generated-configure.sh revision 2579:e5c480ca7b29
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_FULL_DOCS
922ENABLE_HEADLESS_ONLY
923DEFAULT_MAKE_TARGET
924OS_VERSION_MICRO
925OS_VERSION_MINOR
926OS_VERSION_MAJOR
927PKG_CONFIG
928BASH_ARGS
929SETFILE
930CODESIGN
931XATTR
932DSYMUTIL
933IS_GNU_TIME
934PATCH
935DTRACE
936TIME
937STAT
938HG
939DOT
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LEGACY_LIB
985OPENJDK_BUILD_CPU_LEGACY
986HOTSPOT_TARGET_CPU_DEFINE
987HOTSPOT_TARGET_CPU_ARCH
988HOTSPOT_TARGET_CPU
989HOTSPOT_TARGET_OS_TYPE
990HOTSPOT_TARGET_OS
991DEFINE_CROSS_COMPILE_ARCH
992OPENJDK_TARGET_BUNDLE_PLATFORM
993OPENJDK_TARGET_OS_EXPORT_DIR
994OPENJDK_TARGET_CPU_OSARCH
995OPENJDK_TARGET_CPU_ISADIR
996OPENJDK_TARGET_CPU_LEGACY_LIB
997OPENJDK_TARGET_CPU_LEGACY
998REQUIRED_OS_VERSION
999REQUIRED_OS_ARCH
1000REQUIRED_OS_NAME
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_abi_profile
1183enable_warnings_as_errors
1184with_native_debug_symbols
1185enable_debug_symbols
1186enable_zip_debug_info
1187enable_native_coverage
1188enable_dtrace
1189enable_aot
1190enable_hotspot_gtest
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208enable_libffi_bundling
1209with_libjpeg
1210with_giflib
1211with_libpng
1212with_zlib
1213with_lcms
1214with_dxsdk
1215with_dxsdk_lib
1216with_dxsdk_include
1217with_libelf
1218with_libelf_include
1219with_libelf_lib
1220with_jvm_features
1221with_jvm_interpreter
1222enable_jtreg_failure_handler
1223enable_generate_classlist
1224with_num_cores
1225with_memory_size
1226with_jobs
1227with_test_jobs
1228with_boot_jdk_jvmargs
1229with_sjavac_server_java
1230enable_sjavac
1231enable_javac_server
1232enable_icecc
1233enable_precompiled_headers
1234enable_ccache
1235with_ccache_dir
1236'
1237      ac_precious_vars='build_alias
1238host_alias
1239target_alias
1240BASENAME
1241BASH
1242CAT
1243CHMOD
1244CMP
1245COMM
1246CP
1247CUT
1248DATE
1249DIFF
1250DIRNAME
1251ECHO
1252EXPR
1253FILE
1254FIND
1255HEAD
1256GUNZIP
1257GZIP
1258LN
1259LS
1260MKDIR
1261MKTEMP
1262MV
1263NAWK
1264PRINTF
1265RM
1266RMDIR
1267SH
1268SORT
1269TAIL
1270TAR
1271TEE
1272TOUCH
1273TR
1274UNAME
1275UNIQ
1276WC
1277WHICH
1278XARGS
1279AWK
1280GREP
1281EGREP
1282FGREP
1283SED
1284CYGPATH
1285READLINK
1286DF
1287CPIO
1288NICE
1289PANDOC
1290MAKE
1291UNZIP
1292ZIPEXE
1293LDD
1294OTOOL
1295READELF
1296DOT
1297HG
1298STAT
1299TIME
1300DTRACE
1301PATCH
1302DSYMUTIL
1303XATTR
1304CODESIGN
1305SETFILE
1306PKG_CONFIG
1307JAVA
1308JAVAC
1309JAVAH
1310JAR
1311JARSIGNER
1312CC
1313CFLAGS
1314LDFLAGS
1315LIBS
1316CPPFLAGS
1317CXX
1318CXXFLAGS
1319CCC
1320CPP
1321CXXCPP
1322AS
1323AR
1324LIPO
1325STRIP
1326NM
1327GNM
1328OBJCOPY
1329OBJDUMP
1330BUILD_CC
1331BUILD_CXX
1332BUILD_NM
1333BUILD_AR
1334BUILD_OBJCOPY
1335BUILD_STRIP
1336JTREGEXE
1337XMKMF
1338FREETYPE_CFLAGS
1339FREETYPE_LIBS
1340ALSA_CFLAGS
1341ALSA_LIBS
1342LIBFFI_CFLAGS
1343LIBFFI_LIBS
1344PNG_CFLAGS
1345PNG_LIBS
1346LCMS_CFLAGS
1347LCMS_LIBS
1348ELF_CFLAGS
1349ELF_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-full-docs      build complete documentation [disabled]
1978  --disable-unlimited-crypto
1979                          Disable unlimited crypto policy [enabled]
1980  --disable-keep-packaged-modules
1981                          Do not keep packaged modules in jdk image [enable]
1982  --enable-static-build   enable static library build [disabled]
1983  --disable-warnings-as-errors
1984                          do not consider native warnings to be an error
1985                          [enabled]
1986  --enable-debug-symbols  Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-zip-debug-info Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-native-coverage
1991                          enable native compilation with code coverage
1992                          data[disabled]
1993  --enable-dtrace[=yes/no/auto]
1994                          enable dtrace. Default is auto, where dtrace is
1995                          enabled if all dependencies are present.
1996  --enable-aot[=yes/no/auto]
1997                          enable ahead of time compilation feature. Default is
1998                          auto, where aot is enabled if all dependencies are
1999                          present.
2000  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2001  --disable-freetype-bundling
2002                          disable bundling of the freetype library with the
2003                          build result [enabled on Windows or when using
2004                          --with-freetype, disabled otherwise]
2005  --enable-libffi-bundling
2006                          enable bundling of libffi.so to make the built JDK
2007                          runnable on more systems
2008  --enable-jtreg-failure-handler
2009                          forces build of the jtreg failure handler to be
2010                          enabled, missing dependencies become fatal errors.
2011                          Default is auto, where the failure handler is built
2012                          if all dependencies are present and otherwise just
2013                          disabled.
2014  --disable-generate-classlist
2015                          forces enabling or disabling of the generation of a
2016                          CDS classlist at build time. Default is to generate
2017                          it when either the server or client JVMs are built.
2018  --enable-sjavac         use sjavac to do fast incremental compiles
2019                          [disabled]
2020  --disable-javac-server  disable javac server [enabled]
2021  --enable-icecc          enable distribted compilation of native code using
2022                          icecc/icecream [disabled]
2023  --disable-precompiled-headers
2024                          disable using precompiled headers when compiling C++
2025                          [enabled]
2026  --enable-ccache         enable using ccache to speed up recompilations
2027                          [disabled]
2028
2029Optional Packages:
2030  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2031  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2032  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2033                          support it), e.g. --with-target-bits=32 [guessed]
2034  --with-custom-make-dir  Deprecated. Option is kept for backwards
2035                          compatibility and is ignored
2036  --with-jdk-variant      JDK variant to build (normal) [normal]
2037  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2038                          optimized) [release]
2039  --with-jvm-variants     JVM variants (separated by commas) to build
2040                          (server,client,minimal,core,zero,zeroshark,custom)
2041                          [server]
2042  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2043                          (arm64,aarch64) [aarch64]
2044  --with-devkit           use this devkit for compilers, tools and resources
2045  --with-sys-root         alias for --with-sysroot for backwards compatability
2046  --with-sysroot          use this directory as sysroot
2047  --with-tools-dir        alias for --with-toolchain-path for backwards
2048                          compatibility
2049  --with-toolchain-path   prepend these directories when searching for
2050                          toolchain binaries (compilers etc)
2051  --with-extra-path       prepend these directories to the default path
2052  --with-sdk-name         use the platform SDK of the given name. [macosx]
2053  --with-conf-name        use this as the name of the configuration [generated
2054                          from important configuration options]
2055  --with-output-sync      set make output sync type if supported by make.
2056                          [recurse]
2057  --with-default-make-target
2058                          set the default make target [exploded-image]
2059  --with-cacerts-file     specify alternative cacerts file
2060  --with-copyright-year   Set copyright year value for build [current year]
2061  --with-milestone        Deprecated. Option is kept for backwards
2062                          compatibility and is ignored
2063  --with-update-version   Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-user-release-suffix
2066                          Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-build-number     Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-version-string   Set version string [calculated]
2071  --with-version-pre      Set the base part of the version 'PRE' field
2072                          (pre-release identifier) ['internal']
2073  --with-version-opt      Set version 'OPT' field (build metadata)
2074                          [<timestamp>.<user>.<dirname>]
2075  --with-version-build    Set version 'BUILD' field (build number) [not
2076                          specified]
2077  --with-version-major    Set version 'MAJOR' field (first number) [current
2078                          source value]
2079  --with-version-minor    Set version 'MINOR' field (second number) [current
2080                          source value]
2081  --with-version-security Set version 'SECURITY' field (third number) [current
2082                          source value]
2083  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2084                          specified]
2085  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2086  --with-build-jdk        path to JDK of same version as is being built[the
2087                          newly built JDK]
2088  --with-add-source-root  Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-source-root
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-adds-and-overrides
2094                          Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-langtools
2097                          Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-corba   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jaxp    Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxws   Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-hotspot Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-nashorn Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-jdk     Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-import_hotspot   Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import-modules   import a set of prebuilt modules either as a zip
2114                          file or an exploded directory
2115  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2116                          to show possible values [platform dependent]
2117  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2118  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2119  --with-extra-ldflags    extra flags to be used when linking jdk
2120  --with-toolchain-version
2121                          the version of the toolchain to look for, use
2122                          '--help' to show possible values [platform
2123                          dependent]
2124  --with-build-devkit     Devkit to use for the build platform toolchain
2125  --with-jtreg            Regression Test Harness [probed]
2126  --with-abi-profile      specify ABI profile for ARM builds
2127                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2128                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2129                          [toolchain dependent]
2130  --with-native-debug-symbols
2131                          set the native debug symbol configuration (none,
2132                          internal, external, zipped) [varying]
2133  --with-stdc++lib=<static>,<dynamic>,<default>
2134                          force linking of the C++ runtime on Linux to either
2135                          static or dynamic, default is static with dynamic as
2136                          fallback
2137  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2138                          (Windows only) [probed]
2139  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2140                          (Windows only) [probed]
2141  --with-x                use the X Window System
2142  --with-cups             specify prefix directory for the cups package
2143                          (expecting the headers under PATH/include)
2144  --with-cups-include     specify directory for the cups include files
2145  --with-freetype         specify prefix directory for the freetype package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-freetype-include specify directory for the freetype include files
2149  --with-freetype-lib     specify directory for the freetype library
2150  --with-freetype-src     specify directory with freetype sources to
2151                          automatically build the library (experimental,
2152                          Windows-only)
2153  --with-alsa             specify prefix directory for the alsa package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-alsa-include     specify directory for the alsa include files
2157  --with-alsa-lib         specify directory for the alsa library
2158  --with-libffi           specify prefix directory for the libffi package
2159                          (expecting the libraries under PATH/lib and the
2160                          headers under PATH/include)
2161  --with-libffi-include   specify directory for the libffi include files
2162  --with-libffi-lib       specify directory for the libffi library
2163  --with-libjpeg          use libjpeg from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-giflib           use giflib from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-libpng           use libpng from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-zlib             use zlib from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-lcms             use lcms2 from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-dxsdk            Deprecated. Option is kept for backwards
2174                          compatibility and is ignored
2175  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-include    Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-libelf           specify prefix directory for the libelf package
2180                          (expecting the libraries under PATH/lib and the
2181                          headers under PATH/include)
2182  --with-libelf-include   specify directory for the libelf include files
2183  --with-libelf-lib       specify directory for the libelf library
2184  --with-jvm-features     additional JVM features to enable (separated by
2185                          comma), use '--help' to show possible values [none]
2186  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2187                          compatibility and is ignored
2188  --with-num-cores        number of cores in the build system, e.g.
2189                          --with-num-cores=8 [probed]
2190  --with-memory-size      memory (in MB) available in the build system, e.g.
2191                          --with-memory-size=1024 [probed]
2192  --with-jobs             number of parallel jobs to let make run [calculated
2193                          based on cores and memory]
2194  --with-test-jobs        number of parallel tests jobs to run [based on build
2195                          jobs]
2196  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2197                          invocations of boot JDK, overriding the default
2198                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2199                          -enableassertions"
2200  --with-sjavac-server-java
2201                          use this java binary for running the sjavac
2202                          background server [Boot JDK java]
2203  --with-ccache-dir       where to store ccache files [~/.ccache]
2204
2205Some influential environment variables:
2206  BASENAME    Override default value for BASENAME
2207  BASH        Override default value for BASH
2208  CAT         Override default value for CAT
2209  CHMOD       Override default value for CHMOD
2210  CMP         Override default value for CMP
2211  COMM        Override default value for COMM
2212  CP          Override default value for CP
2213  CUT         Override default value for CUT
2214  DATE        Override default value for DATE
2215  DIFF        Override default value for DIFF
2216  DIRNAME     Override default value for DIRNAME
2217  ECHO        Override default value for ECHO
2218  EXPR        Override default value for EXPR
2219  FILE        Override default value for FILE
2220  FIND        Override default value for FIND
2221  HEAD        Override default value for HEAD
2222  GUNZIP      Override default value for GUNZIP
2223  GZIP        Override default value for GZIP
2224  LN          Override default value for LN
2225  LS          Override default value for LS
2226  MKDIR       Override default value for MKDIR
2227  MKTEMP      Override default value for MKTEMP
2228  MV          Override default value for MV
2229  NAWK        Override default value for NAWK
2230  PRINTF      Override default value for PRINTF
2231  RM          Override default value for RM
2232  RMDIR       Override default value for RMDIR
2233  SH          Override default value for SH
2234  SORT        Override default value for SORT
2235  TAIL        Override default value for TAIL
2236  TAR         Override default value for TAR
2237  TEE         Override default value for TEE
2238  TOUCH       Override default value for TOUCH
2239  TR          Override default value for TR
2240  UNAME       Override default value for UNAME
2241  UNIQ        Override default value for UNIQ
2242  WC          Override default value for WC
2243  WHICH       Override default value for WHICH
2244  XARGS       Override default value for XARGS
2245  AWK         Override default value for AWK
2246  GREP        Override default value for GREP
2247  EGREP       Override default value for EGREP
2248  FGREP       Override default value for FGREP
2249  SED         Override default value for SED
2250  CYGPATH     Override default value for CYGPATH
2251  READLINK    Override default value for READLINK
2252  DF          Override default value for DF
2253  CPIO        Override default value for CPIO
2254  NICE        Override default value for NICE
2255  PANDOC      Override default value for PANDOC
2256  MAKE        Override default value for MAKE
2257  UNZIP       Override default value for UNZIP
2258  ZIPEXE      Override default value for ZIPEXE
2259  LDD         Override default value for LDD
2260  OTOOL       Override default value for OTOOL
2261  READELF     Override default value for READELF
2262  DOT         Override default value for DOT
2263  HG          Override default value for HG
2264  STAT        Override default value for STAT
2265  TIME        Override default value for TIME
2266  DTRACE      Override default value for DTRACE
2267  PATCH       Override default value for PATCH
2268  DSYMUTIL    Override default value for DSYMUTIL
2269  XATTR       Override default value for XATTR
2270  CODESIGN    Override default value for CODESIGN
2271  SETFILE     Override default value for SETFILE
2272  PKG_CONFIG  path to pkg-config utility
2273  JAVA        Override default value for JAVA
2274  JAVAC       Override default value for JAVAC
2275  JAVAH       Override default value for JAVAH
2276  JAR         Override default value for JAR
2277  JARSIGNER   Override default value for JARSIGNER
2278  CC          C compiler command
2279  CFLAGS      C compiler flags
2280  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2281              nonstandard directory <lib dir>
2282  LIBS        libraries to pass to the linker, e.g. -l<library>
2283  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284              you have headers in a nonstandard directory <include dir>
2285  CXX         C++ compiler command
2286  CXXFLAGS    C++ compiler flags
2287  CPP         C preprocessor
2288  CXXCPP      C++ preprocessor
2289  AS          Override default value for AS
2290  AR          Override default value for AR
2291  LIPO        Override default value for LIPO
2292  STRIP       Override default value for STRIP
2293  NM          Override default value for NM
2294  GNM         Override default value for GNM
2295  OBJCOPY     Override default value for OBJCOPY
2296  OBJDUMP     Override default value for OBJDUMP
2297  BUILD_CC    Override default value for BUILD_CC
2298  BUILD_CXX   Override default value for BUILD_CXX
2299  BUILD_NM    Override default value for BUILD_NM
2300  BUILD_AR    Override default value for BUILD_AR
2301  BUILD_OBJCOPY
2302              Override default value for BUILD_OBJCOPY
2303  BUILD_STRIP Override default value for BUILD_STRIP
2304  JTREGEXE    Override default value for JTREGEXE
2305  XMKMF       Path to xmkmf, Makefile generator for X Window System
2306  FREETYPE_CFLAGS
2307              C compiler flags for FREETYPE, overriding pkg-config
2308  FREETYPE_LIBS
2309              linker flags for FREETYPE, overriding pkg-config
2310  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2311  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2312  LIBFFI_CFLAGS
2313              C compiler flags for LIBFFI, overriding pkg-config
2314  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2315  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2316  PNG_LIBS    linker flags for PNG, overriding pkg-config
2317  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2318  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2319  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2320  ELF_LIBS    linker flags for ELF, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  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
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# Check if build directory is on local disk. If not possible to determine,
3737# we prefer to claim it's local.
3738# Argument 1: directory to test
3739# Argument 2: what to do if it is on local disk
3740# Argument 3: what to do otherwise (remote disk or failure)
3741
3742
3743# Check that source files have basic read permissions set. This might
3744# not be the case in cygwin in certain conditions.
3745
3746
3747
3748
3749# Check for support for specific options in bash
3750
3751
3752################################################################################
3753#
3754# Default make target
3755#
3756
3757
3758# Code to run after AC_OUTPUT
3759
3760
3761#
3762# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Helper function which possibly converts a path using DOS-style short mode.
3791# If so, the updated path is stored in $new_path.
3792# $1: The path to check
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3801# and could probably be heavily simplified. However, all changes in this
3802# area tend to need lot of testing in different scenarios, and in lack of
3803# proper unit testing, cleaning this up has not been deemed worth the effort
3804# at the moment.
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3815
3816
3817
3818
3819# ... then the rest
3820#
3821# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845########################################################################
3846# This file handles detection of the Boot JDK. The Boot JDK detection
3847# process has been developed as a response to solve a complex real-world
3848# problem. Initially, it was simple, but it has grown as platform after
3849# platform, idiosyncracy after idiosyncracy has been supported.
3850#
3851# The basic idea is this:
3852# 1) You need an acceptable *) JDK to use as a Boot JDK
3853# 2) There are several ways to locate a JDK, that are mostly platform
3854#    dependent **)
3855# 3) You can have multiple JDKs installed
3856# 4) If possible, configure should try to dig out an acceptable JDK
3857#    automatically, without having to resort to command-line options
3858#
3859# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3860#     javac) and not a JRE, etc.
3861#
3862# **) On Windows we typically use a well-known path.
3863#     On MacOSX we typically use the tool java_home.
3864#     On Linux we typically find javac in the $PATH, and then follow a
3865#     chain of symlinks that often ends up in a real JDK.
3866#
3867# This leads to the code where we check in different ways to locate a
3868# JDK, and if one is found, check if it is acceptable. If not, we print
3869# our reasons for rejecting it (useful when debugging non-working
3870# configure situations) and continue checking the next one.
3871########################################################################
3872
3873# Execute the check given as argument, and verify the result
3874# If the Boot JDK was previously found, do nothing
3875# $1 A command line (typically autoconf macro) to execute
3876
3877
3878# Test: Is bootjdk explicitly set by command line arguments?
3879
3880
3881# Test: Is $JAVA_HOME set?
3882
3883
3884# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3885
3886
3887# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3888# $1: Argument to the java_home binary (optional)
3889
3890
3891# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3892
3893
3894# Look for a jdk in the given path. If there are multiple, try to select the newest.
3895# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3896# $1 = Path to directory containing jdk installations.
3897# $2 = String to append to the found JDK directory to get the proper JDK home
3898
3899
3900# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3901# environmental variable as base for where to look.
3902# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3903
3904
3905# Test: Is there a JDK installed in default, well-known locations?
3906
3907
3908# Check that a command-line tool in the Boot JDK is correct
3909# $1 = name of variable to assign
3910# $2 = name of binary
3911
3912
3913###############################################################################
3914#
3915# We need a Boot JDK to bootstrap the build.
3916#
3917
3918
3919
3920
3921
3922# BUILD_JDK: the location of the latest JDK that can run
3923#   on the host system and supports the target class file version
3924#   generated in this JDK build.  This variable should only be
3925#   used after the launchers are built.
3926#
3927
3928# Execute the check given as argument, and verify the result.
3929# If the JDK was previously found, do nothing.
3930# $1 A command line (typically autoconf macro) to execute
3931
3932
3933# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3934# is different than the host system doing the build (e.g. cross-compilation),
3935# a special BUILD_JDK is built as part of the build process.  An external
3936# prebuilt BUILD_JDK can also be supplied.
3937
3938
3939#
3940# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Runs icecc-create-env once and prints the error if it fails
3983#
3984# $1: arguments to icecc-create-env
3985# $2: log file
3986#
3987
3988
3989################################################################################
3990#
3991# Optionally enable distributed compilation of native code using icecc/icecream
3992#
3993
3994
3995
3996
3997
3998
3999
4000#
4001# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4003#
4004# This code is free software; you can redistribute it and/or modify it
4005# under the terms of the GNU General Public License version 2 only, as
4006# published by the Free Software Foundation.  Oracle designates this
4007# particular file as subject to the "Classpath" exception as provided
4008# by Oracle in the LICENSE file that accompanied this code.
4009#
4010# This code is distributed in the hope that it will be useful, but WITHOUT
4011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4013# version 2 for more details (a copy is included in the LICENSE file that
4014# accompanied this code).
4015#
4016# You should have received a copy of the GNU General Public License version
4017# 2 along with this work; if not, write to the Free Software Foundation,
4018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4019#
4020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021# or visit www.oracle.com if you need additional information or have any
4022# questions.
4023#
4024
4025################################################################################
4026#
4027# Setup ABI profile (for arm)
4028#
4029
4030
4031# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4032# corresponding configure arguments instead
4033
4034
4035# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4036# that configure can use them while detecting compilers.
4037# TOOLCHAIN_TYPE is available here.
4038# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4039
4040
4041
4042
4043
4044
4045# Documentation on common flags used for solstudio in HIGHEST.
4046#
4047# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4048#          done with care, there are some assumptions below that need to
4049#          be understood about the use of pointers, and IEEE behavior.
4050#
4051# -fns: Use non-standard floating point mode (not IEEE 754)
4052# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4053# -fsingle: Use single precision floating point with 'float'
4054# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4055#   (Source with excessing pointer casting and data access with mixed
4056#    pointer types are not recommended)
4057# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4058#   (If you expect perfect errno behavior, do not use this)
4059# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4060# -xrestrict: Pointer parameters to functions do not overlap
4061#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4062#    If you pass in multiple pointers to the same data, do not use this)
4063# -xlibmil: Inline some library routines
4064#   (If you expect perfect errno behavior, do not use this)
4065# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4066#   (If you expect perfect errno behavior, do not use this)
4067#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4068
4069    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4070    # Bug?
4071    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4072    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4073    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4074    #fi
4075
4076
4077
4078
4079
4080
4081################################################################################
4082# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4083#      conditionals against.
4084# $2 - Optional prefix for each variable defined.
4085
4086
4087# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088#                                  IF_FALSE: [RUN-IF-FALSE])
4089# ------------------------------------------------------------
4090# Check that the C compiler supports an argument
4091
4092
4093
4094
4095# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096#                                    IF_FALSE: [RUN-IF-FALSE])
4097# ------------------------------------------------------------
4098# Check that the C++ compiler supports an argument
4099
4100
4101
4102
4103# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4104#                                IF_FALSE: [RUN-IF-FALSE])
4105# ------------------------------------------------------------
4106# Check that the C and C++ compilers support an argument
4107
4108
4109
4110
4111# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4112#                                   IF_FALSE: [RUN-IF-FALSE])
4113# ------------------------------------------------------------
4114# Check that the linker support an argument
4115
4116
4117
4118
4119
4120
4121# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4122# Arguments:
4123# $1 - Optional prefix for each variable defined.
4124
4125
4126#
4127# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151
4152
4153
4154
4155cygwin_help() {
4156  case $1 in
4157    unzip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    zip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    make)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    freetype)
4170      HELP_MSG="
4171The freetype library can now be build during the configure process.
4172Download the freetype sources and unpack them into an arbitrary directory:
4173
4174wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4175tar -xzf freetype-2.5.3.tar.gz
4176
4177Then run configure with '--with-freetype-src=<freetype_src>'. This will
4178automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4179builds or into '<freetype_src>/lib32' for 32-bit builds.
4180Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4181and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4182
4183Alternatively you can unpack the sources like this to use the default directory:
4184
4185tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4186      ;;
4187  esac
4188}
4189
4190msys_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194apt_help() {
4195  case $1 in
4196    reduced)
4197      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4198    devkit)
4199      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4200    openjdk)
4201      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4202    alsa)
4203      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4204    cups)
4205      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4206    freetype)
4207      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4208    ffi)
4209      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4210    x11)
4211      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4212    ccache)
4213      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4214    dtrace)
4215      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4216    elf)
4217      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4218  esac
4219}
4220
4221yum_help() {
4222  case $1 in
4223    devkit)
4224      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4225    openjdk)
4226      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4227    alsa)
4228      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4229    cups)
4230      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4231    freetype)
4232      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4233    x11)
4234      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4235    ccache)
4236      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4237    elf)
4238      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4239  esac
4240}
4241
4242brew_help() {
4243  case $1 in
4244    openjdk)
4245      PKGHANDLER_COMMAND="brew cask install java" ;;
4246    freetype)
4247      PKGHANDLER_COMMAND="brew install freetype" ;;
4248    ccache)
4249      PKGHANDLER_COMMAND="brew install ccache" ;;
4250  esac
4251}
4252
4253port_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgutil_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261pkgadd_help() {
4262  PKGHANDLER_COMMAND=""
4263}
4264
4265# This function will check if we're called from the "configure" wrapper while
4266# printing --help. If so, we will print out additional information that can
4267# only be extracted within the autoconf script, and then exit. This must be
4268# called at the very beginning in configure.ac.
4269
4270
4271
4272
4273
4274
4275#
4276# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4277# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4278#
4279# This code is free software; you can redistribute it and/or modify it
4280# under the terms of the GNU General Public License version 2 only, as
4281# published by the Free Software Foundation.  Oracle designates this
4282# particular file as subject to the "Classpath" exception as provided
4283# by Oracle in the LICENSE file that accompanied this code.
4284#
4285# This code is distributed in the hope that it will be useful, but WITHOUT
4286# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4287# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4288# version 2 for more details (a copy is included in the LICENSE file that
4289# accompanied this code).
4290#
4291# You should have received a copy of the GNU General Public License version
4292# 2 along with this work; if not, write to the Free Software Foundation,
4293# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4294#
4295# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4296# or visit www.oracle.com if you need additional information or have any
4297# questions.
4298#
4299
4300# All valid JVM features, regardless of platform
4301VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4302    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4303    static-build link-time-opt aot"
4304
4305# All valid JVM variants
4306VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4307
4308###############################################################################
4309# Check if the specified JVM variant should be built. To be used in shell if
4310# constructs, like this:
4311# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4312#
4313# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4314
4315# Definition kept in one line to allow inlining in if statements.
4316# Additional [] needed to keep m4 from mangling shell constructs.
4317
4318
4319###############################################################################
4320# Check if the specified JVM features are explicitly enabled. To be used in
4321# shell if constructs, like this:
4322# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4323#
4324# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4325
4326# Definition kept in one line to allow inlining in if statements.
4327# Additional [] needed to keep m4 from mangling shell constructs.
4328
4329
4330###############################################################################
4331# Check which variants of the JVM that we want to build. Available variants are:
4332#   server: normal interpreter, and a tiered C1/C2 compiler
4333#   client: normal interpreter, and C1 (no C2 compiler)
4334#   minimal: reduced form of client with optional features stripped out
4335#   core: normal interpreter only, no compiler
4336#   zero: C++ based interpreter only, no compiler
4337#   zeroshark: C++ based interpreter, and a llvm-based compiler
4338#   custom: baseline JVM with no default features
4339#
4340
4341
4342###############################################################################
4343# Check if dtrace should be enabled and has all prerequisites present.
4344#
4345
4346
4347################################################################################
4348# Check if AOT should be enabled
4349#
4350
4351
4352###############################################################################
4353# Set up all JVM features for each JVM variant.
4354#
4355
4356
4357###############################################################################
4358# Validate JVM features once all setup is complete, including custom setup.
4359#
4360
4361
4362################################################################################
4363#
4364# Specify which sources will be used to build the 64-bit ARM port
4365#
4366# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4367# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4368#
4369
4370
4371
4372################################################################################
4373# Check if gtest should be built
4374#
4375
4376
4377#
4378# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4379# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4380#
4381# This code is free software; you can redistribute it and/or modify it
4382# under the terms of the GNU General Public License version 2 only, as
4383# published by the Free Software Foundation.  Oracle designates this
4384# particular file as subject to the "Classpath" exception as provided
4385# by Oracle in the LICENSE file that accompanied this code.
4386#
4387# This code is distributed in the hope that it will be useful, but WITHOUT
4388# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4389# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4390# version 2 for more details (a copy is included in the LICENSE file that
4391# accompanied this code).
4392#
4393# You should have received a copy of the GNU General Public License version
4394# 2 along with this work; if not, write to the Free Software Foundation,
4395# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4396#
4397# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4398# or visit www.oracle.com if you need additional information or have any
4399# questions.
4400#
4401
4402###############################################################################
4403# Check which variant of the JDK that we want to build.
4404# Currently we have:
4405#    normal:   standard edition
4406# but the custom make system may add other variants
4407#
4408# Effectively the JDK variant gives a name to a specific set of
4409# modules to compile into the JDK.
4410
4411
4412###############################################################################
4413# Set the debug level
4414#    release: no debug information, all optimizations, no asserts.
4415#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4416#    fastdebug: debug information (-g), all optimizations, all asserts
4417#    slowdebug: debug information (-g), no optimizations, all asserts
4418
4419
4420###############################################################################
4421#
4422# Should we build only OpenJDK even if closed sources are present?
4423#
4424
4425
4426
4427
4428###############################################################################
4429#
4430# Enable or disable the elliptic curve crypto implementation
4431#
4432
4433
4434
4435
4436################################################################################
4437#
4438# Gcov coverage data for hotspot
4439#
4440
4441
4442################################################################################
4443#
4444# Static build support.  When enabled will generate static
4445# libraries instead of shared libraries for all JDK libs.
4446#
4447
4448
4449################################################################################
4450#
4451# jlink options.
4452# We always keep packaged modules in JDK image.
4453#
4454
4455
4456################################################################################
4457#
4458# Check if building of the jtreg failure handler should be enabled.
4459#
4460
4461
4462################################################################################
4463#
4464# Enable or disable generation of the classlist at build time
4465#
4466
4467
4468#
4469# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4470# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4471#
4472# This code is free software; you can redistribute it and/or modify it
4473# under the terms of the GNU General Public License version 2 only, as
4474# published by the Free Software Foundation.  Oracle designates this
4475# particular file as subject to the "Classpath" exception as provided
4476# by Oracle in the LICENSE file that accompanied this code.
4477#
4478# This code is distributed in the hope that it will be useful, but WITHOUT
4479# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4480# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4481# version 2 for more details (a copy is included in the LICENSE file that
4482# accompanied this code).
4483#
4484# You should have received a copy of the GNU General Public License version
4485# 2 along with this work; if not, write to the Free Software Foundation,
4486# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4487#
4488# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4489# or visit www.oracle.com if you need additional information or have any
4490# questions.
4491#
4492
4493###############################################################################
4494#
4495# Setup version numbers
4496#
4497
4498# Verify that a given string represents a valid version number, and assign it
4499# to a variable.
4500
4501# Argument 1: the variable to assign to
4502# Argument 2: the value given by the user
4503
4504
4505
4506
4507#
4508# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4510#
4511# This code is free software; you can redistribute it and/or modify it
4512# under the terms of the GNU General Public License version 2 only, as
4513# published by the Free Software Foundation.  Oracle designates this
4514# particular file as subject to the "Classpath" exception as provided
4515# by Oracle in the LICENSE file that accompanied this code.
4516#
4517# This code is distributed in the hope that it will be useful, but WITHOUT
4518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4520# version 2 for more details (a copy is included in the LICENSE file that
4521# accompanied this code).
4522#
4523# You should have received a copy of the GNU General Public License version
4524# 2 along with this work; if not, write to the Free Software Foundation,
4525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4526#
4527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4528# or visit www.oracle.com if you need additional information or have any
4529# questions.
4530#
4531
4532# Major library component reside in separate files.
4533#
4534# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4535# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4536#
4537# This code is free software; you can redistribute it and/or modify it
4538# under the terms of the GNU General Public License version 2 only, as
4539# published by the Free Software Foundation.  Oracle designates this
4540# particular file as subject to the "Classpath" exception as provided
4541# by Oracle in the LICENSE file that accompanied this code.
4542#
4543# This code is distributed in the hope that it will be useful, but WITHOUT
4544# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4545# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4546# version 2 for more details (a copy is included in the LICENSE file that
4547# accompanied this code).
4548#
4549# You should have received a copy of the GNU General Public License version
4550# 2 along with this work; if not, write to the Free Software Foundation,
4551# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4552#
4553# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4554# or visit www.oracle.com if you need additional information or have any
4555# questions.
4556#
4557
4558################################################################################
4559# Setup alsa (Advanced Linux Sound Architecture)
4560################################################################################
4561
4562
4563#
4564# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4565# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566#
4567# This code is free software; you can redistribute it and/or modify it
4568# under the terms of the GNU General Public License version 2 only, as
4569# published by the Free Software Foundation.  Oracle designates this
4570# particular file as subject to the "Classpath" exception as provided
4571# by Oracle in the LICENSE file that accompanied this code.
4572#
4573# This code is distributed in the hope that it will be useful, but WITHOUT
4574# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576# version 2 for more details (a copy is included in the LICENSE file that
4577# accompanied this code).
4578#
4579# You should have received a copy of the GNU General Public License version
4580# 2 along with this work; if not, write to the Free Software Foundation,
4581# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582#
4583# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584# or visit www.oracle.com if you need additional information or have any
4585# questions.
4586#
4587
4588################################################################################
4589# Setup bundled libraries.
4590#
4591# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4592# OpenJDK repository. Default is to use these libraries as bundled, but they
4593# might be replaced by en external version by the user.
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libjpeg
4599################################################################################
4600
4601
4602################################################################################
4603# Setup giflib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup libpng
4609################################################################################
4610
4611
4612################################################################################
4613# Setup zlib
4614################################################################################
4615
4616
4617################################################################################
4618# Setup lcms (Little CMS)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Setup cups (Common Unix Printing System)
4649################################################################################
4650
4651
4652#
4653# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4654# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4655#
4656# This code is free software; you can redistribute it and/or modify it
4657# under the terms of the GNU General Public License version 2 only, as
4658# published by the Free Software Foundation.  Oracle designates this
4659# particular file as subject to the "Classpath" exception as provided
4660# by Oracle in the LICENSE file that accompanied this code.
4661#
4662# This code is distributed in the hope that it will be useful, but WITHOUT
4663# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4664# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4665# version 2 for more details (a copy is included in the LICENSE file that
4666# accompanied this code).
4667#
4668# You should have received a copy of the GNU General Public License version
4669# 2 along with this work; if not, write to the Free Software Foundation,
4670# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4671#
4672# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4673# or visit www.oracle.com if you need additional information or have any
4674# questions.
4675#
4676
4677################################################################################
4678# Setup libffi (Foreign Function Interface)
4679################################################################################
4680
4681
4682#
4683# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685#
4686# This code is free software; you can redistribute it and/or modify it
4687# under the terms of the GNU General Public License version 2 only, as
4688# published by the Free Software Foundation.  Oracle designates this
4689# particular file as subject to the "Classpath" exception as provided
4690# by Oracle in the LICENSE file that accompanied this code.
4691#
4692# This code is distributed in the hope that it will be useful, but WITHOUT
4693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695# version 2 for more details (a copy is included in the LICENSE file that
4696# accompanied this code).
4697#
4698# You should have received a copy of the GNU General Public License version
4699# 2 along with this work; if not, write to the Free Software Foundation,
4700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701#
4702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703# or visit www.oracle.com if you need additional information or have any
4704# questions.
4705#
4706
4707################################################################################
4708# Build the freetype lib from source
4709################################################################################
4710
4711
4712################################################################################
4713# Check if a potential freeype library match is correct and usable
4714################################################################################
4715
4716
4717################################################################################
4718# Setup freetype (The FreeType2 font rendering library)
4719################################################################################
4720
4721
4722#
4723# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4724# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4725#
4726# This code is free software; you can redistribute it and/or modify it
4727# under the terms of the GNU General Public License version 2 only, as
4728# published by the Free Software Foundation.  Oracle designates this
4729# particular file as subject to the "Classpath" exception as provided
4730# by Oracle in the LICENSE file that accompanied this code.
4731#
4732# This code is distributed in the hope that it will be useful, but WITHOUT
4733# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4734# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4735# version 2 for more details (a copy is included in the LICENSE file that
4736# accompanied this code).
4737#
4738# You should have received a copy of the GNU General Public License version
4739# 2 along with this work; if not, write to the Free Software Foundation,
4740# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4741#
4742# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4743# or visit www.oracle.com if you need additional information or have any
4744# questions.
4745#
4746
4747################################################################################
4748# Setup the standard C/C++ runtime libraries.
4749#
4750# Most importantly, determine if stdc++ should be linked statically or
4751# dynamically.
4752################################################################################
4753
4754
4755#
4756# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4757# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4758#
4759# This code is free software; you can redistribute it and/or modify it
4760# under the terms of the GNU General Public License version 2 only, as
4761# published by the Free Software Foundation.  Oracle designates this
4762# particular file as subject to the "Classpath" exception as provided
4763# by Oracle in the LICENSE file that accompanied this code.
4764#
4765# This code is distributed in the hope that it will be useful, but WITHOUT
4766# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4767# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4768# version 2 for more details (a copy is included in the LICENSE file that
4769# accompanied this code).
4770#
4771# You should have received a copy of the GNU General Public License version
4772# 2 along with this work; if not, write to the Free Software Foundation,
4773# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4774#
4775# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4776# or visit www.oracle.com if you need additional information or have any
4777# questions.
4778#
4779
4780################################################################################
4781# Setup X11 Windows system
4782################################################################################
4783
4784
4785#
4786# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4787# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4788#
4789# This code is free software; you can redistribute it and/or modify it
4790# under the terms of the GNU General Public License version 2 only, as
4791# published by the Free Software Foundation.  Oracle designates this
4792# particular file as subject to the "Classpath" exception as provided
4793# by Oracle in the LICENSE file that accompanied this code.
4794#
4795# This code is distributed in the hope that it will be useful, but WITHOUT
4796# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4797# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4798# version 2 for more details (a copy is included in the LICENSE file that
4799# accompanied this code).
4800#
4801# You should have received a copy of the GNU General Public License version
4802# 2 along with this work; if not, write to the Free Software Foundation,
4803# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4804#
4805# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4806# or visit www.oracle.com if you need additional information or have any
4807# questions.
4808#
4809
4810################################################################################
4811# Setup libelf (ELF library)
4812################################################################################
4813
4814
4815
4816################################################################################
4817# Determine which libraries are needed for this configuration
4818################################################################################
4819
4820
4821################################################################################
4822# Parse library options, and setup needed libraries
4823################################################################################
4824
4825
4826################################################################################
4827# Setup llvm (Low-Level VM)
4828################################################################################
4829
4830
4831################################################################################
4832# Setup various libraries, typically small system libraries
4833################################################################################
4834
4835
4836################################################################################
4837# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4838# redistribute it in the test image.
4839################################################################################
4840
4841
4842
4843#
4844# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4845# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4846#
4847# This code is free software; you can redistribute it and/or modify it
4848# under the terms of the GNU General Public License version 2 only, as
4849# published by the Free Software Foundation.  Oracle designates this
4850# particular file as subject to the "Classpath" exception as provided
4851# by Oracle in the LICENSE file that accompanied this code.
4852#
4853# This code is distributed in the hope that it will be useful, but WITHOUT
4854# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4855# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4856# version 2 for more details (a copy is included in the LICENSE file that
4857# accompanied this code).
4858#
4859# You should have received a copy of the GNU General Public License version
4860# 2 along with this work; if not, write to the Free Software Foundation,
4861# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4862#
4863# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4864# or visit www.oracle.com if you need additional information or have any
4865# questions.
4866#
4867
4868# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4869# Converts autoconf style CPU name to OpenJDK style, into
4870# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4871
4872
4873# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4874# Converts autoconf style OS name to OpenJDK style, into
4875# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4876
4877
4878# Expects $host_os $host_cpu $build_os and $build_cpu
4879# and $with_target_bits to have been setup!
4880#
4881# Translate the standard triplet(quadruplet) definition
4882# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4883# OPENJDK_BUILD_OS, etc.
4884
4885
4886# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4887# accordingly. Must be done after setting up build and target system, but before
4888# doing anything else with these values.
4889
4890
4891# Setup the legacy variables, for controlling the old makefiles.
4892#
4893
4894
4895# $1 - Either TARGET or BUILD to setup the variables for.
4896
4897
4898
4899
4900#%%% Build and target systems %%%
4901
4902
4903
4904
4905# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4906# Add -mX to various FLAGS variables.
4907
4908
4909
4910
4911
4912
4913#
4914# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4915# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4916#
4917# This code is free software; you can redistribute it and/or modify it
4918# under the terms of the GNU General Public License version 2 only, as
4919# published by the Free Software Foundation.  Oracle designates this
4920# particular file as subject to the "Classpath" exception as provided
4921# by Oracle in the LICENSE file that accompanied this code.
4922#
4923# This code is distributed in the hope that it will be useful, but WITHOUT
4924# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4925# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4926# version 2 for more details (a copy is included in the LICENSE file that
4927# accompanied this code).
4928#
4929# You should have received a copy of the GNU General Public License version
4930# 2 along with this work; if not, write to the Free Software Foundation,
4931# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4932#
4933# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4934# or visit www.oracle.com if you need additional information or have any
4935# questions.
4936#
4937
4938
4939
4940
4941
4942
4943
4944################################################################################
4945# Define a mechanism for importing extra prebuilt modules
4946#
4947
4948
4949
4950#
4951# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4952# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4953#
4954# This code is free software; you can redistribute it and/or modify it
4955# under the terms of the GNU General Public License version 2 only, as
4956# published by the Free Software Foundation.  Oracle designates this
4957# particular file as subject to the "Classpath" exception as provided
4958# by Oracle in the LICENSE file that accompanied this code.
4959#
4960# This code is distributed in the hope that it will be useful, but WITHOUT
4961# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4962# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4963# version 2 for more details (a copy is included in the LICENSE file that
4964# accompanied this code).
4965#
4966# You should have received a copy of the GNU General Public License version
4967# 2 along with this work; if not, write to the Free Software Foundation,
4968# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4969#
4970# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4971# or visit www.oracle.com if you need additional information or have any
4972# questions.
4973#
4974
4975########################################################################
4976# This file is responsible for detecting, verifying and setting up the
4977# toolchain, i.e. the compiler, linker and related utilities. It will setup
4978# proper paths to the binaries, but it will not setup any flags.
4979#
4980# The binaries used is determined by the toolchain type, which is the family of
4981# compilers and related tools that are used.
4982########################################################################
4983
4984
4985# All valid toolchains, regardless of platform (used by help.m4)
4986VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4987
4988# These toolchains are valid on different platforms
4989VALID_TOOLCHAINS_linux="gcc clang"
4990VALID_TOOLCHAINS_solaris="solstudio"
4991VALID_TOOLCHAINS_macosx="gcc clang"
4992VALID_TOOLCHAINS_aix="xlc"
4993VALID_TOOLCHAINS_windows="microsoft"
4994
4995# Toolchain descriptions
4996TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4997TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4998TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4999TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5000TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5001
5002# Minimum supported versions, empty means unspecified
5003TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5004TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5005TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5006TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5007TOOLCHAIN_MINIMUM_VERSION_xlc=""
5008
5009# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5010# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5011# $1 - optional variable prefix for compiler and version variables (BUILD_)
5012# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5013
5014
5015# Check if the configured compiler (C and C++) is of a specific version or
5016# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5017#
5018# Arguments:
5019#   VERSION:   The version string to check against the found version
5020#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5021#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5022#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5023
5024
5025
5026
5027# Setup a number of variables describing how native output files are
5028# named on this platform/toolchain.
5029
5030
5031# Determine which toolchain type to use, and make sure it is valid for this
5032# platform. Setup various information about the selected toolchain.
5033
5034
5035# Before we start detecting the toolchain executables, we might need some
5036# special setup, e.g. additional paths etc.
5037
5038
5039# Restore path, etc
5040
5041
5042# Check if a compiler is of the toolchain type we expect, and save the version
5043# information from it. If the compiler does not match the expected type,
5044# this function will abort using AC_MSG_ERROR. If it matches, the version will
5045# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5046# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5047#
5048# $1 = compiler to test (CC or CXX)
5049# $2 = human readable name of compiler (C or C++)
5050
5051
5052# Try to locate the given C or C++ compiler in the path, or otherwise.
5053#
5054# $1 = compiler to test (CC or CXX)
5055# $2 = human readable name of compiler (C or C++)
5056# $3 = compiler name to search for
5057
5058
5059# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5060# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5061# archiver (AR). Verify that the compilers are correct according to the
5062# toolchain type.
5063
5064
5065# Setup additional tools that is considered a part of the toolchain, but not the
5066# core part. Many of these are highly platform-specific and do not exist,
5067# and/or are not needed on all platforms.
5068
5069
5070# Setup the build tools (i.e, the compiler and linker used to build programs
5071# that should be run on the build platform, not the target platform, as a build
5072# helper). Since the non-cross-compile case uses the normal, target compilers
5073# for this, we can only do this after these have been setup.
5074
5075
5076# Do some additional checks on the detected tools.
5077
5078
5079# Setup the JTReg Regression Test Harness.
5080
5081
5082#
5083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5085#
5086# This code is free software; you can redistribute it and/or modify it
5087# under the terms of the GNU General Public License version 2 only, as
5088# published by the Free Software Foundation.  Oracle designates this
5089# particular file as subject to the "Classpath" exception as provided
5090# by Oracle in the LICENSE file that accompanied this code.
5091#
5092# This code is distributed in the hope that it will be useful, but WITHOUT
5093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5095# version 2 for more details (a copy is included in the LICENSE file that
5096# accompanied this code).
5097#
5098# You should have received a copy of the GNU General Public License version
5099# 2 along with this work; if not, write to the Free Software Foundation,
5100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5101#
5102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5103# or visit www.oracle.com if you need additional information or have any
5104# questions.
5105#
5106
5107################################################################################
5108# The order of these defines the priority by which we try to find them.
5109VALID_VS_VERSIONS="2013 2012 2010"
5110
5111VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5112VS_VERSION_INTERNAL_2010=100
5113VS_MSVCR_2010=msvcr100.dll
5114# We don't use msvcp on Visual Studio 2010
5115#VS_MSVCP_2010=msvcp100.dll
5116VS_ENVVAR_2010="VS100COMNTOOLS"
5117VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5118VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5119VS_VS_PLATFORM_NAME_2010="v100"
5120VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5121
5122VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5123VS_VERSION_INTERNAL_2012=110
5124VS_MSVCR_2012=msvcr110.dll
5125VS_MSVCP_2012=msvcp110.dll
5126VS_ENVVAR_2012="VS110COMNTOOLS"
5127VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5128VS_SDK_INSTALLDIR_2012=
5129VS_VS_PLATFORM_NAME_2012="v110"
5130VS_SDK_PLATFORM_NAME_2012=
5131
5132VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5133VS_VERSION_INTERNAL_2013=120
5134VS_MSVCR_2013=msvcr120.dll
5135VS_MSVCP_2013=msvcp120.dll
5136VS_ENVVAR_2013="VS120COMNTOOLS"
5137VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5138VS_SDK_INSTALLDIR_2013=
5139VS_VS_PLATFORM_NAME_2013="v120"
5140VS_SDK_PLATFORM_NAME_2013=
5141
5142################################################################################
5143
5144
5145
5146################################################################################
5147
5148
5149
5150################################################################################
5151# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5152# build environment and assigns it to VS_ENV_CMD
5153
5154
5155################################################################################
5156
5157
5158
5159################################################################################
5160# Check if the VS env variables were setup prior to running configure.
5161# If not, then find vcvarsall.bat and run it automatically, and integrate
5162# the set env variables into the spec file.
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177# This line needs to be here, verbatim, after all includes and the dummy hook
5178# definitions. It is replaced with custom functionality when building
5179# custom sources.
5180#CUSTOM_AUTOCONF_INCLUDE
5181
5182# Do not change or remove the following line, it is needed for consistency checks:
5183DATE_WHEN_GENERATED=1492592126
5184
5185###############################################################################
5186#
5187# Initialization / Boot-strapping
5188#
5189# The bootstrapping process needs to solve the "chicken or the egg" problem,
5190# thus it jumps back and forth, each time gaining something needed later on.
5191#
5192###############################################################################
5193
5194# If we are requested to print additional help, do that and then exit.
5195# This must be the very first call.
5196
5197  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5198
5199    # Print available toolchains
5200    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5201    $PRINTF "Which are valid to use depends on the build platform.\n"
5202    for toolchain in $VALID_TOOLCHAINS_all; do
5203      # Use indirect variable referencing
5204      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5205      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5206      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5207    done
5208    $PRINTF "\n"
5209
5210    # Print available jvm features
5211    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5212    $PRINTF "Which are valid to use depends on the target platform.\n  "
5213    $PRINTF "%s " $VALID_JVM_FEATURES
5214    $PRINTF "\n"
5215
5216    # And now exit directly
5217    exit 0
5218  fi
5219
5220
5221# Basic initialization that must happen first of all in the normal process.
5222
5223  # Save the original command line. This is passed to us by the wrapper configure script.
5224
5225  # Save the path variable before it gets changed
5226  ORIGINAL_PATH="$PATH"
5227
5228  DATE_WHEN_CONFIGURED=`LANG=C date`
5229
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5231$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5233$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5234
5235
5236  # Start with tools that do not need have cross compilation support
5237  # and can be expected to be found in the default PATH. These tools are
5238  # used by configure.
5239
5240  # First are all the simple required tools.
5241
5242
5243
5244  # Publish this variable in the help.
5245
5246
5247  if [ -z "${BASENAME+x}" ]; then
5248    # The variable is not set by user, try to locate tool using the code snippet
5249    for ac_prog in basename
5250do
5251  # Extract the first word of "$ac_prog", so it can be a program name with args.
5252set dummy $ac_prog; ac_word=$2
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5254$as_echo_n "checking for $ac_word... " >&6; }
5255if ${ac_cv_path_BASENAME+:} false; then :
5256  $as_echo_n "(cached) " >&6
5257else
5258  case $BASENAME in
5259  [\\/]* | ?:[\\/]*)
5260  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5261  ;;
5262  *)
5263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5264for as_dir in $PATH
5265do
5266  IFS=$as_save_IFS
5267  test -z "$as_dir" && as_dir=.
5268    for ac_exec_ext in '' $ac_executable_extensions; do
5269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5270    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5272    break 2
5273  fi
5274done
5275  done
5276IFS=$as_save_IFS
5277
5278  ;;
5279esac
5280fi
5281BASENAME=$ac_cv_path_BASENAME
5282if test -n "$BASENAME"; then
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5284$as_echo "$BASENAME" >&6; }
5285else
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5287$as_echo "no" >&6; }
5288fi
5289
5290
5291  test -n "$BASENAME" && break
5292done
5293
5294  else
5295    # The variable is set, but is it from the command line or the environment?
5296
5297    # Try to remove the string !BASENAME! from our list.
5298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5300      # If it failed, the variable was not from the command line. Ignore it,
5301      # but warn the user (except for BASH, which is always set by the calling BASH).
5302      if test "xBASENAME" != xBASH; then
5303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5304$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5305      fi
5306      # Try to locate tool using the code snippet
5307      for ac_prog in basename
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if ${ac_cv_path_BASENAME+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $BASENAME in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339BASENAME=$ac_cv_path_BASENAME
5340if test -n "$BASENAME"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5342$as_echo "$BASENAME" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$BASENAME" && break
5350done
5351
5352    else
5353      # If it succeeded, then it was overridden by the user. We will use it
5354      # for the tool.
5355
5356      # First remove it from the list of overridden variables, so we can test
5357      # for unknown variables in the end.
5358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5359
5360      # Check if we try to supply an empty value
5361      if test "x$BASENAME" = x; then
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5363$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5365$as_echo_n "checking for BASENAME... " >&6; }
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5367$as_echo "disabled" >&6; }
5368      else
5369        # Check if the provided tool contains a complete path.
5370        tool_specified="$BASENAME"
5371        tool_basename="${tool_specified##*/}"
5372        if test "x$tool_basename" = "x$tool_specified"; then
5373          # A command without a complete path is provided, search $PATH.
5374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5375$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5376          # Extract the first word of "$tool_basename", so it can be a program name with args.
5377set dummy $tool_basename; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_path_BASENAME+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  case $BASENAME in
5384  [\\/]* | ?:[\\/]*)
5385  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5386  ;;
5387  *)
5388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5389for as_dir in $PATH
5390do
5391  IFS=$as_save_IFS
5392  test -z "$as_dir" && as_dir=.
5393    for ac_exec_ext in '' $ac_executable_extensions; do
5394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5395    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5397    break 2
5398  fi
5399done
5400  done
5401IFS=$as_save_IFS
5402
5403  ;;
5404esac
5405fi
5406BASENAME=$ac_cv_path_BASENAME
5407if test -n "$BASENAME"; then
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5409$as_echo "$BASENAME" >&6; }
5410else
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
5413fi
5414
5415
5416          if test "x$BASENAME" = x; then
5417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5418          fi
5419        else
5420          # Otherwise we believe it is a complete path. Use it as it is.
5421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5422$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5424$as_echo_n "checking for BASENAME... " >&6; }
5425          if test ! -x "$tool_specified"; then
5426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5427$as_echo "not found" >&6; }
5428            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5429          fi
5430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5431$as_echo "$tool_specified" >&6; }
5432        fi
5433      fi
5434    fi
5435
5436  fi
5437
5438
5439
5440  if test "x$BASENAME" = x; then
5441    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5442  fi
5443
5444
5445
5446
5447
5448  # Publish this variable in the help.
5449
5450
5451  if [ -z "${BASH+x}" ]; then
5452    # The variable is not set by user, try to locate tool using the code snippet
5453    for ac_prog in bash
5454do
5455  # Extract the first word of "$ac_prog", so it can be a program name with args.
5456set dummy $ac_prog; ac_word=$2
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
5459if ${ac_cv_path_BASH+:} false; then :
5460  $as_echo_n "(cached) " >&6
5461else
5462  case $BASH in
5463  [\\/]* | ?:[\\/]*)
5464  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5465  ;;
5466  *)
5467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468for as_dir in $PATH
5469do
5470  IFS=$as_save_IFS
5471  test -z "$as_dir" && as_dir=.
5472    for ac_exec_ext in '' $ac_executable_extensions; do
5473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5474    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476    break 2
5477  fi
5478done
5479  done
5480IFS=$as_save_IFS
5481
5482  ;;
5483esac
5484fi
5485BASH=$ac_cv_path_BASH
5486if test -n "$BASH"; then
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5488$as_echo "$BASH" >&6; }
5489else
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491$as_echo "no" >&6; }
5492fi
5493
5494
5495  test -n "$BASH" && break
5496done
5497
5498  else
5499    # The variable is set, but is it from the command line or the environment?
5500
5501    # Try to remove the string !BASH! from our list.
5502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5504      # If it failed, the variable was not from the command line. Ignore it,
5505      # but warn the user (except for BASH, which is always set by the calling BASH).
5506      if test "xBASH" != xBASH; then
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5508$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5509      fi
5510      # Try to locate tool using the code snippet
5511      for ac_prog in bash
5512do
5513  # Extract the first word of "$ac_prog", so it can be a program name with args.
5514set dummy $ac_prog; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_BASH+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $BASH in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543BASH=$ac_cv_path_BASH
5544if test -n "$BASH"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5546$as_echo "$BASH" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  test -n "$BASH" && break
5554done
5555
5556    else
5557      # If it succeeded, then it was overridden by the user. We will use it
5558      # for the tool.
5559
5560      # First remove it from the list of overridden variables, so we can test
5561      # for unknown variables in the end.
5562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5563
5564      # Check if we try to supply an empty value
5565      if test "x$BASH" = x; then
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5567$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5569$as_echo_n "checking for BASH... " >&6; }
5570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5571$as_echo "disabled" >&6; }
5572      else
5573        # Check if the provided tool contains a complete path.
5574        tool_specified="$BASH"
5575        tool_basename="${tool_specified##*/}"
5576        if test "x$tool_basename" = "x$tool_specified"; then
5577          # A command without a complete path is provided, search $PATH.
5578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5579$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5580          # Extract the first word of "$tool_basename", so it can be a program name with args.
5581set dummy $tool_basename; ac_word=$2
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if ${ac_cv_path_BASH+:} false; then :
5585  $as_echo_n "(cached) " >&6
5586else
5587  case $BASH in
5588  [\\/]* | ?:[\\/]*)
5589  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5590  ;;
5591  *)
5592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595  IFS=$as_save_IFS
5596  test -z "$as_dir" && as_dir=.
5597    for ac_exec_ext in '' $ac_executable_extensions; do
5598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5599    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601    break 2
5602  fi
5603done
5604  done
5605IFS=$as_save_IFS
5606
5607  ;;
5608esac
5609fi
5610BASH=$ac_cv_path_BASH
5611if test -n "$BASH"; then
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5613$as_echo "$BASH" >&6; }
5614else
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616$as_echo "no" >&6; }
5617fi
5618
5619
5620          if test "x$BASH" = x; then
5621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5622          fi
5623        else
5624          # Otherwise we believe it is a complete path. Use it as it is.
5625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5626$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5628$as_echo_n "checking for BASH... " >&6; }
5629          if test ! -x "$tool_specified"; then
5630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5631$as_echo "not found" >&6; }
5632            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5633          fi
5634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5635$as_echo "$tool_specified" >&6; }
5636        fi
5637      fi
5638    fi
5639
5640  fi
5641
5642
5643
5644  if test "x$BASH" = x; then
5645    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5646  fi
5647
5648
5649
5650
5651
5652  # Publish this variable in the help.
5653
5654
5655  if [ -z "${CAT+x}" ]; then
5656    # The variable is not set by user, try to locate tool using the code snippet
5657    for ac_prog in cat
5658do
5659  # Extract the first word of "$ac_prog", so it can be a program name with args.
5660set dummy $ac_prog; ac_word=$2
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
5663if ${ac_cv_path_CAT+:} false; then :
5664  $as_echo_n "(cached) " >&6
5665else
5666  case $CAT in
5667  [\\/]* | ?:[\\/]*)
5668  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5669  ;;
5670  *)
5671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5672for as_dir in $PATH
5673do
5674  IFS=$as_save_IFS
5675  test -z "$as_dir" && as_dir=.
5676    for ac_exec_ext in '' $ac_executable_extensions; do
5677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5678    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5680    break 2
5681  fi
5682done
5683  done
5684IFS=$as_save_IFS
5685
5686  ;;
5687esac
5688fi
5689CAT=$ac_cv_path_CAT
5690if test -n "$CAT"; then
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5692$as_echo "$CAT" >&6; }
5693else
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
5696fi
5697
5698
5699  test -n "$CAT" && break
5700done
5701
5702  else
5703    # The variable is set, but is it from the command line or the environment?
5704
5705    # Try to remove the string !CAT! from our list.
5706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5708      # If it failed, the variable was not from the command line. Ignore it,
5709      # but warn the user (except for BASH, which is always set by the calling BASH).
5710      if test "xCAT" != xBASH; then
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5712$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5713      fi
5714      # Try to locate tool using the code snippet
5715      for ac_prog in cat
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CAT+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CAT in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CAT=$ac_cv_path_CAT
5748if test -n "$CAT"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5750$as_echo "$CAT" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CAT" && break
5758done
5759
5760    else
5761      # If it succeeded, then it was overridden by the user. We will use it
5762      # for the tool.
5763
5764      # First remove it from the list of overridden variables, so we can test
5765      # for unknown variables in the end.
5766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5767
5768      # Check if we try to supply an empty value
5769      if test "x$CAT" = x; then
5770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5771$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5773$as_echo_n "checking for CAT... " >&6; }
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5775$as_echo "disabled" >&6; }
5776      else
5777        # Check if the provided tool contains a complete path.
5778        tool_specified="$CAT"
5779        tool_basename="${tool_specified##*/}"
5780        if test "x$tool_basename" = "x$tool_specified"; then
5781          # A command without a complete path is provided, search $PATH.
5782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5783$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5784          # Extract the first word of "$tool_basename", so it can be a program name with args.
5785set dummy $tool_basename; ac_word=$2
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787$as_echo_n "checking for $ac_word... " >&6; }
5788if ${ac_cv_path_CAT+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  case $CAT in
5792  [\\/]* | ?:[\\/]*)
5793  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5794  ;;
5795  *)
5796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5803    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811  ;;
5812esac
5813fi
5814CAT=$ac_cv_path_CAT
5815if test -n "$CAT"; then
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5817$as_echo "$CAT" >&6; }
5818else
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
5821fi
5822
5823
5824          if test "x$CAT" = x; then
5825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5826          fi
5827        else
5828          # Otherwise we believe it is a complete path. Use it as it is.
5829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5830$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5832$as_echo_n "checking for CAT... " >&6; }
5833          if test ! -x "$tool_specified"; then
5834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5835$as_echo "not found" >&6; }
5836            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5837          fi
5838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5839$as_echo "$tool_specified" >&6; }
5840        fi
5841      fi
5842    fi
5843
5844  fi
5845
5846
5847
5848  if test "x$CAT" = x; then
5849    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5850  fi
5851
5852
5853
5854
5855
5856  # Publish this variable in the help.
5857
5858
5859  if [ -z "${CHMOD+x}" ]; then
5860    # The variable is not set by user, try to locate tool using the code snippet
5861    for ac_prog in chmod
5862do
5863  # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_path_CHMOD+:} false; then :
5868  $as_echo_n "(cached) " >&6
5869else
5870  case $CHMOD in
5871  [\\/]* | ?:[\\/]*)
5872  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5873  ;;
5874  *)
5875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5876for as_dir in $PATH
5877do
5878  IFS=$as_save_IFS
5879  test -z "$as_dir" && as_dir=.
5880    for ac_exec_ext in '' $ac_executable_extensions; do
5881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5882    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5884    break 2
5885  fi
5886done
5887  done
5888IFS=$as_save_IFS
5889
5890  ;;
5891esac
5892fi
5893CHMOD=$ac_cv_path_CHMOD
5894if test -n "$CHMOD"; then
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5896$as_echo "$CHMOD" >&6; }
5897else
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903  test -n "$CHMOD" && break
5904done
5905
5906  else
5907    # The variable is set, but is it from the command line or the environment?
5908
5909    # Try to remove the string !CHMOD! from our list.
5910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5912      # If it failed, the variable was not from the command line. Ignore it,
5913      # but warn the user (except for BASH, which is always set by the calling BASH).
5914      if test "xCHMOD" != xBASH; then
5915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5916$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5917      fi
5918      # Try to locate tool using the code snippet
5919      for ac_prog in chmod
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_CHMOD+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $CHMOD in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951CHMOD=$ac_cv_path_CHMOD
5952if test -n "$CHMOD"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5954$as_echo "$CHMOD" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$CHMOD" && break
5962done
5963
5964    else
5965      # If it succeeded, then it was overridden by the user. We will use it
5966      # for the tool.
5967
5968      # First remove it from the list of overridden variables, so we can test
5969      # for unknown variables in the end.
5970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5971
5972      # Check if we try to supply an empty value
5973      if test "x$CHMOD" = x; then
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5975$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5977$as_echo_n "checking for CHMOD... " >&6; }
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5979$as_echo "disabled" >&6; }
5980      else
5981        # Check if the provided tool contains a complete path.
5982        tool_specified="$CHMOD"
5983        tool_basename="${tool_specified##*/}"
5984        if test "x$tool_basename" = "x$tool_specified"; then
5985          # A command without a complete path is provided, search $PATH.
5986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5987$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5988          # Extract the first word of "$tool_basename", so it can be a program name with args.
5989set dummy $tool_basename; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_path_CHMOD+:} false; then :
5993  $as_echo_n "(cached) " >&6
5994else
5995  case $CHMOD in
5996  [\\/]* | ?:[\\/]*)
5997  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5998  ;;
5999  *)
6000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003  IFS=$as_save_IFS
6004  test -z "$as_dir" && as_dir=.
6005    for ac_exec_ext in '' $ac_executable_extensions; do
6006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6007    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009    break 2
6010  fi
6011done
6012  done
6013IFS=$as_save_IFS
6014
6015  ;;
6016esac
6017fi
6018CHMOD=$ac_cv_path_CHMOD
6019if test -n "$CHMOD"; then
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6021$as_echo "$CHMOD" >&6; }
6022else
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
6025fi
6026
6027
6028          if test "x$CHMOD" = x; then
6029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6030          fi
6031        else
6032          # Otherwise we believe it is a complete path. Use it as it is.
6033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6034$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6036$as_echo_n "checking for CHMOD... " >&6; }
6037          if test ! -x "$tool_specified"; then
6038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6039$as_echo "not found" >&6; }
6040            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6041          fi
6042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6043$as_echo "$tool_specified" >&6; }
6044        fi
6045      fi
6046    fi
6047
6048  fi
6049
6050
6051
6052  if test "x$CHMOD" = x; then
6053    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6054  fi
6055
6056
6057
6058
6059
6060  # Publish this variable in the help.
6061
6062
6063  if [ -z "${CMP+x}" ]; then
6064    # The variable is not set by user, try to locate tool using the code snippet
6065    for ac_prog in cmp
6066do
6067  # Extract the first word of "$ac_prog", so it can be a program name with args.
6068set dummy $ac_prog; ac_word=$2
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
6071if ${ac_cv_path_CMP+:} false; then :
6072  $as_echo_n "(cached) " >&6
6073else
6074  case $CMP in
6075  [\\/]* | ?:[\\/]*)
6076  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6077  ;;
6078  *)
6079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082  IFS=$as_save_IFS
6083  test -z "$as_dir" && as_dir=.
6084    for ac_exec_ext in '' $ac_executable_extensions; do
6085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6086    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6088    break 2
6089  fi
6090done
6091  done
6092IFS=$as_save_IFS
6093
6094  ;;
6095esac
6096fi
6097CMP=$ac_cv_path_CMP
6098if test -n "$CMP"; then
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6100$as_echo "$CMP" >&6; }
6101else
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107  test -n "$CMP" && break
6108done
6109
6110  else
6111    # The variable is set, but is it from the command line or the environment?
6112
6113    # Try to remove the string !CMP! from our list.
6114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6116      # If it failed, the variable was not from the command line. Ignore it,
6117      # but warn the user (except for BASH, which is always set by the calling BASH).
6118      if test "xCMP" != xBASH; then
6119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6120$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6121      fi
6122      # Try to locate tool using the code snippet
6123      for ac_prog in cmp
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_CMP+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $CMP in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155CMP=$ac_cv_path_CMP
6156if test -n "$CMP"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6158$as_echo "$CMP" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$CMP" && break
6166done
6167
6168    else
6169      # If it succeeded, then it was overridden by the user. We will use it
6170      # for the tool.
6171
6172      # First remove it from the list of overridden variables, so we can test
6173      # for unknown variables in the end.
6174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6175
6176      # Check if we try to supply an empty value
6177      if test "x$CMP" = x; then
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6179$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6181$as_echo_n "checking for CMP... " >&6; }
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6183$as_echo "disabled" >&6; }
6184      else
6185        # Check if the provided tool contains a complete path.
6186        tool_specified="$CMP"
6187        tool_basename="${tool_specified##*/}"
6188        if test "x$tool_basename" = "x$tool_specified"; then
6189          # A command without a complete path is provided, search $PATH.
6190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6191$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6192          # Extract the first word of "$tool_basename", so it can be a program name with args.
6193set dummy $tool_basename; ac_word=$2
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6195$as_echo_n "checking for $ac_word... " >&6; }
6196if ${ac_cv_path_CMP+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  case $CMP in
6200  [\\/]* | ?:[\\/]*)
6201  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6202  ;;
6203  *)
6204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207  IFS=$as_save_IFS
6208  test -z "$as_dir" && as_dir=.
6209    for ac_exec_ext in '' $ac_executable_extensions; do
6210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6211    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213    break 2
6214  fi
6215done
6216  done
6217IFS=$as_save_IFS
6218
6219  ;;
6220esac
6221fi
6222CMP=$ac_cv_path_CMP
6223if test -n "$CMP"; then
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6225$as_echo "$CMP" >&6; }
6226else
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229fi
6230
6231
6232          if test "x$CMP" = x; then
6233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6234          fi
6235        else
6236          # Otherwise we believe it is a complete path. Use it as it is.
6237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6238$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6240$as_echo_n "checking for CMP... " >&6; }
6241          if test ! -x "$tool_specified"; then
6242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6243$as_echo "not found" >&6; }
6244            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6245          fi
6246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6247$as_echo "$tool_specified" >&6; }
6248        fi
6249      fi
6250    fi
6251
6252  fi
6253
6254
6255
6256  if test "x$CMP" = x; then
6257    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6258  fi
6259
6260
6261
6262
6263
6264  # Publish this variable in the help.
6265
6266
6267  if [ -z "${COMM+x}" ]; then
6268    # The variable is not set by user, try to locate tool using the code snippet
6269    for ac_prog in comm
6270do
6271  # Extract the first word of "$ac_prog", so it can be a program name with args.
6272set dummy $ac_prog; ac_word=$2
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274$as_echo_n "checking for $ac_word... " >&6; }
6275if ${ac_cv_path_COMM+:} false; then :
6276  $as_echo_n "(cached) " >&6
6277else
6278  case $COMM in
6279  [\\/]* | ?:[\\/]*)
6280  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6281  ;;
6282  *)
6283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH
6285do
6286  IFS=$as_save_IFS
6287  test -z "$as_dir" && as_dir=.
6288    for ac_exec_ext in '' $ac_executable_extensions; do
6289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6290    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6292    break 2
6293  fi
6294done
6295  done
6296IFS=$as_save_IFS
6297
6298  ;;
6299esac
6300fi
6301COMM=$ac_cv_path_COMM
6302if test -n "$COMM"; then
6303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6304$as_echo "$COMM" >&6; }
6305else
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }
6308fi
6309
6310
6311  test -n "$COMM" && break
6312done
6313
6314  else
6315    # The variable is set, but is it from the command line or the environment?
6316
6317    # Try to remove the string !COMM! from our list.
6318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6320      # If it failed, the variable was not from the command line. Ignore it,
6321      # but warn the user (except for BASH, which is always set by the calling BASH).
6322      if test "xCOMM" != xBASH; then
6323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6324$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6325      fi
6326      # Try to locate tool using the code snippet
6327      for ac_prog in comm
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_path_COMM+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  case $COMM in
6337  [\\/]* | ?:[\\/]*)
6338  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6339  ;;
6340  *)
6341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342for as_dir in $PATH
6343do
6344  IFS=$as_save_IFS
6345  test -z "$as_dir" && as_dir=.
6346    for ac_exec_ext in '' $ac_executable_extensions; do
6347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6348    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6350    break 2
6351  fi
6352done
6353  done
6354IFS=$as_save_IFS
6355
6356  ;;
6357esac
6358fi
6359COMM=$ac_cv_path_COMM
6360if test -n "$COMM"; then
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6362$as_echo "$COMM" >&6; }
6363else
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369  test -n "$COMM" && break
6370done
6371
6372    else
6373      # If it succeeded, then it was overridden by the user. We will use it
6374      # for the tool.
6375
6376      # First remove it from the list of overridden variables, so we can test
6377      # for unknown variables in the end.
6378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6379
6380      # Check if we try to supply an empty value
6381      if test "x$COMM" = x; then
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6383$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6385$as_echo_n "checking for COMM... " >&6; }
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6387$as_echo "disabled" >&6; }
6388      else
6389        # Check if the provided tool contains a complete path.
6390        tool_specified="$COMM"
6391        tool_basename="${tool_specified##*/}"
6392        if test "x$tool_basename" = "x$tool_specified"; then
6393          # A command without a complete path is provided, search $PATH.
6394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6395$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6396          # Extract the first word of "$tool_basename", so it can be a program name with args.
6397set dummy $tool_basename; ac_word=$2
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if ${ac_cv_path_COMM+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  case $COMM in
6404  [\\/]* | ?:[\\/]*)
6405  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6406  ;;
6407  *)
6408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411  IFS=$as_save_IFS
6412  test -z "$as_dir" && as_dir=.
6413    for ac_exec_ext in '' $ac_executable_extensions; do
6414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6415    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6417    break 2
6418  fi
6419done
6420  done
6421IFS=$as_save_IFS
6422
6423  ;;
6424esac
6425fi
6426COMM=$ac_cv_path_COMM
6427if test -n "$COMM"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6429$as_echo "$COMM" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436          if test "x$COMM" = x; then
6437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6438          fi
6439        else
6440          # Otherwise we believe it is a complete path. Use it as it is.
6441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6442$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6444$as_echo_n "checking for COMM... " >&6; }
6445          if test ! -x "$tool_specified"; then
6446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6447$as_echo "not found" >&6; }
6448            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6449          fi
6450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6451$as_echo "$tool_specified" >&6; }
6452        fi
6453      fi
6454    fi
6455
6456  fi
6457
6458
6459
6460  if test "x$COMM" = x; then
6461    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6462  fi
6463
6464
6465
6466
6467
6468  # Publish this variable in the help.
6469
6470
6471  if [ -z "${CP+x}" ]; then
6472    # The variable is not set by user, try to locate tool using the code snippet
6473    for ac_prog in cp
6474do
6475  # Extract the first word of "$ac_prog", so it can be a program name with args.
6476set dummy $ac_prog; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_CP+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $CP in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505CP=$ac_cv_path_CP
6506if test -n "$CP"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6508$as_echo "$CP" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515  test -n "$CP" && break
6516done
6517
6518  else
6519    # The variable is set, but is it from the command line or the environment?
6520
6521    # Try to remove the string !CP! from our list.
6522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6524      # If it failed, the variable was not from the command line. Ignore it,
6525      # but warn the user (except for BASH, which is always set by the calling BASH).
6526      if test "xCP" != xBASH; then
6527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6528$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6529      fi
6530      # Try to locate tool using the code snippet
6531      for ac_prog in cp
6532do
6533  # Extract the first word of "$ac_prog", so it can be a program name with args.
6534set dummy $ac_prog; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_CP+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $CP in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563CP=$ac_cv_path_CP
6564if test -n "$CP"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6566$as_echo "$CP" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573  test -n "$CP" && break
6574done
6575
6576    else
6577      # If it succeeded, then it was overridden by the user. We will use it
6578      # for the tool.
6579
6580      # First remove it from the list of overridden variables, so we can test
6581      # for unknown variables in the end.
6582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6583
6584      # Check if we try to supply an empty value
6585      if test "x$CP" = x; then
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6587$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6589$as_echo_n "checking for CP... " >&6; }
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6591$as_echo "disabled" >&6; }
6592      else
6593        # Check if the provided tool contains a complete path.
6594        tool_specified="$CP"
6595        tool_basename="${tool_specified##*/}"
6596        if test "x$tool_basename" = "x$tool_specified"; then
6597          # A command without a complete path is provided, search $PATH.
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6599$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6600          # Extract the first word of "$tool_basename", so it can be a program name with args.
6601set dummy $tool_basename; ac_word=$2
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603$as_echo_n "checking for $ac_word... " >&6; }
6604if ${ac_cv_path_CP+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  case $CP in
6608  [\\/]* | ?:[\\/]*)
6609  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6610  ;;
6611  *)
6612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6613for as_dir in $PATH
6614do
6615  IFS=$as_save_IFS
6616  test -z "$as_dir" && as_dir=.
6617    for ac_exec_ext in '' $ac_executable_extensions; do
6618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6619    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6621    break 2
6622  fi
6623done
6624  done
6625IFS=$as_save_IFS
6626
6627  ;;
6628esac
6629fi
6630CP=$ac_cv_path_CP
6631if test -n "$CP"; then
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6633$as_echo "$CP" >&6; }
6634else
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6636$as_echo "no" >&6; }
6637fi
6638
6639
6640          if test "x$CP" = x; then
6641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6642          fi
6643        else
6644          # Otherwise we believe it is a complete path. Use it as it is.
6645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6646$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6648$as_echo_n "checking for CP... " >&6; }
6649          if test ! -x "$tool_specified"; then
6650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6651$as_echo "not found" >&6; }
6652            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6653          fi
6654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6655$as_echo "$tool_specified" >&6; }
6656        fi
6657      fi
6658    fi
6659
6660  fi
6661
6662
6663
6664  if test "x$CP" = x; then
6665    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6666  fi
6667
6668
6669
6670
6671
6672  # Publish this variable in the help.
6673
6674
6675  if [ -z "${CUT+x}" ]; then
6676    # The variable is not set by user, try to locate tool using the code snippet
6677    for ac_prog in cut
6678do
6679  # Extract the first word of "$ac_prog", so it can be a program name with args.
6680set dummy $ac_prog; ac_word=$2
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6682$as_echo_n "checking for $ac_word... " >&6; }
6683if ${ac_cv_path_CUT+:} false; then :
6684  $as_echo_n "(cached) " >&6
6685else
6686  case $CUT in
6687  [\\/]* | ?:[\\/]*)
6688  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6689  ;;
6690  *)
6691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692for as_dir in $PATH
6693do
6694  IFS=$as_save_IFS
6695  test -z "$as_dir" && as_dir=.
6696    for ac_exec_ext in '' $ac_executable_extensions; do
6697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6698    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700    break 2
6701  fi
6702done
6703  done
6704IFS=$as_save_IFS
6705
6706  ;;
6707esac
6708fi
6709CUT=$ac_cv_path_CUT
6710if test -n "$CUT"; then
6711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6712$as_echo "$CUT" >&6; }
6713else
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718
6719  test -n "$CUT" && break
6720done
6721
6722  else
6723    # The variable is set, but is it from the command line or the environment?
6724
6725    # Try to remove the string !CUT! from our list.
6726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6728      # If it failed, the variable was not from the command line. Ignore it,
6729      # but warn the user (except for BASH, which is always set by the calling BASH).
6730      if test "xCUT" != xBASH; then
6731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6732$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6733      fi
6734      # Try to locate tool using the code snippet
6735      for ac_prog in cut
6736do
6737  # Extract the first word of "$ac_prog", so it can be a program name with args.
6738set dummy $ac_prog; ac_word=$2
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740$as_echo_n "checking for $ac_word... " >&6; }
6741if ${ac_cv_path_CUT+:} false; then :
6742  $as_echo_n "(cached) " >&6
6743else
6744  case $CUT in
6745  [\\/]* | ?:[\\/]*)
6746  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6747  ;;
6748  *)
6749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764  ;;
6765esac
6766fi
6767CUT=$ac_cv_path_CUT
6768if test -n "$CUT"; then
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6770$as_echo "$CUT" >&6; }
6771else
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773$as_echo "no" >&6; }
6774fi
6775
6776
6777  test -n "$CUT" && break
6778done
6779
6780    else
6781      # If it succeeded, then it was overridden by the user. We will use it
6782      # for the tool.
6783
6784      # First remove it from the list of overridden variables, so we can test
6785      # for unknown variables in the end.
6786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6787
6788      # Check if we try to supply an empty value
6789      if test "x$CUT" = x; then
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6791$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6793$as_echo_n "checking for CUT... " >&6; }
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6795$as_echo "disabled" >&6; }
6796      else
6797        # Check if the provided tool contains a complete path.
6798        tool_specified="$CUT"
6799        tool_basename="${tool_specified##*/}"
6800        if test "x$tool_basename" = "x$tool_specified"; then
6801          # A command without a complete path is provided, search $PATH.
6802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6803$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6804          # Extract the first word of "$tool_basename", so it can be a program name with args.
6805set dummy $tool_basename; ac_word=$2
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if ${ac_cv_path_CUT+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  case $CUT in
6812  [\\/]* | ?:[\\/]*)
6813  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6814  ;;
6815  *)
6816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831  ;;
6832esac
6833fi
6834CUT=$ac_cv_path_CUT
6835if test -n "$CUT"; then
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6837$as_echo "$CUT" >&6; }
6838else
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6840$as_echo "no" >&6; }
6841fi
6842
6843
6844          if test "x$CUT" = x; then
6845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6846          fi
6847        else
6848          # Otherwise we believe it is a complete path. Use it as it is.
6849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6850$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6852$as_echo_n "checking for CUT... " >&6; }
6853          if test ! -x "$tool_specified"; then
6854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6855$as_echo "not found" >&6; }
6856            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6857          fi
6858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6859$as_echo "$tool_specified" >&6; }
6860        fi
6861      fi
6862    fi
6863
6864  fi
6865
6866
6867
6868  if test "x$CUT" = x; then
6869    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6870  fi
6871
6872
6873
6874
6875
6876  # Publish this variable in the help.
6877
6878
6879  if [ -z "${DATE+x}" ]; then
6880    # The variable is not set by user, try to locate tool using the code snippet
6881    for ac_prog in date
6882do
6883  # Extract the first word of "$ac_prog", so it can be a program name with args.
6884set dummy $ac_prog; ac_word=$2
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886$as_echo_n "checking for $ac_word... " >&6; }
6887if ${ac_cv_path_DATE+:} false; then :
6888  $as_echo_n "(cached) " >&6
6889else
6890  case $DATE in
6891  [\\/]* | ?:[\\/]*)
6892  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6893  ;;
6894  *)
6895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896for as_dir in $PATH
6897do
6898  IFS=$as_save_IFS
6899  test -z "$as_dir" && as_dir=.
6900    for ac_exec_ext in '' $ac_executable_extensions; do
6901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904    break 2
6905  fi
6906done
6907  done
6908IFS=$as_save_IFS
6909
6910  ;;
6911esac
6912fi
6913DATE=$ac_cv_path_DATE
6914if test -n "$DATE"; then
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6916$as_echo "$DATE" >&6; }
6917else
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919$as_echo "no" >&6; }
6920fi
6921
6922
6923  test -n "$DATE" && break
6924done
6925
6926  else
6927    # The variable is set, but is it from the command line or the environment?
6928
6929    # Try to remove the string !DATE! from our list.
6930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6932      # If it failed, the variable was not from the command line. Ignore it,
6933      # but warn the user (except for BASH, which is always set by the calling BASH).
6934      if test "xDATE" != xBASH; then
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6936$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6937      fi
6938      # Try to locate tool using the code snippet
6939      for ac_prog in date
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_DATE+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $DATE in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971DATE=$ac_cv_path_DATE
6972if test -n "$DATE"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6974$as_echo "$DATE" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$DATE" && break
6982done
6983
6984    else
6985      # If it succeeded, then it was overridden by the user. We will use it
6986      # for the tool.
6987
6988      # First remove it from the list of overridden variables, so we can test
6989      # for unknown variables in the end.
6990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6991
6992      # Check if we try to supply an empty value
6993      if test "x$DATE" = x; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6995$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6997$as_echo_n "checking for DATE... " >&6; }
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6999$as_echo "disabled" >&6; }
7000      else
7001        # Check if the provided tool contains a complete path.
7002        tool_specified="$DATE"
7003        tool_basename="${tool_specified##*/}"
7004        if test "x$tool_basename" = "x$tool_specified"; then
7005          # A command without a complete path is provided, search $PATH.
7006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7007$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7008          # Extract the first word of "$tool_basename", so it can be a program name with args.
7009set dummy $tool_basename; ac_word=$2
7010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7011$as_echo_n "checking for $ac_word... " >&6; }
7012if ${ac_cv_path_DATE+:} false; then :
7013  $as_echo_n "(cached) " >&6
7014else
7015  case $DATE in
7016  [\\/]* | ?:[\\/]*)
7017  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7018  ;;
7019  *)
7020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7021for as_dir in $PATH
7022do
7023  IFS=$as_save_IFS
7024  test -z "$as_dir" && as_dir=.
7025    for ac_exec_ext in '' $ac_executable_extensions; do
7026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7027    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7029    break 2
7030  fi
7031done
7032  done
7033IFS=$as_save_IFS
7034
7035  ;;
7036esac
7037fi
7038DATE=$ac_cv_path_DATE
7039if test -n "$DATE"; then
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7041$as_echo "$DATE" >&6; }
7042else
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044$as_echo "no" >&6; }
7045fi
7046
7047
7048          if test "x$DATE" = x; then
7049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7050          fi
7051        else
7052          # Otherwise we believe it is a complete path. Use it as it is.
7053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7054$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7056$as_echo_n "checking for DATE... " >&6; }
7057          if test ! -x "$tool_specified"; then
7058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7059$as_echo "not found" >&6; }
7060            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7061          fi
7062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7063$as_echo "$tool_specified" >&6; }
7064        fi
7065      fi
7066    fi
7067
7068  fi
7069
7070
7071
7072  if test "x$DATE" = x; then
7073    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7074  fi
7075
7076
7077
7078
7079
7080  # Publish this variable in the help.
7081
7082
7083  if [ -z "${DIFF+x}" ]; then
7084    # The variable is not set by user, try to locate tool using the code snippet
7085    for ac_prog in gdiff diff
7086do
7087  # Extract the first word of "$ac_prog", so it can be a program name with args.
7088set dummy $ac_prog; ac_word=$2
7089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7090$as_echo_n "checking for $ac_word... " >&6; }
7091if ${ac_cv_path_DIFF+:} false; then :
7092  $as_echo_n "(cached) " >&6
7093else
7094  case $DIFF in
7095  [\\/]* | ?:[\\/]*)
7096  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7097  ;;
7098  *)
7099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7100for as_dir in $PATH
7101do
7102  IFS=$as_save_IFS
7103  test -z "$as_dir" && as_dir=.
7104    for ac_exec_ext in '' $ac_executable_extensions; do
7105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7106    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7108    break 2
7109  fi
7110done
7111  done
7112IFS=$as_save_IFS
7113
7114  ;;
7115esac
7116fi
7117DIFF=$ac_cv_path_DIFF
7118if test -n "$DIFF"; then
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7120$as_echo "$DIFF" >&6; }
7121else
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7123$as_echo "no" >&6; }
7124fi
7125
7126
7127  test -n "$DIFF" && break
7128done
7129
7130  else
7131    # The variable is set, but is it from the command line or the environment?
7132
7133    # Try to remove the string !DIFF! from our list.
7134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7136      # If it failed, the variable was not from the command line. Ignore it,
7137      # but warn the user (except for BASH, which is always set by the calling BASH).
7138      if test "xDIFF" != xBASH; then
7139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7140$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7141      fi
7142      # Try to locate tool using the code snippet
7143      for ac_prog in gdiff diff
7144do
7145  # Extract the first word of "$ac_prog", so it can be a program name with args.
7146set dummy $ac_prog; ac_word=$2
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7148$as_echo_n "checking for $ac_word... " >&6; }
7149if ${ac_cv_path_DIFF+:} false; then :
7150  $as_echo_n "(cached) " >&6
7151else
7152  case $DIFF in
7153  [\\/]* | ?:[\\/]*)
7154  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7155  ;;
7156  *)
7157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158for as_dir in $PATH
7159do
7160  IFS=$as_save_IFS
7161  test -z "$as_dir" && as_dir=.
7162    for ac_exec_ext in '' $ac_executable_extensions; do
7163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7164    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7166    break 2
7167  fi
7168done
7169  done
7170IFS=$as_save_IFS
7171
7172  ;;
7173esac
7174fi
7175DIFF=$ac_cv_path_DIFF
7176if test -n "$DIFF"; then
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7178$as_echo "$DIFF" >&6; }
7179else
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
7182fi
7183
7184
7185  test -n "$DIFF" && break
7186done
7187
7188    else
7189      # If it succeeded, then it was overridden by the user. We will use it
7190      # for the tool.
7191
7192      # First remove it from the list of overridden variables, so we can test
7193      # for unknown variables in the end.
7194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7195
7196      # Check if we try to supply an empty value
7197      if test "x$DIFF" = x; then
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7199$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7201$as_echo_n "checking for DIFF... " >&6; }
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7203$as_echo "disabled" >&6; }
7204      else
7205        # Check if the provided tool contains a complete path.
7206        tool_specified="$DIFF"
7207        tool_basename="${tool_specified##*/}"
7208        if test "x$tool_basename" = "x$tool_specified"; then
7209          # A command without a complete path is provided, search $PATH.
7210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7211$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7212          # Extract the first word of "$tool_basename", so it can be a program name with args.
7213set dummy $tool_basename; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_DIFF+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $DIFF in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242DIFF=$ac_cv_path_DIFF
7243if test -n "$DIFF"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7245$as_echo "$DIFF" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252          if test "x$DIFF" = x; then
7253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7254          fi
7255        else
7256          # Otherwise we believe it is a complete path. Use it as it is.
7257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7258$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7260$as_echo_n "checking for DIFF... " >&6; }
7261          if test ! -x "$tool_specified"; then
7262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7263$as_echo "not found" >&6; }
7264            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7265          fi
7266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7267$as_echo "$tool_specified" >&6; }
7268        fi
7269      fi
7270    fi
7271
7272  fi
7273
7274
7275
7276  if test "x$DIFF" = x; then
7277    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7278  fi
7279
7280
7281
7282
7283
7284  # Publish this variable in the help.
7285
7286
7287  if [ -z "${DIRNAME+x}" ]; then
7288    # The variable is not set by user, try to locate tool using the code snippet
7289    for ac_prog in dirname
7290do
7291  # Extract the first word of "$ac_prog", so it can be a program name with args.
7292set dummy $ac_prog; ac_word=$2
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
7295if ${ac_cv_path_DIRNAME+:} false; then :
7296  $as_echo_n "(cached) " >&6
7297else
7298  case $DIRNAME in
7299  [\\/]* | ?:[\\/]*)
7300  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7301  ;;
7302  *)
7303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  test -z "$as_dir" && as_dir=.
7308    for ac_exec_ext in '' $ac_executable_extensions; do
7309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312    break 2
7313  fi
7314done
7315  done
7316IFS=$as_save_IFS
7317
7318  ;;
7319esac
7320fi
7321DIRNAME=$ac_cv_path_DIRNAME
7322if test -n "$DIRNAME"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7324$as_echo "$DIRNAME" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331  test -n "$DIRNAME" && break
7332done
7333
7334  else
7335    # The variable is set, but is it from the command line or the environment?
7336
7337    # Try to remove the string !DIRNAME! from our list.
7338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7340      # If it failed, the variable was not from the command line. Ignore it,
7341      # but warn the user (except for BASH, which is always set by the calling BASH).
7342      if test "xDIRNAME" != xBASH; then
7343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7344$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7345      fi
7346      # Try to locate tool using the code snippet
7347      for ac_prog in dirname
7348do
7349  # Extract the first word of "$ac_prog", so it can be a program name with args.
7350set dummy $ac_prog; ac_word=$2
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
7353if ${ac_cv_path_DIRNAME+:} false; then :
7354  $as_echo_n "(cached) " >&6
7355else
7356  case $DIRNAME in
7357  [\\/]* | ?:[\\/]*)
7358  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7359  ;;
7360  *)
7361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364  IFS=$as_save_IFS
7365  test -z "$as_dir" && as_dir=.
7366    for ac_exec_ext in '' $ac_executable_extensions; do
7367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7368    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7370    break 2
7371  fi
7372done
7373  done
7374IFS=$as_save_IFS
7375
7376  ;;
7377esac
7378fi
7379DIRNAME=$ac_cv_path_DIRNAME
7380if test -n "$DIRNAME"; then
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7382$as_echo "$DIRNAME" >&6; }
7383else
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
7386fi
7387
7388
7389  test -n "$DIRNAME" && break
7390done
7391
7392    else
7393      # If it succeeded, then it was overridden by the user. We will use it
7394      # for the tool.
7395
7396      # First remove it from the list of overridden variables, so we can test
7397      # for unknown variables in the end.
7398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7399
7400      # Check if we try to supply an empty value
7401      if test "x$DIRNAME" = x; then
7402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7403$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7405$as_echo_n "checking for DIRNAME... " >&6; }
7406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7407$as_echo "disabled" >&6; }
7408      else
7409        # Check if the provided tool contains a complete path.
7410        tool_specified="$DIRNAME"
7411        tool_basename="${tool_specified##*/}"
7412        if test "x$tool_basename" = "x$tool_specified"; then
7413          # A command without a complete path is provided, search $PATH.
7414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7415$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7416          # Extract the first word of "$tool_basename", so it can be a program name with args.
7417set dummy $tool_basename; ac_word=$2
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419$as_echo_n "checking for $ac_word... " >&6; }
7420if ${ac_cv_path_DIRNAME+:} false; then :
7421  $as_echo_n "(cached) " >&6
7422else
7423  case $DIRNAME in
7424  [\\/]* | ?:[\\/]*)
7425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7426  ;;
7427  *)
7428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429for as_dir in $PATH
7430do
7431  IFS=$as_save_IFS
7432  test -z "$as_dir" && as_dir=.
7433    for ac_exec_ext in '' $ac_executable_extensions; do
7434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7437    break 2
7438  fi
7439done
7440  done
7441IFS=$as_save_IFS
7442
7443  ;;
7444esac
7445fi
7446DIRNAME=$ac_cv_path_DIRNAME
7447if test -n "$DIRNAME"; then
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7449$as_echo "$DIRNAME" >&6; }
7450else
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452$as_echo "no" >&6; }
7453fi
7454
7455
7456          if test "x$DIRNAME" = x; then
7457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7458          fi
7459        else
7460          # Otherwise we believe it is a complete path. Use it as it is.
7461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7462$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7464$as_echo_n "checking for DIRNAME... " >&6; }
7465          if test ! -x "$tool_specified"; then
7466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7467$as_echo "not found" >&6; }
7468            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7469          fi
7470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7471$as_echo "$tool_specified" >&6; }
7472        fi
7473      fi
7474    fi
7475
7476  fi
7477
7478
7479
7480  if test "x$DIRNAME" = x; then
7481    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7482  fi
7483
7484
7485
7486
7487
7488  # Publish this variable in the help.
7489
7490
7491  if [ -z "${ECHO+x}" ]; then
7492    # The variable is not set by user, try to locate tool using the code snippet
7493    for ac_prog in echo
7494do
7495  # Extract the first word of "$ac_prog", so it can be a program name with args.
7496set dummy $ac_prog; ac_word=$2
7497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7498$as_echo_n "checking for $ac_word... " >&6; }
7499if ${ac_cv_path_ECHO+:} false; then :
7500  $as_echo_n "(cached) " >&6
7501else
7502  case $ECHO in
7503  [\\/]* | ?:[\\/]*)
7504  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7505  ;;
7506  *)
7507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508for as_dir in $PATH
7509do
7510  IFS=$as_save_IFS
7511  test -z "$as_dir" && as_dir=.
7512    for ac_exec_ext in '' $ac_executable_extensions; do
7513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7514    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7516    break 2
7517  fi
7518done
7519  done
7520IFS=$as_save_IFS
7521
7522  ;;
7523esac
7524fi
7525ECHO=$ac_cv_path_ECHO
7526if test -n "$ECHO"; then
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7528$as_echo "$ECHO" >&6; }
7529else
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
7532fi
7533
7534
7535  test -n "$ECHO" && break
7536done
7537
7538  else
7539    # The variable is set, but is it from the command line or the environment?
7540
7541    # Try to remove the string !ECHO! from our list.
7542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7544      # If it failed, the variable was not from the command line. Ignore it,
7545      # but warn the user (except for BASH, which is always set by the calling BASH).
7546      if test "xECHO" != xBASH; then
7547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7548$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7549      fi
7550      # Try to locate tool using the code snippet
7551      for ac_prog in echo
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_ECHO+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $ECHO in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583ECHO=$ac_cv_path_ECHO
7584if test -n "$ECHO"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7586$as_echo "$ECHO" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$ECHO" && break
7594done
7595
7596    else
7597      # If it succeeded, then it was overridden by the user. We will use it
7598      # for the tool.
7599
7600      # First remove it from the list of overridden variables, so we can test
7601      # for unknown variables in the end.
7602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7603
7604      # Check if we try to supply an empty value
7605      if test "x$ECHO" = x; then
7606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7607$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7609$as_echo_n "checking for ECHO... " >&6; }
7610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7611$as_echo "disabled" >&6; }
7612      else
7613        # Check if the provided tool contains a complete path.
7614        tool_specified="$ECHO"
7615        tool_basename="${tool_specified##*/}"
7616        if test "x$tool_basename" = "x$tool_specified"; then
7617          # A command without a complete path is provided, search $PATH.
7618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7619$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7620          # Extract the first word of "$tool_basename", so it can be a program name with args.
7621set dummy $tool_basename; ac_word=$2
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
7624if ${ac_cv_path_ECHO+:} false; then :
7625  $as_echo_n "(cached) " >&6
7626else
7627  case $ECHO in
7628  [\\/]* | ?:[\\/]*)
7629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7630  ;;
7631  *)
7632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633for as_dir in $PATH
7634do
7635  IFS=$as_save_IFS
7636  test -z "$as_dir" && as_dir=.
7637    for ac_exec_ext in '' $ac_executable_extensions; do
7638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7641    break 2
7642  fi
7643done
7644  done
7645IFS=$as_save_IFS
7646
7647  ;;
7648esac
7649fi
7650ECHO=$ac_cv_path_ECHO
7651if test -n "$ECHO"; then
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7653$as_echo "$ECHO" >&6; }
7654else
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
7657fi
7658
7659
7660          if test "x$ECHO" = x; then
7661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7662          fi
7663        else
7664          # Otherwise we believe it is a complete path. Use it as it is.
7665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7666$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7668$as_echo_n "checking for ECHO... " >&6; }
7669          if test ! -x "$tool_specified"; then
7670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7671$as_echo "not found" >&6; }
7672            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7673          fi
7674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7675$as_echo "$tool_specified" >&6; }
7676        fi
7677      fi
7678    fi
7679
7680  fi
7681
7682
7683
7684  if test "x$ECHO" = x; then
7685    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7686  fi
7687
7688
7689
7690
7691
7692  # Publish this variable in the help.
7693
7694
7695  if [ -z "${EXPR+x}" ]; then
7696    # The variable is not set by user, try to locate tool using the code snippet
7697    for ac_prog in expr
7698do
7699  # Extract the first word of "$ac_prog", so it can be a program name with args.
7700set dummy $ac_prog; ac_word=$2
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7702$as_echo_n "checking for $ac_word... " >&6; }
7703if ${ac_cv_path_EXPR+:} false; then :
7704  $as_echo_n "(cached) " >&6
7705else
7706  case $EXPR in
7707  [\\/]* | ?:[\\/]*)
7708  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7709  ;;
7710  *)
7711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7712for as_dir in $PATH
7713do
7714  IFS=$as_save_IFS
7715  test -z "$as_dir" && as_dir=.
7716    for ac_exec_ext in '' $ac_executable_extensions; do
7717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7718    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7720    break 2
7721  fi
7722done
7723  done
7724IFS=$as_save_IFS
7725
7726  ;;
7727esac
7728fi
7729EXPR=$ac_cv_path_EXPR
7730if test -n "$EXPR"; then
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7732$as_echo "$EXPR" >&6; }
7733else
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738
7739  test -n "$EXPR" && break
7740done
7741
7742  else
7743    # The variable is set, but is it from the command line or the environment?
7744
7745    # Try to remove the string !EXPR! from our list.
7746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7748      # If it failed, the variable was not from the command line. Ignore it,
7749      # but warn the user (except for BASH, which is always set by the calling BASH).
7750      if test "xEXPR" != xBASH; then
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7752$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7753      fi
7754      # Try to locate tool using the code snippet
7755      for ac_prog in expr
7756do
7757  # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7760$as_echo_n "checking for $ac_word... " >&6; }
7761if ${ac_cv_path_EXPR+:} false; then :
7762  $as_echo_n "(cached) " >&6
7763else
7764  case $EXPR in
7765  [\\/]* | ?:[\\/]*)
7766  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7767  ;;
7768  *)
7769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784  ;;
7785esac
7786fi
7787EXPR=$ac_cv_path_EXPR
7788if test -n "$EXPR"; then
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7790$as_echo "$EXPR" >&6; }
7791else
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7793$as_echo "no" >&6; }
7794fi
7795
7796
7797  test -n "$EXPR" && break
7798done
7799
7800    else
7801      # If it succeeded, then it was overridden by the user. We will use it
7802      # for the tool.
7803
7804      # First remove it from the list of overridden variables, so we can test
7805      # for unknown variables in the end.
7806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7807
7808      # Check if we try to supply an empty value
7809      if test "x$EXPR" = x; then
7810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7811$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7813$as_echo_n "checking for EXPR... " >&6; }
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7815$as_echo "disabled" >&6; }
7816      else
7817        # Check if the provided tool contains a complete path.
7818        tool_specified="$EXPR"
7819        tool_basename="${tool_specified##*/}"
7820        if test "x$tool_basename" = "x$tool_specified"; then
7821          # A command without a complete path is provided, search $PATH.
7822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7823$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7824          # Extract the first word of "$tool_basename", so it can be a program name with args.
7825set dummy $tool_basename; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_EXPR+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $EXPR in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854EXPR=$ac_cv_path_EXPR
7855if test -n "$EXPR"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7857$as_echo "$EXPR" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864          if test "x$EXPR" = x; then
7865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7866          fi
7867        else
7868          # Otherwise we believe it is a complete path. Use it as it is.
7869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7870$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7872$as_echo_n "checking for EXPR... " >&6; }
7873          if test ! -x "$tool_specified"; then
7874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7875$as_echo "not found" >&6; }
7876            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7877          fi
7878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7879$as_echo "$tool_specified" >&6; }
7880        fi
7881      fi
7882    fi
7883
7884  fi
7885
7886
7887
7888  if test "x$EXPR" = x; then
7889    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7890  fi
7891
7892
7893
7894
7895
7896  # Publish this variable in the help.
7897
7898
7899  if [ -z "${FILE+x}" ]; then
7900    # The variable is not set by user, try to locate tool using the code snippet
7901    for ac_prog in file
7902do
7903  # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_path_FILE+:} false; then :
7908  $as_echo_n "(cached) " >&6
7909else
7910  case $FILE in
7911  [\\/]* | ?:[\\/]*)
7912  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7913  ;;
7914  *)
7915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916for as_dir in $PATH
7917do
7918  IFS=$as_save_IFS
7919  test -z "$as_dir" && as_dir=.
7920    for ac_exec_ext in '' $ac_executable_extensions; do
7921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924    break 2
7925  fi
7926done
7927  done
7928IFS=$as_save_IFS
7929
7930  ;;
7931esac
7932fi
7933FILE=$ac_cv_path_FILE
7934if test -n "$FILE"; then
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7936$as_echo "$FILE" >&6; }
7937else
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939$as_echo "no" >&6; }
7940fi
7941
7942
7943  test -n "$FILE" && break
7944done
7945
7946  else
7947    # The variable is set, but is it from the command line or the environment?
7948
7949    # Try to remove the string !FILE! from our list.
7950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952      # If it failed, the variable was not from the command line. Ignore it,
7953      # but warn the user (except for BASH, which is always set by the calling BASH).
7954      if test "xFILE" != xBASH; then
7955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7956$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7957      fi
7958      # Try to locate tool using the code snippet
7959      for ac_prog in file
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_FILE+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $FILE in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991FILE=$ac_cv_path_FILE
7992if test -n "$FILE"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7994$as_echo "$FILE" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$FILE" && break
8002done
8003
8004    else
8005      # If it succeeded, then it was overridden by the user. We will use it
8006      # for the tool.
8007
8008      # First remove it from the list of overridden variables, so we can test
8009      # for unknown variables in the end.
8010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011
8012      # Check if we try to supply an empty value
8013      if test "x$FILE" = x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8015$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8017$as_echo_n "checking for FILE... " >&6; }
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8019$as_echo "disabled" >&6; }
8020      else
8021        # Check if the provided tool contains a complete path.
8022        tool_specified="$FILE"
8023        tool_basename="${tool_specified##*/}"
8024        if test "x$tool_basename" = "x$tool_specified"; then
8025          # A command without a complete path is provided, search $PATH.
8026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8027$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8028          # Extract the first word of "$tool_basename", so it can be a program name with args.
8029set dummy $tool_basename; ac_word=$2
8030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
8032if ${ac_cv_path_FILE+:} false; then :
8033  $as_echo_n "(cached) " >&6
8034else
8035  case $FILE in
8036  [\\/]* | ?:[\\/]*)
8037  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8038  ;;
8039  *)
8040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043  IFS=$as_save_IFS
8044  test -z "$as_dir" && as_dir=.
8045    for ac_exec_ext in '' $ac_executable_extensions; do
8046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8047    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8049    break 2
8050  fi
8051done
8052  done
8053IFS=$as_save_IFS
8054
8055  ;;
8056esac
8057fi
8058FILE=$ac_cv_path_FILE
8059if test -n "$FILE"; then
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8061$as_echo "$FILE" >&6; }
8062else
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
8065fi
8066
8067
8068          if test "x$FILE" = x; then
8069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8070          fi
8071        else
8072          # Otherwise we believe it is a complete path. Use it as it is.
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8074$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8076$as_echo_n "checking for FILE... " >&6; }
8077          if test ! -x "$tool_specified"; then
8078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8079$as_echo "not found" >&6; }
8080            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8081          fi
8082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8083$as_echo "$tool_specified" >&6; }
8084        fi
8085      fi
8086    fi
8087
8088  fi
8089
8090
8091
8092  if test "x$FILE" = x; then
8093    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8094  fi
8095
8096
8097
8098
8099
8100  # Publish this variable in the help.
8101
8102
8103  if [ -z "${FIND+x}" ]; then
8104    # The variable is not set by user, try to locate tool using the code snippet
8105    for ac_prog in find
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_FIND+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $FIND in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137FIND=$ac_cv_path_FIND
8138if test -n "$FIND"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8140$as_echo "$FIND" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$FIND" && break
8148done
8149
8150  else
8151    # The variable is set, but is it from the command line or the environment?
8152
8153    # Try to remove the string !FIND! from our list.
8154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8156      # If it failed, the variable was not from the command line. Ignore it,
8157      # but warn the user (except for BASH, which is always set by the calling BASH).
8158      if test "xFIND" != xBASH; then
8159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8160$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8161      fi
8162      # Try to locate tool using the code snippet
8163      for ac_prog in find
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_FIND+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $FIND in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195FIND=$ac_cv_path_FIND
8196if test -n "$FIND"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8198$as_echo "$FIND" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$FIND" && break
8206done
8207
8208    else
8209      # If it succeeded, then it was overridden by the user. We will use it
8210      # for the tool.
8211
8212      # First remove it from the list of overridden variables, so we can test
8213      # for unknown variables in the end.
8214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8215
8216      # Check if we try to supply an empty value
8217      if test "x$FIND" = x; then
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8219$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8221$as_echo_n "checking for FIND... " >&6; }
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8223$as_echo "disabled" >&6; }
8224      else
8225        # Check if the provided tool contains a complete path.
8226        tool_specified="$FIND"
8227        tool_basename="${tool_specified##*/}"
8228        if test "x$tool_basename" = "x$tool_specified"; then
8229          # A command without a complete path is provided, search $PATH.
8230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8231$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8232          # Extract the first word of "$tool_basename", so it can be a program name with args.
8233set dummy $tool_basename; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_FIND+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $FIND in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262FIND=$ac_cv_path_FIND
8263if test -n "$FIND"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8265$as_echo "$FIND" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272          if test "x$FIND" = x; then
8273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8274          fi
8275        else
8276          # Otherwise we believe it is a complete path. Use it as it is.
8277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8278$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8280$as_echo_n "checking for FIND... " >&6; }
8281          if test ! -x "$tool_specified"; then
8282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8283$as_echo "not found" >&6; }
8284            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8285          fi
8286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8287$as_echo "$tool_specified" >&6; }
8288        fi
8289      fi
8290    fi
8291
8292  fi
8293
8294
8295
8296  if test "x$FIND" = x; then
8297    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8298  fi
8299
8300
8301
8302
8303
8304  # Publish this variable in the help.
8305
8306
8307  if [ -z "${HEAD+x}" ]; then
8308    # The variable is not set by user, try to locate tool using the code snippet
8309    for ac_prog in head
8310do
8311  # Extract the first word of "$ac_prog", so it can be a program name with args.
8312set dummy $ac_prog; ac_word=$2
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8314$as_echo_n "checking for $ac_word... " >&6; }
8315if ${ac_cv_path_HEAD+:} false; then :
8316  $as_echo_n "(cached) " >&6
8317else
8318  case $HEAD in
8319  [\\/]* | ?:[\\/]*)
8320  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8321  ;;
8322  *)
8323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8324for as_dir in $PATH
8325do
8326  IFS=$as_save_IFS
8327  test -z "$as_dir" && as_dir=.
8328    for ac_exec_ext in '' $ac_executable_extensions; do
8329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8330    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8332    break 2
8333  fi
8334done
8335  done
8336IFS=$as_save_IFS
8337
8338  ;;
8339esac
8340fi
8341HEAD=$ac_cv_path_HEAD
8342if test -n "$HEAD"; then
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8344$as_echo "$HEAD" >&6; }
8345else
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347$as_echo "no" >&6; }
8348fi
8349
8350
8351  test -n "$HEAD" && break
8352done
8353
8354  else
8355    # The variable is set, but is it from the command line or the environment?
8356
8357    # Try to remove the string !HEAD! from our list.
8358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8360      # If it failed, the variable was not from the command line. Ignore it,
8361      # but warn the user (except for BASH, which is always set by the calling BASH).
8362      if test "xHEAD" != xBASH; then
8363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8364$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8365      fi
8366      # Try to locate tool using the code snippet
8367      for ac_prog in head
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_HEAD+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $HEAD in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399HEAD=$ac_cv_path_HEAD
8400if test -n "$HEAD"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8402$as_echo "$HEAD" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$HEAD" && break
8410done
8411
8412    else
8413      # If it succeeded, then it was overridden by the user. We will use it
8414      # for the tool.
8415
8416      # First remove it from the list of overridden variables, so we can test
8417      # for unknown variables in the end.
8418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8419
8420      # Check if we try to supply an empty value
8421      if test "x$HEAD" = x; then
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8423$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8425$as_echo_n "checking for HEAD... " >&6; }
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8427$as_echo "disabled" >&6; }
8428      else
8429        # Check if the provided tool contains a complete path.
8430        tool_specified="$HEAD"
8431        tool_basename="${tool_specified##*/}"
8432        if test "x$tool_basename" = "x$tool_specified"; then
8433          # A command without a complete path is provided, search $PATH.
8434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8435$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8436          # Extract the first word of "$tool_basename", so it can be a program name with args.
8437set dummy $tool_basename; ac_word=$2
8438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8439$as_echo_n "checking for $ac_word... " >&6; }
8440if ${ac_cv_path_HEAD+:} false; then :
8441  $as_echo_n "(cached) " >&6
8442else
8443  case $HEAD in
8444  [\\/]* | ?:[\\/]*)
8445  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8446  ;;
8447  *)
8448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8449for as_dir in $PATH
8450do
8451  IFS=$as_save_IFS
8452  test -z "$as_dir" && as_dir=.
8453    for ac_exec_ext in '' $ac_executable_extensions; do
8454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8455    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8457    break 2
8458  fi
8459done
8460  done
8461IFS=$as_save_IFS
8462
8463  ;;
8464esac
8465fi
8466HEAD=$ac_cv_path_HEAD
8467if test -n "$HEAD"; then
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8469$as_echo "$HEAD" >&6; }
8470else
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
8473fi
8474
8475
8476          if test "x$HEAD" = x; then
8477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8478          fi
8479        else
8480          # Otherwise we believe it is a complete path. Use it as it is.
8481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8482$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8484$as_echo_n "checking for HEAD... " >&6; }
8485          if test ! -x "$tool_specified"; then
8486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8487$as_echo "not found" >&6; }
8488            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8489          fi
8490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8491$as_echo "$tool_specified" >&6; }
8492        fi
8493      fi
8494    fi
8495
8496  fi
8497
8498
8499
8500  if test "x$HEAD" = x; then
8501    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8502  fi
8503
8504
8505
8506
8507
8508  # Publish this variable in the help.
8509
8510
8511  if [ -z "${GUNZIP+x}" ]; then
8512    # The variable is not set by user, try to locate tool using the code snippet
8513    for ac_prog in gunzip
8514do
8515  # Extract the first word of "$ac_prog", so it can be a program name with args.
8516set dummy $ac_prog; ac_word=$2
8517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8518$as_echo_n "checking for $ac_word... " >&6; }
8519if ${ac_cv_path_GUNZIP+:} false; then :
8520  $as_echo_n "(cached) " >&6
8521else
8522  case $GUNZIP in
8523  [\\/]* | ?:[\\/]*)
8524  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8525  ;;
8526  *)
8527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8528for as_dir in $PATH
8529do
8530  IFS=$as_save_IFS
8531  test -z "$as_dir" && as_dir=.
8532    for ac_exec_ext in '' $ac_executable_extensions; do
8533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8534    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8536    break 2
8537  fi
8538done
8539  done
8540IFS=$as_save_IFS
8541
8542  ;;
8543esac
8544fi
8545GUNZIP=$ac_cv_path_GUNZIP
8546if test -n "$GUNZIP"; then
8547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8548$as_echo "$GUNZIP" >&6; }
8549else
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551$as_echo "no" >&6; }
8552fi
8553
8554
8555  test -n "$GUNZIP" && break
8556done
8557
8558  else
8559    # The variable is set, but is it from the command line or the environment?
8560
8561    # Try to remove the string !GUNZIP! from our list.
8562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8564      # If it failed, the variable was not from the command line. Ignore it,
8565      # but warn the user (except for BASH, which is always set by the calling BASH).
8566      if test "xGUNZIP" != xBASH; then
8567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8568$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8569      fi
8570      # Try to locate tool using the code snippet
8571      for ac_prog in gunzip
8572do
8573  # Extract the first word of "$ac_prog", so it can be a program name with args.
8574set dummy $ac_prog; ac_word=$2
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8576$as_echo_n "checking for $ac_word... " >&6; }
8577if ${ac_cv_path_GUNZIP+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  case $GUNZIP in
8581  [\\/]* | ?:[\\/]*)
8582  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8583  ;;
8584  *)
8585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8586for as_dir in $PATH
8587do
8588  IFS=$as_save_IFS
8589  test -z "$as_dir" && as_dir=.
8590    for ac_exec_ext in '' $ac_executable_extensions; do
8591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8592    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8594    break 2
8595  fi
8596done
8597  done
8598IFS=$as_save_IFS
8599
8600  ;;
8601esac
8602fi
8603GUNZIP=$ac_cv_path_GUNZIP
8604if test -n "$GUNZIP"; then
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8606$as_echo "$GUNZIP" >&6; }
8607else
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609$as_echo "no" >&6; }
8610fi
8611
8612
8613  test -n "$GUNZIP" && break
8614done
8615
8616    else
8617      # If it succeeded, then it was overridden by the user. We will use it
8618      # for the tool.
8619
8620      # First remove it from the list of overridden variables, so we can test
8621      # for unknown variables in the end.
8622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8623
8624      # Check if we try to supply an empty value
8625      if test "x$GUNZIP" = x; then
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8627$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8629$as_echo_n "checking for GUNZIP... " >&6; }
8630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8631$as_echo "disabled" >&6; }
8632      else
8633        # Check if the provided tool contains a complete path.
8634        tool_specified="$GUNZIP"
8635        tool_basename="${tool_specified##*/}"
8636        if test "x$tool_basename" = "x$tool_specified"; then
8637          # A command without a complete path is provided, search $PATH.
8638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8639$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8640          # Extract the first word of "$tool_basename", so it can be a program name with args.
8641set dummy $tool_basename; ac_word=$2
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8643$as_echo_n "checking for $ac_word... " >&6; }
8644if ${ac_cv_path_GUNZIP+:} false; then :
8645  $as_echo_n "(cached) " >&6
8646else
8647  case $GUNZIP in
8648  [\\/]* | ?:[\\/]*)
8649  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8650  ;;
8651  *)
8652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8653for as_dir in $PATH
8654do
8655  IFS=$as_save_IFS
8656  test -z "$as_dir" && as_dir=.
8657    for ac_exec_ext in '' $ac_executable_extensions; do
8658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8659    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8661    break 2
8662  fi
8663done
8664  done
8665IFS=$as_save_IFS
8666
8667  ;;
8668esac
8669fi
8670GUNZIP=$ac_cv_path_GUNZIP
8671if test -n "$GUNZIP"; then
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8673$as_echo "$GUNZIP" >&6; }
8674else
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676$as_echo "no" >&6; }
8677fi
8678
8679
8680          if test "x$GUNZIP" = x; then
8681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8682          fi
8683        else
8684          # Otherwise we believe it is a complete path. Use it as it is.
8685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8686$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8688$as_echo_n "checking for GUNZIP... " >&6; }
8689          if test ! -x "$tool_specified"; then
8690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8691$as_echo "not found" >&6; }
8692            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8693          fi
8694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8695$as_echo "$tool_specified" >&6; }
8696        fi
8697      fi
8698    fi
8699
8700  fi
8701
8702
8703
8704  if test "x$GUNZIP" = x; then
8705    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8706  fi
8707
8708
8709
8710
8711
8712  # Publish this variable in the help.
8713
8714
8715  if [ -z "${GZIP+x}" ]; then
8716    # The variable is not set by user, try to locate tool using the code snippet
8717    for ac_prog in pigz gzip
8718do
8719  # Extract the first word of "$ac_prog", so it can be a program name with args.
8720set dummy $ac_prog; ac_word=$2
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8722$as_echo_n "checking for $ac_word... " >&6; }
8723if ${ac_cv_path_GZIP+:} false; then :
8724  $as_echo_n "(cached) " >&6
8725else
8726  case $GZIP in
8727  [\\/]* | ?:[\\/]*)
8728  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8729  ;;
8730  *)
8731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734  IFS=$as_save_IFS
8735  test -z "$as_dir" && as_dir=.
8736    for ac_exec_ext in '' $ac_executable_extensions; do
8737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740    break 2
8741  fi
8742done
8743  done
8744IFS=$as_save_IFS
8745
8746  ;;
8747esac
8748fi
8749GZIP=$ac_cv_path_GZIP
8750if test -n "$GZIP"; then
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8752$as_echo "$GZIP" >&6; }
8753else
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8755$as_echo "no" >&6; }
8756fi
8757
8758
8759  test -n "$GZIP" && break
8760done
8761
8762  else
8763    # The variable is set, but is it from the command line or the environment?
8764
8765    # Try to remove the string !GZIP! from our list.
8766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8768      # If it failed, the variable was not from the command line. Ignore it,
8769      # but warn the user (except for BASH, which is always set by the calling BASH).
8770      if test "xGZIP" != xBASH; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8772$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8773      fi
8774      # Try to locate tool using the code snippet
8775      for ac_prog in pigz gzip
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_GZIP+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $GZIP in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807GZIP=$ac_cv_path_GZIP
8808if test -n "$GZIP"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8810$as_echo "$GZIP" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$GZIP" && break
8818done
8819
8820    else
8821      # If it succeeded, then it was overridden by the user. We will use it
8822      # for the tool.
8823
8824      # First remove it from the list of overridden variables, so we can test
8825      # for unknown variables in the end.
8826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8827
8828      # Check if we try to supply an empty value
8829      if test "x$GZIP" = x; then
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8831$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8833$as_echo_n "checking for GZIP... " >&6; }
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8835$as_echo "disabled" >&6; }
8836      else
8837        # Check if the provided tool contains a complete path.
8838        tool_specified="$GZIP"
8839        tool_basename="${tool_specified##*/}"
8840        if test "x$tool_basename" = "x$tool_specified"; then
8841          # A command without a complete path is provided, search $PATH.
8842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8843$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8844          # Extract the first word of "$tool_basename", so it can be a program name with args.
8845set dummy $tool_basename; ac_word=$2
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8847$as_echo_n "checking for $ac_word... " >&6; }
8848if ${ac_cv_path_GZIP+:} false; then :
8849  $as_echo_n "(cached) " >&6
8850else
8851  case $GZIP in
8852  [\\/]* | ?:[\\/]*)
8853  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8854  ;;
8855  *)
8856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8857for as_dir in $PATH
8858do
8859  IFS=$as_save_IFS
8860  test -z "$as_dir" && as_dir=.
8861    for ac_exec_ext in '' $ac_executable_extensions; do
8862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8863    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8865    break 2
8866  fi
8867done
8868  done
8869IFS=$as_save_IFS
8870
8871  ;;
8872esac
8873fi
8874GZIP=$ac_cv_path_GZIP
8875if test -n "$GZIP"; then
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8877$as_echo "$GZIP" >&6; }
8878else
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
8881fi
8882
8883
8884          if test "x$GZIP" = x; then
8885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8886          fi
8887        else
8888          # Otherwise we believe it is a complete path. Use it as it is.
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8890$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8892$as_echo_n "checking for GZIP... " >&6; }
8893          if test ! -x "$tool_specified"; then
8894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8895$as_echo "not found" >&6; }
8896            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8897          fi
8898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8899$as_echo "$tool_specified" >&6; }
8900        fi
8901      fi
8902    fi
8903
8904  fi
8905
8906
8907
8908  if test "x$GZIP" = x; then
8909    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8910  fi
8911
8912
8913
8914
8915
8916  # Publish this variable in the help.
8917
8918
8919  if [ -z "${LN+x}" ]; then
8920    # The variable is not set by user, try to locate tool using the code snippet
8921    for ac_prog in ln
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_LN+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $LN in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953LN=$ac_cv_path_LN
8954if test -n "$LN"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8956$as_echo "$LN" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$LN" && break
8964done
8965
8966  else
8967    # The variable is set, but is it from the command line or the environment?
8968
8969    # Try to remove the string !LN! from our list.
8970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8972      # If it failed, the variable was not from the command line. Ignore it,
8973      # but warn the user (except for BASH, which is always set by the calling BASH).
8974      if test "xLN" != xBASH; then
8975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8976$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8977      fi
8978      # Try to locate tool using the code snippet
8979      for ac_prog in ln
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_LN+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $LN in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011LN=$ac_cv_path_LN
9012if test -n "$LN"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9014$as_echo "$LN" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$LN" && break
9022done
9023
9024    else
9025      # If it succeeded, then it was overridden by the user. We will use it
9026      # for the tool.
9027
9028      # First remove it from the list of overridden variables, so we can test
9029      # for unknown variables in the end.
9030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9031
9032      # Check if we try to supply an empty value
9033      if test "x$LN" = x; then
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9035$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9037$as_echo_n "checking for LN... " >&6; }
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9039$as_echo "disabled" >&6; }
9040      else
9041        # Check if the provided tool contains a complete path.
9042        tool_specified="$LN"
9043        tool_basename="${tool_specified##*/}"
9044        if test "x$tool_basename" = "x$tool_specified"; then
9045          # A command without a complete path is provided, search $PATH.
9046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9047$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9048          # Extract the first word of "$tool_basename", so it can be a program name with args.
9049set dummy $tool_basename; ac_word=$2
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9051$as_echo_n "checking for $ac_word... " >&6; }
9052if ${ac_cv_path_LN+:} false; then :
9053  $as_echo_n "(cached) " >&6
9054else
9055  case $LN in
9056  [\\/]* | ?:[\\/]*)
9057  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9058  ;;
9059  *)
9060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9061for as_dir in $PATH
9062do
9063  IFS=$as_save_IFS
9064  test -z "$as_dir" && as_dir=.
9065    for ac_exec_ext in '' $ac_executable_extensions; do
9066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9067    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9069    break 2
9070  fi
9071done
9072  done
9073IFS=$as_save_IFS
9074
9075  ;;
9076esac
9077fi
9078LN=$ac_cv_path_LN
9079if test -n "$LN"; then
9080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9081$as_echo "$LN" >&6; }
9082else
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
9085fi
9086
9087
9088          if test "x$LN" = x; then
9089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9090          fi
9091        else
9092          # Otherwise we believe it is a complete path. Use it as it is.
9093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9094$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9096$as_echo_n "checking for LN... " >&6; }
9097          if test ! -x "$tool_specified"; then
9098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9099$as_echo "not found" >&6; }
9100            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9101          fi
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9103$as_echo "$tool_specified" >&6; }
9104        fi
9105      fi
9106    fi
9107
9108  fi
9109
9110
9111
9112  if test "x$LN" = x; then
9113    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9114  fi
9115
9116
9117
9118
9119
9120  # Publish this variable in the help.
9121
9122
9123  if [ -z "${LS+x}" ]; then
9124    # The variable is not set by user, try to locate tool using the code snippet
9125    for ac_prog in ls
9126do
9127  # Extract the first word of "$ac_prog", so it can be a program name with args.
9128set dummy $ac_prog; ac_word=$2
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
9131if ${ac_cv_path_LS+:} false; then :
9132  $as_echo_n "(cached) " >&6
9133else
9134  case $LS in
9135  [\\/]* | ?:[\\/]*)
9136  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9137  ;;
9138  *)
9139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142  IFS=$as_save_IFS
9143  test -z "$as_dir" && as_dir=.
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9146    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154  ;;
9155esac
9156fi
9157LS=$ac_cv_path_LS
9158if test -n "$LS"; then
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9160$as_echo "$LS" >&6; }
9161else
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
9165
9166
9167  test -n "$LS" && break
9168done
9169
9170  else
9171    # The variable is set, but is it from the command line or the environment?
9172
9173    # Try to remove the string !LS! from our list.
9174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9176      # If it failed, the variable was not from the command line. Ignore it,
9177      # but warn the user (except for BASH, which is always set by the calling BASH).
9178      if test "xLS" != xBASH; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9180$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9181      fi
9182      # Try to locate tool using the code snippet
9183      for ac_prog in ls
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_LS+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $LS in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215LS=$ac_cv_path_LS
9216if test -n "$LS"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9218$as_echo "$LS" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$LS" && break
9226done
9227
9228    else
9229      # If it succeeded, then it was overridden by the user. We will use it
9230      # for the tool.
9231
9232      # First remove it from the list of overridden variables, so we can test
9233      # for unknown variables in the end.
9234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9235
9236      # Check if we try to supply an empty value
9237      if test "x$LS" = x; then
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9239$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9241$as_echo_n "checking for LS... " >&6; }
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9243$as_echo "disabled" >&6; }
9244      else
9245        # Check if the provided tool contains a complete path.
9246        tool_specified="$LS"
9247        tool_basename="${tool_specified##*/}"
9248        if test "x$tool_basename" = "x$tool_specified"; then
9249          # A command without a complete path is provided, search $PATH.
9250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9251$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9252          # Extract the first word of "$tool_basename", so it can be a program name with args.
9253set dummy $tool_basename; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_LS+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $LS in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282LS=$ac_cv_path_LS
9283if test -n "$LS"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9285$as_echo "$LS" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292          if test "x$LS" = x; then
9293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9294          fi
9295        else
9296          # Otherwise we believe it is a complete path. Use it as it is.
9297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9298$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9300$as_echo_n "checking for LS... " >&6; }
9301          if test ! -x "$tool_specified"; then
9302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9303$as_echo "not found" >&6; }
9304            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9305          fi
9306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9307$as_echo "$tool_specified" >&6; }
9308        fi
9309      fi
9310    fi
9311
9312  fi
9313
9314
9315
9316  if test "x$LS" = x; then
9317    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9318  fi
9319
9320
9321
9322
9323
9324  # Publish this variable in the help.
9325
9326
9327  if [ -z "${MKDIR+x}" ]; then
9328    # The variable is not set by user, try to locate tool using the code snippet
9329    for ac_prog in mkdir
9330do
9331  # Extract the first word of "$ac_prog", so it can be a program name with args.
9332set dummy $ac_prog; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_MKDIR+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $MKDIR in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361MKDIR=$ac_cv_path_MKDIR
9362if test -n "$MKDIR"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9364$as_echo "$MKDIR" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371  test -n "$MKDIR" && break
9372done
9373
9374  else
9375    # The variable is set, but is it from the command line or the environment?
9376
9377    # Try to remove the string !MKDIR! from our list.
9378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9380      # If it failed, the variable was not from the command line. Ignore it,
9381      # but warn the user (except for BASH, which is always set by the calling BASH).
9382      if test "xMKDIR" != xBASH; then
9383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9384$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9385      fi
9386      # Try to locate tool using the code snippet
9387      for ac_prog in mkdir
9388do
9389  # Extract the first word of "$ac_prog", so it can be a program name with args.
9390set dummy $ac_prog; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_MKDIR+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $MKDIR in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419MKDIR=$ac_cv_path_MKDIR
9420if test -n "$MKDIR"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9422$as_echo "$MKDIR" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429  test -n "$MKDIR" && break
9430done
9431
9432    else
9433      # If it succeeded, then it was overridden by the user. We will use it
9434      # for the tool.
9435
9436      # First remove it from the list of overridden variables, so we can test
9437      # for unknown variables in the end.
9438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9439
9440      # Check if we try to supply an empty value
9441      if test "x$MKDIR" = x; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9443$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9445$as_echo_n "checking for MKDIR... " >&6; }
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9447$as_echo "disabled" >&6; }
9448      else
9449        # Check if the provided tool contains a complete path.
9450        tool_specified="$MKDIR"
9451        tool_basename="${tool_specified##*/}"
9452        if test "x$tool_basename" = "x$tool_specified"; then
9453          # A command without a complete path is provided, search $PATH.
9454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9455$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9456          # Extract the first word of "$tool_basename", so it can be a program name with args.
9457set dummy $tool_basename; ac_word=$2
9458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9459$as_echo_n "checking for $ac_word... " >&6; }
9460if ${ac_cv_path_MKDIR+:} false; then :
9461  $as_echo_n "(cached) " >&6
9462else
9463  case $MKDIR in
9464  [\\/]* | ?:[\\/]*)
9465  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9466  ;;
9467  *)
9468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9469for as_dir in $PATH
9470do
9471  IFS=$as_save_IFS
9472  test -z "$as_dir" && as_dir=.
9473    for ac_exec_ext in '' $ac_executable_extensions; do
9474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9475    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9477    break 2
9478  fi
9479done
9480  done
9481IFS=$as_save_IFS
9482
9483  ;;
9484esac
9485fi
9486MKDIR=$ac_cv_path_MKDIR
9487if test -n "$MKDIR"; then
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9489$as_echo "$MKDIR" >&6; }
9490else
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9492$as_echo "no" >&6; }
9493fi
9494
9495
9496          if test "x$MKDIR" = x; then
9497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9498          fi
9499        else
9500          # Otherwise we believe it is a complete path. Use it as it is.
9501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9502$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9504$as_echo_n "checking for MKDIR... " >&6; }
9505          if test ! -x "$tool_specified"; then
9506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9507$as_echo "not found" >&6; }
9508            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9509          fi
9510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9511$as_echo "$tool_specified" >&6; }
9512        fi
9513      fi
9514    fi
9515
9516  fi
9517
9518
9519
9520  if test "x$MKDIR" = x; then
9521    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9522  fi
9523
9524
9525
9526
9527
9528  # Publish this variable in the help.
9529
9530
9531  if [ -z "${MKTEMP+x}" ]; then
9532    # The variable is not set by user, try to locate tool using the code snippet
9533    for ac_prog in mktemp
9534do
9535  # Extract the first word of "$ac_prog", so it can be a program name with args.
9536set dummy $ac_prog; ac_word=$2
9537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9538$as_echo_n "checking for $ac_word... " >&6; }
9539if ${ac_cv_path_MKTEMP+:} false; then :
9540  $as_echo_n "(cached) " >&6
9541else
9542  case $MKTEMP in
9543  [\\/]* | ?:[\\/]*)
9544  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9545  ;;
9546  *)
9547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9548for as_dir in $PATH
9549do
9550  IFS=$as_save_IFS
9551  test -z "$as_dir" && as_dir=.
9552    for ac_exec_ext in '' $ac_executable_extensions; do
9553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9554    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9556    break 2
9557  fi
9558done
9559  done
9560IFS=$as_save_IFS
9561
9562  ;;
9563esac
9564fi
9565MKTEMP=$ac_cv_path_MKTEMP
9566if test -n "$MKTEMP"; then
9567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9568$as_echo "$MKTEMP" >&6; }
9569else
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
9572fi
9573
9574
9575  test -n "$MKTEMP" && break
9576done
9577
9578  else
9579    # The variable is set, but is it from the command line or the environment?
9580
9581    # Try to remove the string !MKTEMP! from our list.
9582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9584      # If it failed, the variable was not from the command line. Ignore it,
9585      # but warn the user (except for BASH, which is always set by the calling BASH).
9586      if test "xMKTEMP" != xBASH; then
9587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9588$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9589      fi
9590      # Try to locate tool using the code snippet
9591      for ac_prog in mktemp
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_MKTEMP+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $MKTEMP in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623MKTEMP=$ac_cv_path_MKTEMP
9624if test -n "$MKTEMP"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9626$as_echo "$MKTEMP" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$MKTEMP" && break
9634done
9635
9636    else
9637      # If it succeeded, then it was overridden by the user. We will use it
9638      # for the tool.
9639
9640      # First remove it from the list of overridden variables, so we can test
9641      # for unknown variables in the end.
9642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9643
9644      # Check if we try to supply an empty value
9645      if test "x$MKTEMP" = x; then
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9647$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9649$as_echo_n "checking for MKTEMP... " >&6; }
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9651$as_echo "disabled" >&6; }
9652      else
9653        # Check if the provided tool contains a complete path.
9654        tool_specified="$MKTEMP"
9655        tool_basename="${tool_specified##*/}"
9656        if test "x$tool_basename" = "x$tool_specified"; then
9657          # A command without a complete path is provided, search $PATH.
9658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9659$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9660          # Extract the first word of "$tool_basename", so it can be a program name with args.
9661set dummy $tool_basename; ac_word=$2
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9663$as_echo_n "checking for $ac_word... " >&6; }
9664if ${ac_cv_path_MKTEMP+:} false; then :
9665  $as_echo_n "(cached) " >&6
9666else
9667  case $MKTEMP in
9668  [\\/]* | ?:[\\/]*)
9669  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9670  ;;
9671  *)
9672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9673for as_dir in $PATH
9674do
9675  IFS=$as_save_IFS
9676  test -z "$as_dir" && as_dir=.
9677    for ac_exec_ext in '' $ac_executable_extensions; do
9678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9679    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9681    break 2
9682  fi
9683done
9684  done
9685IFS=$as_save_IFS
9686
9687  ;;
9688esac
9689fi
9690MKTEMP=$ac_cv_path_MKTEMP
9691if test -n "$MKTEMP"; then
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9693$as_echo "$MKTEMP" >&6; }
9694else
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
9697fi
9698
9699
9700          if test "x$MKTEMP" = x; then
9701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9702          fi
9703        else
9704          # Otherwise we believe it is a complete path. Use it as it is.
9705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9706$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9708$as_echo_n "checking for MKTEMP... " >&6; }
9709          if test ! -x "$tool_specified"; then
9710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9711$as_echo "not found" >&6; }
9712            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9713          fi
9714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9715$as_echo "$tool_specified" >&6; }
9716        fi
9717      fi
9718    fi
9719
9720  fi
9721
9722
9723
9724  if test "x$MKTEMP" = x; then
9725    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9726  fi
9727
9728
9729
9730
9731
9732  # Publish this variable in the help.
9733
9734
9735  if [ -z "${MV+x}" ]; then
9736    # The variable is not set by user, try to locate tool using the code snippet
9737    for ac_prog in mv
9738do
9739  # Extract the first word of "$ac_prog", so it can be a program name with args.
9740set dummy $ac_prog; ac_word=$2
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9742$as_echo_n "checking for $ac_word... " >&6; }
9743if ${ac_cv_path_MV+:} false; then :
9744  $as_echo_n "(cached) " >&6
9745else
9746  case $MV in
9747  [\\/]* | ?:[\\/]*)
9748  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9749  ;;
9750  *)
9751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754  IFS=$as_save_IFS
9755  test -z "$as_dir" && as_dir=.
9756    for ac_exec_ext in '' $ac_executable_extensions; do
9757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9758    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760    break 2
9761  fi
9762done
9763  done
9764IFS=$as_save_IFS
9765
9766  ;;
9767esac
9768fi
9769MV=$ac_cv_path_MV
9770if test -n "$MV"; then
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9772$as_echo "$MV" >&6; }
9773else
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775$as_echo "no" >&6; }
9776fi
9777
9778
9779  test -n "$MV" && break
9780done
9781
9782  else
9783    # The variable is set, but is it from the command line or the environment?
9784
9785    # Try to remove the string !MV! from our list.
9786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9788      # If it failed, the variable was not from the command line. Ignore it,
9789      # but warn the user (except for BASH, which is always set by the calling BASH).
9790      if test "xMV" != xBASH; then
9791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9792$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9793      fi
9794      # Try to locate tool using the code snippet
9795      for ac_prog in mv
9796do
9797  # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if ${ac_cv_path_MV+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804  case $MV in
9805  [\\/]* | ?:[\\/]*)
9806  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9807  ;;
9808  *)
9809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812  IFS=$as_save_IFS
9813  test -z "$as_dir" && as_dir=.
9814    for ac_exec_ext in '' $ac_executable_extensions; do
9815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818    break 2
9819  fi
9820done
9821  done
9822IFS=$as_save_IFS
9823
9824  ;;
9825esac
9826fi
9827MV=$ac_cv_path_MV
9828if test -n "$MV"; then
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9830$as_echo "$MV" >&6; }
9831else
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834fi
9835
9836
9837  test -n "$MV" && break
9838done
9839
9840    else
9841      # If it succeeded, then it was overridden by the user. We will use it
9842      # for the tool.
9843
9844      # First remove it from the list of overridden variables, so we can test
9845      # for unknown variables in the end.
9846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9847
9848      # Check if we try to supply an empty value
9849      if test "x$MV" = x; then
9850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9851$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9853$as_echo_n "checking for MV... " >&6; }
9854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9855$as_echo "disabled" >&6; }
9856      else
9857        # Check if the provided tool contains a complete path.
9858        tool_specified="$MV"
9859        tool_basename="${tool_specified##*/}"
9860        if test "x$tool_basename" = "x$tool_specified"; then
9861          # A command without a complete path is provided, search $PATH.
9862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9863$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9864          # Extract the first word of "$tool_basename", so it can be a program name with args.
9865set dummy $tool_basename; ac_word=$2
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867$as_echo_n "checking for $ac_word... " >&6; }
9868if ${ac_cv_path_MV+:} false; then :
9869  $as_echo_n "(cached) " >&6
9870else
9871  case $MV in
9872  [\\/]* | ?:[\\/]*)
9873  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9874  ;;
9875  *)
9876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9877for as_dir in $PATH
9878do
9879  IFS=$as_save_IFS
9880  test -z "$as_dir" && as_dir=.
9881    for ac_exec_ext in '' $ac_executable_extensions; do
9882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9883    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9885    break 2
9886  fi
9887done
9888  done
9889IFS=$as_save_IFS
9890
9891  ;;
9892esac
9893fi
9894MV=$ac_cv_path_MV
9895if test -n "$MV"; then
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9897$as_echo "$MV" >&6; }
9898else
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901fi
9902
9903
9904          if test "x$MV" = x; then
9905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9906          fi
9907        else
9908          # Otherwise we believe it is a complete path. Use it as it is.
9909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9910$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9912$as_echo_n "checking for MV... " >&6; }
9913          if test ! -x "$tool_specified"; then
9914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9915$as_echo "not found" >&6; }
9916            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9917          fi
9918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9919$as_echo "$tool_specified" >&6; }
9920        fi
9921      fi
9922    fi
9923
9924  fi
9925
9926
9927
9928  if test "x$MV" = x; then
9929    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9930  fi
9931
9932
9933
9934
9935
9936  # Publish this variable in the help.
9937
9938
9939  if [ -z "${NAWK+x}" ]; then
9940    # The variable is not set by user, try to locate tool using the code snippet
9941    for ac_prog in nawk gawk awk
9942do
9943  # Extract the first word of "$ac_prog", so it can be a program name with args.
9944set dummy $ac_prog; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_NAWK+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $NAWK in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9962    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973NAWK=$ac_cv_path_NAWK
9974if test -n "$NAWK"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9976$as_echo "$NAWK" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983  test -n "$NAWK" && break
9984done
9985
9986  else
9987    # The variable is set, but is it from the command line or the environment?
9988
9989    # Try to remove the string !NAWK! from our list.
9990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9992      # If it failed, the variable was not from the command line. Ignore it,
9993      # but warn the user (except for BASH, which is always set by the calling BASH).
9994      if test "xNAWK" != xBASH; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9996$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9997      fi
9998      # Try to locate tool using the code snippet
9999      for ac_prog in nawk gawk awk
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_NAWK+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $NAWK in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10020    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031NAWK=$ac_cv_path_NAWK
10032if test -n "$NAWK"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10034$as_echo "$NAWK" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$NAWK" && break
10042done
10043
10044    else
10045      # If it succeeded, then it was overridden by the user. We will use it
10046      # for the tool.
10047
10048      # First remove it from the list of overridden variables, so we can test
10049      # for unknown variables in the end.
10050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10051
10052      # Check if we try to supply an empty value
10053      if test "x$NAWK" = x; then
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10055$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10057$as_echo_n "checking for NAWK... " >&6; }
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10059$as_echo "disabled" >&6; }
10060      else
10061        # Check if the provided tool contains a complete path.
10062        tool_specified="$NAWK"
10063        tool_basename="${tool_specified##*/}"
10064        if test "x$tool_basename" = "x$tool_specified"; then
10065          # A command without a complete path is provided, search $PATH.
10066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10067$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10068          # Extract the first word of "$tool_basename", so it can be a program name with args.
10069set dummy $tool_basename; ac_word=$2
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10071$as_echo_n "checking for $ac_word... " >&6; }
10072if ${ac_cv_path_NAWK+:} false; then :
10073  $as_echo_n "(cached) " >&6
10074else
10075  case $NAWK in
10076  [\\/]* | ?:[\\/]*)
10077  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10078  ;;
10079  *)
10080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10081for as_dir in $PATH
10082do
10083  IFS=$as_save_IFS
10084  test -z "$as_dir" && as_dir=.
10085    for ac_exec_ext in '' $ac_executable_extensions; do
10086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10087    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10089    break 2
10090  fi
10091done
10092  done
10093IFS=$as_save_IFS
10094
10095  ;;
10096esac
10097fi
10098NAWK=$ac_cv_path_NAWK
10099if test -n "$NAWK"; then
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10101$as_echo "$NAWK" >&6; }
10102else
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108          if test "x$NAWK" = x; then
10109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10110          fi
10111        else
10112          # Otherwise we believe it is a complete path. Use it as it is.
10113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10114$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10116$as_echo_n "checking for NAWK... " >&6; }
10117          if test ! -x "$tool_specified"; then
10118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10119$as_echo "not found" >&6; }
10120            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10121          fi
10122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10123$as_echo "$tool_specified" >&6; }
10124        fi
10125      fi
10126    fi
10127
10128  fi
10129
10130
10131
10132  if test "x$NAWK" = x; then
10133    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10134  fi
10135
10136
10137
10138
10139
10140  # Publish this variable in the help.
10141
10142
10143  if [ -z "${PRINTF+x}" ]; then
10144    # The variable is not set by user, try to locate tool using the code snippet
10145    for ac_prog in printf
10146do
10147  # Extract the first word of "$ac_prog", so it can be a program name with args.
10148set dummy $ac_prog; ac_word=$2
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10150$as_echo_n "checking for $ac_word... " >&6; }
10151if ${ac_cv_path_PRINTF+:} false; then :
10152  $as_echo_n "(cached) " >&6
10153else
10154  case $PRINTF in
10155  [\\/]* | ?:[\\/]*)
10156  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10157  ;;
10158  *)
10159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10160for as_dir in $PATH
10161do
10162  IFS=$as_save_IFS
10163  test -z "$as_dir" && as_dir=.
10164    for ac_exec_ext in '' $ac_executable_extensions; do
10165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10166    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10168    break 2
10169  fi
10170done
10171  done
10172IFS=$as_save_IFS
10173
10174  ;;
10175esac
10176fi
10177PRINTF=$ac_cv_path_PRINTF
10178if test -n "$PRINTF"; then
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10180$as_echo "$PRINTF" >&6; }
10181else
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187  test -n "$PRINTF" && break
10188done
10189
10190  else
10191    # The variable is set, but is it from the command line or the environment?
10192
10193    # Try to remove the string !PRINTF! from our list.
10194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10196      # If it failed, the variable was not from the command line. Ignore it,
10197      # but warn the user (except for BASH, which is always set by the calling BASH).
10198      if test "xPRINTF" != xBASH; then
10199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10200$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10201      fi
10202      # Try to locate tool using the code snippet
10203      for ac_prog in printf
10204do
10205  # Extract the first word of "$ac_prog", so it can be a program name with args.
10206set dummy $ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_PRINTF+:} false; then :
10210  $as_echo_n "(cached) " >&6
10211else
10212  case $PRINTF in
10213  [\\/]* | ?:[\\/]*)
10214  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10215  ;;
10216  *)
10217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220  IFS=$as_save_IFS
10221  test -z "$as_dir" && as_dir=.
10222    for ac_exec_ext in '' $ac_executable_extensions; do
10223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226    break 2
10227  fi
10228done
10229  done
10230IFS=$as_save_IFS
10231
10232  ;;
10233esac
10234fi
10235PRINTF=$ac_cv_path_PRINTF
10236if test -n "$PRINTF"; then
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10238$as_echo "$PRINTF" >&6; }
10239else
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245  test -n "$PRINTF" && break
10246done
10247
10248    else
10249      # If it succeeded, then it was overridden by the user. We will use it
10250      # for the tool.
10251
10252      # First remove it from the list of overridden variables, so we can test
10253      # for unknown variables in the end.
10254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10255
10256      # Check if we try to supply an empty value
10257      if test "x$PRINTF" = x; then
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10259$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10261$as_echo_n "checking for PRINTF... " >&6; }
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10263$as_echo "disabled" >&6; }
10264      else
10265        # Check if the provided tool contains a complete path.
10266        tool_specified="$PRINTF"
10267        tool_basename="${tool_specified##*/}"
10268        if test "x$tool_basename" = "x$tool_specified"; then
10269          # A command without a complete path is provided, search $PATH.
10270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10271$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10272          # Extract the first word of "$tool_basename", so it can be a program name with args.
10273set dummy $tool_basename; ac_word=$2
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275$as_echo_n "checking for $ac_word... " >&6; }
10276if ${ac_cv_path_PRINTF+:} false; then :
10277  $as_echo_n "(cached) " >&6
10278else
10279  case $PRINTF in
10280  [\\/]* | ?:[\\/]*)
10281  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10282  ;;
10283  *)
10284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285for as_dir in $PATH
10286do
10287  IFS=$as_save_IFS
10288  test -z "$as_dir" && as_dir=.
10289    for ac_exec_ext in '' $ac_executable_extensions; do
10290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10291    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293    break 2
10294  fi
10295done
10296  done
10297IFS=$as_save_IFS
10298
10299  ;;
10300esac
10301fi
10302PRINTF=$ac_cv_path_PRINTF
10303if test -n "$PRINTF"; then
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10305$as_echo "$PRINTF" >&6; }
10306else
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312          if test "x$PRINTF" = x; then
10313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10314          fi
10315        else
10316          # Otherwise we believe it is a complete path. Use it as it is.
10317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10318$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10320$as_echo_n "checking for PRINTF... " >&6; }
10321          if test ! -x "$tool_specified"; then
10322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10323$as_echo "not found" >&6; }
10324            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10325          fi
10326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10327$as_echo "$tool_specified" >&6; }
10328        fi
10329      fi
10330    fi
10331
10332  fi
10333
10334
10335
10336  if test "x$PRINTF" = x; then
10337    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10338  fi
10339
10340
10341
10342
10343
10344  # Publish this variable in the help.
10345
10346
10347  if [ -z "${RM+x}" ]; then
10348    # The variable is not set by user, try to locate tool using the code snippet
10349    for ac_prog in rm
10350do
10351  # Extract the first word of "$ac_prog", so it can be a program name with args.
10352set dummy $ac_prog; ac_word=$2
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10354$as_echo_n "checking for $ac_word... " >&6; }
10355if ${ac_cv_path_RM+:} false; then :
10356  $as_echo_n "(cached) " >&6
10357else
10358  case $RM in
10359  [\\/]* | ?:[\\/]*)
10360  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10361  ;;
10362  *)
10363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10364for as_dir in $PATH
10365do
10366  IFS=$as_save_IFS
10367  test -z "$as_dir" && as_dir=.
10368    for ac_exec_ext in '' $ac_executable_extensions; do
10369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10370    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10372    break 2
10373  fi
10374done
10375  done
10376IFS=$as_save_IFS
10377
10378  ;;
10379esac
10380fi
10381RM=$ac_cv_path_RM
10382if test -n "$RM"; then
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10384$as_echo "$RM" >&6; }
10385else
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
10388fi
10389
10390
10391  test -n "$RM" && break
10392done
10393
10394  else
10395    # The variable is set, but is it from the command line or the environment?
10396
10397    # Try to remove the string !RM! from our list.
10398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10400      # If it failed, the variable was not from the command line. Ignore it,
10401      # but warn the user (except for BASH, which is always set by the calling BASH).
10402      if test "xRM" != xBASH; then
10403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10404$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10405      fi
10406      # Try to locate tool using the code snippet
10407      for ac_prog in rm
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_RM+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $RM in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439RM=$ac_cv_path_RM
10440if test -n "$RM"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10442$as_echo "$RM" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$RM" && break
10450done
10451
10452    else
10453      # If it succeeded, then it was overridden by the user. We will use it
10454      # for the tool.
10455
10456      # First remove it from the list of overridden variables, so we can test
10457      # for unknown variables in the end.
10458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10459
10460      # Check if we try to supply an empty value
10461      if test "x$RM" = x; then
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10463$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10465$as_echo_n "checking for RM... " >&6; }
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10467$as_echo "disabled" >&6; }
10468      else
10469        # Check if the provided tool contains a complete path.
10470        tool_specified="$RM"
10471        tool_basename="${tool_specified##*/}"
10472        if test "x$tool_basename" = "x$tool_specified"; then
10473          # A command without a complete path is provided, search $PATH.
10474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10475$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10476          # Extract the first word of "$tool_basename", so it can be a program name with args.
10477set dummy $tool_basename; ac_word=$2
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479$as_echo_n "checking for $ac_word... " >&6; }
10480if ${ac_cv_path_RM+:} false; then :
10481  $as_echo_n "(cached) " >&6
10482else
10483  case $RM in
10484  [\\/]* | ?:[\\/]*)
10485  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10486  ;;
10487  *)
10488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489for as_dir in $PATH
10490do
10491  IFS=$as_save_IFS
10492  test -z "$as_dir" && as_dir=.
10493    for ac_exec_ext in '' $ac_executable_extensions; do
10494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497    break 2
10498  fi
10499done
10500  done
10501IFS=$as_save_IFS
10502
10503  ;;
10504esac
10505fi
10506RM=$ac_cv_path_RM
10507if test -n "$RM"; then
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10509$as_echo "$RM" >&6; }
10510else
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
10513fi
10514
10515
10516          if test "x$RM" = x; then
10517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10518          fi
10519        else
10520          # Otherwise we believe it is a complete path. Use it as it is.
10521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10522$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10524$as_echo_n "checking for RM... " >&6; }
10525          if test ! -x "$tool_specified"; then
10526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10527$as_echo "not found" >&6; }
10528            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10529          fi
10530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10531$as_echo "$tool_specified" >&6; }
10532        fi
10533      fi
10534    fi
10535
10536  fi
10537
10538
10539
10540  if test "x$RM" = x; then
10541    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10542  fi
10543
10544
10545
10546
10547
10548  # Publish this variable in the help.
10549
10550
10551  if [ -z "${RMDIR+x}" ]; then
10552    # The variable is not set by user, try to locate tool using the code snippet
10553    for ac_prog in rmdir
10554do
10555  # Extract the first word of "$ac_prog", so it can be a program name with args.
10556set dummy $ac_prog; ac_word=$2
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10558$as_echo_n "checking for $ac_word... " >&6; }
10559if ${ac_cv_path_RMDIR+:} false; then :
10560  $as_echo_n "(cached) " >&6
10561else
10562  case $RMDIR in
10563  [\\/]* | ?:[\\/]*)
10564  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10565  ;;
10566  *)
10567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568for as_dir in $PATH
10569do
10570  IFS=$as_save_IFS
10571  test -z "$as_dir" && as_dir=.
10572    for ac_exec_ext in '' $ac_executable_extensions; do
10573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10574    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10576    break 2
10577  fi
10578done
10579  done
10580IFS=$as_save_IFS
10581
10582  ;;
10583esac
10584fi
10585RMDIR=$ac_cv_path_RMDIR
10586if test -n "$RMDIR"; then
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10588$as_echo "$RMDIR" >&6; }
10589else
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592fi
10593
10594
10595  test -n "$RMDIR" && break
10596done
10597
10598  else
10599    # The variable is set, but is it from the command line or the environment?
10600
10601    # Try to remove the string !RMDIR! from our list.
10602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10604      # If it failed, the variable was not from the command line. Ignore it,
10605      # but warn the user (except for BASH, which is always set by the calling BASH).
10606      if test "xRMDIR" != xBASH; then
10607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10608$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10609      fi
10610      # Try to locate tool using the code snippet
10611      for ac_prog in rmdir
10612do
10613  # Extract the first word of "$ac_prog", so it can be a program name with args.
10614set dummy $ac_prog; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
10617if ${ac_cv_path_RMDIR+:} false; then :
10618  $as_echo_n "(cached) " >&6
10619else
10620  case $RMDIR in
10621  [\\/]* | ?:[\\/]*)
10622  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10623  ;;
10624  *)
10625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640  ;;
10641esac
10642fi
10643RMDIR=$ac_cv_path_RMDIR
10644if test -n "$RMDIR"; then
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10646$as_echo "$RMDIR" >&6; }
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652
10653  test -n "$RMDIR" && break
10654done
10655
10656    else
10657      # If it succeeded, then it was overridden by the user. We will use it
10658      # for the tool.
10659
10660      # First remove it from the list of overridden variables, so we can test
10661      # for unknown variables in the end.
10662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10663
10664      # Check if we try to supply an empty value
10665      if test "x$RMDIR" = x; then
10666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10667$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10669$as_echo_n "checking for RMDIR... " >&6; }
10670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10671$as_echo "disabled" >&6; }
10672      else
10673        # Check if the provided tool contains a complete path.
10674        tool_specified="$RMDIR"
10675        tool_basename="${tool_specified##*/}"
10676        if test "x$tool_basename" = "x$tool_specified"; then
10677          # A command without a complete path is provided, search $PATH.
10678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10679$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10680          # Extract the first word of "$tool_basename", so it can be a program name with args.
10681set dummy $tool_basename; ac_word=$2
10682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10683$as_echo_n "checking for $ac_word... " >&6; }
10684if ${ac_cv_path_RMDIR+:} false; then :
10685  $as_echo_n "(cached) " >&6
10686else
10687  case $RMDIR in
10688  [\\/]* | ?:[\\/]*)
10689  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10690  ;;
10691  *)
10692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10693for as_dir in $PATH
10694do
10695  IFS=$as_save_IFS
10696  test -z "$as_dir" && as_dir=.
10697    for ac_exec_ext in '' $ac_executable_extensions; do
10698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10699    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10701    break 2
10702  fi
10703done
10704  done
10705IFS=$as_save_IFS
10706
10707  ;;
10708esac
10709fi
10710RMDIR=$ac_cv_path_RMDIR
10711if test -n "$RMDIR"; then
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10713$as_echo "$RMDIR" >&6; }
10714else
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
10717fi
10718
10719
10720          if test "x$RMDIR" = x; then
10721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10722          fi
10723        else
10724          # Otherwise we believe it is a complete path. Use it as it is.
10725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10726$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10728$as_echo_n "checking for RMDIR... " >&6; }
10729          if test ! -x "$tool_specified"; then
10730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10731$as_echo "not found" >&6; }
10732            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10733          fi
10734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10735$as_echo "$tool_specified" >&6; }
10736        fi
10737      fi
10738    fi
10739
10740  fi
10741
10742
10743
10744  if test "x$RMDIR" = x; then
10745    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if [ -z "${SH+x}" ]; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in sh
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_SH+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $SH in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789SH=$ac_cv_path_SH
10790if test -n "$SH"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10792$as_echo "$SH" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$SH" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !SH! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xSH" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in sh
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_SH+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $SH in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847SH=$ac_cv_path_SH
10848if test -n "$SH"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10850$as_echo "$SH" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$SH" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if we try to supply an empty value
10869      if test "x$SH" = x; then
10870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10871$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10873$as_echo_n "checking for SH... " >&6; }
10874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10875$as_echo "disabled" >&6; }
10876      else
10877        # Check if the provided tool contains a complete path.
10878        tool_specified="$SH"
10879        tool_basename="${tool_specified##*/}"
10880        if test "x$tool_basename" = "x$tool_specified"; then
10881          # A command without a complete path is provided, search $PATH.
10882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10883$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10884          # Extract the first word of "$tool_basename", so it can be a program name with args.
10885set dummy $tool_basename; ac_word=$2
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887$as_echo_n "checking for $ac_word... " >&6; }
10888if ${ac_cv_path_SH+:} false; then :
10889  $as_echo_n "(cached) " >&6
10890else
10891  case $SH in
10892  [\\/]* | ?:[\\/]*)
10893  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10894  ;;
10895  *)
10896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897for as_dir in $PATH
10898do
10899  IFS=$as_save_IFS
10900  test -z "$as_dir" && as_dir=.
10901    for ac_exec_ext in '' $ac_executable_extensions; do
10902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905    break 2
10906  fi
10907done
10908  done
10909IFS=$as_save_IFS
10910
10911  ;;
10912esac
10913fi
10914SH=$ac_cv_path_SH
10915if test -n "$SH"; then
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10917$as_echo "$SH" >&6; }
10918else
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921fi
10922
10923
10924          if test "x$SH" = x; then
10925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10926          fi
10927        else
10928          # Otherwise we believe it is a complete path. Use it as it is.
10929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10930$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10932$as_echo_n "checking for SH... " >&6; }
10933          if test ! -x "$tool_specified"; then
10934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10935$as_echo "not found" >&6; }
10936            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10937          fi
10938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10939$as_echo "$tool_specified" >&6; }
10940        fi
10941      fi
10942    fi
10943
10944  fi
10945
10946
10947
10948  if test "x$SH" = x; then
10949    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10950  fi
10951
10952
10953
10954
10955
10956  # Publish this variable in the help.
10957
10958
10959  if [ -z "${SORT+x}" ]; then
10960    # The variable is not set by user, try to locate tool using the code snippet
10961    for ac_prog in sort
10962do
10963  # Extract the first word of "$ac_prog", so it can be a program name with args.
10964set dummy $ac_prog; ac_word=$2
10965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10966$as_echo_n "checking for $ac_word... " >&6; }
10967if ${ac_cv_path_SORT+:} false; then :
10968  $as_echo_n "(cached) " >&6
10969else
10970  case $SORT in
10971  [\\/]* | ?:[\\/]*)
10972  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10973  ;;
10974  *)
10975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10976for as_dir in $PATH
10977do
10978  IFS=$as_save_IFS
10979  test -z "$as_dir" && as_dir=.
10980    for ac_exec_ext in '' $ac_executable_extensions; do
10981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10982    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10984    break 2
10985  fi
10986done
10987  done
10988IFS=$as_save_IFS
10989
10990  ;;
10991esac
10992fi
10993SORT=$ac_cv_path_SORT
10994if test -n "$SORT"; then
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10996$as_echo "$SORT" >&6; }
10997else
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
11000fi
11001
11002
11003  test -n "$SORT" && break
11004done
11005
11006  else
11007    # The variable is set, but is it from the command line or the environment?
11008
11009    # Try to remove the string !SORT! from our list.
11010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11012      # If it failed, the variable was not from the command line. Ignore it,
11013      # but warn the user (except for BASH, which is always set by the calling BASH).
11014      if test "xSORT" != xBASH; then
11015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11016$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11017      fi
11018      # Try to locate tool using the code snippet
11019      for ac_prog in sort
11020do
11021  # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
11025if ${ac_cv_path_SORT+:} false; then :
11026  $as_echo_n "(cached) " >&6
11027else
11028  case $SORT in
11029  [\\/]* | ?:[\\/]*)
11030  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11031  ;;
11032  *)
11033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036  IFS=$as_save_IFS
11037  test -z "$as_dir" && as_dir=.
11038    for ac_exec_ext in '' $ac_executable_extensions; do
11039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11040    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042    break 2
11043  fi
11044done
11045  done
11046IFS=$as_save_IFS
11047
11048  ;;
11049esac
11050fi
11051SORT=$ac_cv_path_SORT
11052if test -n "$SORT"; then
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11054$as_echo "$SORT" >&6; }
11055else
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058fi
11059
11060
11061  test -n "$SORT" && break
11062done
11063
11064    else
11065      # If it succeeded, then it was overridden by the user. We will use it
11066      # for the tool.
11067
11068      # First remove it from the list of overridden variables, so we can test
11069      # for unknown variables in the end.
11070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11071
11072      # Check if we try to supply an empty value
11073      if test "x$SORT" = x; then
11074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11075$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11077$as_echo_n "checking for SORT... " >&6; }
11078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11079$as_echo "disabled" >&6; }
11080      else
11081        # Check if the provided tool contains a complete path.
11082        tool_specified="$SORT"
11083        tool_basename="${tool_specified##*/}"
11084        if test "x$tool_basename" = "x$tool_specified"; then
11085          # A command without a complete path is provided, search $PATH.
11086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11087$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11088          # Extract the first word of "$tool_basename", so it can be a program name with args.
11089set dummy $tool_basename; ac_word=$2
11090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11091$as_echo_n "checking for $ac_word... " >&6; }
11092if ${ac_cv_path_SORT+:} false; then :
11093  $as_echo_n "(cached) " >&6
11094else
11095  case $SORT in
11096  [\\/]* | ?:[\\/]*)
11097  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11098  ;;
11099  *)
11100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11101for as_dir in $PATH
11102do
11103  IFS=$as_save_IFS
11104  test -z "$as_dir" && as_dir=.
11105    for ac_exec_ext in '' $ac_executable_extensions; do
11106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11107    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11109    break 2
11110  fi
11111done
11112  done
11113IFS=$as_save_IFS
11114
11115  ;;
11116esac
11117fi
11118SORT=$ac_cv_path_SORT
11119if test -n "$SORT"; then
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11121$as_echo "$SORT" >&6; }
11122else
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
11125fi
11126
11127
11128          if test "x$SORT" = x; then
11129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11130          fi
11131        else
11132          # Otherwise we believe it is a complete path. Use it as it is.
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11134$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11136$as_echo_n "checking for SORT... " >&6; }
11137          if test ! -x "$tool_specified"; then
11138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11139$as_echo "not found" >&6; }
11140            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11141          fi
11142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11143$as_echo "$tool_specified" >&6; }
11144        fi
11145      fi
11146    fi
11147
11148  fi
11149
11150
11151
11152  if test "x$SORT" = x; then
11153    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11154  fi
11155
11156
11157
11158
11159
11160  # Publish this variable in the help.
11161
11162
11163  if [ -z "${TAIL+x}" ]; then
11164    # The variable is not set by user, try to locate tool using the code snippet
11165    for ac_prog in tail
11166do
11167  # Extract the first word of "$ac_prog", so it can be a program name with args.
11168set dummy $ac_prog; ac_word=$2
11169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11170$as_echo_n "checking for $ac_word... " >&6; }
11171if ${ac_cv_path_TAIL+:} false; then :
11172  $as_echo_n "(cached) " >&6
11173else
11174  case $TAIL in
11175  [\\/]* | ?:[\\/]*)
11176  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11177  ;;
11178  *)
11179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11180for as_dir in $PATH
11181do
11182  IFS=$as_save_IFS
11183  test -z "$as_dir" && as_dir=.
11184    for ac_exec_ext in '' $ac_executable_extensions; do
11185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11186    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11188    break 2
11189  fi
11190done
11191  done
11192IFS=$as_save_IFS
11193
11194  ;;
11195esac
11196fi
11197TAIL=$ac_cv_path_TAIL
11198if test -n "$TAIL"; then
11199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11200$as_echo "$TAIL" >&6; }
11201else
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11203$as_echo "no" >&6; }
11204fi
11205
11206
11207  test -n "$TAIL" && break
11208done
11209
11210  else
11211    # The variable is set, but is it from the command line or the environment?
11212
11213    # Try to remove the string !TAIL! from our list.
11214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11216      # If it failed, the variable was not from the command line. Ignore it,
11217      # but warn the user (except for BASH, which is always set by the calling BASH).
11218      if test "xTAIL" != xBASH; then
11219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11220$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11221      fi
11222      # Try to locate tool using the code snippet
11223      for ac_prog in tail
11224do
11225  # Extract the first word of "$ac_prog", so it can be a program name with args.
11226set dummy $ac_prog; ac_word=$2
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11228$as_echo_n "checking for $ac_word... " >&6; }
11229if ${ac_cv_path_TAIL+:} false; then :
11230  $as_echo_n "(cached) " >&6
11231else
11232  case $TAIL in
11233  [\\/]* | ?:[\\/]*)
11234  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11235  ;;
11236  *)
11237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11238for as_dir in $PATH
11239do
11240  IFS=$as_save_IFS
11241  test -z "$as_dir" && as_dir=.
11242    for ac_exec_ext in '' $ac_executable_extensions; do
11243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11244    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11246    break 2
11247  fi
11248done
11249  done
11250IFS=$as_save_IFS
11251
11252  ;;
11253esac
11254fi
11255TAIL=$ac_cv_path_TAIL
11256if test -n "$TAIL"; then
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11258$as_echo "$TAIL" >&6; }
11259else
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
11262fi
11263
11264
11265  test -n "$TAIL" && break
11266done
11267
11268    else
11269      # If it succeeded, then it was overridden by the user. We will use it
11270      # for the tool.
11271
11272      # First remove it from the list of overridden variables, so we can test
11273      # for unknown variables in the end.
11274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11275
11276      # Check if we try to supply an empty value
11277      if test "x$TAIL" = x; then
11278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11279$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11281$as_echo_n "checking for TAIL... " >&6; }
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11283$as_echo "disabled" >&6; }
11284      else
11285        # Check if the provided tool contains a complete path.
11286        tool_specified="$TAIL"
11287        tool_basename="${tool_specified##*/}"
11288        if test "x$tool_basename" = "x$tool_specified"; then
11289          # A command without a complete path is provided, search $PATH.
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11291$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11292          # Extract the first word of "$tool_basename", so it can be a program name with args.
11293set dummy $tool_basename; ac_word=$2
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11295$as_echo_n "checking for $ac_word... " >&6; }
11296if ${ac_cv_path_TAIL+:} false; then :
11297  $as_echo_n "(cached) " >&6
11298else
11299  case $TAIL in
11300  [\\/]* | ?:[\\/]*)
11301  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11302  ;;
11303  *)
11304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11305for as_dir in $PATH
11306do
11307  IFS=$as_save_IFS
11308  test -z "$as_dir" && as_dir=.
11309    for ac_exec_ext in '' $ac_executable_extensions; do
11310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11311    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11313    break 2
11314  fi
11315done
11316  done
11317IFS=$as_save_IFS
11318
11319  ;;
11320esac
11321fi
11322TAIL=$ac_cv_path_TAIL
11323if test -n "$TAIL"; then
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11325$as_echo "$TAIL" >&6; }
11326else
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
11329fi
11330
11331
11332          if test "x$TAIL" = x; then
11333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11334          fi
11335        else
11336          # Otherwise we believe it is a complete path. Use it as it is.
11337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11338$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11340$as_echo_n "checking for TAIL... " >&6; }
11341          if test ! -x "$tool_specified"; then
11342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11343$as_echo "not found" >&6; }
11344            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11345          fi
11346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11347$as_echo "$tool_specified" >&6; }
11348        fi
11349      fi
11350    fi
11351
11352  fi
11353
11354
11355
11356  if test "x$TAIL" = x; then
11357    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11358  fi
11359
11360
11361
11362
11363
11364  # Publish this variable in the help.
11365
11366
11367  if [ -z "${TAR+x}" ]; then
11368    # The variable is not set by user, try to locate tool using the code snippet
11369    for ac_prog in gtar tar
11370do
11371  # Extract the first word of "$ac_prog", so it can be a program name with args.
11372set dummy $ac_prog; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_TAR+:} false; then :
11376  $as_echo_n "(cached) " >&6
11377else
11378  case $TAR in
11379  [\\/]* | ?:[\\/]*)
11380  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11381  ;;
11382  *)
11383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386  IFS=$as_save_IFS
11387  test -z "$as_dir" && as_dir=.
11388    for ac_exec_ext in '' $ac_executable_extensions; do
11389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392    break 2
11393  fi
11394done
11395  done
11396IFS=$as_save_IFS
11397
11398  ;;
11399esac
11400fi
11401TAR=$ac_cv_path_TAR
11402if test -n "$TAR"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11404$as_echo "$TAR" >&6; }
11405else
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
11408fi
11409
11410
11411  test -n "$TAR" && break
11412done
11413
11414  else
11415    # The variable is set, but is it from the command line or the environment?
11416
11417    # Try to remove the string !TAR! from our list.
11418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11420      # If it failed, the variable was not from the command line. Ignore it,
11421      # but warn the user (except for BASH, which is always set by the calling BASH).
11422      if test "xTAR" != xBASH; then
11423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11424$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11425      fi
11426      # Try to locate tool using the code snippet
11427      for ac_prog in gtar tar
11428do
11429  # Extract the first word of "$ac_prog", so it can be a program name with args.
11430set dummy $ac_prog; ac_word=$2
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11432$as_echo_n "checking for $ac_word... " >&6; }
11433if ${ac_cv_path_TAR+:} false; then :
11434  $as_echo_n "(cached) " >&6
11435else
11436  case $TAR in
11437  [\\/]* | ?:[\\/]*)
11438  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11439  ;;
11440  *)
11441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456  ;;
11457esac
11458fi
11459TAR=$ac_cv_path_TAR
11460if test -n "$TAR"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11462$as_echo "$TAR" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$TAR" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if we try to supply an empty value
11481      if test "x$TAR" = x; then
11482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11483$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11485$as_echo_n "checking for TAR... " >&6; }
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11487$as_echo "disabled" >&6; }
11488      else
11489        # Check if the provided tool contains a complete path.
11490        tool_specified="$TAR"
11491        tool_basename="${tool_specified##*/}"
11492        if test "x$tool_basename" = "x$tool_specified"; then
11493          # A command without a complete path is provided, search $PATH.
11494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11495$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11496          # Extract the first word of "$tool_basename", so it can be a program name with args.
11497set dummy $tool_basename; ac_word=$2
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11499$as_echo_n "checking for $ac_word... " >&6; }
11500if ${ac_cv_path_TAR+:} false; then :
11501  $as_echo_n "(cached) " >&6
11502else
11503  case $TAR in
11504  [\\/]* | ?:[\\/]*)
11505  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11506  ;;
11507  *)
11508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11509for as_dir in $PATH
11510do
11511  IFS=$as_save_IFS
11512  test -z "$as_dir" && as_dir=.
11513    for ac_exec_ext in '' $ac_executable_extensions; do
11514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11515    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11517    break 2
11518  fi
11519done
11520  done
11521IFS=$as_save_IFS
11522
11523  ;;
11524esac
11525fi
11526TAR=$ac_cv_path_TAR
11527if test -n "$TAR"; then
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11529$as_echo "$TAR" >&6; }
11530else
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533fi
11534
11535
11536          if test "x$TAR" = x; then
11537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11538          fi
11539        else
11540          # Otherwise we believe it is a complete path. Use it as it is.
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11542$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11544$as_echo_n "checking for TAR... " >&6; }
11545          if test ! -x "$tool_specified"; then
11546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11547$as_echo "not found" >&6; }
11548            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11549          fi
11550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11551$as_echo "$tool_specified" >&6; }
11552        fi
11553      fi
11554    fi
11555
11556  fi
11557
11558
11559
11560  if test "x$TAR" = x; then
11561    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11562  fi
11563
11564
11565
11566
11567
11568  # Publish this variable in the help.
11569
11570
11571  if [ -z "${TEE+x}" ]; then
11572    # The variable is not set by user, try to locate tool using the code snippet
11573    for ac_prog in tee
11574do
11575  # Extract the first word of "$ac_prog", so it can be a program name with args.
11576set dummy $ac_prog; ac_word=$2
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11578$as_echo_n "checking for $ac_word... " >&6; }
11579if ${ac_cv_path_TEE+:} false; then :
11580  $as_echo_n "(cached) " >&6
11581else
11582  case $TEE in
11583  [\\/]* | ?:[\\/]*)
11584  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11585  ;;
11586  *)
11587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11588for as_dir in $PATH
11589do
11590  IFS=$as_save_IFS
11591  test -z "$as_dir" && as_dir=.
11592    for ac_exec_ext in '' $ac_executable_extensions; do
11593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11594    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11596    break 2
11597  fi
11598done
11599  done
11600IFS=$as_save_IFS
11601
11602  ;;
11603esac
11604fi
11605TEE=$ac_cv_path_TEE
11606if test -n "$TEE"; then
11607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11608$as_echo "$TEE" >&6; }
11609else
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612fi
11613
11614
11615  test -n "$TEE" && break
11616done
11617
11618  else
11619    # The variable is set, but is it from the command line or the environment?
11620
11621    # Try to remove the string !TEE! from our list.
11622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11624      # If it failed, the variable was not from the command line. Ignore it,
11625      # but warn the user (except for BASH, which is always set by the calling BASH).
11626      if test "xTEE" != xBASH; then
11627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11628$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11629      fi
11630      # Try to locate tool using the code snippet
11631      for ac_prog in tee
11632do
11633  # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
11637if ${ac_cv_path_TEE+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  case $TEE in
11641  [\\/]* | ?:[\\/]*)
11642  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11643  ;;
11644  *)
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11652    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11654    break 2
11655  fi
11656done
11657  done
11658IFS=$as_save_IFS
11659
11660  ;;
11661esac
11662fi
11663TEE=$ac_cv_path_TEE
11664if test -n "$TEE"; then
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11666$as_echo "$TEE" >&6; }
11667else
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670fi
11671
11672
11673  test -n "$TEE" && break
11674done
11675
11676    else
11677      # If it succeeded, then it was overridden by the user. We will use it
11678      # for the tool.
11679
11680      # First remove it from the list of overridden variables, so we can test
11681      # for unknown variables in the end.
11682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11683
11684      # Check if we try to supply an empty value
11685      if test "x$TEE" = x; then
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11687$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11689$as_echo_n "checking for TEE... " >&6; }
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11691$as_echo "disabled" >&6; }
11692      else
11693        # Check if the provided tool contains a complete path.
11694        tool_specified="$TEE"
11695        tool_basename="${tool_specified##*/}"
11696        if test "x$tool_basename" = "x$tool_specified"; then
11697          # A command without a complete path is provided, search $PATH.
11698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11699$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11700          # Extract the first word of "$tool_basename", so it can be a program name with args.
11701set dummy $tool_basename; ac_word=$2
11702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11703$as_echo_n "checking for $ac_word... " >&6; }
11704if ${ac_cv_path_TEE+:} false; then :
11705  $as_echo_n "(cached) " >&6
11706else
11707  case $TEE in
11708  [\\/]* | ?:[\\/]*)
11709  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11710  ;;
11711  *)
11712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11713for as_dir in $PATH
11714do
11715  IFS=$as_save_IFS
11716  test -z "$as_dir" && as_dir=.
11717    for ac_exec_ext in '' $ac_executable_extensions; do
11718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11719    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11721    break 2
11722  fi
11723done
11724  done
11725IFS=$as_save_IFS
11726
11727  ;;
11728esac
11729fi
11730TEE=$ac_cv_path_TEE
11731if test -n "$TEE"; then
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11733$as_echo "$TEE" >&6; }
11734else
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
11737fi
11738
11739
11740          if test "x$TEE" = x; then
11741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11742          fi
11743        else
11744          # Otherwise we believe it is a complete path. Use it as it is.
11745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11746$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11748$as_echo_n "checking for TEE... " >&6; }
11749          if test ! -x "$tool_specified"; then
11750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11751$as_echo "not found" >&6; }
11752            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11753          fi
11754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11755$as_echo "$tool_specified" >&6; }
11756        fi
11757      fi
11758    fi
11759
11760  fi
11761
11762
11763
11764  if test "x$TEE" = x; then
11765    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11766  fi
11767
11768
11769
11770
11771
11772  # Publish this variable in the help.
11773
11774
11775  if [ -z "${TOUCH+x}" ]; then
11776    # The variable is not set by user, try to locate tool using the code snippet
11777    for ac_prog in touch
11778do
11779  # Extract the first word of "$ac_prog", so it can be a program name with args.
11780set dummy $ac_prog; ac_word=$2
11781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11782$as_echo_n "checking for $ac_word... " >&6; }
11783if ${ac_cv_path_TOUCH+:} false; then :
11784  $as_echo_n "(cached) " >&6
11785else
11786  case $TOUCH in
11787  [\\/]* | ?:[\\/]*)
11788  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11789  ;;
11790  *)
11791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11792for as_dir in $PATH
11793do
11794  IFS=$as_save_IFS
11795  test -z "$as_dir" && as_dir=.
11796    for ac_exec_ext in '' $ac_executable_extensions; do
11797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11798    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11800    break 2
11801  fi
11802done
11803  done
11804IFS=$as_save_IFS
11805
11806  ;;
11807esac
11808fi
11809TOUCH=$ac_cv_path_TOUCH
11810if test -n "$TOUCH"; then
11811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11812$as_echo "$TOUCH" >&6; }
11813else
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
11816fi
11817
11818
11819  test -n "$TOUCH" && break
11820done
11821
11822  else
11823    # The variable is set, but is it from the command line or the environment?
11824
11825    # Try to remove the string !TOUCH! from our list.
11826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11828      # If it failed, the variable was not from the command line. Ignore it,
11829      # but warn the user (except for BASH, which is always set by the calling BASH).
11830      if test "xTOUCH" != xBASH; then
11831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11832$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11833      fi
11834      # Try to locate tool using the code snippet
11835      for ac_prog in touch
11836do
11837  # Extract the first word of "$ac_prog", so it can be a program name with args.
11838set dummy $ac_prog; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_TOUCH+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $TOUCH in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867TOUCH=$ac_cv_path_TOUCH
11868if test -n "$TOUCH"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11870$as_echo "$TOUCH" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877  test -n "$TOUCH" && break
11878done
11879
11880    else
11881      # If it succeeded, then it was overridden by the user. We will use it
11882      # for the tool.
11883
11884      # First remove it from the list of overridden variables, so we can test
11885      # for unknown variables in the end.
11886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11887
11888      # Check if we try to supply an empty value
11889      if test "x$TOUCH" = x; then
11890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11891$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11893$as_echo_n "checking for TOUCH... " >&6; }
11894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11895$as_echo "disabled" >&6; }
11896      else
11897        # Check if the provided tool contains a complete path.
11898        tool_specified="$TOUCH"
11899        tool_basename="${tool_specified##*/}"
11900        if test "x$tool_basename" = "x$tool_specified"; then
11901          # A command without a complete path is provided, search $PATH.
11902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11903$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11904          # Extract the first word of "$tool_basename", so it can be a program name with args.
11905set dummy $tool_basename; ac_word=$2
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11907$as_echo_n "checking for $ac_word... " >&6; }
11908if ${ac_cv_path_TOUCH+:} false; then :
11909  $as_echo_n "(cached) " >&6
11910else
11911  case $TOUCH in
11912  [\\/]* | ?:[\\/]*)
11913  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11914  ;;
11915  *)
11916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11917for as_dir in $PATH
11918do
11919  IFS=$as_save_IFS
11920  test -z "$as_dir" && as_dir=.
11921    for ac_exec_ext in '' $ac_executable_extensions; do
11922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11923    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11925    break 2
11926  fi
11927done
11928  done
11929IFS=$as_save_IFS
11930
11931  ;;
11932esac
11933fi
11934TOUCH=$ac_cv_path_TOUCH
11935if test -n "$TOUCH"; then
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11937$as_echo "$TOUCH" >&6; }
11938else
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
11941fi
11942
11943
11944          if test "x$TOUCH" = x; then
11945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11946          fi
11947        else
11948          # Otherwise we believe it is a complete path. Use it as it is.
11949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11950$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11952$as_echo_n "checking for TOUCH... " >&6; }
11953          if test ! -x "$tool_specified"; then
11954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11955$as_echo "not found" >&6; }
11956            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11957          fi
11958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11959$as_echo "$tool_specified" >&6; }
11960        fi
11961      fi
11962    fi
11963
11964  fi
11965
11966
11967
11968  if test "x$TOUCH" = x; then
11969    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11970  fi
11971
11972
11973
11974
11975
11976  # Publish this variable in the help.
11977
11978
11979  if [ -z "${TR+x}" ]; then
11980    # The variable is not set by user, try to locate tool using the code snippet
11981    for ac_prog in tr
11982do
11983  # Extract the first word of "$ac_prog", so it can be a program name with args.
11984set dummy $ac_prog; ac_word=$2
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11986$as_echo_n "checking for $ac_word... " >&6; }
11987if ${ac_cv_path_TR+:} false; then :
11988  $as_echo_n "(cached) " >&6
11989else
11990  case $TR in
11991  [\\/]* | ?:[\\/]*)
11992  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11993  ;;
11994  *)
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_exec_ext in '' $ac_executable_extensions; do
12001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12002    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12004    break 2
12005  fi
12006done
12007  done
12008IFS=$as_save_IFS
12009
12010  ;;
12011esac
12012fi
12013TR=$ac_cv_path_TR
12014if test -n "$TR"; then
12015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12016$as_echo "$TR" >&6; }
12017else
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12019$as_echo "no" >&6; }
12020fi
12021
12022
12023  test -n "$TR" && break
12024done
12025
12026  else
12027    # The variable is set, but is it from the command line or the environment?
12028
12029    # Try to remove the string !TR! from our list.
12030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12032      # If it failed, the variable was not from the command line. Ignore it,
12033      # but warn the user (except for BASH, which is always set by the calling BASH).
12034      if test "xTR" != xBASH; then
12035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12036$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12037      fi
12038      # Try to locate tool using the code snippet
12039      for ac_prog in tr
12040do
12041  # Extract the first word of "$ac_prog", so it can be a program name with args.
12042set dummy $ac_prog; ac_word=$2
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044$as_echo_n "checking for $ac_word... " >&6; }
12045if ${ac_cv_path_TR+:} false; then :
12046  $as_echo_n "(cached) " >&6
12047else
12048  case $TR in
12049  [\\/]* | ?:[\\/]*)
12050  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12051  ;;
12052  *)
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_exec_ext in '' $ac_executable_extensions; do
12059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12060    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12062    break 2
12063  fi
12064done
12065  done
12066IFS=$as_save_IFS
12067
12068  ;;
12069esac
12070fi
12071TR=$ac_cv_path_TR
12072if test -n "$TR"; then
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12074$as_echo "$TR" >&6; }
12075else
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078fi
12079
12080
12081  test -n "$TR" && break
12082done
12083
12084    else
12085      # If it succeeded, then it was overridden by the user. We will use it
12086      # for the tool.
12087
12088      # First remove it from the list of overridden variables, so we can test
12089      # for unknown variables in the end.
12090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12091
12092      # Check if we try to supply an empty value
12093      if test "x$TR" = x; then
12094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12095$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12097$as_echo_n "checking for TR... " >&6; }
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12099$as_echo "disabled" >&6; }
12100      else
12101        # Check if the provided tool contains a complete path.
12102        tool_specified="$TR"
12103        tool_basename="${tool_specified##*/}"
12104        if test "x$tool_basename" = "x$tool_specified"; then
12105          # A command without a complete path is provided, search $PATH.
12106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12107$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12108          # Extract the first word of "$tool_basename", so it can be a program name with args.
12109set dummy $tool_basename; ac_word=$2
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12111$as_echo_n "checking for $ac_word... " >&6; }
12112if ${ac_cv_path_TR+:} false; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  case $TR in
12116  [\\/]* | ?:[\\/]*)
12117  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12118  ;;
12119  *)
12120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12121for as_dir in $PATH
12122do
12123  IFS=$as_save_IFS
12124  test -z "$as_dir" && as_dir=.
12125    for ac_exec_ext in '' $ac_executable_extensions; do
12126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12127    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12129    break 2
12130  fi
12131done
12132  done
12133IFS=$as_save_IFS
12134
12135  ;;
12136esac
12137fi
12138TR=$ac_cv_path_TR
12139if test -n "$TR"; then
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12141$as_echo "$TR" >&6; }
12142else
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12144$as_echo "no" >&6; }
12145fi
12146
12147
12148          if test "x$TR" = x; then
12149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12150          fi
12151        else
12152          # Otherwise we believe it is a complete path. Use it as it is.
12153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12154$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12156$as_echo_n "checking for TR... " >&6; }
12157          if test ! -x "$tool_specified"; then
12158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12159$as_echo "not found" >&6; }
12160            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12161          fi
12162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12163$as_echo "$tool_specified" >&6; }
12164        fi
12165      fi
12166    fi
12167
12168  fi
12169
12170
12171
12172  if test "x$TR" = x; then
12173    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12174  fi
12175
12176
12177
12178
12179
12180  # Publish this variable in the help.
12181
12182
12183  if [ -z "${UNAME+x}" ]; then
12184    # The variable is not set by user, try to locate tool using the code snippet
12185    for ac_prog in uname
12186do
12187  # Extract the first word of "$ac_prog", so it can be a program name with args.
12188set dummy $ac_prog; ac_word=$2
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12190$as_echo_n "checking for $ac_word... " >&6; }
12191if ${ac_cv_path_UNAME+:} false; then :
12192  $as_echo_n "(cached) " >&6
12193else
12194  case $UNAME in
12195  [\\/]* | ?:[\\/]*)
12196  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12197  ;;
12198  *)
12199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12200for as_dir in $PATH
12201do
12202  IFS=$as_save_IFS
12203  test -z "$as_dir" && as_dir=.
12204    for ac_exec_ext in '' $ac_executable_extensions; do
12205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12206    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12208    break 2
12209  fi
12210done
12211  done
12212IFS=$as_save_IFS
12213
12214  ;;
12215esac
12216fi
12217UNAME=$ac_cv_path_UNAME
12218if test -n "$UNAME"; then
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12220$as_echo "$UNAME" >&6; }
12221else
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12223$as_echo "no" >&6; }
12224fi
12225
12226
12227  test -n "$UNAME" && break
12228done
12229
12230  else
12231    # The variable is set, but is it from the command line or the environment?
12232
12233    # Try to remove the string !UNAME! from our list.
12234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12236      # If it failed, the variable was not from the command line. Ignore it,
12237      # but warn the user (except for BASH, which is always set by the calling BASH).
12238      if test "xUNAME" != xBASH; then
12239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12240$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12241      fi
12242      # Try to locate tool using the code snippet
12243      for ac_prog in uname
12244do
12245  # Extract the first word of "$ac_prog", so it can be a program name with args.
12246set dummy $ac_prog; ac_word=$2
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12248$as_echo_n "checking for $ac_word... " >&6; }
12249if ${ac_cv_path_UNAME+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  case $UNAME in
12253  [\\/]* | ?:[\\/]*)
12254  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12255  ;;
12256  *)
12257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12258for as_dir in $PATH
12259do
12260  IFS=$as_save_IFS
12261  test -z "$as_dir" && as_dir=.
12262    for ac_exec_ext in '' $ac_executable_extensions; do
12263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12264    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12266    break 2
12267  fi
12268done
12269  done
12270IFS=$as_save_IFS
12271
12272  ;;
12273esac
12274fi
12275UNAME=$ac_cv_path_UNAME
12276if test -n "$UNAME"; then
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12278$as_echo "$UNAME" >&6; }
12279else
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
12282fi
12283
12284
12285  test -n "$UNAME" && break
12286done
12287
12288    else
12289      # If it succeeded, then it was overridden by the user. We will use it
12290      # for the tool.
12291
12292      # First remove it from the list of overridden variables, so we can test
12293      # for unknown variables in the end.
12294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12295
12296      # Check if we try to supply an empty value
12297      if test "x$UNAME" = x; then
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12299$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12301$as_echo_n "checking for UNAME... " >&6; }
12302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12303$as_echo "disabled" >&6; }
12304      else
12305        # Check if the provided tool contains a complete path.
12306        tool_specified="$UNAME"
12307        tool_basename="${tool_specified##*/}"
12308        if test "x$tool_basename" = "x$tool_specified"; then
12309          # A command without a complete path is provided, search $PATH.
12310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12311$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12312          # Extract the first word of "$tool_basename", so it can be a program name with args.
12313set dummy $tool_basename; ac_word=$2
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12315$as_echo_n "checking for $ac_word... " >&6; }
12316if ${ac_cv_path_UNAME+:} false; then :
12317  $as_echo_n "(cached) " >&6
12318else
12319  case $UNAME in
12320  [\\/]* | ?:[\\/]*)
12321  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12322  ;;
12323  *)
12324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325for as_dir in $PATH
12326do
12327  IFS=$as_save_IFS
12328  test -z "$as_dir" && as_dir=.
12329    for ac_exec_ext in '' $ac_executable_extensions; do
12330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12333    break 2
12334  fi
12335done
12336  done
12337IFS=$as_save_IFS
12338
12339  ;;
12340esac
12341fi
12342UNAME=$ac_cv_path_UNAME
12343if test -n "$UNAME"; then
12344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12345$as_echo "$UNAME" >&6; }
12346else
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12348$as_echo "no" >&6; }
12349fi
12350
12351
12352          if test "x$UNAME" = x; then
12353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12354          fi
12355        else
12356          # Otherwise we believe it is a complete path. Use it as it is.
12357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12358$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12360$as_echo_n "checking for UNAME... " >&6; }
12361          if test ! -x "$tool_specified"; then
12362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12363$as_echo "not found" >&6; }
12364            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12365          fi
12366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12367$as_echo "$tool_specified" >&6; }
12368        fi
12369      fi
12370    fi
12371
12372  fi
12373
12374
12375
12376  if test "x$UNAME" = x; then
12377    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12378  fi
12379
12380
12381
12382
12383
12384  # Publish this variable in the help.
12385
12386
12387  if [ -z "${UNIQ+x}" ]; then
12388    # The variable is not set by user, try to locate tool using the code snippet
12389    for ac_prog in uniq
12390do
12391  # Extract the first word of "$ac_prog", so it can be a program name with args.
12392set dummy $ac_prog; ac_word=$2
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12394$as_echo_n "checking for $ac_word... " >&6; }
12395if ${ac_cv_path_UNIQ+:} false; then :
12396  $as_echo_n "(cached) " >&6
12397else
12398  case $UNIQ in
12399  [\\/]* | ?:[\\/]*)
12400  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12401  ;;
12402  *)
12403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12404for as_dir in $PATH
12405do
12406  IFS=$as_save_IFS
12407  test -z "$as_dir" && as_dir=.
12408    for ac_exec_ext in '' $ac_executable_extensions; do
12409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12410    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12412    break 2
12413  fi
12414done
12415  done
12416IFS=$as_save_IFS
12417
12418  ;;
12419esac
12420fi
12421UNIQ=$ac_cv_path_UNIQ
12422if test -n "$UNIQ"; then
12423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12424$as_echo "$UNIQ" >&6; }
12425else
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12427$as_echo "no" >&6; }
12428fi
12429
12430
12431  test -n "$UNIQ" && break
12432done
12433
12434  else
12435    # The variable is set, but is it from the command line or the environment?
12436
12437    # Try to remove the string !UNIQ! from our list.
12438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12440      # If it failed, the variable was not from the command line. Ignore it,
12441      # but warn the user (except for BASH, which is always set by the calling BASH).
12442      if test "xUNIQ" != xBASH; then
12443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12444$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12445      fi
12446      # Try to locate tool using the code snippet
12447      for ac_prog in uniq
12448do
12449  # Extract the first word of "$ac_prog", so it can be a program name with args.
12450set dummy $ac_prog; ac_word=$2
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12452$as_echo_n "checking for $ac_word... " >&6; }
12453if ${ac_cv_path_UNIQ+:} false; then :
12454  $as_echo_n "(cached) " >&6
12455else
12456  case $UNIQ in
12457  [\\/]* | ?:[\\/]*)
12458  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12459  ;;
12460  *)
12461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12462for as_dir in $PATH
12463do
12464  IFS=$as_save_IFS
12465  test -z "$as_dir" && as_dir=.
12466    for ac_exec_ext in '' $ac_executable_extensions; do
12467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12468    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12470    break 2
12471  fi
12472done
12473  done
12474IFS=$as_save_IFS
12475
12476  ;;
12477esac
12478fi
12479UNIQ=$ac_cv_path_UNIQ
12480if test -n "$UNIQ"; then
12481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12482$as_echo "$UNIQ" >&6; }
12483else
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486fi
12487
12488
12489  test -n "$UNIQ" && break
12490done
12491
12492    else
12493      # If it succeeded, then it was overridden by the user. We will use it
12494      # for the tool.
12495
12496      # First remove it from the list of overridden variables, so we can test
12497      # for unknown variables in the end.
12498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12499
12500      # Check if we try to supply an empty value
12501      if test "x$UNIQ" = x; then
12502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12503$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12505$as_echo_n "checking for UNIQ... " >&6; }
12506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12507$as_echo "disabled" >&6; }
12508      else
12509        # Check if the provided tool contains a complete path.
12510        tool_specified="$UNIQ"
12511        tool_basename="${tool_specified##*/}"
12512        if test "x$tool_basename" = "x$tool_specified"; then
12513          # A command without a complete path is provided, search $PATH.
12514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12515$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12516          # Extract the first word of "$tool_basename", so it can be a program name with args.
12517set dummy $tool_basename; ac_word=$2
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12519$as_echo_n "checking for $ac_word... " >&6; }
12520if ${ac_cv_path_UNIQ+:} false; then :
12521  $as_echo_n "(cached) " >&6
12522else
12523  case $UNIQ in
12524  [\\/]* | ?:[\\/]*)
12525  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12526  ;;
12527  *)
12528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12529for as_dir in $PATH
12530do
12531  IFS=$as_save_IFS
12532  test -z "$as_dir" && as_dir=.
12533    for ac_exec_ext in '' $ac_executable_extensions; do
12534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12535    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12537    break 2
12538  fi
12539done
12540  done
12541IFS=$as_save_IFS
12542
12543  ;;
12544esac
12545fi
12546UNIQ=$ac_cv_path_UNIQ
12547if test -n "$UNIQ"; then
12548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12549$as_echo "$UNIQ" >&6; }
12550else
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12552$as_echo "no" >&6; }
12553fi
12554
12555
12556          if test "x$UNIQ" = x; then
12557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12558          fi
12559        else
12560          # Otherwise we believe it is a complete path. Use it as it is.
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12562$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12564$as_echo_n "checking for UNIQ... " >&6; }
12565          if test ! -x "$tool_specified"; then
12566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12567$as_echo "not found" >&6; }
12568            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12569          fi
12570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12571$as_echo "$tool_specified" >&6; }
12572        fi
12573      fi
12574    fi
12575
12576  fi
12577
12578
12579
12580  if test "x$UNIQ" = x; then
12581    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12582  fi
12583
12584
12585
12586
12587
12588  # Publish this variable in the help.
12589
12590
12591  if [ -z "${WC+x}" ]; then
12592    # The variable is not set by user, try to locate tool using the code snippet
12593    for ac_prog in wc
12594do
12595  # Extract the first word of "$ac_prog", so it can be a program name with args.
12596set dummy $ac_prog; ac_word=$2
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12598$as_echo_n "checking for $ac_word... " >&6; }
12599if ${ac_cv_path_WC+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  case $WC in
12603  [\\/]* | ?:[\\/]*)
12604  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12605  ;;
12606  *)
12607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622  ;;
12623esac
12624fi
12625WC=$ac_cv_path_WC
12626if test -n "$WC"; then
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12628$as_echo "$WC" >&6; }
12629else
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632fi
12633
12634
12635  test -n "$WC" && break
12636done
12637
12638  else
12639    # The variable is set, but is it from the command line or the environment?
12640
12641    # Try to remove the string !WC! from our list.
12642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12644      # If it failed, the variable was not from the command line. Ignore it,
12645      # but warn the user (except for BASH, which is always set by the calling BASH).
12646      if test "xWC" != xBASH; then
12647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12648$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12649      fi
12650      # Try to locate tool using the code snippet
12651      for ac_prog in wc
12652do
12653  # Extract the first word of "$ac_prog", so it can be a program name with args.
12654set dummy $ac_prog; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_WC+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $WC in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683WC=$ac_cv_path_WC
12684if test -n "$WC"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12686$as_echo "$WC" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693  test -n "$WC" && break
12694done
12695
12696    else
12697      # If it succeeded, then it was overridden by the user. We will use it
12698      # for the tool.
12699
12700      # First remove it from the list of overridden variables, so we can test
12701      # for unknown variables in the end.
12702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12703
12704      # Check if we try to supply an empty value
12705      if test "x$WC" = x; then
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12707$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12709$as_echo_n "checking for WC... " >&6; }
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12711$as_echo "disabled" >&6; }
12712      else
12713        # Check if the provided tool contains a complete path.
12714        tool_specified="$WC"
12715        tool_basename="${tool_specified##*/}"
12716        if test "x$tool_basename" = "x$tool_specified"; then
12717          # A command without a complete path is provided, search $PATH.
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12719$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12720          # Extract the first word of "$tool_basename", so it can be a program name with args.
12721set dummy $tool_basename; ac_word=$2
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12723$as_echo_n "checking for $ac_word... " >&6; }
12724if ${ac_cv_path_WC+:} false; then :
12725  $as_echo_n "(cached) " >&6
12726else
12727  case $WC in
12728  [\\/]* | ?:[\\/]*)
12729  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12730  ;;
12731  *)
12732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12733for as_dir in $PATH
12734do
12735  IFS=$as_save_IFS
12736  test -z "$as_dir" && as_dir=.
12737    for ac_exec_ext in '' $ac_executable_extensions; do
12738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12739    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12741    break 2
12742  fi
12743done
12744  done
12745IFS=$as_save_IFS
12746
12747  ;;
12748esac
12749fi
12750WC=$ac_cv_path_WC
12751if test -n "$WC"; then
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12753$as_echo "$WC" >&6; }
12754else
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12756$as_echo "no" >&6; }
12757fi
12758
12759
12760          if test "x$WC" = x; then
12761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12762          fi
12763        else
12764          # Otherwise we believe it is a complete path. Use it as it is.
12765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12766$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12768$as_echo_n "checking for WC... " >&6; }
12769          if test ! -x "$tool_specified"; then
12770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12771$as_echo "not found" >&6; }
12772            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12773          fi
12774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12775$as_echo "$tool_specified" >&6; }
12776        fi
12777      fi
12778    fi
12779
12780  fi
12781
12782
12783
12784  if test "x$WC" = x; then
12785    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12786  fi
12787
12788
12789
12790
12791
12792  # Publish this variable in the help.
12793
12794
12795  if [ -z "${WHICH+x}" ]; then
12796    # The variable is not set by user, try to locate tool using the code snippet
12797    for ac_prog in which
12798do
12799  # Extract the first word of "$ac_prog", so it can be a program name with args.
12800set dummy $ac_prog; ac_word=$2
12801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12802$as_echo_n "checking for $ac_word... " >&6; }
12803if ${ac_cv_path_WHICH+:} false; then :
12804  $as_echo_n "(cached) " >&6
12805else
12806  case $WHICH in
12807  [\\/]* | ?:[\\/]*)
12808  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12809  ;;
12810  *)
12811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12812for as_dir in $PATH
12813do
12814  IFS=$as_save_IFS
12815  test -z "$as_dir" && as_dir=.
12816    for ac_exec_ext in '' $ac_executable_extensions; do
12817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12818    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12820    break 2
12821  fi
12822done
12823  done
12824IFS=$as_save_IFS
12825
12826  ;;
12827esac
12828fi
12829WHICH=$ac_cv_path_WHICH
12830if test -n "$WHICH"; then
12831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12832$as_echo "$WHICH" >&6; }
12833else
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12835$as_echo "no" >&6; }
12836fi
12837
12838
12839  test -n "$WHICH" && break
12840done
12841
12842  else
12843    # The variable is set, but is it from the command line or the environment?
12844
12845    # Try to remove the string !WHICH! from our list.
12846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12848      # If it failed, the variable was not from the command line. Ignore it,
12849      # but warn the user (except for BASH, which is always set by the calling BASH).
12850      if test "xWHICH" != xBASH; then
12851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12852$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12853      fi
12854      # Try to locate tool using the code snippet
12855      for ac_prog in which
12856do
12857  # Extract the first word of "$ac_prog", so it can be a program name with args.
12858set dummy $ac_prog; ac_word=$2
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12860$as_echo_n "checking for $ac_word... " >&6; }
12861if ${ac_cv_path_WHICH+:} false; then :
12862  $as_echo_n "(cached) " >&6
12863else
12864  case $WHICH in
12865  [\\/]* | ?:[\\/]*)
12866  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12867  ;;
12868  *)
12869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12870for as_dir in $PATH
12871do
12872  IFS=$as_save_IFS
12873  test -z "$as_dir" && as_dir=.
12874    for ac_exec_ext in '' $ac_executable_extensions; do
12875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12876    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12878    break 2
12879  fi
12880done
12881  done
12882IFS=$as_save_IFS
12883
12884  ;;
12885esac
12886fi
12887WHICH=$ac_cv_path_WHICH
12888if test -n "$WHICH"; then
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12890$as_echo "$WHICH" >&6; }
12891else
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12893$as_echo "no" >&6; }
12894fi
12895
12896
12897  test -n "$WHICH" && break
12898done
12899
12900    else
12901      # If it succeeded, then it was overridden by the user. We will use it
12902      # for the tool.
12903
12904      # First remove it from the list of overridden variables, so we can test
12905      # for unknown variables in the end.
12906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12907
12908      # Check if we try to supply an empty value
12909      if test "x$WHICH" = x; then
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12911$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12913$as_echo_n "checking for WHICH... " >&6; }
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12915$as_echo "disabled" >&6; }
12916      else
12917        # Check if the provided tool contains a complete path.
12918        tool_specified="$WHICH"
12919        tool_basename="${tool_specified##*/}"
12920        if test "x$tool_basename" = "x$tool_specified"; then
12921          # A command without a complete path is provided, search $PATH.
12922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12923$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12924          # Extract the first word of "$tool_basename", so it can be a program name with args.
12925set dummy $tool_basename; ac_word=$2
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12927$as_echo_n "checking for $ac_word... " >&6; }
12928if ${ac_cv_path_WHICH+:} false; then :
12929  $as_echo_n "(cached) " >&6
12930else
12931  case $WHICH in
12932  [\\/]* | ?:[\\/]*)
12933  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12934  ;;
12935  *)
12936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12937for as_dir in $PATH
12938do
12939  IFS=$as_save_IFS
12940  test -z "$as_dir" && as_dir=.
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12943    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12945    break 2
12946  fi
12947done
12948  done
12949IFS=$as_save_IFS
12950
12951  ;;
12952esac
12953fi
12954WHICH=$ac_cv_path_WHICH
12955if test -n "$WHICH"; then
12956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12957$as_echo "$WHICH" >&6; }
12958else
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12960$as_echo "no" >&6; }
12961fi
12962
12963
12964          if test "x$WHICH" = x; then
12965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12966          fi
12967        else
12968          # Otherwise we believe it is a complete path. Use it as it is.
12969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12970$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12972$as_echo_n "checking for WHICH... " >&6; }
12973          if test ! -x "$tool_specified"; then
12974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12975$as_echo "not found" >&6; }
12976            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12977          fi
12978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12979$as_echo "$tool_specified" >&6; }
12980        fi
12981      fi
12982    fi
12983
12984  fi
12985
12986
12987
12988  if test "x$WHICH" = x; then
12989    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12990  fi
12991
12992
12993
12994
12995
12996  # Publish this variable in the help.
12997
12998
12999  if [ -z "${XARGS+x}" ]; then
13000    # The variable is not set by user, try to locate tool using the code snippet
13001    for ac_prog in xargs
13002do
13003  # Extract the first word of "$ac_prog", so it can be a program name with args.
13004set dummy $ac_prog; ac_word=$2
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13006$as_echo_n "checking for $ac_word... " >&6; }
13007if ${ac_cv_path_XARGS+:} false; then :
13008  $as_echo_n "(cached) " >&6
13009else
13010  case $XARGS in
13011  [\\/]* | ?:[\\/]*)
13012  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13013  ;;
13014  *)
13015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13016for as_dir in $PATH
13017do
13018  IFS=$as_save_IFS
13019  test -z "$as_dir" && as_dir=.
13020    for ac_exec_ext in '' $ac_executable_extensions; do
13021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13022    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13024    break 2
13025  fi
13026done
13027  done
13028IFS=$as_save_IFS
13029
13030  ;;
13031esac
13032fi
13033XARGS=$ac_cv_path_XARGS
13034if test -n "$XARGS"; then
13035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13036$as_echo "$XARGS" >&6; }
13037else
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13039$as_echo "no" >&6; }
13040fi
13041
13042
13043  test -n "$XARGS" && break
13044done
13045
13046  else
13047    # The variable is set, but is it from the command line or the environment?
13048
13049    # Try to remove the string !XARGS! from our list.
13050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13052      # If it failed, the variable was not from the command line. Ignore it,
13053      # but warn the user (except for BASH, which is always set by the calling BASH).
13054      if test "xXARGS" != xBASH; then
13055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13056$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13057      fi
13058      # Try to locate tool using the code snippet
13059      for ac_prog in xargs
13060do
13061  # Extract the first word of "$ac_prog", so it can be a program name with args.
13062set dummy $ac_prog; ac_word=$2
13063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13064$as_echo_n "checking for $ac_word... " >&6; }
13065if ${ac_cv_path_XARGS+:} false; then :
13066  $as_echo_n "(cached) " >&6
13067else
13068  case $XARGS in
13069  [\\/]* | ?:[\\/]*)
13070  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13071  ;;
13072  *)
13073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13074for as_dir in $PATH
13075do
13076  IFS=$as_save_IFS
13077  test -z "$as_dir" && as_dir=.
13078    for ac_exec_ext in '' $ac_executable_extensions; do
13079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13080    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13082    break 2
13083  fi
13084done
13085  done
13086IFS=$as_save_IFS
13087
13088  ;;
13089esac
13090fi
13091XARGS=$ac_cv_path_XARGS
13092if test -n "$XARGS"; then
13093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13094$as_echo "$XARGS" >&6; }
13095else
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097$as_echo "no" >&6; }
13098fi
13099
13100
13101  test -n "$XARGS" && break
13102done
13103
13104    else
13105      # If it succeeded, then it was overridden by the user. We will use it
13106      # for the tool.
13107
13108      # First remove it from the list of overridden variables, so we can test
13109      # for unknown variables in the end.
13110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13111
13112      # Check if we try to supply an empty value
13113      if test "x$XARGS" = x; then
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13115$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13117$as_echo_n "checking for XARGS... " >&6; }
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13119$as_echo "disabled" >&6; }
13120      else
13121        # Check if the provided tool contains a complete path.
13122        tool_specified="$XARGS"
13123        tool_basename="${tool_specified##*/}"
13124        if test "x$tool_basename" = "x$tool_specified"; then
13125          # A command without a complete path is provided, search $PATH.
13126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13127$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13128          # Extract the first word of "$tool_basename", so it can be a program name with args.
13129set dummy $tool_basename; ac_word=$2
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13131$as_echo_n "checking for $ac_word... " >&6; }
13132if ${ac_cv_path_XARGS+:} false; then :
13133  $as_echo_n "(cached) " >&6
13134else
13135  case $XARGS in
13136  [\\/]* | ?:[\\/]*)
13137  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13138  ;;
13139  *)
13140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13141for as_dir in $PATH
13142do
13143  IFS=$as_save_IFS
13144  test -z "$as_dir" && as_dir=.
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13147    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13149    break 2
13150  fi
13151done
13152  done
13153IFS=$as_save_IFS
13154
13155  ;;
13156esac
13157fi
13158XARGS=$ac_cv_path_XARGS
13159if test -n "$XARGS"; then
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13161$as_echo "$XARGS" >&6; }
13162else
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13164$as_echo "no" >&6; }
13165fi
13166
13167
13168          if test "x$XARGS" = x; then
13169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13170          fi
13171        else
13172          # Otherwise we believe it is a complete path. Use it as it is.
13173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13174$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13176$as_echo_n "checking for XARGS... " >&6; }
13177          if test ! -x "$tool_specified"; then
13178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13179$as_echo "not found" >&6; }
13180            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13181          fi
13182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13183$as_echo "$tool_specified" >&6; }
13184        fi
13185      fi
13186    fi
13187
13188  fi
13189
13190
13191
13192  if test "x$XARGS" = x; then
13193    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13194  fi
13195
13196
13197
13198  # Then required tools that require some special treatment.
13199
13200
13201  # Publish this variable in the help.
13202
13203
13204  if [ -z "${AWK+x}" ]; then
13205    # The variable is not set by user, try to locate tool using the code snippet
13206    for ac_prog in gawk mawk nawk awk
13207do
13208  # Extract the first word of "$ac_prog", so it can be a program name with args.
13209set dummy $ac_prog; ac_word=$2
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13211$as_echo_n "checking for $ac_word... " >&6; }
13212if ${ac_cv_prog_AWK+:} false; then :
13213  $as_echo_n "(cached) " >&6
13214else
13215  if test -n "$AWK"; then
13216  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13217else
13218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13219for as_dir in $PATH
13220do
13221  IFS=$as_save_IFS
13222  test -z "$as_dir" && as_dir=.
13223    for ac_exec_ext in '' $ac_executable_extensions; do
13224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13225    ac_cv_prog_AWK="$ac_prog"
13226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13227    break 2
13228  fi
13229done
13230  done
13231IFS=$as_save_IFS
13232
13233fi
13234fi
13235AWK=$ac_cv_prog_AWK
13236if test -n "$AWK"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13238$as_echo "$AWK" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$AWK" && break
13246done
13247
13248  else
13249    # The variable is set, but is it from the command line or the environment?
13250
13251    # Try to remove the string !AWK! from our list.
13252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13254      # If it failed, the variable was not from the command line. Ignore it,
13255      # but warn the user (except for BASH, which is always set by the calling BASH).
13256      if test "xAWK" != xBASH; then
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13258$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13259      fi
13260      # Try to locate tool using the code snippet
13261      for ac_prog in gawk mawk nawk awk
13262do
13263  # Extract the first word of "$ac_prog", so it can be a program name with args.
13264set dummy $ac_prog; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_prog_AWK+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  if test -n "$AWK"; then
13271  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13272else
13273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13274for as_dir in $PATH
13275do
13276  IFS=$as_save_IFS
13277  test -z "$as_dir" && as_dir=.
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13280    ac_cv_prog_AWK="$ac_prog"
13281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13282    break 2
13283  fi
13284done
13285  done
13286IFS=$as_save_IFS
13287
13288fi
13289fi
13290AWK=$ac_cv_prog_AWK
13291if test -n "$AWK"; then
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13293$as_echo "$AWK" >&6; }
13294else
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
13297fi
13298
13299
13300  test -n "$AWK" && break
13301done
13302
13303    else
13304      # If it succeeded, then it was overridden by the user. We will use it
13305      # for the tool.
13306
13307      # First remove it from the list of overridden variables, so we can test
13308      # for unknown variables in the end.
13309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13310
13311      # Check if we try to supply an empty value
13312      if test "x$AWK" = x; then
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13314$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13316$as_echo_n "checking for AWK... " >&6; }
13317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13318$as_echo "disabled" >&6; }
13319      else
13320        # Check if the provided tool contains a complete path.
13321        tool_specified="$AWK"
13322        tool_basename="${tool_specified##*/}"
13323        if test "x$tool_basename" = "x$tool_specified"; then
13324          # A command without a complete path is provided, search $PATH.
13325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13326$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13327          # Extract the first word of "$tool_basename", so it can be a program name with args.
13328set dummy $tool_basename; ac_word=$2
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13330$as_echo_n "checking for $ac_word... " >&6; }
13331if ${ac_cv_path_AWK+:} false; then :
13332  $as_echo_n "(cached) " >&6
13333else
13334  case $AWK in
13335  [\\/]* | ?:[\\/]*)
13336  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13337  ;;
13338  *)
13339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13340for as_dir in $PATH
13341do
13342  IFS=$as_save_IFS
13343  test -z "$as_dir" && as_dir=.
13344    for ac_exec_ext in '' $ac_executable_extensions; do
13345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13346    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13348    break 2
13349  fi
13350done
13351  done
13352IFS=$as_save_IFS
13353
13354  ;;
13355esac
13356fi
13357AWK=$ac_cv_path_AWK
13358if test -n "$AWK"; then
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13360$as_echo "$AWK" >&6; }
13361else
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13363$as_echo "no" >&6; }
13364fi
13365
13366
13367          if test "x$AWK" = x; then
13368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13369          fi
13370        else
13371          # Otherwise we believe it is a complete path. Use it as it is.
13372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13373$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13375$as_echo_n "checking for AWK... " >&6; }
13376          if test ! -x "$tool_specified"; then
13377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13378$as_echo "not found" >&6; }
13379            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13380          fi
13381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13382$as_echo "$tool_specified" >&6; }
13383        fi
13384      fi
13385    fi
13386
13387  fi
13388
13389
13390  if test "x$AWK" = x; then
13391    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13392  fi
13393
13394
13395
13396
13397  # Publish this variable in the help.
13398
13399
13400  if [ -z "${GREP+x}" ]; then
13401    # The variable is not set by user, try to locate tool using the code snippet
13402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13403$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13404if ${ac_cv_path_GREP+:} false; then :
13405  $as_echo_n "(cached) " >&6
13406else
13407  if test -z "$GREP"; then
13408  ac_path_GREP_found=false
13409  # Loop through the user's path and test for each of PROGNAME-LIST
13410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13412do
13413  IFS=$as_save_IFS
13414  test -z "$as_dir" && as_dir=.
13415    for ac_prog in grep ggrep; do
13416    for ac_exec_ext in '' $ac_executable_extensions; do
13417      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13418      as_fn_executable_p "$ac_path_GREP" || continue
13419# Check for GNU ac_path_GREP and select it if it is found.
13420  # Check for GNU $ac_path_GREP
13421case `"$ac_path_GREP" --version 2>&1` in
13422*GNU*)
13423  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13424*)
13425  ac_count=0
13426  $as_echo_n 0123456789 >"conftest.in"
13427  while :
13428  do
13429    cat "conftest.in" "conftest.in" >"conftest.tmp"
13430    mv "conftest.tmp" "conftest.in"
13431    cp "conftest.in" "conftest.nl"
13432    $as_echo 'GREP' >> "conftest.nl"
13433    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13435    as_fn_arith $ac_count + 1 && ac_count=$as_val
13436    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13437      # Best one so far, save it but keep looking for a better one
13438      ac_cv_path_GREP="$ac_path_GREP"
13439      ac_path_GREP_max=$ac_count
13440    fi
13441    # 10*(2^10) chars as input seems more than enough
13442    test $ac_count -gt 10 && break
13443  done
13444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13445esac
13446
13447      $ac_path_GREP_found && break 3
13448    done
13449  done
13450  done
13451IFS=$as_save_IFS
13452  if test -z "$ac_cv_path_GREP"; then
13453    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13454  fi
13455else
13456  ac_cv_path_GREP=$GREP
13457fi
13458
13459fi
13460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13461$as_echo "$ac_cv_path_GREP" >&6; }
13462 GREP="$ac_cv_path_GREP"
13463
13464
13465  else
13466    # The variable is set, but is it from the command line or the environment?
13467
13468    # Try to remove the string !GREP! from our list.
13469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13471      # If it failed, the variable was not from the command line. Ignore it,
13472      # but warn the user (except for BASH, which is always set by the calling BASH).
13473      if test "xGREP" != xBASH; then
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13475$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13476      fi
13477      # Try to locate tool using the code snippet
13478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13479$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13480if ${ac_cv_path_GREP+:} false; then :
13481  $as_echo_n "(cached) " >&6
13482else
13483  if test -z "$GREP"; then
13484  ac_path_GREP_found=false
13485  # Loop through the user's path and test for each of PROGNAME-LIST
13486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13488do
13489  IFS=$as_save_IFS
13490  test -z "$as_dir" && as_dir=.
13491    for ac_prog in grep ggrep; do
13492    for ac_exec_ext in '' $ac_executable_extensions; do
13493      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13494      as_fn_executable_p "$ac_path_GREP" || continue
13495# Check for GNU ac_path_GREP and select it if it is found.
13496  # Check for GNU $ac_path_GREP
13497case `"$ac_path_GREP" --version 2>&1` in
13498*GNU*)
13499  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13500*)
13501  ac_count=0
13502  $as_echo_n 0123456789 >"conftest.in"
13503  while :
13504  do
13505    cat "conftest.in" "conftest.in" >"conftest.tmp"
13506    mv "conftest.tmp" "conftest.in"
13507    cp "conftest.in" "conftest.nl"
13508    $as_echo 'GREP' >> "conftest.nl"
13509    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13510    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13511    as_fn_arith $ac_count + 1 && ac_count=$as_val
13512    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13513      # Best one so far, save it but keep looking for a better one
13514      ac_cv_path_GREP="$ac_path_GREP"
13515      ac_path_GREP_max=$ac_count
13516    fi
13517    # 10*(2^10) chars as input seems more than enough
13518    test $ac_count -gt 10 && break
13519  done
13520  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13521esac
13522
13523      $ac_path_GREP_found && break 3
13524    done
13525  done
13526  done
13527IFS=$as_save_IFS
13528  if test -z "$ac_cv_path_GREP"; then
13529    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13530  fi
13531else
13532  ac_cv_path_GREP=$GREP
13533fi
13534
13535fi
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13537$as_echo "$ac_cv_path_GREP" >&6; }
13538 GREP="$ac_cv_path_GREP"
13539
13540
13541    else
13542      # If it succeeded, then it was overridden by the user. We will use it
13543      # for the tool.
13544
13545      # First remove it from the list of overridden variables, so we can test
13546      # for unknown variables in the end.
13547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13548
13549      # Check if we try to supply an empty value
13550      if test "x$GREP" = x; then
13551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13552$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13554$as_echo_n "checking for GREP... " >&6; }
13555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13556$as_echo "disabled" >&6; }
13557      else
13558        # Check if the provided tool contains a complete path.
13559        tool_specified="$GREP"
13560        tool_basename="${tool_specified##*/}"
13561        if test "x$tool_basename" = "x$tool_specified"; then
13562          # A command without a complete path is provided, search $PATH.
13563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13564$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13565          # Extract the first word of "$tool_basename", so it can be a program name with args.
13566set dummy $tool_basename; ac_word=$2
13567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13568$as_echo_n "checking for $ac_word... " >&6; }
13569if ${ac_cv_path_GREP+:} false; then :
13570  $as_echo_n "(cached) " >&6
13571else
13572  case $GREP in
13573  [\\/]* | ?:[\\/]*)
13574  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13575  ;;
13576  *)
13577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13578for as_dir in $PATH
13579do
13580  IFS=$as_save_IFS
13581  test -z "$as_dir" && as_dir=.
13582    for ac_exec_ext in '' $ac_executable_extensions; do
13583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13584    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13586    break 2
13587  fi
13588done
13589  done
13590IFS=$as_save_IFS
13591
13592  ;;
13593esac
13594fi
13595GREP=$ac_cv_path_GREP
13596if test -n "$GREP"; then
13597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13598$as_echo "$GREP" >&6; }
13599else
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
13602fi
13603
13604
13605          if test "x$GREP" = x; then
13606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13607          fi
13608        else
13609          # Otherwise we believe it is a complete path. Use it as it is.
13610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13611$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13613$as_echo_n "checking for GREP... " >&6; }
13614          if test ! -x "$tool_specified"; then
13615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13616$as_echo "not found" >&6; }
13617            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13618          fi
13619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13620$as_echo "$tool_specified" >&6; }
13621        fi
13622      fi
13623    fi
13624
13625  fi
13626
13627
13628  if test "x$GREP" = x; then
13629    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13630  fi
13631
13632
13633
13634
13635  # Publish this variable in the help.
13636
13637
13638  if [ -z "${EGREP+x}" ]; then
13639    # The variable is not set by user, try to locate tool using the code snippet
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13641$as_echo_n "checking for egrep... " >&6; }
13642if ${ac_cv_path_EGREP+:} false; then :
13643  $as_echo_n "(cached) " >&6
13644else
13645  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13646   then ac_cv_path_EGREP="$GREP -E"
13647   else
13648     if test -z "$EGREP"; then
13649  ac_path_EGREP_found=false
13650  # Loop through the user's path and test for each of PROGNAME-LIST
13651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13652for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13653do
13654  IFS=$as_save_IFS
13655  test -z "$as_dir" && as_dir=.
13656    for ac_prog in egrep; do
13657    for ac_exec_ext in '' $ac_executable_extensions; do
13658      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13659      as_fn_executable_p "$ac_path_EGREP" || continue
13660# Check for GNU ac_path_EGREP and select it if it is found.
13661  # Check for GNU $ac_path_EGREP
13662case `"$ac_path_EGREP" --version 2>&1` in
13663*GNU*)
13664  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13665*)
13666  ac_count=0
13667  $as_echo_n 0123456789 >"conftest.in"
13668  while :
13669  do
13670    cat "conftest.in" "conftest.in" >"conftest.tmp"
13671    mv "conftest.tmp" "conftest.in"
13672    cp "conftest.in" "conftest.nl"
13673    $as_echo 'EGREP' >> "conftest.nl"
13674    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13675    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13676    as_fn_arith $ac_count + 1 && ac_count=$as_val
13677    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13678      # Best one so far, save it but keep looking for a better one
13679      ac_cv_path_EGREP="$ac_path_EGREP"
13680      ac_path_EGREP_max=$ac_count
13681    fi
13682    # 10*(2^10) chars as input seems more than enough
13683    test $ac_count -gt 10 && break
13684  done
13685  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13686esac
13687
13688      $ac_path_EGREP_found && break 3
13689    done
13690  done
13691  done
13692IFS=$as_save_IFS
13693  if test -z "$ac_cv_path_EGREP"; then
13694    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13695  fi
13696else
13697  ac_cv_path_EGREP=$EGREP
13698fi
13699
13700   fi
13701fi
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13703$as_echo "$ac_cv_path_EGREP" >&6; }
13704 EGREP="$ac_cv_path_EGREP"
13705
13706
13707  else
13708    # The variable is set, but is it from the command line or the environment?
13709
13710    # Try to remove the string !EGREP! from our list.
13711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13713      # If it failed, the variable was not from the command line. Ignore it,
13714      # but warn the user (except for BASH, which is always set by the calling BASH).
13715      if test "xEGREP" != xBASH; then
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13717$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13718      fi
13719      # Try to locate tool using the code snippet
13720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13721$as_echo_n "checking for egrep... " >&6; }
13722if ${ac_cv_path_EGREP+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13726   then ac_cv_path_EGREP="$GREP -E"
13727   else
13728     if test -z "$EGREP"; then
13729  ac_path_EGREP_found=false
13730  # Loop through the user's path and test for each of PROGNAME-LIST
13731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13732for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13733do
13734  IFS=$as_save_IFS
13735  test -z "$as_dir" && as_dir=.
13736    for ac_prog in egrep; do
13737    for ac_exec_ext in '' $ac_executable_extensions; do
13738      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13739      as_fn_executable_p "$ac_path_EGREP" || continue
13740# Check for GNU ac_path_EGREP and select it if it is found.
13741  # Check for GNU $ac_path_EGREP
13742case `"$ac_path_EGREP" --version 2>&1` in
13743*GNU*)
13744  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13745*)
13746  ac_count=0
13747  $as_echo_n 0123456789 >"conftest.in"
13748  while :
13749  do
13750    cat "conftest.in" "conftest.in" >"conftest.tmp"
13751    mv "conftest.tmp" "conftest.in"
13752    cp "conftest.in" "conftest.nl"
13753    $as_echo 'EGREP' >> "conftest.nl"
13754    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13755    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13756    as_fn_arith $ac_count + 1 && ac_count=$as_val
13757    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13758      # Best one so far, save it but keep looking for a better one
13759      ac_cv_path_EGREP="$ac_path_EGREP"
13760      ac_path_EGREP_max=$ac_count
13761    fi
13762    # 10*(2^10) chars as input seems more than enough
13763    test $ac_count -gt 10 && break
13764  done
13765  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13766esac
13767
13768      $ac_path_EGREP_found && break 3
13769    done
13770  done
13771  done
13772IFS=$as_save_IFS
13773  if test -z "$ac_cv_path_EGREP"; then
13774    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13775  fi
13776else
13777  ac_cv_path_EGREP=$EGREP
13778fi
13779
13780   fi
13781fi
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13783$as_echo "$ac_cv_path_EGREP" >&6; }
13784 EGREP="$ac_cv_path_EGREP"
13785
13786
13787    else
13788      # If it succeeded, then it was overridden by the user. We will use it
13789      # for the tool.
13790
13791      # First remove it from the list of overridden variables, so we can test
13792      # for unknown variables in the end.
13793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13794
13795      # Check if we try to supply an empty value
13796      if test "x$EGREP" = x; then
13797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13798$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13800$as_echo_n "checking for EGREP... " >&6; }
13801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13802$as_echo "disabled" >&6; }
13803      else
13804        # Check if the provided tool contains a complete path.
13805        tool_specified="$EGREP"
13806        tool_basename="${tool_specified##*/}"
13807        if test "x$tool_basename" = "x$tool_specified"; then
13808          # A command without a complete path is provided, search $PATH.
13809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13810$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13811          # Extract the first word of "$tool_basename", so it can be a program name with args.
13812set dummy $tool_basename; ac_word=$2
13813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13814$as_echo_n "checking for $ac_word... " >&6; }
13815if ${ac_cv_path_EGREP+:} false; then :
13816  $as_echo_n "(cached) " >&6
13817else
13818  case $EGREP in
13819  [\\/]* | ?:[\\/]*)
13820  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13821  ;;
13822  *)
13823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13824for as_dir in $PATH
13825do
13826  IFS=$as_save_IFS
13827  test -z "$as_dir" && as_dir=.
13828    for ac_exec_ext in '' $ac_executable_extensions; do
13829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13830    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13832    break 2
13833  fi
13834done
13835  done
13836IFS=$as_save_IFS
13837
13838  ;;
13839esac
13840fi
13841EGREP=$ac_cv_path_EGREP
13842if test -n "$EGREP"; then
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13844$as_echo "$EGREP" >&6; }
13845else
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13847$as_echo "no" >&6; }
13848fi
13849
13850
13851          if test "x$EGREP" = x; then
13852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13853          fi
13854        else
13855          # Otherwise we believe it is a complete path. Use it as it is.
13856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13857$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13859$as_echo_n "checking for EGREP... " >&6; }
13860          if test ! -x "$tool_specified"; then
13861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13862$as_echo "not found" >&6; }
13863            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13864          fi
13865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13866$as_echo "$tool_specified" >&6; }
13867        fi
13868      fi
13869    fi
13870
13871  fi
13872
13873
13874  if test "x$EGREP" = x; then
13875    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13876  fi
13877
13878
13879
13880
13881  # Publish this variable in the help.
13882
13883
13884  if [ -z "${FGREP+x}" ]; then
13885    # The variable is not set by user, try to locate tool using the code snippet
13886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13887$as_echo_n "checking for fgrep... " >&6; }
13888if ${ac_cv_path_FGREP+:} false; then :
13889  $as_echo_n "(cached) " >&6
13890else
13891  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13892   then ac_cv_path_FGREP="$GREP -F"
13893   else
13894     if test -z "$FGREP"; then
13895  ac_path_FGREP_found=false
13896  # Loop through the user's path and test for each of PROGNAME-LIST
13897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13898for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13899do
13900  IFS=$as_save_IFS
13901  test -z "$as_dir" && as_dir=.
13902    for ac_prog in fgrep; do
13903    for ac_exec_ext in '' $ac_executable_extensions; do
13904      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13905      as_fn_executable_p "$ac_path_FGREP" || continue
13906# Check for GNU ac_path_FGREP and select it if it is found.
13907  # Check for GNU $ac_path_FGREP
13908case `"$ac_path_FGREP" --version 2>&1` in
13909*GNU*)
13910  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13911*)
13912  ac_count=0
13913  $as_echo_n 0123456789 >"conftest.in"
13914  while :
13915  do
13916    cat "conftest.in" "conftest.in" >"conftest.tmp"
13917    mv "conftest.tmp" "conftest.in"
13918    cp "conftest.in" "conftest.nl"
13919    $as_echo 'FGREP' >> "conftest.nl"
13920    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13921    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13922    as_fn_arith $ac_count + 1 && ac_count=$as_val
13923    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13924      # Best one so far, save it but keep looking for a better one
13925      ac_cv_path_FGREP="$ac_path_FGREP"
13926      ac_path_FGREP_max=$ac_count
13927    fi
13928    # 10*(2^10) chars as input seems more than enough
13929    test $ac_count -gt 10 && break
13930  done
13931  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13932esac
13933
13934      $ac_path_FGREP_found && break 3
13935    done
13936  done
13937  done
13938IFS=$as_save_IFS
13939  if test -z "$ac_cv_path_FGREP"; then
13940    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13941  fi
13942else
13943  ac_cv_path_FGREP=$FGREP
13944fi
13945
13946   fi
13947fi
13948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13949$as_echo "$ac_cv_path_FGREP" >&6; }
13950 FGREP="$ac_cv_path_FGREP"
13951
13952
13953  else
13954    # The variable is set, but is it from the command line or the environment?
13955
13956    # Try to remove the string !FGREP! from our list.
13957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13959      # If it failed, the variable was not from the command line. Ignore it,
13960      # but warn the user (except for BASH, which is always set by the calling BASH).
13961      if test "xFGREP" != xBASH; then
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13963$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13964      fi
13965      # Try to locate tool using the code snippet
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13967$as_echo_n "checking for fgrep... " >&6; }
13968if ${ac_cv_path_FGREP+:} false; then :
13969  $as_echo_n "(cached) " >&6
13970else
13971  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13972   then ac_cv_path_FGREP="$GREP -F"
13973   else
13974     if test -z "$FGREP"; then
13975  ac_path_FGREP_found=false
13976  # Loop through the user's path and test for each of PROGNAME-LIST
13977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13978for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13979do
13980  IFS=$as_save_IFS
13981  test -z "$as_dir" && as_dir=.
13982    for ac_prog in fgrep; do
13983    for ac_exec_ext in '' $ac_executable_extensions; do
13984      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13985      as_fn_executable_p "$ac_path_FGREP" || continue
13986# Check for GNU ac_path_FGREP and select it if it is found.
13987  # Check for GNU $ac_path_FGREP
13988case `"$ac_path_FGREP" --version 2>&1` in
13989*GNU*)
13990  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13991*)
13992  ac_count=0
13993  $as_echo_n 0123456789 >"conftest.in"
13994  while :
13995  do
13996    cat "conftest.in" "conftest.in" >"conftest.tmp"
13997    mv "conftest.tmp" "conftest.in"
13998    cp "conftest.in" "conftest.nl"
13999    $as_echo 'FGREP' >> "conftest.nl"
14000    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14001    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14002    as_fn_arith $ac_count + 1 && ac_count=$as_val
14003    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14004      # Best one so far, save it but keep looking for a better one
14005      ac_cv_path_FGREP="$ac_path_FGREP"
14006      ac_path_FGREP_max=$ac_count
14007    fi
14008    # 10*(2^10) chars as input seems more than enough
14009    test $ac_count -gt 10 && break
14010  done
14011  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14012esac
14013
14014      $ac_path_FGREP_found && break 3
14015    done
14016  done
14017  done
14018IFS=$as_save_IFS
14019  if test -z "$ac_cv_path_FGREP"; then
14020    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14021  fi
14022else
14023  ac_cv_path_FGREP=$FGREP
14024fi
14025
14026   fi
14027fi
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14029$as_echo "$ac_cv_path_FGREP" >&6; }
14030 FGREP="$ac_cv_path_FGREP"
14031
14032
14033    else
14034      # If it succeeded, then it was overridden by the user. We will use it
14035      # for the tool.
14036
14037      # First remove it from the list of overridden variables, so we can test
14038      # for unknown variables in the end.
14039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14040
14041      # Check if we try to supply an empty value
14042      if test "x$FGREP" = x; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14044$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14046$as_echo_n "checking for FGREP... " >&6; }
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14048$as_echo "disabled" >&6; }
14049      else
14050        # Check if the provided tool contains a complete path.
14051        tool_specified="$FGREP"
14052        tool_basename="${tool_specified##*/}"
14053        if test "x$tool_basename" = "x$tool_specified"; then
14054          # A command without a complete path is provided, search $PATH.
14055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14056$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14057          # Extract the first word of "$tool_basename", so it can be a program name with args.
14058set dummy $tool_basename; ac_word=$2
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14060$as_echo_n "checking for $ac_word... " >&6; }
14061if ${ac_cv_path_FGREP+:} false; then :
14062  $as_echo_n "(cached) " >&6
14063else
14064  case $FGREP in
14065  [\\/]* | ?:[\\/]*)
14066  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14067  ;;
14068  *)
14069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14070for as_dir in $PATH
14071do
14072  IFS=$as_save_IFS
14073  test -z "$as_dir" && as_dir=.
14074    for ac_exec_ext in '' $ac_executable_extensions; do
14075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14076    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14078    break 2
14079  fi
14080done
14081  done
14082IFS=$as_save_IFS
14083
14084  ;;
14085esac
14086fi
14087FGREP=$ac_cv_path_FGREP
14088if test -n "$FGREP"; then
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14090$as_echo "$FGREP" >&6; }
14091else
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14093$as_echo "no" >&6; }
14094fi
14095
14096
14097          if test "x$FGREP" = x; then
14098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14099          fi
14100        else
14101          # Otherwise we believe it is a complete path. Use it as it is.
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14103$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14105$as_echo_n "checking for FGREP... " >&6; }
14106          if test ! -x "$tool_specified"; then
14107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14108$as_echo "not found" >&6; }
14109            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14110          fi
14111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14112$as_echo "$tool_specified" >&6; }
14113        fi
14114      fi
14115    fi
14116
14117  fi
14118
14119
14120  if test "x$FGREP" = x; then
14121    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14122  fi
14123
14124
14125
14126
14127  # Publish this variable in the help.
14128
14129
14130  if [ -z "${SED+x}" ]; then
14131    # The variable is not set by user, try to locate tool using the code snippet
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14133$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14134if ${ac_cv_path_SED+:} false; then :
14135  $as_echo_n "(cached) " >&6
14136else
14137            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14138     for ac_i in 1 2 3 4 5 6 7; do
14139       ac_script="$ac_script$as_nl$ac_script"
14140     done
14141     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14142     { ac_script=; unset ac_script;}
14143     if test -z "$SED"; then
14144  ac_path_SED_found=false
14145  # Loop through the user's path and test for each of PROGNAME-LIST
14146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14147for as_dir in $PATH
14148do
14149  IFS=$as_save_IFS
14150  test -z "$as_dir" && as_dir=.
14151    for ac_prog in sed gsed; do
14152    for ac_exec_ext in '' $ac_executable_extensions; do
14153      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14154      as_fn_executable_p "$ac_path_SED" || continue
14155# Check for GNU ac_path_SED and select it if it is found.
14156  # Check for GNU $ac_path_SED
14157case `"$ac_path_SED" --version 2>&1` in
14158*GNU*)
14159  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14160*)
14161  ac_count=0
14162  $as_echo_n 0123456789 >"conftest.in"
14163  while :
14164  do
14165    cat "conftest.in" "conftest.in" >"conftest.tmp"
14166    mv "conftest.tmp" "conftest.in"
14167    cp "conftest.in" "conftest.nl"
14168    $as_echo '' >> "conftest.nl"
14169    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14170    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14171    as_fn_arith $ac_count + 1 && ac_count=$as_val
14172    if test $ac_count -gt ${ac_path_SED_max-0}; then
14173      # Best one so far, save it but keep looking for a better one
14174      ac_cv_path_SED="$ac_path_SED"
14175      ac_path_SED_max=$ac_count
14176    fi
14177    # 10*(2^10) chars as input seems more than enough
14178    test $ac_count -gt 10 && break
14179  done
14180  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14181esac
14182
14183      $ac_path_SED_found && break 3
14184    done
14185  done
14186  done
14187IFS=$as_save_IFS
14188  if test -z "$ac_cv_path_SED"; then
14189    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14190  fi
14191else
14192  ac_cv_path_SED=$SED
14193fi
14194
14195fi
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14197$as_echo "$ac_cv_path_SED" >&6; }
14198 SED="$ac_cv_path_SED"
14199  rm -f conftest.sed
14200
14201  else
14202    # The variable is set, but is it from the command line or the environment?
14203
14204    # Try to remove the string !SED! from our list.
14205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14207      # If it failed, the variable was not from the command line. Ignore it,
14208      # but warn the user (except for BASH, which is always set by the calling BASH).
14209      if test "xSED" != xBASH; then
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14211$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14212      fi
14213      # Try to locate tool using the code snippet
14214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14215$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14216if ${ac_cv_path_SED+:} false; then :
14217  $as_echo_n "(cached) " >&6
14218else
14219            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14220     for ac_i in 1 2 3 4 5 6 7; do
14221       ac_script="$ac_script$as_nl$ac_script"
14222     done
14223     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14224     { ac_script=; unset ac_script;}
14225     if test -z "$SED"; then
14226  ac_path_SED_found=false
14227  # Loop through the user's path and test for each of PROGNAME-LIST
14228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14229for as_dir in $PATH
14230do
14231  IFS=$as_save_IFS
14232  test -z "$as_dir" && as_dir=.
14233    for ac_prog in sed gsed; do
14234    for ac_exec_ext in '' $ac_executable_extensions; do
14235      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14236      as_fn_executable_p "$ac_path_SED" || continue
14237# Check for GNU ac_path_SED and select it if it is found.
14238  # Check for GNU $ac_path_SED
14239case `"$ac_path_SED" --version 2>&1` in
14240*GNU*)
14241  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14242*)
14243  ac_count=0
14244  $as_echo_n 0123456789 >"conftest.in"
14245  while :
14246  do
14247    cat "conftest.in" "conftest.in" >"conftest.tmp"
14248    mv "conftest.tmp" "conftest.in"
14249    cp "conftest.in" "conftest.nl"
14250    $as_echo '' >> "conftest.nl"
14251    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14252    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14253    as_fn_arith $ac_count + 1 && ac_count=$as_val
14254    if test $ac_count -gt ${ac_path_SED_max-0}; then
14255      # Best one so far, save it but keep looking for a better one
14256      ac_cv_path_SED="$ac_path_SED"
14257      ac_path_SED_max=$ac_count
14258    fi
14259    # 10*(2^10) chars as input seems more than enough
14260    test $ac_count -gt 10 && break
14261  done
14262  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14263esac
14264
14265      $ac_path_SED_found && break 3
14266    done
14267  done
14268  done
14269IFS=$as_save_IFS
14270  if test -z "$ac_cv_path_SED"; then
14271    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14272  fi
14273else
14274  ac_cv_path_SED=$SED
14275fi
14276
14277fi
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14279$as_echo "$ac_cv_path_SED" >&6; }
14280 SED="$ac_cv_path_SED"
14281  rm -f conftest.sed
14282
14283    else
14284      # If it succeeded, then it was overridden by the user. We will use it
14285      # for the tool.
14286
14287      # First remove it from the list of overridden variables, so we can test
14288      # for unknown variables in the end.
14289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14290
14291      # Check if we try to supply an empty value
14292      if test "x$SED" = x; then
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14294$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14296$as_echo_n "checking for SED... " >&6; }
14297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14298$as_echo "disabled" >&6; }
14299      else
14300        # Check if the provided tool contains a complete path.
14301        tool_specified="$SED"
14302        tool_basename="${tool_specified##*/}"
14303        if test "x$tool_basename" = "x$tool_specified"; then
14304          # A command without a complete path is provided, search $PATH.
14305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14306$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14307          # Extract the first word of "$tool_basename", so it can be a program name with args.
14308set dummy $tool_basename; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_SED+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $SED in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337SED=$ac_cv_path_SED
14338if test -n "$SED"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14340$as_echo "$SED" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347          if test "x$SED" = x; then
14348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14349          fi
14350        else
14351          # Otherwise we believe it is a complete path. Use it as it is.
14352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14353$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14355$as_echo_n "checking for SED... " >&6; }
14356          if test ! -x "$tool_specified"; then
14357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14358$as_echo "not found" >&6; }
14359            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14360          fi
14361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14362$as_echo "$tool_specified" >&6; }
14363        fi
14364      fi
14365    fi
14366
14367  fi
14368
14369
14370  if test "x$SED" = x; then
14371    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14372  fi
14373
14374
14375
14376  # Always force rm.
14377  RM="$RM -f"
14378
14379  # pwd behaves differently on various platforms and some don't support the -L flag.
14380  # Always use the bash builtin pwd to get uniform behavior.
14381  THEPWDCMD=pwd
14382
14383  # These are not required on all platforms
14384
14385
14386  # Publish this variable in the help.
14387
14388
14389  if [ -z "${CYGPATH+x}" ]; then
14390    # The variable is not set by user, try to locate tool using the code snippet
14391    for ac_prog in cygpath
14392do
14393  # Extract the first word of "$ac_prog", so it can be a program name with args.
14394set dummy $ac_prog; ac_word=$2
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14396$as_echo_n "checking for $ac_word... " >&6; }
14397if ${ac_cv_path_CYGPATH+:} false; then :
14398  $as_echo_n "(cached) " >&6
14399else
14400  case $CYGPATH in
14401  [\\/]* | ?:[\\/]*)
14402  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14403  ;;
14404  *)
14405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14406for as_dir in $PATH
14407do
14408  IFS=$as_save_IFS
14409  test -z "$as_dir" && as_dir=.
14410    for ac_exec_ext in '' $ac_executable_extensions; do
14411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14412    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14414    break 2
14415  fi
14416done
14417  done
14418IFS=$as_save_IFS
14419
14420  ;;
14421esac
14422fi
14423CYGPATH=$ac_cv_path_CYGPATH
14424if test -n "$CYGPATH"; then
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14426$as_echo "$CYGPATH" >&6; }
14427else
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14429$as_echo "no" >&6; }
14430fi
14431
14432
14433  test -n "$CYGPATH" && break
14434done
14435
14436  else
14437    # The variable is set, but is it from the command line or the environment?
14438
14439    # Try to remove the string !CYGPATH! from our list.
14440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14442      # If it failed, the variable was not from the command line. Ignore it,
14443      # but warn the user (except for BASH, which is always set by the calling BASH).
14444      if test "xCYGPATH" != xBASH; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14446$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14447      fi
14448      # Try to locate tool using the code snippet
14449      for ac_prog in cygpath
14450do
14451  # Extract the first word of "$ac_prog", so it can be a program name with args.
14452set dummy $ac_prog; ac_word=$2
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14454$as_echo_n "checking for $ac_word... " >&6; }
14455if ${ac_cv_path_CYGPATH+:} false; then :
14456  $as_echo_n "(cached) " >&6
14457else
14458  case $CYGPATH in
14459  [\\/]* | ?:[\\/]*)
14460  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14461  ;;
14462  *)
14463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14464for as_dir in $PATH
14465do
14466  IFS=$as_save_IFS
14467  test -z "$as_dir" && as_dir=.
14468    for ac_exec_ext in '' $ac_executable_extensions; do
14469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14470    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14472    break 2
14473  fi
14474done
14475  done
14476IFS=$as_save_IFS
14477
14478  ;;
14479esac
14480fi
14481CYGPATH=$ac_cv_path_CYGPATH
14482if test -n "$CYGPATH"; then
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14484$as_echo "$CYGPATH" >&6; }
14485else
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14487$as_echo "no" >&6; }
14488fi
14489
14490
14491  test -n "$CYGPATH" && break
14492done
14493
14494    else
14495      # If it succeeded, then it was overridden by the user. We will use it
14496      # for the tool.
14497
14498      # First remove it from the list of overridden variables, so we can test
14499      # for unknown variables in the end.
14500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14501
14502      # Check if we try to supply an empty value
14503      if test "x$CYGPATH" = x; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14505$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14507$as_echo_n "checking for CYGPATH... " >&6; }
14508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14509$as_echo "disabled" >&6; }
14510      else
14511        # Check if the provided tool contains a complete path.
14512        tool_specified="$CYGPATH"
14513        tool_basename="${tool_specified##*/}"
14514        if test "x$tool_basename" = "x$tool_specified"; then
14515          # A command without a complete path is provided, search $PATH.
14516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14517$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14518          # Extract the first word of "$tool_basename", so it can be a program name with args.
14519set dummy $tool_basename; ac_word=$2
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14521$as_echo_n "checking for $ac_word... " >&6; }
14522if ${ac_cv_path_CYGPATH+:} false; then :
14523  $as_echo_n "(cached) " >&6
14524else
14525  case $CYGPATH in
14526  [\\/]* | ?:[\\/]*)
14527  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14528  ;;
14529  *)
14530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14531for as_dir in $PATH
14532do
14533  IFS=$as_save_IFS
14534  test -z "$as_dir" && as_dir=.
14535    for ac_exec_ext in '' $ac_executable_extensions; do
14536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14537    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14539    break 2
14540  fi
14541done
14542  done
14543IFS=$as_save_IFS
14544
14545  ;;
14546esac
14547fi
14548CYGPATH=$ac_cv_path_CYGPATH
14549if test -n "$CYGPATH"; then
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14551$as_echo "$CYGPATH" >&6; }
14552else
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14554$as_echo "no" >&6; }
14555fi
14556
14557
14558          if test "x$CYGPATH" = x; then
14559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14560          fi
14561        else
14562          # Otherwise we believe it is a complete path. Use it as it is.
14563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14564$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14566$as_echo_n "checking for CYGPATH... " >&6; }
14567          if test ! -x "$tool_specified"; then
14568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14569$as_echo "not found" >&6; }
14570            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14571          fi
14572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14573$as_echo "$tool_specified" >&6; }
14574        fi
14575      fi
14576    fi
14577
14578  fi
14579
14580
14581
14582
14583  # Publish this variable in the help.
14584
14585
14586  if [ -z "${READLINK+x}" ]; then
14587    # The variable is not set by user, try to locate tool using the code snippet
14588    for ac_prog in greadlink readlink
14589do
14590  # Extract the first word of "$ac_prog", so it can be a program name with args.
14591set dummy $ac_prog; ac_word=$2
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14593$as_echo_n "checking for $ac_word... " >&6; }
14594if ${ac_cv_path_READLINK+:} false; then :
14595  $as_echo_n "(cached) " >&6
14596else
14597  case $READLINK in
14598  [\\/]* | ?:[\\/]*)
14599  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14600  ;;
14601  *)
14602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14603for as_dir in $PATH
14604do
14605  IFS=$as_save_IFS
14606  test -z "$as_dir" && as_dir=.
14607    for ac_exec_ext in '' $ac_executable_extensions; do
14608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14609    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14611    break 2
14612  fi
14613done
14614  done
14615IFS=$as_save_IFS
14616
14617  ;;
14618esac
14619fi
14620READLINK=$ac_cv_path_READLINK
14621if test -n "$READLINK"; then
14622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14623$as_echo "$READLINK" >&6; }
14624else
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14626$as_echo "no" >&6; }
14627fi
14628
14629
14630  test -n "$READLINK" && break
14631done
14632
14633  else
14634    # The variable is set, but is it from the command line or the environment?
14635
14636    # Try to remove the string !READLINK! from our list.
14637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14639      # If it failed, the variable was not from the command line. Ignore it,
14640      # but warn the user (except for BASH, which is always set by the calling BASH).
14641      if test "xREADLINK" != xBASH; then
14642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14643$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14644      fi
14645      # Try to locate tool using the code snippet
14646      for ac_prog in greadlink readlink
14647do
14648  # Extract the first word of "$ac_prog", so it can be a program name with args.
14649set dummy $ac_prog; ac_word=$2
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14651$as_echo_n "checking for $ac_word... " >&6; }
14652if ${ac_cv_path_READLINK+:} false; then :
14653  $as_echo_n "(cached) " >&6
14654else
14655  case $READLINK in
14656  [\\/]* | ?:[\\/]*)
14657  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14658  ;;
14659  *)
14660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14661for as_dir in $PATH
14662do
14663  IFS=$as_save_IFS
14664  test -z "$as_dir" && as_dir=.
14665    for ac_exec_ext in '' $ac_executable_extensions; do
14666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14667    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14669    break 2
14670  fi
14671done
14672  done
14673IFS=$as_save_IFS
14674
14675  ;;
14676esac
14677fi
14678READLINK=$ac_cv_path_READLINK
14679if test -n "$READLINK"; then
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14681$as_echo "$READLINK" >&6; }
14682else
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14684$as_echo "no" >&6; }
14685fi
14686
14687
14688  test -n "$READLINK" && break
14689done
14690
14691    else
14692      # If it succeeded, then it was overridden by the user. We will use it
14693      # for the tool.
14694
14695      # First remove it from the list of overridden variables, so we can test
14696      # for unknown variables in the end.
14697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14698
14699      # Check if we try to supply an empty value
14700      if test "x$READLINK" = x; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14702$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14704$as_echo_n "checking for READLINK... " >&6; }
14705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14706$as_echo "disabled" >&6; }
14707      else
14708        # Check if the provided tool contains a complete path.
14709        tool_specified="$READLINK"
14710        tool_basename="${tool_specified##*/}"
14711        if test "x$tool_basename" = "x$tool_specified"; then
14712          # A command without a complete path is provided, search $PATH.
14713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14714$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14715          # Extract the first word of "$tool_basename", so it can be a program name with args.
14716set dummy $tool_basename; ac_word=$2
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14718$as_echo_n "checking for $ac_word... " >&6; }
14719if ${ac_cv_path_READLINK+:} false; then :
14720  $as_echo_n "(cached) " >&6
14721else
14722  case $READLINK in
14723  [\\/]* | ?:[\\/]*)
14724  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14725  ;;
14726  *)
14727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14728for as_dir in $PATH
14729do
14730  IFS=$as_save_IFS
14731  test -z "$as_dir" && as_dir=.
14732    for ac_exec_ext in '' $ac_executable_extensions; do
14733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14734    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14736    break 2
14737  fi
14738done
14739  done
14740IFS=$as_save_IFS
14741
14742  ;;
14743esac
14744fi
14745READLINK=$ac_cv_path_READLINK
14746if test -n "$READLINK"; then
14747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14748$as_echo "$READLINK" >&6; }
14749else
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14751$as_echo "no" >&6; }
14752fi
14753
14754
14755          if test "x$READLINK" = x; then
14756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14757          fi
14758        else
14759          # Otherwise we believe it is a complete path. Use it as it is.
14760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14761$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14763$as_echo_n "checking for READLINK... " >&6; }
14764          if test ! -x "$tool_specified"; then
14765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14766$as_echo "not found" >&6; }
14767            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14768          fi
14769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14770$as_echo "$tool_specified" >&6; }
14771        fi
14772      fi
14773    fi
14774
14775  fi
14776
14777
14778
14779
14780  # Publish this variable in the help.
14781
14782
14783  if [ -z "${DF+x}" ]; then
14784    # The variable is not set by user, try to locate tool using the code snippet
14785    for ac_prog in df
14786do
14787  # Extract the first word of "$ac_prog", so it can be a program name with args.
14788set dummy $ac_prog; ac_word=$2
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14790$as_echo_n "checking for $ac_word... " >&6; }
14791if ${ac_cv_path_DF+:} false; then :
14792  $as_echo_n "(cached) " >&6
14793else
14794  case $DF in
14795  [\\/]* | ?:[\\/]*)
14796  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14797  ;;
14798  *)
14799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14800for as_dir in $PATH
14801do
14802  IFS=$as_save_IFS
14803  test -z "$as_dir" && as_dir=.
14804    for ac_exec_ext in '' $ac_executable_extensions; do
14805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14806    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14808    break 2
14809  fi
14810done
14811  done
14812IFS=$as_save_IFS
14813
14814  ;;
14815esac
14816fi
14817DF=$ac_cv_path_DF
14818if test -n "$DF"; then
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14820$as_echo "$DF" >&6; }
14821else
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14823$as_echo "no" >&6; }
14824fi
14825
14826
14827  test -n "$DF" && break
14828done
14829
14830  else
14831    # The variable is set, but is it from the command line or the environment?
14832
14833    # Try to remove the string !DF! from our list.
14834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14836      # If it failed, the variable was not from the command line. Ignore it,
14837      # but warn the user (except for BASH, which is always set by the calling BASH).
14838      if test "xDF" != xBASH; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14840$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14841      fi
14842      # Try to locate tool using the code snippet
14843      for ac_prog in df
14844do
14845  # Extract the first word of "$ac_prog", so it can be a program name with args.
14846set dummy $ac_prog; ac_word=$2
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14848$as_echo_n "checking for $ac_word... " >&6; }
14849if ${ac_cv_path_DF+:} false; then :
14850  $as_echo_n "(cached) " >&6
14851else
14852  case $DF in
14853  [\\/]* | ?:[\\/]*)
14854  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14855  ;;
14856  *)
14857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14858for as_dir in $PATH
14859do
14860  IFS=$as_save_IFS
14861  test -z "$as_dir" && as_dir=.
14862    for ac_exec_ext in '' $ac_executable_extensions; do
14863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14864    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14866    break 2
14867  fi
14868done
14869  done
14870IFS=$as_save_IFS
14871
14872  ;;
14873esac
14874fi
14875DF=$ac_cv_path_DF
14876if test -n "$DF"; then
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14878$as_echo "$DF" >&6; }
14879else
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14881$as_echo "no" >&6; }
14882fi
14883
14884
14885  test -n "$DF" && break
14886done
14887
14888    else
14889      # If it succeeded, then it was overridden by the user. We will use it
14890      # for the tool.
14891
14892      # First remove it from the list of overridden variables, so we can test
14893      # for unknown variables in the end.
14894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14895
14896      # Check if we try to supply an empty value
14897      if test "x$DF" = x; then
14898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14899$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14901$as_echo_n "checking for DF... " >&6; }
14902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14903$as_echo "disabled" >&6; }
14904      else
14905        # Check if the provided tool contains a complete path.
14906        tool_specified="$DF"
14907        tool_basename="${tool_specified##*/}"
14908        if test "x$tool_basename" = "x$tool_specified"; then
14909          # A command without a complete path is provided, search $PATH.
14910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14911$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14912          # Extract the first word of "$tool_basename", so it can be a program name with args.
14913set dummy $tool_basename; ac_word=$2
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14915$as_echo_n "checking for $ac_word... " >&6; }
14916if ${ac_cv_path_DF+:} false; then :
14917  $as_echo_n "(cached) " >&6
14918else
14919  case $DF in
14920  [\\/]* | ?:[\\/]*)
14921  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14922  ;;
14923  *)
14924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14925for as_dir in $PATH
14926do
14927  IFS=$as_save_IFS
14928  test -z "$as_dir" && as_dir=.
14929    for ac_exec_ext in '' $ac_executable_extensions; do
14930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14931    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14933    break 2
14934  fi
14935done
14936  done
14937IFS=$as_save_IFS
14938
14939  ;;
14940esac
14941fi
14942DF=$ac_cv_path_DF
14943if test -n "$DF"; then
14944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14945$as_echo "$DF" >&6; }
14946else
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14948$as_echo "no" >&6; }
14949fi
14950
14951
14952          if test "x$DF" = x; then
14953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14954          fi
14955        else
14956          # Otherwise we believe it is a complete path. Use it as it is.
14957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14958$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14960$as_echo_n "checking for DF... " >&6; }
14961          if test ! -x "$tool_specified"; then
14962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14963$as_echo "not found" >&6; }
14964            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14965          fi
14966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14967$as_echo "$tool_specified" >&6; }
14968        fi
14969      fi
14970    fi
14971
14972  fi
14973
14974
14975
14976
14977  # Publish this variable in the help.
14978
14979
14980  if [ -z "${CPIO+x}" ]; then
14981    # The variable is not set by user, try to locate tool using the code snippet
14982    for ac_prog in cpio bsdcpio
14983do
14984  # Extract the first word of "$ac_prog", so it can be a program name with args.
14985set dummy $ac_prog; ac_word=$2
14986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14987$as_echo_n "checking for $ac_word... " >&6; }
14988if ${ac_cv_path_CPIO+:} false; then :
14989  $as_echo_n "(cached) " >&6
14990else
14991  case $CPIO in
14992  [\\/]* | ?:[\\/]*)
14993  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14994  ;;
14995  *)
14996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14997for as_dir in $PATH
14998do
14999  IFS=$as_save_IFS
15000  test -z "$as_dir" && as_dir=.
15001    for ac_exec_ext in '' $ac_executable_extensions; do
15002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15003    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15005    break 2
15006  fi
15007done
15008  done
15009IFS=$as_save_IFS
15010
15011  ;;
15012esac
15013fi
15014CPIO=$ac_cv_path_CPIO
15015if test -n "$CPIO"; then
15016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15017$as_echo "$CPIO" >&6; }
15018else
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15020$as_echo "no" >&6; }
15021fi
15022
15023
15024  test -n "$CPIO" && break
15025done
15026
15027  else
15028    # The variable is set, but is it from the command line or the environment?
15029
15030    # Try to remove the string !CPIO! from our list.
15031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15033      # If it failed, the variable was not from the command line. Ignore it,
15034      # but warn the user (except for BASH, which is always set by the calling BASH).
15035      if test "xCPIO" != xBASH; then
15036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15037$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15038      fi
15039      # Try to locate tool using the code snippet
15040      for ac_prog in cpio bsdcpio
15041do
15042  # Extract the first word of "$ac_prog", so it can be a program name with args.
15043set dummy $ac_prog; ac_word=$2
15044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15045$as_echo_n "checking for $ac_word... " >&6; }
15046if ${ac_cv_path_CPIO+:} false; then :
15047  $as_echo_n "(cached) " >&6
15048else
15049  case $CPIO in
15050  [\\/]* | ?:[\\/]*)
15051  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15052  ;;
15053  *)
15054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15055for as_dir in $PATH
15056do
15057  IFS=$as_save_IFS
15058  test -z "$as_dir" && as_dir=.
15059    for ac_exec_ext in '' $ac_executable_extensions; do
15060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15061    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15063    break 2
15064  fi
15065done
15066  done
15067IFS=$as_save_IFS
15068
15069  ;;
15070esac
15071fi
15072CPIO=$ac_cv_path_CPIO
15073if test -n "$CPIO"; then
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15075$as_echo "$CPIO" >&6; }
15076else
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15078$as_echo "no" >&6; }
15079fi
15080
15081
15082  test -n "$CPIO" && break
15083done
15084
15085    else
15086      # If it succeeded, then it was overridden by the user. We will use it
15087      # for the tool.
15088
15089      # First remove it from the list of overridden variables, so we can test
15090      # for unknown variables in the end.
15091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15092
15093      # Check if we try to supply an empty value
15094      if test "x$CPIO" = x; then
15095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15096$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15098$as_echo_n "checking for CPIO... " >&6; }
15099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15100$as_echo "disabled" >&6; }
15101      else
15102        # Check if the provided tool contains a complete path.
15103        tool_specified="$CPIO"
15104        tool_basename="${tool_specified##*/}"
15105        if test "x$tool_basename" = "x$tool_specified"; then
15106          # A command without a complete path is provided, search $PATH.
15107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15108$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15109          # Extract the first word of "$tool_basename", so it can be a program name with args.
15110set dummy $tool_basename; ac_word=$2
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15112$as_echo_n "checking for $ac_word... " >&6; }
15113if ${ac_cv_path_CPIO+:} false; then :
15114  $as_echo_n "(cached) " >&6
15115else
15116  case $CPIO in
15117  [\\/]* | ?:[\\/]*)
15118  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15119  ;;
15120  *)
15121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15122for as_dir in $PATH
15123do
15124  IFS=$as_save_IFS
15125  test -z "$as_dir" && as_dir=.
15126    for ac_exec_ext in '' $ac_executable_extensions; do
15127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15128    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15130    break 2
15131  fi
15132done
15133  done
15134IFS=$as_save_IFS
15135
15136  ;;
15137esac
15138fi
15139CPIO=$ac_cv_path_CPIO
15140if test -n "$CPIO"; then
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15142$as_echo "$CPIO" >&6; }
15143else
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15145$as_echo "no" >&6; }
15146fi
15147
15148
15149          if test "x$CPIO" = x; then
15150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15151          fi
15152        else
15153          # Otherwise we believe it is a complete path. Use it as it is.
15154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15155$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15157$as_echo_n "checking for CPIO... " >&6; }
15158          if test ! -x "$tool_specified"; then
15159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15160$as_echo "not found" >&6; }
15161            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15162          fi
15163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15164$as_echo "$tool_specified" >&6; }
15165        fi
15166      fi
15167    fi
15168
15169  fi
15170
15171
15172
15173
15174  # Publish this variable in the help.
15175
15176
15177  if [ -z "${NICE+x}" ]; then
15178    # The variable is not set by user, try to locate tool using the code snippet
15179    for ac_prog in nice
15180do
15181  # Extract the first word of "$ac_prog", so it can be a program name with args.
15182set dummy $ac_prog; ac_word=$2
15183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15184$as_echo_n "checking for $ac_word... " >&6; }
15185if ${ac_cv_path_NICE+:} false; then :
15186  $as_echo_n "(cached) " >&6
15187else
15188  case $NICE in
15189  [\\/]* | ?:[\\/]*)
15190  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15191  ;;
15192  *)
15193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15194for as_dir in $PATH
15195do
15196  IFS=$as_save_IFS
15197  test -z "$as_dir" && as_dir=.
15198    for ac_exec_ext in '' $ac_executable_extensions; do
15199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15200    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15202    break 2
15203  fi
15204done
15205  done
15206IFS=$as_save_IFS
15207
15208  ;;
15209esac
15210fi
15211NICE=$ac_cv_path_NICE
15212if test -n "$NICE"; then
15213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15214$as_echo "$NICE" >&6; }
15215else
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15217$as_echo "no" >&6; }
15218fi
15219
15220
15221  test -n "$NICE" && break
15222done
15223
15224  else
15225    # The variable is set, but is it from the command line or the environment?
15226
15227    # Try to remove the string !NICE! from our list.
15228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15230      # If it failed, the variable was not from the command line. Ignore it,
15231      # but warn the user (except for BASH, which is always set by the calling BASH).
15232      if test "xNICE" != xBASH; then
15233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15234$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15235      fi
15236      # Try to locate tool using the code snippet
15237      for ac_prog in nice
15238do
15239  # Extract the first word of "$ac_prog", so it can be a program name with args.
15240set dummy $ac_prog; ac_word=$2
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15242$as_echo_n "checking for $ac_word... " >&6; }
15243if ${ac_cv_path_NICE+:} false; then :
15244  $as_echo_n "(cached) " >&6
15245else
15246  case $NICE in
15247  [\\/]* | ?:[\\/]*)
15248  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15249  ;;
15250  *)
15251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15252for as_dir in $PATH
15253do
15254  IFS=$as_save_IFS
15255  test -z "$as_dir" && as_dir=.
15256    for ac_exec_ext in '' $ac_executable_extensions; do
15257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15258    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15260    break 2
15261  fi
15262done
15263  done
15264IFS=$as_save_IFS
15265
15266  ;;
15267esac
15268fi
15269NICE=$ac_cv_path_NICE
15270if test -n "$NICE"; then
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15272$as_echo "$NICE" >&6; }
15273else
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15275$as_echo "no" >&6; }
15276fi
15277
15278
15279  test -n "$NICE" && break
15280done
15281
15282    else
15283      # If it succeeded, then it was overridden by the user. We will use it
15284      # for the tool.
15285
15286      # First remove it from the list of overridden variables, so we can test
15287      # for unknown variables in the end.
15288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15289
15290      # Check if we try to supply an empty value
15291      if test "x$NICE" = x; then
15292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15293$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15295$as_echo_n "checking for NICE... " >&6; }
15296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15297$as_echo "disabled" >&6; }
15298      else
15299        # Check if the provided tool contains a complete path.
15300        tool_specified="$NICE"
15301        tool_basename="${tool_specified##*/}"
15302        if test "x$tool_basename" = "x$tool_specified"; then
15303          # A command without a complete path is provided, search $PATH.
15304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15305$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15306          # Extract the first word of "$tool_basename", so it can be a program name with args.
15307set dummy $tool_basename; ac_word=$2
15308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15309$as_echo_n "checking for $ac_word... " >&6; }
15310if ${ac_cv_path_NICE+:} false; then :
15311  $as_echo_n "(cached) " >&6
15312else
15313  case $NICE in
15314  [\\/]* | ?:[\\/]*)
15315  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15316  ;;
15317  *)
15318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15319for as_dir in $PATH
15320do
15321  IFS=$as_save_IFS
15322  test -z "$as_dir" && as_dir=.
15323    for ac_exec_ext in '' $ac_executable_extensions; do
15324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15325    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15327    break 2
15328  fi
15329done
15330  done
15331IFS=$as_save_IFS
15332
15333  ;;
15334esac
15335fi
15336NICE=$ac_cv_path_NICE
15337if test -n "$NICE"; then
15338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15339$as_echo "$NICE" >&6; }
15340else
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15342$as_echo "no" >&6; }
15343fi
15344
15345
15346          if test "x$NICE" = x; then
15347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15348          fi
15349        else
15350          # Otherwise we believe it is a complete path. Use it as it is.
15351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15352$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15354$as_echo_n "checking for NICE... " >&6; }
15355          if test ! -x "$tool_specified"; then
15356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15357$as_echo "not found" >&6; }
15358            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15359          fi
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15361$as_echo "$tool_specified" >&6; }
15362        fi
15363      fi
15364    fi
15365
15366  fi
15367
15368
15369
15370
15371  # Publish this variable in the help.
15372
15373
15374  if [ -z "${PANDOC+x}" ]; then
15375    # The variable is not set by user, try to locate tool using the code snippet
15376    for ac_prog in pandoc
15377do
15378  # Extract the first word of "$ac_prog", so it can be a program name with args.
15379set dummy $ac_prog; ac_word=$2
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15381$as_echo_n "checking for $ac_word... " >&6; }
15382if ${ac_cv_path_PANDOC+:} false; then :
15383  $as_echo_n "(cached) " >&6
15384else
15385  case $PANDOC in
15386  [\\/]* | ?:[\\/]*)
15387  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15388  ;;
15389  *)
15390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15391for as_dir in $PATH
15392do
15393  IFS=$as_save_IFS
15394  test -z "$as_dir" && as_dir=.
15395    for ac_exec_ext in '' $ac_executable_extensions; do
15396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15397    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15399    break 2
15400  fi
15401done
15402  done
15403IFS=$as_save_IFS
15404
15405  ;;
15406esac
15407fi
15408PANDOC=$ac_cv_path_PANDOC
15409if test -n "$PANDOC"; then
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15411$as_echo "$PANDOC" >&6; }
15412else
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15414$as_echo "no" >&6; }
15415fi
15416
15417
15418  test -n "$PANDOC" && break
15419done
15420
15421  else
15422    # The variable is set, but is it from the command line or the environment?
15423
15424    # Try to remove the string !PANDOC! from our list.
15425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15427      # If it failed, the variable was not from the command line. Ignore it,
15428      # but warn the user (except for BASH, which is always set by the calling BASH).
15429      if test "xPANDOC" != xBASH; then
15430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15431$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15432      fi
15433      # Try to locate tool using the code snippet
15434      for ac_prog in pandoc
15435do
15436  # Extract the first word of "$ac_prog", so it can be a program name with args.
15437set dummy $ac_prog; ac_word=$2
15438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15439$as_echo_n "checking for $ac_word... " >&6; }
15440if ${ac_cv_path_PANDOC+:} false; then :
15441  $as_echo_n "(cached) " >&6
15442else
15443  case $PANDOC in
15444  [\\/]* | ?:[\\/]*)
15445  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15446  ;;
15447  *)
15448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15449for as_dir in $PATH
15450do
15451  IFS=$as_save_IFS
15452  test -z "$as_dir" && as_dir=.
15453    for ac_exec_ext in '' $ac_executable_extensions; do
15454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15455    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15457    break 2
15458  fi
15459done
15460  done
15461IFS=$as_save_IFS
15462
15463  ;;
15464esac
15465fi
15466PANDOC=$ac_cv_path_PANDOC
15467if test -n "$PANDOC"; then
15468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15469$as_echo "$PANDOC" >&6; }
15470else
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15472$as_echo "no" >&6; }
15473fi
15474
15475
15476  test -n "$PANDOC" && break
15477done
15478
15479    else
15480      # If it succeeded, then it was overridden by the user. We will use it
15481      # for the tool.
15482
15483      # First remove it from the list of overridden variables, so we can test
15484      # for unknown variables in the end.
15485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15486
15487      # Check if we try to supply an empty value
15488      if test "x$PANDOC" = x; then
15489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15490$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15492$as_echo_n "checking for PANDOC... " >&6; }
15493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15494$as_echo "disabled" >&6; }
15495      else
15496        # Check if the provided tool contains a complete path.
15497        tool_specified="$PANDOC"
15498        tool_basename="${tool_specified##*/}"
15499        if test "x$tool_basename" = "x$tool_specified"; then
15500          # A command without a complete path is provided, search $PATH.
15501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15502$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15503          # Extract the first word of "$tool_basename", so it can be a program name with args.
15504set dummy $tool_basename; ac_word=$2
15505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15506$as_echo_n "checking for $ac_word... " >&6; }
15507if ${ac_cv_path_PANDOC+:} false; then :
15508  $as_echo_n "(cached) " >&6
15509else
15510  case $PANDOC in
15511  [\\/]* | ?:[\\/]*)
15512  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15513  ;;
15514  *)
15515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15516for as_dir in $PATH
15517do
15518  IFS=$as_save_IFS
15519  test -z "$as_dir" && as_dir=.
15520    for ac_exec_ext in '' $ac_executable_extensions; do
15521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15522    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15524    break 2
15525  fi
15526done
15527  done
15528IFS=$as_save_IFS
15529
15530  ;;
15531esac
15532fi
15533PANDOC=$ac_cv_path_PANDOC
15534if test -n "$PANDOC"; then
15535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15536$as_echo "$PANDOC" >&6; }
15537else
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15539$as_echo "no" >&6; }
15540fi
15541
15542
15543          if test "x$PANDOC" = x; then
15544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15545          fi
15546        else
15547          # Otherwise we believe it is a complete path. Use it as it is.
15548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15549$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15551$as_echo_n "checking for PANDOC... " >&6; }
15552          if test ! -x "$tool_specified"; then
15553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15554$as_echo "not found" >&6; }
15555            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15556          fi
15557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15558$as_echo "$tool_specified" >&6; }
15559        fi
15560      fi
15561    fi
15562
15563  fi
15564
15565
15566
15567
15568# Now we can determine OpenJDK build and target platforms. This is required to
15569# have early on.
15570# Make sure we can run config.sub.
15571$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15572  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15573
15574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15575$as_echo_n "checking build system type... " >&6; }
15576if ${ac_cv_build+:} false; then :
15577  $as_echo_n "(cached) " >&6
15578else
15579  ac_build_alias=$build_alias
15580test "x$ac_build_alias" = x &&
15581  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15582test "x$ac_build_alias" = x &&
15583  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15584ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15585  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15586
15587fi
15588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15589$as_echo "$ac_cv_build" >&6; }
15590case $ac_cv_build in
15591*-*-*) ;;
15592*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15593esac
15594build=$ac_cv_build
15595ac_save_IFS=$IFS; IFS='-'
15596set x $ac_cv_build
15597shift
15598build_cpu=$1
15599build_vendor=$2
15600shift; shift
15601# Remember, the first character of IFS is used to create $*,
15602# except with old shells:
15603build_os=$*
15604IFS=$ac_save_IFS
15605case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15606
15607
15608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15609$as_echo_n "checking host system type... " >&6; }
15610if ${ac_cv_host+:} false; then :
15611  $as_echo_n "(cached) " >&6
15612else
15613  if test "x$host_alias" = x; then
15614  ac_cv_host=$ac_cv_build
15615else
15616  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15617    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15618fi
15619
15620fi
15621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15622$as_echo "$ac_cv_host" >&6; }
15623case $ac_cv_host in
15624*-*-*) ;;
15625*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15626esac
15627host=$ac_cv_host
15628ac_save_IFS=$IFS; IFS='-'
15629set x $ac_cv_host
15630shift
15631host_cpu=$1
15632host_vendor=$2
15633shift; shift
15634# Remember, the first character of IFS is used to create $*,
15635# except with old shells:
15636host_os=$*
15637IFS=$ac_save_IFS
15638case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15639
15640
15641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15642$as_echo_n "checking target system type... " >&6; }
15643if ${ac_cv_target+:} false; then :
15644  $as_echo_n "(cached) " >&6
15645else
15646  if test "x$target_alias" = x; then
15647  ac_cv_target=$ac_cv_host
15648else
15649  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15650    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15651fi
15652
15653fi
15654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15655$as_echo "$ac_cv_target" >&6; }
15656case $ac_cv_target in
15657*-*-*) ;;
15658*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15659esac
15660target=$ac_cv_target
15661ac_save_IFS=$IFS; IFS='-'
15662set x $ac_cv_target
15663shift
15664target_cpu=$1
15665target_vendor=$2
15666shift; shift
15667# Remember, the first character of IFS is used to create $*,
15668# except with old shells:
15669target_os=$*
15670IFS=$ac_save_IFS
15671case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15672
15673
15674# The aliases save the names the user supplied, while $host etc.
15675# will get canonicalized.
15676test -n "$target_alias" &&
15677  test "$program_prefix$program_suffix$program_transform_name" = \
15678    NONENONEs,x,x, &&
15679  program_prefix=${target_alias}-
15680
15681  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15682  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15683  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15684  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15685  # to use the configure naming style.
15686
15687
15688
15689
15690
15691  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15692  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15693  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15694  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15695  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15696  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15697
15698
15699
15700  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15701
15702  case "$build_os" in
15703    *linux*)
15704      VAR_OS=linux
15705      VAR_OS_TYPE=unix
15706      ;;
15707    *solaris*)
15708      VAR_OS=solaris
15709      VAR_OS_TYPE=unix
15710      ;;
15711    *darwin*)
15712      VAR_OS=macosx
15713      VAR_OS_TYPE=unix
15714      ;;
15715    *bsd*)
15716      VAR_OS=bsd
15717      VAR_OS_TYPE=unix
15718      ;;
15719    *cygwin*)
15720      VAR_OS=windows
15721      VAR_OS_ENV=windows.cygwin
15722      ;;
15723    *mingw*)
15724      VAR_OS=windows
15725      VAR_OS_ENV=windows.msys
15726      ;;
15727    *aix*)
15728      VAR_OS=aix
15729      VAR_OS_TYPE=unix
15730      ;;
15731    *)
15732      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15733      ;;
15734  esac
15735
15736
15737  # First argument is the cpu name from the trip/quad
15738  case "$build_cpu" in
15739    x86_64)
15740      VAR_CPU=x86_64
15741      VAR_CPU_ARCH=x86
15742      VAR_CPU_BITS=64
15743      VAR_CPU_ENDIAN=little
15744      ;;
15745    i?86)
15746      VAR_CPU=x86
15747      VAR_CPU_ARCH=x86
15748      VAR_CPU_BITS=32
15749      VAR_CPU_ENDIAN=little
15750      ;;
15751    arm*)
15752      VAR_CPU=arm
15753      VAR_CPU_ARCH=arm
15754      VAR_CPU_BITS=32
15755      VAR_CPU_ENDIAN=little
15756      ;;
15757    aarch64)
15758      VAR_CPU=aarch64
15759      VAR_CPU_ARCH=aarch64
15760      VAR_CPU_BITS=64
15761      VAR_CPU_ENDIAN=little
15762      ;;
15763    powerpc)
15764      VAR_CPU=ppc
15765      VAR_CPU_ARCH=ppc
15766      VAR_CPU_BITS=32
15767      VAR_CPU_ENDIAN=big
15768      ;;
15769    powerpc64)
15770      VAR_CPU=ppc64
15771      VAR_CPU_ARCH=ppc
15772      VAR_CPU_BITS=64
15773      VAR_CPU_ENDIAN=big
15774      ;;
15775    powerpc64le)
15776      VAR_CPU=ppc64le
15777      VAR_CPU_ARCH=ppc
15778      VAR_CPU_BITS=64
15779      VAR_CPU_ENDIAN=little
15780      ;;
15781    s390)
15782      VAR_CPU=s390
15783      VAR_CPU_ARCH=s390
15784      VAR_CPU_BITS=32
15785      VAR_CPU_ENDIAN=big
15786      ;;
15787    s390x)
15788      VAR_CPU=s390x
15789      VAR_CPU_ARCH=s390
15790      VAR_CPU_BITS=64
15791      VAR_CPU_ENDIAN=big
15792      ;;
15793    sparc)
15794      VAR_CPU=sparc
15795      VAR_CPU_ARCH=sparc
15796      VAR_CPU_BITS=32
15797      VAR_CPU_ENDIAN=big
15798      ;;
15799    sparcv9|sparc64)
15800      VAR_CPU=sparcv9
15801      VAR_CPU_ARCH=sparc
15802      VAR_CPU_BITS=64
15803      VAR_CPU_ENDIAN=big
15804      ;;
15805    *)
15806      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15807      ;;
15808  esac
15809
15810  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15811  OPENJDK_BUILD_OS="$VAR_OS"
15812  if test "x$VAR_OS_TYPE" != x; then
15813    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15814  else
15815    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15816  fi
15817  if test "x$VAR_OS_ENV" != x; then
15818    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15819  else
15820    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15821  fi
15822  OPENJDK_BUILD_CPU="$VAR_CPU"
15823  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15824  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15825  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15826
15827
15828
15829
15830
15831
15832
15833
15834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15835$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15837$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15838
15839  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15840
15841  case "$host_os" in
15842    *linux*)
15843      VAR_OS=linux
15844      VAR_OS_TYPE=unix
15845      ;;
15846    *solaris*)
15847      VAR_OS=solaris
15848      VAR_OS_TYPE=unix
15849      ;;
15850    *darwin*)
15851      VAR_OS=macosx
15852      VAR_OS_TYPE=unix
15853      ;;
15854    *bsd*)
15855      VAR_OS=bsd
15856      VAR_OS_TYPE=unix
15857      ;;
15858    *cygwin*)
15859      VAR_OS=windows
15860      VAR_OS_ENV=windows.cygwin
15861      ;;
15862    *mingw*)
15863      VAR_OS=windows
15864      VAR_OS_ENV=windows.msys
15865      ;;
15866    *aix*)
15867      VAR_OS=aix
15868      VAR_OS_TYPE=unix
15869      ;;
15870    *)
15871      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15872      ;;
15873  esac
15874
15875
15876  # First argument is the cpu name from the trip/quad
15877  case "$host_cpu" in
15878    x86_64)
15879      VAR_CPU=x86_64
15880      VAR_CPU_ARCH=x86
15881      VAR_CPU_BITS=64
15882      VAR_CPU_ENDIAN=little
15883      ;;
15884    i?86)
15885      VAR_CPU=x86
15886      VAR_CPU_ARCH=x86
15887      VAR_CPU_BITS=32
15888      VAR_CPU_ENDIAN=little
15889      ;;
15890    arm*)
15891      VAR_CPU=arm
15892      VAR_CPU_ARCH=arm
15893      VAR_CPU_BITS=32
15894      VAR_CPU_ENDIAN=little
15895      ;;
15896    aarch64)
15897      VAR_CPU=aarch64
15898      VAR_CPU_ARCH=aarch64
15899      VAR_CPU_BITS=64
15900      VAR_CPU_ENDIAN=little
15901      ;;
15902    powerpc)
15903      VAR_CPU=ppc
15904      VAR_CPU_ARCH=ppc
15905      VAR_CPU_BITS=32
15906      VAR_CPU_ENDIAN=big
15907      ;;
15908    powerpc64)
15909      VAR_CPU=ppc64
15910      VAR_CPU_ARCH=ppc
15911      VAR_CPU_BITS=64
15912      VAR_CPU_ENDIAN=big
15913      ;;
15914    powerpc64le)
15915      VAR_CPU=ppc64le
15916      VAR_CPU_ARCH=ppc
15917      VAR_CPU_BITS=64
15918      VAR_CPU_ENDIAN=little
15919      ;;
15920    s390)
15921      VAR_CPU=s390
15922      VAR_CPU_ARCH=s390
15923      VAR_CPU_BITS=32
15924      VAR_CPU_ENDIAN=big
15925      ;;
15926    s390x)
15927      VAR_CPU=s390x
15928      VAR_CPU_ARCH=s390
15929      VAR_CPU_BITS=64
15930      VAR_CPU_ENDIAN=big
15931      ;;
15932    sparc)
15933      VAR_CPU=sparc
15934      VAR_CPU_ARCH=sparc
15935      VAR_CPU_BITS=32
15936      VAR_CPU_ENDIAN=big
15937      ;;
15938    sparcv9|sparc64)
15939      VAR_CPU=sparcv9
15940      VAR_CPU_ARCH=sparc
15941      VAR_CPU_BITS=64
15942      VAR_CPU_ENDIAN=big
15943      ;;
15944    *)
15945      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15946      ;;
15947  esac
15948
15949  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15950  OPENJDK_TARGET_OS="$VAR_OS"
15951  if test "x$VAR_OS_TYPE" != x; then
15952    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15953  else
15954    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15955  fi
15956  if test "x$VAR_OS_ENV" != x; then
15957    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15958  else
15959    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15960  fi
15961  OPENJDK_TARGET_CPU="$VAR_CPU"
15962  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15963  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15964  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15965
15966
15967
15968
15969
15970
15971
15972
15973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15974$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15976$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15977
15978
15979
15980# Check whether --with-target-bits was given.
15981if test "${with_target_bits+set}" = set; then :
15982  withval=$with_target_bits;
15983fi
15984
15985
15986  # We have three types of compiles:
15987  # native  == normal compilation, target system == build system
15988  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15989  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15990  #
15991  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15992    # We're doing a proper cross-compilation
15993    COMPILE_TYPE="cross"
15994  else
15995    COMPILE_TYPE="native"
15996  fi
15997
15998  if test "x$with_target_bits" != x; then
15999    if test "x$COMPILE_TYPE" = "xcross"; then
16000      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16001    fi
16002
16003    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16004      # A reduced build is requested
16005      COMPILE_TYPE="reduced"
16006      OPENJDK_TARGET_CPU_BITS=32
16007      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16008        OPENJDK_TARGET_CPU=x86
16009      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16010        OPENJDK_TARGET_CPU=sparc
16011      else
16012        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16013      fi
16014    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16015      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
16016    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16017      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16018$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16019    else
16020      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16021    fi
16022  fi
16023
16024
16025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16026$as_echo_n "checking compilation type... " >&6; }
16027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16028$as_echo "$COMPILE_TYPE" >&6; }
16029
16030
16031  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16032    REQUIRED_OS_NAME=SunOS
16033    REQUIRED_OS_VERSION=5.10
16034  fi
16035  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16036    REQUIRED_OS_NAME=Linux
16037    REQUIRED_OS_VERSION=2.6
16038  fi
16039  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16040    REQUIRED_OS_NAME=Windows
16041    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
16042      REQUIRED_OS_VERSION=5.2
16043    else
16044      REQUIRED_OS_VERSION=5.1
16045    fi
16046  fi
16047  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16048    REQUIRED_OS_NAME="Mac OS X"
16049    REQUIRED_OS_VERSION=11.2
16050  fi
16051  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16052    REQUIRED_OS_NAME=AIX
16053    REQUIRED_OS_VERSION=7.1
16054  fi
16055  REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
16056
16057
16058
16059
16060
16061
16062
16063  # Also store the legacy naming of the cpu.
16064  # Ie i586 and amd64 instead of x86 and x86_64
16065  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16066  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16067    OPENJDK_TARGET_CPU_LEGACY="i586"
16068  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16069    # On all platforms except MacOSX replace x86_64 with amd64.
16070    OPENJDK_TARGET_CPU_LEGACY="amd64"
16071  fi
16072
16073
16074  # And the second legacy naming of the cpu.
16075  # Ie i386 and amd64 instead of x86 and x86_64.
16076  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16077  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16078    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16079  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16080    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16081  fi
16082
16083
16084  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16085  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16086  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16087  OPENJDK_TARGET_CPU_ISADIR=""
16088  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16089    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16090      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16091    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16092      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16093    fi
16094  fi
16095
16096
16097  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16098  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16099  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16100    # On linux only, we replace x86 with i386.
16101    OPENJDK_TARGET_CPU_OSARCH="i386"
16102  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16103    # On all platforms except macosx, we replace x86_64 with amd64.
16104    OPENJDK_TARGET_CPU_OSARCH="amd64"
16105  fi
16106
16107
16108  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16109  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16110    OPENJDK_TARGET_CPU_JLI="i386"
16111  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16112    # On all platforms except macosx, we replace x86_64 with amd64.
16113    OPENJDK_TARGET_CPU_JLI="amd64"
16114  fi
16115
16116  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16117      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16118  else
16119      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16120  fi
16121
16122
16123  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16124  # Macosx is osx and x86_64 is x64
16125  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16126    OPENJDK_TARGET_OS_BUNDLE="osx"
16127  else
16128    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16129  fi
16130  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16131    OPENJDK_TARGET_CPU_BUNDLE="x64"
16132  else
16133    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16134  fi
16135  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16136
16137
16138  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16139    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16140    # unpack200.exe. This variable is used in
16141    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16142    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16143      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16144    fi
16145  fi
16146
16147  if test "x$COMPILE_TYPE" = "xcross"; then
16148    # FIXME: ... or should this include reduced builds..?
16149    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16150  else
16151    DEFINE_CROSS_COMPILE_ARCH=""
16152  fi
16153
16154
16155  # Convert openjdk platform names to hotspot names
16156
16157  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16158  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16159    HOTSPOT_TARGET_OS=bsd
16160  fi
16161
16162
16163  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16164  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16165    HOTSPOT_TARGET_OS_TYPE=posix
16166  fi
16167
16168
16169  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16170  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16171    HOTSPOT_TARGET_CPU=x86_32
16172  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16173    HOTSPOT_TARGET_CPU=sparc
16174  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16175    HOTSPOT_TARGET_CPU=ppc_64
16176  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16177    HOTSPOT_TARGET_CPU=ppc_64
16178  fi
16179
16180
16181  # This is identical with OPENJDK_*, but define anyway for consistency.
16182  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16183
16184
16185  # Setup HOTSPOT_TARGET_CPU_DEFINE
16186  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16187    HOTSPOT_TARGET_CPU_DEFINE=IA32
16188  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16189    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16190  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16191    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16192  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16193    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16194  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16195    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16196  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16197    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16198
16199  # The cpu defines below are for zero, we don't support them directly.
16200  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16201    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16202  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16203    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16204  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16205    HOTSPOT_TARGET_CPU_DEFINE=S390
16206  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16207    HOTSPOT_TARGET_CPU_DEFINE=S390
16208  elif test "x$OPENJDK_TARGET_CPU" != x; then
16209    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16210  fi
16211
16212
16213
16214
16215  # Also store the legacy naming of the cpu.
16216  # Ie i586 and amd64 instead of x86 and x86_64
16217  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16218  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16219    OPENJDK_BUILD_CPU_LEGACY="i586"
16220  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16221    # On all platforms except MacOSX replace x86_64 with amd64.
16222    OPENJDK_BUILD_CPU_LEGACY="amd64"
16223  fi
16224
16225
16226  # And the second legacy naming of the cpu.
16227  # Ie i386 and amd64 instead of x86 and x86_64.
16228  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16229  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16230    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16231  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16232    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16233  fi
16234
16235
16236  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16237  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16238  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16239  OPENJDK_BUILD_CPU_ISADIR=""
16240  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16241    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16242      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16243    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16244      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16245    fi
16246  fi
16247
16248
16249  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16250  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16251  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16252    # On linux only, we replace x86 with i386.
16253    OPENJDK_BUILD_CPU_OSARCH="i386"
16254  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16255    # On all platforms except macosx, we replace x86_64 with amd64.
16256    OPENJDK_BUILD_CPU_OSARCH="amd64"
16257  fi
16258
16259
16260  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16261  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16262    OPENJDK_BUILD_CPU_JLI="i386"
16263  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16264    # On all platforms except macosx, we replace x86_64 with amd64.
16265    OPENJDK_BUILD_CPU_JLI="amd64"
16266  fi
16267
16268  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16269      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16270  else
16271      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16272  fi
16273
16274
16275  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16276  # Macosx is osx and x86_64 is x64
16277  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16278    OPENJDK_BUILD_OS_BUNDLE="osx"
16279  else
16280    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16281  fi
16282  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16283    OPENJDK_BUILD_CPU_BUNDLE="x64"
16284  else
16285    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16286  fi
16287  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16288
16289
16290  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16291    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16292    # unpack200.exe. This variable is used in
16293    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16294    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16295      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16296    fi
16297  fi
16298
16299  if test "x$COMPILE_TYPE" = "xcross"; then
16300    # FIXME: ... or should this include reduced builds..?
16301    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16302  else
16303    DEFINE_CROSS_COMPILE_ARCH=""
16304  fi
16305
16306
16307  # Convert openjdk platform names to hotspot names
16308
16309  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16310  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16311    HOTSPOT_BUILD_OS=bsd
16312  fi
16313
16314
16315  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16316  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16317    HOTSPOT_BUILD_OS_TYPE=posix
16318  fi
16319
16320
16321  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16322  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16323    HOTSPOT_BUILD_CPU=x86_32
16324  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16325    HOTSPOT_BUILD_CPU=sparc
16326  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16327    HOTSPOT_BUILD_CPU=ppc_64
16328  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16329    HOTSPOT_BUILD_CPU=ppc_64
16330  fi
16331
16332
16333  # This is identical with OPENJDK_*, but define anyway for consistency.
16334  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16335
16336
16337  # Setup HOTSPOT_BUILD_CPU_DEFINE
16338  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16339    HOTSPOT_BUILD_CPU_DEFINE=IA32
16340  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16341    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16342  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16343    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16344  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16345    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16346  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16347    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16348  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16349    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16350
16351  # The cpu defines below are for zero, we don't support them directly.
16352  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16353    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16354  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16355    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16356  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16357    HOTSPOT_BUILD_CPU_DEFINE=S390
16358  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16359    HOTSPOT_BUILD_CPU_DEFINE=S390
16360  elif test "x$OPENJDK_BUILD_CPU" != x; then
16361    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16362  fi
16363
16364
16365
16366
16367
16368
16369# Continue setting up basic stuff. Most remaining code require fundamental tools.
16370
16371  # Save the current directory this script was started from
16372  CURDIR="$PWD"
16373
16374  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16375  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16376  # was not available at that time.
16377  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16378  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16379    ORIGINAL_PATH="$REWRITTEN_PATH"
16380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16381$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16382  fi
16383
16384  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16385    PATH_SEP=";"
16386
16387  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16388  if test $SRC_ROOT_LENGTH -gt 100; then
16389    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16390  fi
16391
16392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16394$as_echo_n "checking cygwin release... " >&6; }
16395    CYGWIN_VERSION=`$UNAME -r`
16396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16397$as_echo "$CYGWIN_VERSION" >&6; }
16398    WINDOWS_ENV_VENDOR='cygwin'
16399    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16400
16401    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16402    if test "x$CYGWIN_VERSION_OLD" != x; then
16403      { $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
16404$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;}
16405      as_fn_error $? "Cannot continue" "$LINENO" 5
16406    fi
16407    if test "x$CYGPATH" = x; then
16408      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16409    fi
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16411$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16412    # The cmd output ends with Windows line endings (CR/LF)
16413    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16414    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16415    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16417$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16418    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16419    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16420    if test "x$test_cygdrive_prefix" = x; then
16421      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16422    fi
16423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16425$as_echo_n "checking msys release... " >&6; }
16426    MSYS_VERSION=`$UNAME -r`
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16428$as_echo "$MSYS_VERSION" >&6; }
16429
16430    WINDOWS_ENV_VENDOR='msys'
16431    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16432
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16434$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16435    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16436    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16437
16438  windows_path="$MSYS_ROOT_PATH"
16439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16440    unix_path=`$CYGPATH -u "$windows_path"`
16441    MSYS_ROOT_PATH="$unix_path"
16442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16444    MSYS_ROOT_PATH="$unix_path"
16445  fi
16446
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16448$as_echo "$MSYS_ROOT_PATH" >&6; }
16449    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16450  else
16451    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16452  fi
16453
16454  # Test if windows or unix (cygwin/msys) find is first in path.
16455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16456$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16457  FIND_BINARY_OUTPUT=`find --version 2>&1`
16458  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16460$as_echo "unix style" >&6; }
16461  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16463$as_echo "Windows" >&6; }
16464    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16465$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16466    { $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
16467$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16468    as_fn_error $? "Cannot continue" "$LINENO" 5
16469  else
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16471$as_echo "unknown" >&6; }
16472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16473$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16474  fi
16475
16476  else
16477    PATH_SEP=":"
16478  fi
16479
16480
16481  # We get the top-level directory from the supporting wrappers.
16482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16483$as_echo_n "checking for top-level directory... " >&6; }
16484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16485$as_echo "$TOPDIR" >&6; }
16486
16487
16488  # Save the original version of TOPDIR for string comparisons
16489  ORIGINAL_TOPDIR="$TOPDIR"
16490
16491
16492  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16493
16494  # Only process if variable expands to non-empty
16495
16496  if test "x$CURDIR" != x; then
16497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16498
16499  # Input might be given as Windows format, start by converting to
16500  # unix format.
16501  path="$CURDIR"
16502  new_path=`$CYGPATH -u "$path"`
16503
16504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16507  # "foo.exe" is OK but "foo" is an error.
16508  #
16509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16510  # It is also a way to make sure we got the proper file name for the real test later on.
16511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16512  if test "x$test_shortpath" = x; then
16513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16514$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16515    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16516  fi
16517
16518  # Call helper function which possibly converts this using DOS-style short mode.
16519  # If so, the updated path is stored in $new_path.
16520
16521  input_path="$new_path"
16522  # Check if we need to convert this using DOS-style short mode. If the path
16523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16524  # take no chances and rewrite it.
16525  # Note: m4 eats our [], so we need to use [ and ] instead.
16526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16527  if test "x$has_forbidden_chars" != x; then
16528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16532      # Going to short mode and back again did indeed matter. Since short mode is
16533      # case insensitive, let's make it lowercase to improve readability.
16534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16535      # Now convert it back to Unix-style (cygpath)
16536      input_path=`$CYGPATH -u "$shortmode_path"`
16537      new_path="$input_path"
16538    fi
16539  fi
16540
16541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16542  if test "x$test_cygdrive_prefix" = x; then
16543    # As a simple fix, exclude /usr/bin since it's not a real path.
16544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16546      # a path prefixed by /cygdrive for fixpath to work.
16547      new_path="$CYGWIN_ROOT_PATH$input_path"
16548    fi
16549  fi
16550
16551
16552  if test "x$path" != "x$new_path"; then
16553    CURDIR="$new_path"
16554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16555$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16556  fi
16557
16558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16559
16560  path="$CURDIR"
16561  has_colon=`$ECHO $path | $GREP ^.:`
16562  new_path="$path"
16563  if test "x$has_colon" = x; then
16564    # Not in mixed or Windows style, start by that.
16565    new_path=`cmd //c echo $path`
16566  fi
16567
16568
16569  input_path="$new_path"
16570  # Check if we need to convert this using DOS-style short mode. If the path
16571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16572  # take no chances and rewrite it.
16573  # Note: m4 eats our [], so we need to use [ and ] instead.
16574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16575  if test "x$has_forbidden_chars" != x; then
16576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16578  fi
16579
16580
16581  windows_path="$new_path"
16582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16583    unix_path=`$CYGPATH -u "$windows_path"`
16584    new_path="$unix_path"
16585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16587    new_path="$unix_path"
16588  fi
16589
16590  if test "x$path" != "x$new_path"; then
16591    CURDIR="$new_path"
16592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16593$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16594  fi
16595
16596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16598
16599    else
16600      # We're on a unix platform. Hooray! :)
16601      path="$CURDIR"
16602      has_space=`$ECHO "$path" | $GREP " "`
16603      if test "x$has_space" != x; then
16604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16605$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16607      fi
16608
16609      # Use eval to expand a potential ~
16610      eval path="$path"
16611      if test ! -f "$path" && test ! -d "$path"; then
16612        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16613      fi
16614
16615      if test -d "$path"; then
16616        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16617      else
16618        dir="`$DIRNAME "$path"`"
16619        base="`$BASENAME "$path"`"
16620        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16621      fi
16622    fi
16623  fi
16624
16625
16626  # Only process if variable expands to non-empty
16627
16628  if test "x$TOPDIR" != x; then
16629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16630
16631  # Input might be given as Windows format, start by converting to
16632  # unix format.
16633  path="$TOPDIR"
16634  new_path=`$CYGPATH -u "$path"`
16635
16636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16639  # "foo.exe" is OK but "foo" is an error.
16640  #
16641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16642  # It is also a way to make sure we got the proper file name for the real test later on.
16643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16644  if test "x$test_shortpath" = x; then
16645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16646$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16647    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16648  fi
16649
16650  # Call helper function which possibly converts this using DOS-style short mode.
16651  # If so, the updated path is stored in $new_path.
16652
16653  input_path="$new_path"
16654  # Check if we need to convert this using DOS-style short mode. If the path
16655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16656  # take no chances and rewrite it.
16657  # Note: m4 eats our [], so we need to use [ and ] instead.
16658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16659  if test "x$has_forbidden_chars" != x; then
16660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16664      # Going to short mode and back again did indeed matter. Since short mode is
16665      # case insensitive, let's make it lowercase to improve readability.
16666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16667      # Now convert it back to Unix-style (cygpath)
16668      input_path=`$CYGPATH -u "$shortmode_path"`
16669      new_path="$input_path"
16670    fi
16671  fi
16672
16673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16674  if test "x$test_cygdrive_prefix" = x; then
16675    # As a simple fix, exclude /usr/bin since it's not a real path.
16676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16678      # a path prefixed by /cygdrive for fixpath to work.
16679      new_path="$CYGWIN_ROOT_PATH$input_path"
16680    fi
16681  fi
16682
16683
16684  if test "x$path" != "x$new_path"; then
16685    TOPDIR="$new_path"
16686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16687$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16688  fi
16689
16690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16691
16692  path="$TOPDIR"
16693  has_colon=`$ECHO $path | $GREP ^.:`
16694  new_path="$path"
16695  if test "x$has_colon" = x; then
16696    # Not in mixed or Windows style, start by that.
16697    new_path=`cmd //c echo $path`
16698  fi
16699
16700
16701  input_path="$new_path"
16702  # Check if we need to convert this using DOS-style short mode. If the path
16703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16704  # take no chances and rewrite it.
16705  # Note: m4 eats our [], so we need to use [ and ] instead.
16706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16707  if test "x$has_forbidden_chars" != x; then
16708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16710  fi
16711
16712
16713  windows_path="$new_path"
16714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16715    unix_path=`$CYGPATH -u "$windows_path"`
16716    new_path="$unix_path"
16717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16719    new_path="$unix_path"
16720  fi
16721
16722  if test "x$path" != "x$new_path"; then
16723    TOPDIR="$new_path"
16724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16725$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16726  fi
16727
16728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16730
16731    else
16732      # We're on a unix platform. Hooray! :)
16733      path="$TOPDIR"
16734      has_space=`$ECHO "$path" | $GREP " "`
16735      if test "x$has_space" != x; then
16736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16737$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16739      fi
16740
16741      # Use eval to expand a potential ~
16742      eval path="$path"
16743      if test ! -f "$path" && test ! -d "$path"; then
16744        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16745      fi
16746
16747      if test -d "$path"; then
16748        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16749      else
16750        dir="`$DIRNAME "$path"`"
16751        base="`$BASENAME "$path"`"
16752        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16753      fi
16754    fi
16755  fi
16756
16757  # SRC_ROOT is a traditional alias for TOPDIR.
16758  SRC_ROOT=$TOPDIR
16759
16760  # Calculate a canonical version of TOPDIR for string comparisons
16761  CANONICAL_TOPDIR=$TOPDIR
16762
16763  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16764    # Follow a chain of symbolic links. Use readlink
16765    # where it exists, else fall back to horribly
16766    # complicated shell code.
16767    if test "x$READLINK_TESTED" != yes; then
16768      # On MacOSX there is a readlink tool with a different
16769      # purpose than the GNU readlink tool. Check the found readlink.
16770      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16771      if test "x$ISGNU" = x; then
16772        # A readlink that we do not know how to use.
16773        # Are there other non-GNU readlinks out there?
16774        READLINK_TESTED=yes
16775        READLINK=
16776      fi
16777    fi
16778
16779    if test "x$READLINK" != x; then
16780      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16781    else
16782      # Save the current directory for restoring afterwards
16783      STARTDIR=$PWD
16784      COUNTER=0
16785      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16786      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16787      cd $sym_link_dir
16788      # Use -P flag to resolve symlinks in directories.
16789      cd `$THEPWDCMD -P`
16790      sym_link_dir=`$THEPWDCMD -P`
16791      # Resolve file symlinks
16792      while test $COUNTER -lt 20; do
16793        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16794        if test "x$ISLINK" == x; then
16795          # This is not a symbolic link! We are done!
16796          break
16797        fi
16798        # Again resolve directory symlinks since the target of the just found
16799        # link could be in a different directory
16800        cd `$DIRNAME $ISLINK`
16801        sym_link_dir=`$THEPWDCMD -P`
16802        sym_link_file=`$BASENAME $ISLINK`
16803        let COUNTER=COUNTER+1
16804      done
16805      cd $STARTDIR
16806      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16807    fi
16808  fi
16809
16810
16811
16812  # Locate the directory of this script.
16813  AUTOCONF_DIR=$TOPDIR/common/autoconf
16814
16815  # Setup username (for use in adhoc version strings etc)
16816  # Outer [ ] to quote m4.
16817   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16818
16819
16820
16821# Check if it's a pure open build or if custom sources are to be used.
16822
16823  # Check whether --enable-openjdk-only was given.
16824if test "${enable_openjdk_only+set}" = set; then :
16825  enableval=$enable_openjdk_only;
16826else
16827  enable_openjdk_only="no"
16828fi
16829
16830
16831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16832$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16834$as_echo "$enable_openjdk_only" >&6; }
16835  if test "x$enable_openjdk_only" = "xyes"; then
16836    SUPPRESS_CUSTOM_EXTENSIONS="true"
16837  elif test "x$enable_openjdk_only" = "xno"; then
16838    SUPPRESS_CUSTOM_EXTENSIONS="false"
16839  else
16840    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16841  fi
16842
16843  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16844  # the IncludeCustomExtension macro.
16845
16846
16847# Check whether --with-custom-make-dir was given.
16848if test "${with_custom_make_dir+set}" = set; then :
16849  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
16850$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16851fi
16852
16853
16854
16855
16856# These are needed to be able to create a configuration name (and thus the output directory)
16857
16858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16859$as_echo_n "checking which variant of the JDK to build... " >&6; }
16860
16861# Check whether --with-jdk-variant was given.
16862if test "${with_jdk_variant+set}" = set; then :
16863  withval=$with_jdk_variant;
16864fi
16865
16866
16867  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16868    JDK_VARIANT="normal"
16869  else
16870    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16871  fi
16872
16873
16874
16875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16876$as_echo "$JDK_VARIANT" >&6; }
16877
16878
16879  DEBUG_LEVEL="release"
16880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16881$as_echo_n "checking which debug level to use... " >&6; }
16882  # Check whether --enable-debug was given.
16883if test "${enable_debug+set}" = set; then :
16884  enableval=$enable_debug;
16885        ENABLE_DEBUG="${enableval}"
16886        DEBUG_LEVEL="fastdebug"
16887
16888else
16889  ENABLE_DEBUG="no"
16890fi
16891
16892
16893
16894# Check whether --with-debug-level was given.
16895if test "${with_debug_level+set}" = set; then :
16896  withval=$with_debug_level;
16897        DEBUG_LEVEL="${withval}"
16898        if test "x$ENABLE_DEBUG" = xyes; then
16899          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16900        fi
16901
16902fi
16903
16904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16905$as_echo "$DEBUG_LEVEL" >&6; }
16906
16907  if test "x$DEBUG_LEVEL" != xrelease && \
16908      test "x$DEBUG_LEVEL" != xoptimized && \
16909      test "x$DEBUG_LEVEL" != xfastdebug && \
16910      test "x$DEBUG_LEVEL" != xslowdebug; then
16911    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16912  fi
16913
16914  # Translate DEBUG_LEVEL to debug level used by Hotspot
16915  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16916  if test "x$DEBUG_LEVEL" = xrelease; then
16917    HOTSPOT_DEBUG_LEVEL="product"
16918  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16919    HOTSPOT_DEBUG_LEVEL="debug"
16920  fi
16921
16922  if test "x$DEBUG_LEVEL" = xoptimized; then
16923    # The debug level 'optimized' is a little special because it is currently only
16924    # applicable to the HotSpot build where it means to build a completely
16925    # optimized version of the VM without any debugging code (like for the
16926    # 'release' debug level which is called 'product' in the HotSpot build) but
16927    # with the exception that it can contain additional code which is otherwise
16928    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16929    # test new and/or experimental features which are not intended for customer
16930    # shipment. Because these new features need to be tested and benchmarked in
16931    # real world scenarios, we want to build the containing JDK at the 'release'
16932    # debug level.
16933    DEBUG_LEVEL="release"
16934  fi
16935
16936
16937
16938
16939
16940
16941# Check whether --with-jvm-variants was given.
16942if test "${with_jvm_variants+set}" = set; then :
16943  withval=$with_jvm_variants;
16944fi
16945
16946
16947
16948
16949# Check whether --with-cpu-port was given.
16950if test "${with_cpu_port+set}" = set; then :
16951  withval=$with_cpu_port;
16952fi
16953
16954
16955  if test "x$with_cpu_port" != x; then
16956    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16957      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16958    fi
16959    if test "x$with_cpu_port" != xarm64 && \
16960        test "x$with_cpu_port" != xaarch64; then
16961      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16962    fi
16963    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16964  fi
16965
16966
16967  if test "x$with_jvm_variants" = x; then
16968    with_jvm_variants="server"
16969  fi
16970  JVM_VARIANTS_OPT="$with_jvm_variants"
16971
16972  # Has the user listed more than one variant?
16973  # Additional [] needed to keep m4 from mangling shell constructs.
16974  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16975    BUILDING_MULTIPLE_JVM_VARIANTS=true
16976  else
16977    BUILDING_MULTIPLE_JVM_VARIANTS=false
16978  fi
16979  # Replace the commas with AND for use in the build directory name.
16980  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16981
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16983$as_echo_n "checking which variants of the JVM to build... " >&6; }
16984  # JVM_VARIANTS is a space-separated list.
16985  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16986  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16988$as_echo "$JVM_VARIANTS" >&6; }
16989
16990  # Check that the selected variants are valid
16991
16992  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16993  # Notice that the original variant failes on SLES 10 and 11
16994  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16995  STACK=${JVM_VARIANTS// /$'\n'}
16996  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16997  if test "x$INVALID_VARIANTS" != x; then
16998    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16999$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17000    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17001  fi
17002
17003  # All "special" variants share the same output directory ("server")
17004  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17005  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17006  STACK=${JVM_VARIANTS// /$'\n'}
17007  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17008  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17009    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17010  fi
17011
17012  # The "main" variant is the one used by other libs to link against during the
17013  # build.
17014  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17015    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17016    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17017      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17018        JVM_VARIANT_MAIN="$variant"
17019        break
17020      fi
17021    done
17022  else
17023    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17024  fi
17025
17026
17027
17028
17029
17030  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17031    # zero behaves as a platform and rewrites these values. This is really weird. :(
17032    # We are guaranteed that we do not build any other variants when building zero.
17033    HOTSPOT_TARGET_CPU=zero
17034    HOTSPOT_TARGET_CPU_ARCH=zero
17035  fi
17036
17037
17038# With basic setup done, call the custom early hook.
17039
17040
17041# Check if we have devkits, extra paths or sysroot set.
17042
17043
17044# Check whether --with-devkit was given.
17045if test "${with_devkit+set}" = set; then :
17046  withval=$with_devkit;
17047
17048  # Only process if variable expands to non-empty
17049
17050  if test "x$with_devkit" != x; then
17051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17052
17053  # Input might be given as Windows format, start by converting to
17054  # unix format.
17055  path="$with_devkit"
17056  new_path=`$CYGPATH -u "$path"`
17057
17058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17061  # "foo.exe" is OK but "foo" is an error.
17062  #
17063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17064  # It is also a way to make sure we got the proper file name for the real test later on.
17065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17066  if test "x$test_shortpath" = x; then
17067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17068$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17069    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17070  fi
17071
17072  # Call helper function which possibly converts this using DOS-style short mode.
17073  # If so, the updated path is stored in $new_path.
17074
17075  input_path="$new_path"
17076  # Check if we need to convert this using DOS-style short mode. If the path
17077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17078  # take no chances and rewrite it.
17079  # Note: m4 eats our [], so we need to use [ and ] instead.
17080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17081  if test "x$has_forbidden_chars" != x; then
17082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17086      # Going to short mode and back again did indeed matter. Since short mode is
17087      # case insensitive, let's make it lowercase to improve readability.
17088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17089      # Now convert it back to Unix-style (cygpath)
17090      input_path=`$CYGPATH -u "$shortmode_path"`
17091      new_path="$input_path"
17092    fi
17093  fi
17094
17095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17096  if test "x$test_cygdrive_prefix" = x; then
17097    # As a simple fix, exclude /usr/bin since it's not a real path.
17098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17100      # a path prefixed by /cygdrive for fixpath to work.
17101      new_path="$CYGWIN_ROOT_PATH$input_path"
17102    fi
17103  fi
17104
17105
17106  if test "x$path" != "x$new_path"; then
17107    with_devkit="$new_path"
17108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17109$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17110  fi
17111
17112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17113
17114  path="$with_devkit"
17115  has_colon=`$ECHO $path | $GREP ^.:`
17116  new_path="$path"
17117  if test "x$has_colon" = x; then
17118    # Not in mixed or Windows style, start by that.
17119    new_path=`cmd //c echo $path`
17120  fi
17121
17122
17123  input_path="$new_path"
17124  # Check if we need to convert this using DOS-style short mode. If the path
17125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17126  # take no chances and rewrite it.
17127  # Note: m4 eats our [], so we need to use [ and ] instead.
17128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17129  if test "x$has_forbidden_chars" != x; then
17130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17132  fi
17133
17134
17135  windows_path="$new_path"
17136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17137    unix_path=`$CYGPATH -u "$windows_path"`
17138    new_path="$unix_path"
17139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17141    new_path="$unix_path"
17142  fi
17143
17144  if test "x$path" != "x$new_path"; then
17145    with_devkit="$new_path"
17146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17147$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17148  fi
17149
17150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17152
17153    else
17154      # We're on a unix platform. Hooray! :)
17155      path="$with_devkit"
17156      has_space=`$ECHO "$path" | $GREP " "`
17157      if test "x$has_space" != x; then
17158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17159$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17161      fi
17162
17163      # Use eval to expand a potential ~
17164      eval path="$path"
17165      if test ! -f "$path" && test ! -d "$path"; then
17166        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17167      fi
17168
17169      if test -d "$path"; then
17170        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17171      else
17172        dir="`$DIRNAME "$path"`"
17173        base="`$BASENAME "$path"`"
17174        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17175      fi
17176    fi
17177  fi
17178
17179        DEVKIT_ROOT="$with_devkit"
17180        # Check for a meta data info file in the root of the devkit
17181        if test -f "$DEVKIT_ROOT/devkit.info"; then
17182          . $DEVKIT_ROOT/devkit.info
17183          # This potentially sets the following:
17184          # A descriptive name of the devkit
17185
17186  if test "x$DEVKIT_NAME" = x; then
17187    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17188  fi
17189
17190          # Corresponds to --with-extra-path
17191
17192  if test "x$DEVKIT_EXTRA_PATH" = x; then
17193    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17194  fi
17195
17196          # Corresponds to --with-toolchain-path
17197
17198  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17199    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17200  fi
17201
17202          # Corresponds to --with-sysroot
17203
17204  if test "x$DEVKIT_SYSROOT" = x; then
17205    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17206  fi
17207
17208
17209          # Identifies the Visual Studio version in the devkit
17210
17211  if test "x$DEVKIT_VS_VERSION" = x; then
17212    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17213  fi
17214
17215          # The Visual Studio include environment variable
17216
17217  if test "x$DEVKIT_VS_INCLUDE" = x; then
17218    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17219  fi
17220
17221          # The Visual Studio lib environment variable
17222
17223  if test "x$DEVKIT_VS_LIB" = x; then
17224    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17225  fi
17226
17227          # Corresponds to --with-msvcr-dll
17228
17229  if test "x$DEVKIT_MSVCR_DLL" = x; then
17230    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17231  fi
17232
17233          # Corresponds to --with-msvcp-dll
17234
17235  if test "x$DEVKIT_MSVCP_DLL" = x; then
17236    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17237  fi
17238
17239        fi
17240
17241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17242$as_echo_n "checking for devkit... " >&6; }
17243        if test "x$DEVKIT_NAME" != x; then
17244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17245$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17246        else
17247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17248$as_echo "$DEVKIT_ROOT" >&6; }
17249        fi
17250
17251
17252  if test "x$DEVKIT_EXTRA_PATH" != x; then
17253    if test "x$EXTRA_PATH" = x; then
17254      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17255    else
17256      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17257    fi
17258  fi
17259
17260
17261        # Fallback default of just /bin if DEVKIT_PATH is not defined
17262        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17263          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17264        fi
17265
17266  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17267    if test "x$TOOLCHAIN_PATH" = x; then
17268      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17269    else
17270      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17271    fi
17272  fi
17273
17274
17275        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17276        # places for backwards compatiblity.
17277        if test "x$DEVKIT_SYSROOT" != x; then
17278          SYSROOT="$DEVKIT_SYSROOT"
17279        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17280          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17281        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17282          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17283        fi
17284
17285
17286fi
17287
17288
17289  # You can force the sysroot if the sysroot encoded into the compiler tools
17290  # is not correct.
17291
17292# Check whether --with-sys-root was given.
17293if test "${with_sys_root+set}" = set; then :
17294  withval=$with_sys_root; SYSROOT=$with_sys_root
17295
17296fi
17297
17298
17299
17300# Check whether --with-sysroot was given.
17301if test "${with_sysroot+set}" = set; then :
17302  withval=$with_sysroot; SYSROOT=$with_sysroot
17303
17304fi
17305
17306
17307
17308# Check whether --with-tools-dir was given.
17309if test "${with_tools_dir+set}" = set; then :
17310  withval=$with_tools_dir;
17311  if test "x$with_tools_dir" != x; then
17312    if test "x$TOOLCHAIN_PATH" = x; then
17313      TOOLCHAIN_PATH="$with_tools_dir"
17314    else
17315      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17316    fi
17317  fi
17318
17319
17320fi
17321
17322
17323
17324# Check whether --with-toolchain-path was given.
17325if test "${with_toolchain_path+set}" = set; then :
17326  withval=$with_toolchain_path;
17327  if test "x$with_toolchain_path" != x; then
17328    if test "x$TOOLCHAIN_PATH" = x; then
17329      TOOLCHAIN_PATH="$with_toolchain_path"
17330    else
17331      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17332    fi
17333  fi
17334
17335
17336fi
17337
17338
17339
17340# Check whether --with-extra-path was given.
17341if test "${with_extra_path+set}" = set; then :
17342  withval=$with_extra_path;
17343  if test "x$with_extra_path" != x; then
17344    if test "x$EXTRA_PATH" = x; then
17345      EXTRA_PATH="$with_extra_path"
17346    else
17347      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17348    fi
17349  fi
17350
17351
17352fi
17353
17354
17355  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17356    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17357    # If not, detect if Xcode is installed by running xcodebuild -version
17358    # if no Xcode installed, xcodebuild exits with 1
17359    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17360    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17361      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17362      # fall back on the stub binary in /usr/bin/xcodebuild
17363      # Extract the first word of "xcodebuild", so it can be a program name with args.
17364set dummy xcodebuild; ac_word=$2
17365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17366$as_echo_n "checking for $ac_word... " >&6; }
17367if ${ac_cv_path_XCODEBUILD+:} false; then :
17368  $as_echo_n "(cached) " >&6
17369else
17370  case $XCODEBUILD in
17371  [\\/]* | ?:[\\/]*)
17372  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17373  ;;
17374  *)
17375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17376for as_dir in $TOOLCHAIN_PATH
17377do
17378  IFS=$as_save_IFS
17379  test -z "$as_dir" && as_dir=.
17380    for ac_exec_ext in '' $ac_executable_extensions; do
17381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17382    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17384    break 2
17385  fi
17386done
17387  done
17388IFS=$as_save_IFS
17389
17390  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17391  ;;
17392esac
17393fi
17394XCODEBUILD=$ac_cv_path_XCODEBUILD
17395if test -n "$XCODEBUILD"; then
17396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17397$as_echo "$XCODEBUILD" >&6; }
17398else
17399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17400$as_echo "no" >&6; }
17401fi
17402
17403
17404    else
17405      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17406      # when only the command line tools are installed there are no SDKs, so headers
17407      # are copied into the system frameworks
17408      XCODEBUILD=
17409
17410    fi
17411
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17413$as_echo_n "checking for sdk name... " >&6; }
17414
17415# Check whether --with-sdk-name was given.
17416if test "${with_sdk_name+set}" = set; then :
17417  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17418
17419fi
17420
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17422$as_echo "$SDKNAME" >&6; }
17423
17424    # if toolchain path is specified then don't rely on system headers, they may not compile
17425    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17426    test -z "$TOOLCHAIN_PATH" && \
17427      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17428
17429    if test -z "$SYSROOT"; then
17430      if test -n "$XCODEBUILD"; then
17431        # if we don't have system headers, use default SDK name (last resort)
17432        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17433          SDKNAME=${SDKNAME:-macosx}
17434        fi
17435
17436        if test -n "$SDKNAME"; then
17437          # Call xcodebuild to determine SYSROOT
17438          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17439        fi
17440      else
17441        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17442          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
17443        fi
17444      fi
17445    else
17446      # warn user if --with-sdk-name was also set
17447      if test -n "$with_sdk_name"; then
17448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17449$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17450      fi
17451    fi
17452
17453    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17454      # If no system framework headers, then SYSROOT must be set, or we won't build
17455      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
17456    fi
17457
17458    # Perform a basic sanity test
17459    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17460      if test -z "$SYSROOT"; then
17461        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
17462      else
17463        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17464      fi
17465    fi
17466
17467    # set SDKROOT too, Xcode tools will pick it up
17468    SDKROOT="$SYSROOT"
17469
17470  fi
17471
17472  # Prepend the extra path to the global path
17473
17474  if test "x$EXTRA_PATH" != x; then
17475    if test "x$PATH" = x; then
17476      PATH="$EXTRA_PATH"
17477    else
17478      PATH="$EXTRA_PATH:$PATH"
17479    fi
17480  fi
17481
17482
17483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17484$as_echo_n "checking for sysroot... " >&6; }
17485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17486$as_echo "$SYSROOT" >&6; }
17487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17488$as_echo_n "checking for toolchain path... " >&6; }
17489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17490$as_echo "$TOOLCHAIN_PATH" >&6; }
17491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17492$as_echo_n "checking for extra path... " >&6; }
17493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17494$as_echo "$EXTRA_PATH" >&6; }
17495
17496
17497# To properly create a configuration name, we need to have the OpenJDK target
17498# and options (variants and debug level) parsed.
17499
17500
17501
17502# Check whether --with-conf-name was given.
17503if test "${with_conf_name+set}" = set; then :
17504  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17505fi
17506
17507
17508  # Test from where we are running configure, in or outside of src root.
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17510$as_echo_n "checking where to store configuration... " >&6; }
17511  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17512      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17513      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17514    # We are running configure from the src root.
17515    # Create a default ./build/target-variant-debuglevel output root.
17516    if test "x${CONF_NAME}" = x; then
17517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17518$as_echo "in default location" >&6; }
17519      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17520    else
17521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17522$as_echo "in build directory with custom name" >&6; }
17523    fi
17524    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17525    $MKDIR -p "$OUTPUT_ROOT"
17526    if test ! -d "$OUTPUT_ROOT"; then
17527      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17528    fi
17529  else
17530    # We are running configure from outside of the src dir.
17531    # Then use the current directory as output dir!
17532    # If configuration is situated in normal build directory, just use the build
17533    # directory name as configuration name, otherwise use the complete path.
17534    if test "x${CONF_NAME}" = x; then
17535      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17536    fi
17537    OUTPUT_ROOT="$CURDIR"
17538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17539$as_echo "in current directory" >&6; }
17540
17541    # WARNING: This might be a bad thing to do. You need to be sure you want to
17542    # have a configuration in this directory. Do some sanity checks!
17543
17544    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17545      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17546      # other files
17547      files_present=`$LS $OUTPUT_ROOT`
17548      # Configure has already touched config.log and confdefs.h in the current dir when this check
17549      # is performed.
17550      filtered_files=`$ECHO "$files_present" \
17551          | $SED -e 's/config.log//g' \
17552              -e 's/configure.log//g' \
17553              -e 's/confdefs.h//g' \
17554              -e 's/ //g' \
17555          | $TR -d '\n'`
17556      if test "x$filtered_files" != x; then
17557        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17558$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17559        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17560$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17561        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17562$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17563        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17564$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17565        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17566$as_echo "$as_me: seriously mess up just about everything." >&6;}
17567        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17568$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17569        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17570$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17571        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17572      fi
17573    fi
17574  fi
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17576$as_echo_n "checking what configuration name to use... " >&6; }
17577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17578$as_echo "$CONF_NAME" >&6; }
17579
17580
17581  # Only process if variable expands to non-empty
17582
17583  if test "x$OUTPUT_ROOT" != x; then
17584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585
17586  # Input might be given as Windows format, start by converting to
17587  # unix format.
17588  path="$OUTPUT_ROOT"
17589  new_path=`$CYGPATH -u "$path"`
17590
17591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17594  # "foo.exe" is OK but "foo" is an error.
17595  #
17596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17597  # It is also a way to make sure we got the proper file name for the real test later on.
17598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17599  if test "x$test_shortpath" = x; then
17600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17601$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17602    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17603  fi
17604
17605  # Call helper function which possibly converts this using DOS-style short mode.
17606  # If so, the updated path is stored in $new_path.
17607
17608  input_path="$new_path"
17609  # Check if we need to convert this using DOS-style short mode. If the path
17610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17611  # take no chances and rewrite it.
17612  # Note: m4 eats our [], so we need to use [ and ] instead.
17613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17614  if test "x$has_forbidden_chars" != x; then
17615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17619      # Going to short mode and back again did indeed matter. Since short mode is
17620      # case insensitive, let's make it lowercase to improve readability.
17621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17622      # Now convert it back to Unix-style (cygpath)
17623      input_path=`$CYGPATH -u "$shortmode_path"`
17624      new_path="$input_path"
17625    fi
17626  fi
17627
17628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17629  if test "x$test_cygdrive_prefix" = x; then
17630    # As a simple fix, exclude /usr/bin since it's not a real path.
17631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17633      # a path prefixed by /cygdrive for fixpath to work.
17634      new_path="$CYGWIN_ROOT_PATH$input_path"
17635    fi
17636  fi
17637
17638
17639  if test "x$path" != "x$new_path"; then
17640    OUTPUT_ROOT="$new_path"
17641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17642$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17643  fi
17644
17645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17646
17647  path="$OUTPUT_ROOT"
17648  has_colon=`$ECHO $path | $GREP ^.:`
17649  new_path="$path"
17650  if test "x$has_colon" = x; then
17651    # Not in mixed or Windows style, start by that.
17652    new_path=`cmd //c echo $path`
17653  fi
17654
17655
17656  input_path="$new_path"
17657  # Check if we need to convert this using DOS-style short mode. If the path
17658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17659  # take no chances and rewrite it.
17660  # Note: m4 eats our [], so we need to use [ and ] instead.
17661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17662  if test "x$has_forbidden_chars" != x; then
17663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17665  fi
17666
17667
17668  windows_path="$new_path"
17669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17670    unix_path=`$CYGPATH -u "$windows_path"`
17671    new_path="$unix_path"
17672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17674    new_path="$unix_path"
17675  fi
17676
17677  if test "x$path" != "x$new_path"; then
17678    OUTPUT_ROOT="$new_path"
17679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17680$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17681  fi
17682
17683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17685
17686    else
17687      # We're on a unix platform. Hooray! :)
17688      path="$OUTPUT_ROOT"
17689      has_space=`$ECHO "$path" | $GREP " "`
17690      if test "x$has_space" != x; then
17691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17692$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17694      fi
17695
17696      # Use eval to expand a potential ~
17697      eval path="$path"
17698      if test ! -f "$path" && test ! -d "$path"; then
17699        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17700      fi
17701
17702      if test -d "$path"; then
17703        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17704      else
17705        dir="`$DIRNAME "$path"`"
17706        base="`$BASENAME "$path"`"
17707        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17708      fi
17709    fi
17710  fi
17711
17712
17713  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17714  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17715
17716  SPEC="$OUTPUT_ROOT/spec.gmk"
17717
17718
17719
17720
17721
17722  # The spec.gmk file contains all variables for the make system.
17723  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17724
17725  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17726  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17727
17728  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17729  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17730
17731  # The compare.sh is used to compare the build output to other builds.
17732  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17733
17734  # The generated Makefile knows where the spec.gmk is and where the source is.
17735  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17736  # which will look for generated configurations
17737  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17738
17739
17740
17741# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17742
17743  for ac_prog in apt-get yum brew port pkgutil pkgadd
17744do
17745  # Extract the first word of "$ac_prog", so it can be a program name with args.
17746set dummy $ac_prog; ac_word=$2
17747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17748$as_echo_n "checking for $ac_word... " >&6; }
17749if ${ac_cv_prog_PKGHANDLER+:} false; then :
17750  $as_echo_n "(cached) " >&6
17751else
17752  if test -n "$PKGHANDLER"; then
17753  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17754else
17755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17756for as_dir in $PATH
17757do
17758  IFS=$as_save_IFS
17759  test -z "$as_dir" && as_dir=.
17760    for ac_exec_ext in '' $ac_executable_extensions; do
17761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17762    ac_cv_prog_PKGHANDLER="$ac_prog"
17763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17764    break 2
17765  fi
17766done
17767  done
17768IFS=$as_save_IFS
17769
17770fi
17771fi
17772PKGHANDLER=$ac_cv_prog_PKGHANDLER
17773if test -n "$PKGHANDLER"; then
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17775$as_echo "$PKGHANDLER" >&6; }
17776else
17777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17778$as_echo "no" >&6; }
17779fi
17780
17781
17782  test -n "$PKGHANDLER" && break
17783done
17784
17785
17786
17787# Setup tools that requires more complex handling, or that is not needed by the configure script.
17788
17789
17790
17791  # Publish this variable in the help.
17792
17793
17794  if [ -z "${MAKE+x}" ]; then
17795    # The variable is not set by user, try to locate tool using the code snippet
17796
17797    # Try our hardest to locate a correct version of GNU make
17798    for ac_prog in gmake
17799do
17800  # Extract the first word of "$ac_prog", so it can be a program name with args.
17801set dummy $ac_prog; ac_word=$2
17802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17803$as_echo_n "checking for $ac_word... " >&6; }
17804if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17805  $as_echo_n "(cached) " >&6
17806else
17807  case $CHECK_GMAKE in
17808  [\\/]* | ?:[\\/]*)
17809  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17810  ;;
17811  *)
17812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17813for as_dir in $PATH
17814do
17815  IFS=$as_save_IFS
17816  test -z "$as_dir" && as_dir=.
17817    for ac_exec_ext in '' $ac_executable_extensions; do
17818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17819    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17821    break 2
17822  fi
17823done
17824  done
17825IFS=$as_save_IFS
17826
17827  ;;
17828esac
17829fi
17830CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17831if test -n "$CHECK_GMAKE"; then
17832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17833$as_echo "$CHECK_GMAKE" >&6; }
17834else
17835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17836$as_echo "no" >&6; }
17837fi
17838
17839
17840  test -n "$CHECK_GMAKE" && break
17841done
17842
17843
17844  MAKE_CANDIDATE=""$CHECK_GMAKE""
17845  DESCRIPTION="gmake in PATH"
17846
17847  # On Cygwin, we require a newer version of make than on other platforms
17848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849    MAKE_VERSION_EXPR="-e 4\."
17850    MAKE_REQUIRED_VERSION="4.0"
17851   else
17852    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17853    MAKE_REQUIRED_VERSION="3.81"
17854  fi
17855
17856  if test "x$MAKE_CANDIDATE" != x; then
17857    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17858$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17859    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17860    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17861    if test "x$IS_GNU_MAKE" = x; then
17862      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17863$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17864    else
17865      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17866      if test "x$IS_MODERN_MAKE" = x; then
17867        { $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
17868$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;}
17869      else
17870        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17871          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17872            MAKE_EXPECTED_ENV='cygwin'
17873          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17874            MAKE_EXPECTED_ENV='msys'
17875          else
17876            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17877          fi
17878          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17879          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17880        else
17881          # Not relevant for non-Windows
17882          IS_MAKE_CORRECT_ENV=true
17883        fi
17884        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17885          { $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
17886$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;}
17887        else
17888          FOUND_MAKE=$MAKE_CANDIDATE
17889
17890  # Only process if variable expands to non-empty
17891
17892  if test "x$FOUND_MAKE" != x; then
17893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17894
17895  # First separate the path from the arguments. This will split at the first
17896  # space.
17897  complete="$FOUND_MAKE"
17898  path="${complete%% *}"
17899  tmp="$complete EOL"
17900  arguments="${tmp#* }"
17901
17902  # Input might be given as Windows format, start by converting to
17903  # unix format.
17904  new_path=`$CYGPATH -u "$path"`
17905
17906  # Now try to locate executable using which
17907  new_path=`$WHICH "$new_path" 2> /dev/null`
17908  # bat and cmd files are not always considered executable in cygwin causing which
17909  # to not find them
17910  if test "x$new_path" = x \
17911      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17912      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17913    new_path=`$CYGPATH -u "$path"`
17914  fi
17915  if test "x$new_path" = x; then
17916    # Oops. Which didn't find the executable.
17917    # The splitting of arguments from the executable at a space might have been incorrect,
17918    # since paths with space are more likely in Windows. Give it another try with the whole
17919    # argument.
17920    path="$complete"
17921    arguments="EOL"
17922    new_path=`$CYGPATH -u "$path"`
17923    new_path=`$WHICH "$new_path" 2> /dev/null`
17924    # bat and cmd files are not always considered executable in cygwin causing which
17925    # to not find them
17926    if test "x$new_path" = x \
17927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17929      new_path=`$CYGPATH -u "$path"`
17930    fi
17931    if test "x$new_path" = x; then
17932      # It's still not found. Now this is an unrecoverable error.
17933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17935      has_space=`$ECHO "$complete" | $GREP " "`
17936      if test "x$has_space" != x; then
17937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17939      fi
17940      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17941    fi
17942  fi
17943
17944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17947  # "foo.exe" is OK but "foo" is an error.
17948  #
17949  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17950  # It is also a way to make sure we got the proper file name for the real test later on.
17951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17952  if test "x$test_shortpath" = x; then
17953    # Short path failed, file does not exist as specified.
17954    # Try adding .exe or .cmd
17955    if test -f "${new_path}.exe"; then
17956      input_to_shortpath="${new_path}.exe"
17957    elif test -f "${new_path}.cmd"; then
17958      input_to_shortpath="${new_path}.cmd"
17959    else
17960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17961$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17962      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17963$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17965    fi
17966  else
17967    input_to_shortpath="$new_path"
17968  fi
17969
17970  # Call helper function which possibly converts this using DOS-style short mode.
17971  # If so, the updated path is stored in $new_path.
17972  new_path="$input_to_shortpath"
17973
17974  input_path="$input_to_shortpath"
17975  # Check if we need to convert this using DOS-style short mode. If the path
17976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17977  # take no chances and rewrite it.
17978  # Note: m4 eats our [], so we need to use [ and ] instead.
17979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17980  if test "x$has_forbidden_chars" != x; then
17981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17985      # Going to short mode and back again did indeed matter. Since short mode is
17986      # case insensitive, let's make it lowercase to improve readability.
17987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17988      # Now convert it back to Unix-style (cygpath)
17989      input_path=`$CYGPATH -u "$shortmode_path"`
17990      new_path="$input_path"
17991    fi
17992  fi
17993
17994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17995  if test "x$test_cygdrive_prefix" = x; then
17996    # As a simple fix, exclude /usr/bin since it's not a real path.
17997    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17999      # a path prefixed by /cygdrive for fixpath to work.
18000      new_path="$CYGWIN_ROOT_PATH$input_path"
18001    fi
18002  fi
18003
18004  # remove trailing .exe if any
18005  new_path="${new_path/%.exe/}"
18006
18007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18008
18009  # First separate the path from the arguments. This will split at the first
18010  # space.
18011  complete="$FOUND_MAKE"
18012  path="${complete%% *}"
18013  tmp="$complete EOL"
18014  arguments="${tmp#* }"
18015
18016  # Input might be given as Windows format, start by converting to
18017  # unix format.
18018  new_path="$path"
18019
18020  windows_path="$new_path"
18021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18022    unix_path=`$CYGPATH -u "$windows_path"`
18023    new_path="$unix_path"
18024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18026    new_path="$unix_path"
18027  fi
18028
18029
18030  # Now try to locate executable using which
18031  new_path=`$WHICH "$new_path" 2> /dev/null`
18032
18033  if test "x$new_path" = x; then
18034    # Oops. Which didn't find the executable.
18035    # The splitting of arguments from the executable at a space might have been incorrect,
18036    # since paths with space are more likely in Windows. Give it another try with the whole
18037    # argument.
18038    path="$complete"
18039    arguments="EOL"
18040    new_path="$path"
18041
18042  windows_path="$new_path"
18043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18044    unix_path=`$CYGPATH -u "$windows_path"`
18045    new_path="$unix_path"
18046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18048    new_path="$unix_path"
18049  fi
18050
18051
18052    new_path=`$WHICH "$new_path" 2> /dev/null`
18053    # bat and cmd files are not always considered executable in MSYS causing which
18054    # to not find them
18055    if test "x$new_path" = x \
18056        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18057        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18058      new_path="$path"
18059
18060  windows_path="$new_path"
18061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18062    unix_path=`$CYGPATH -u "$windows_path"`
18063    new_path="$unix_path"
18064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18066    new_path="$unix_path"
18067  fi
18068
18069    fi
18070
18071    if test "x$new_path" = x; then
18072      # It's still not found. Now this is an unrecoverable error.
18073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18074$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18075      has_space=`$ECHO "$complete" | $GREP " "`
18076      if test "x$has_space" != x; then
18077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18079      fi
18080      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18081    fi
18082  fi
18083
18084  # Now new_path has a complete unix path to the binary
18085  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18086    # Keep paths in /bin as-is, but remove trailing .exe if any
18087    new_path="${new_path/%.exe/}"
18088    # Do not save /bin paths to all_fixpath_prefixes!
18089  else
18090    # Not in mixed or Windows style, start by that.
18091    new_path=`cmd //c echo $new_path`
18092
18093  input_path="$new_path"
18094  # Check if we need to convert this using DOS-style short mode. If the path
18095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18096  # take no chances and rewrite it.
18097  # Note: m4 eats our [], so we need to use [ and ] instead.
18098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18099  if test "x$has_forbidden_chars" != x; then
18100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18102  fi
18103
18104    # Output is in $new_path
18105
18106  windows_path="$new_path"
18107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18108    unix_path=`$CYGPATH -u "$windows_path"`
18109    new_path="$unix_path"
18110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18112    new_path="$unix_path"
18113  fi
18114
18115    # remove trailing .exe if any
18116    new_path="${new_path/%.exe/}"
18117
18118    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18119    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18120  fi
18121
18122    else
18123      # We're on a unix platform. Hooray! :)
18124      # First separate the path from the arguments. This will split at the first
18125      # space.
18126      complete="$FOUND_MAKE"
18127      path="${complete%% *}"
18128      tmp="$complete EOL"
18129      arguments="${tmp#* }"
18130
18131      # Cannot rely on the command "which" here since it doesn't always work.
18132      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18133      if test -z "$is_absolute_path"; then
18134        # Path to executable is not absolute. Find it.
18135        IFS_save="$IFS"
18136        IFS=:
18137        for p in $PATH; do
18138          if test -f "$p/$path" && test -x "$p/$path"; then
18139            new_path="$p/$path"
18140            break
18141          fi
18142        done
18143        IFS="$IFS_save"
18144      else
18145        # This is an absolute path, we can use it without further modifications.
18146        new_path="$path"
18147      fi
18148
18149      if test "x$new_path" = x; then
18150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18151$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18152        has_space=`$ECHO "$complete" | $GREP " "`
18153        if test "x$has_space" != x; then
18154          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18155$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18156        fi
18157        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18158      fi
18159    fi
18160
18161    # Now join together the path and the arguments once again
18162    if test "x$arguments" != xEOL; then
18163      new_complete="$new_path ${arguments% *}"
18164    else
18165      new_complete="$new_path"
18166    fi
18167
18168    if test "x$complete" != "x$new_complete"; then
18169      FOUND_MAKE="$new_complete"
18170      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18171$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18172    fi
18173  fi
18174
18175        fi
18176      fi
18177    fi
18178  fi
18179
18180
18181    if test "x$FOUND_MAKE" = x; then
18182      for ac_prog in make
18183do
18184  # Extract the first word of "$ac_prog", so it can be a program name with args.
18185set dummy $ac_prog; ac_word=$2
18186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18187$as_echo_n "checking for $ac_word... " >&6; }
18188if ${ac_cv_path_CHECK_MAKE+:} false; then :
18189  $as_echo_n "(cached) " >&6
18190else
18191  case $CHECK_MAKE in
18192  [\\/]* | ?:[\\/]*)
18193  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18194  ;;
18195  *)
18196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18197for as_dir in $PATH
18198do
18199  IFS=$as_save_IFS
18200  test -z "$as_dir" && as_dir=.
18201    for ac_exec_ext in '' $ac_executable_extensions; do
18202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18203    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18205    break 2
18206  fi
18207done
18208  done
18209IFS=$as_save_IFS
18210
18211  ;;
18212esac
18213fi
18214CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18215if test -n "$CHECK_MAKE"; then
18216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18217$as_echo "$CHECK_MAKE" >&6; }
18218else
18219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18220$as_echo "no" >&6; }
18221fi
18222
18223
18224  test -n "$CHECK_MAKE" && break
18225done
18226
18227
18228  MAKE_CANDIDATE=""$CHECK_MAKE""
18229  DESCRIPTION="make in PATH"
18230
18231  # On Cygwin, we require a newer version of make than on other platforms
18232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233    MAKE_VERSION_EXPR="-e 4\."
18234    MAKE_REQUIRED_VERSION="4.0"
18235   else
18236    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18237    MAKE_REQUIRED_VERSION="3.81"
18238  fi
18239
18240  if test "x$MAKE_CANDIDATE" != x; then
18241    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18242$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18243    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18244    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18245    if test "x$IS_GNU_MAKE" = x; then
18246      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18247$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18248    else
18249      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18250      if test "x$IS_MODERN_MAKE" = x; then
18251        { $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
18252$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;}
18253      else
18254        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18255          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18256            MAKE_EXPECTED_ENV='cygwin'
18257          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18258            MAKE_EXPECTED_ENV='msys'
18259          else
18260            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18261          fi
18262          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18263          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18264        else
18265          # Not relevant for non-Windows
18266          IS_MAKE_CORRECT_ENV=true
18267        fi
18268        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18269          { $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
18270$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;}
18271        else
18272          FOUND_MAKE=$MAKE_CANDIDATE
18273
18274  # Only process if variable expands to non-empty
18275
18276  if test "x$FOUND_MAKE" != x; then
18277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18278
18279  # First separate the path from the arguments. This will split at the first
18280  # space.
18281  complete="$FOUND_MAKE"
18282  path="${complete%% *}"
18283  tmp="$complete EOL"
18284  arguments="${tmp#* }"
18285
18286  # Input might be given as Windows format, start by converting to
18287  # unix format.
18288  new_path=`$CYGPATH -u "$path"`
18289
18290  # Now try to locate executable using which
18291  new_path=`$WHICH "$new_path" 2> /dev/null`
18292  # bat and cmd files are not always considered executable in cygwin causing which
18293  # to not find them
18294  if test "x$new_path" = x \
18295      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18296      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18297    new_path=`$CYGPATH -u "$path"`
18298  fi
18299  if test "x$new_path" = x; then
18300    # Oops. Which didn't find the executable.
18301    # The splitting of arguments from the executable at a space might have been incorrect,
18302    # since paths with space are more likely in Windows. Give it another try with the whole
18303    # argument.
18304    path="$complete"
18305    arguments="EOL"
18306    new_path=`$CYGPATH -u "$path"`
18307    new_path=`$WHICH "$new_path" 2> /dev/null`
18308    # bat and cmd files are not always considered executable in cygwin causing which
18309    # to not find them
18310    if test "x$new_path" = x \
18311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18313      new_path=`$CYGPATH -u "$path"`
18314    fi
18315    if test "x$new_path" = x; then
18316      # It's still not found. Now this is an unrecoverable error.
18317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18319      has_space=`$ECHO "$complete" | $GREP " "`
18320      if test "x$has_space" != x; then
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18323      fi
18324      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18325    fi
18326  fi
18327
18328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18331  # "foo.exe" is OK but "foo" is an error.
18332  #
18333  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18334  # It is also a way to make sure we got the proper file name for the real test later on.
18335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18336  if test "x$test_shortpath" = x; then
18337    # Short path failed, file does not exist as specified.
18338    # Try adding .exe or .cmd
18339    if test -f "${new_path}.exe"; then
18340      input_to_shortpath="${new_path}.exe"
18341    elif test -f "${new_path}.cmd"; then
18342      input_to_shortpath="${new_path}.cmd"
18343    else
18344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18345$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18346      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18347$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18349    fi
18350  else
18351    input_to_shortpath="$new_path"
18352  fi
18353
18354  # Call helper function which possibly converts this using DOS-style short mode.
18355  # If so, the updated path is stored in $new_path.
18356  new_path="$input_to_shortpath"
18357
18358  input_path="$input_to_shortpath"
18359  # Check if we need to convert this using DOS-style short mode. If the path
18360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18361  # take no chances and rewrite it.
18362  # Note: m4 eats our [], so we need to use [ and ] instead.
18363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18364  if test "x$has_forbidden_chars" != x; then
18365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18369      # Going to short mode and back again did indeed matter. Since short mode is
18370      # case insensitive, let's make it lowercase to improve readability.
18371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18372      # Now convert it back to Unix-style (cygpath)
18373      input_path=`$CYGPATH -u "$shortmode_path"`
18374      new_path="$input_path"
18375    fi
18376  fi
18377
18378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18379  if test "x$test_cygdrive_prefix" = x; then
18380    # As a simple fix, exclude /usr/bin since it's not a real path.
18381    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18383      # a path prefixed by /cygdrive for fixpath to work.
18384      new_path="$CYGWIN_ROOT_PATH$input_path"
18385    fi
18386  fi
18387
18388  # remove trailing .exe if any
18389  new_path="${new_path/%.exe/}"
18390
18391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392
18393  # First separate the path from the arguments. This will split at the first
18394  # space.
18395  complete="$FOUND_MAKE"
18396  path="${complete%% *}"
18397  tmp="$complete EOL"
18398  arguments="${tmp#* }"
18399
18400  # Input might be given as Windows format, start by converting to
18401  # unix format.
18402  new_path="$path"
18403
18404  windows_path="$new_path"
18405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406    unix_path=`$CYGPATH -u "$windows_path"`
18407    new_path="$unix_path"
18408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18410    new_path="$unix_path"
18411  fi
18412
18413
18414  # Now try to locate executable using which
18415  new_path=`$WHICH "$new_path" 2> /dev/null`
18416
18417  if test "x$new_path" = x; then
18418    # Oops. Which didn't find the executable.
18419    # The splitting of arguments from the executable at a space might have been incorrect,
18420    # since paths with space are more likely in Windows. Give it another try with the whole
18421    # argument.
18422    path="$complete"
18423    arguments="EOL"
18424    new_path="$path"
18425
18426  windows_path="$new_path"
18427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18428    unix_path=`$CYGPATH -u "$windows_path"`
18429    new_path="$unix_path"
18430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18432    new_path="$unix_path"
18433  fi
18434
18435
18436    new_path=`$WHICH "$new_path" 2> /dev/null`
18437    # bat and cmd files are not always considered executable in MSYS causing which
18438    # to not find them
18439    if test "x$new_path" = x \
18440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18442      new_path="$path"
18443
18444  windows_path="$new_path"
18445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18446    unix_path=`$CYGPATH -u "$windows_path"`
18447    new_path="$unix_path"
18448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18450    new_path="$unix_path"
18451  fi
18452
18453    fi
18454
18455    if test "x$new_path" = x; then
18456      # It's still not found. Now this is an unrecoverable error.
18457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18458$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18459      has_space=`$ECHO "$complete" | $GREP " "`
18460      if test "x$has_space" != x; then
18461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18463      fi
18464      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18465    fi
18466  fi
18467
18468  # Now new_path has a complete unix path to the binary
18469  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18470    # Keep paths in /bin as-is, but remove trailing .exe if any
18471    new_path="${new_path/%.exe/}"
18472    # Do not save /bin paths to all_fixpath_prefixes!
18473  else
18474    # Not in mixed or Windows style, start by that.
18475    new_path=`cmd //c echo $new_path`
18476
18477  input_path="$new_path"
18478  # Check if we need to convert this using DOS-style short mode. If the path
18479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18480  # take no chances and rewrite it.
18481  # Note: m4 eats our [], so we need to use [ and ] instead.
18482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18483  if test "x$has_forbidden_chars" != x; then
18484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18486  fi
18487
18488    # Output is in $new_path
18489
18490  windows_path="$new_path"
18491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18492    unix_path=`$CYGPATH -u "$windows_path"`
18493    new_path="$unix_path"
18494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18496    new_path="$unix_path"
18497  fi
18498
18499    # remove trailing .exe if any
18500    new_path="${new_path/%.exe/}"
18501
18502    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18503    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18504  fi
18505
18506    else
18507      # We're on a unix platform. Hooray! :)
18508      # First separate the path from the arguments. This will split at the first
18509      # space.
18510      complete="$FOUND_MAKE"
18511      path="${complete%% *}"
18512      tmp="$complete EOL"
18513      arguments="${tmp#* }"
18514
18515      # Cannot rely on the command "which" here since it doesn't always work.
18516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18517      if test -z "$is_absolute_path"; then
18518        # Path to executable is not absolute. Find it.
18519        IFS_save="$IFS"
18520        IFS=:
18521        for p in $PATH; do
18522          if test -f "$p/$path" && test -x "$p/$path"; then
18523            new_path="$p/$path"
18524            break
18525          fi
18526        done
18527        IFS="$IFS_save"
18528      else
18529        # This is an absolute path, we can use it without further modifications.
18530        new_path="$path"
18531      fi
18532
18533      if test "x$new_path" = x; then
18534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18536        has_space=`$ECHO "$complete" | $GREP " "`
18537        if test "x$has_space" != x; then
18538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18540        fi
18541        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18542      fi
18543    fi
18544
18545    # Now join together the path and the arguments once again
18546    if test "x$arguments" != xEOL; then
18547      new_complete="$new_path ${arguments% *}"
18548    else
18549      new_complete="$new_path"
18550    fi
18551
18552    if test "x$complete" != "x$new_complete"; then
18553      FOUND_MAKE="$new_complete"
18554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18555$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18556    fi
18557  fi
18558
18559        fi
18560      fi
18561    fi
18562  fi
18563
18564    fi
18565
18566    if test "x$FOUND_MAKE" = x; then
18567      if test "x$TOOLCHAIN_PATH" != x; then
18568        # We have a toolchain path, check that as well before giving up.
18569        OLD_PATH=$PATH
18570        PATH=$TOOLCHAIN_PATH:$PATH
18571        for ac_prog in gmake
18572do
18573  # Extract the first word of "$ac_prog", so it can be a program name with args.
18574set dummy $ac_prog; ac_word=$2
18575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18576$as_echo_n "checking for $ac_word... " >&6; }
18577if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18578  $as_echo_n "(cached) " >&6
18579else
18580  case $CHECK_TOOLSDIR_GMAKE in
18581  [\\/]* | ?:[\\/]*)
18582  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18583  ;;
18584  *)
18585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586for as_dir in $PATH
18587do
18588  IFS=$as_save_IFS
18589  test -z "$as_dir" && as_dir=.
18590    for ac_exec_ext in '' $ac_executable_extensions; do
18591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18592    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18594    break 2
18595  fi
18596done
18597  done
18598IFS=$as_save_IFS
18599
18600  ;;
18601esac
18602fi
18603CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18604if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18606$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18607else
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609$as_echo "no" >&6; }
18610fi
18611
18612
18613  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18614done
18615
18616
18617  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18618  DESCRIPTION="gmake in tools-dir"
18619
18620  # On Cygwin, we require a newer version of make than on other platforms
18621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622    MAKE_VERSION_EXPR="-e 4\."
18623    MAKE_REQUIRED_VERSION="4.0"
18624   else
18625    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18626    MAKE_REQUIRED_VERSION="3.81"
18627  fi
18628
18629  if test "x$MAKE_CANDIDATE" != x; then
18630    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18631$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18632    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18633    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18634    if test "x$IS_GNU_MAKE" = x; then
18635      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18636$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18637    else
18638      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18639      if test "x$IS_MODERN_MAKE" = x; then
18640        { $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
18641$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;}
18642      else
18643        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18644          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18645            MAKE_EXPECTED_ENV='cygwin'
18646          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18647            MAKE_EXPECTED_ENV='msys'
18648          else
18649            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18650          fi
18651          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18652          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18653        else
18654          # Not relevant for non-Windows
18655          IS_MAKE_CORRECT_ENV=true
18656        fi
18657        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18658          { $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
18659$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;}
18660        else
18661          FOUND_MAKE=$MAKE_CANDIDATE
18662
18663  # Only process if variable expands to non-empty
18664
18665  if test "x$FOUND_MAKE" != x; then
18666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18667
18668  # First separate the path from the arguments. This will split at the first
18669  # space.
18670  complete="$FOUND_MAKE"
18671  path="${complete%% *}"
18672  tmp="$complete EOL"
18673  arguments="${tmp#* }"
18674
18675  # Input might be given as Windows format, start by converting to
18676  # unix format.
18677  new_path=`$CYGPATH -u "$path"`
18678
18679  # Now try to locate executable using which
18680  new_path=`$WHICH "$new_path" 2> /dev/null`
18681  # bat and cmd files are not always considered executable in cygwin causing which
18682  # to not find them
18683  if test "x$new_path" = x \
18684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18686    new_path=`$CYGPATH -u "$path"`
18687  fi
18688  if test "x$new_path" = x; then
18689    # Oops. Which didn't find the executable.
18690    # The splitting of arguments from the executable at a space might have been incorrect,
18691    # since paths with space are more likely in Windows. Give it another try with the whole
18692    # argument.
18693    path="$complete"
18694    arguments="EOL"
18695    new_path=`$CYGPATH -u "$path"`
18696    new_path=`$WHICH "$new_path" 2> /dev/null`
18697    # bat and cmd files are not always considered executable in cygwin causing which
18698    # to not find them
18699    if test "x$new_path" = x \
18700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18702      new_path=`$CYGPATH -u "$path"`
18703    fi
18704    if test "x$new_path" = x; then
18705      # It's still not found. Now this is an unrecoverable error.
18706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18708      has_space=`$ECHO "$complete" | $GREP " "`
18709      if test "x$has_space" != x; then
18710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18712      fi
18713      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18714    fi
18715  fi
18716
18717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18720  # "foo.exe" is OK but "foo" is an error.
18721  #
18722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18723  # It is also a way to make sure we got the proper file name for the real test later on.
18724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18725  if test "x$test_shortpath" = x; then
18726    # Short path failed, file does not exist as specified.
18727    # Try adding .exe or .cmd
18728    if test -f "${new_path}.exe"; then
18729      input_to_shortpath="${new_path}.exe"
18730    elif test -f "${new_path}.cmd"; then
18731      input_to_shortpath="${new_path}.cmd"
18732    else
18733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18734$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18737      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18738    fi
18739  else
18740    input_to_shortpath="$new_path"
18741  fi
18742
18743  # Call helper function which possibly converts this using DOS-style short mode.
18744  # If so, the updated path is stored in $new_path.
18745  new_path="$input_to_shortpath"
18746
18747  input_path="$input_to_shortpath"
18748  # Check if we need to convert this using DOS-style short mode. If the path
18749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18750  # take no chances and rewrite it.
18751  # Note: m4 eats our [], so we need to use [ and ] instead.
18752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18753  if test "x$has_forbidden_chars" != x; then
18754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18758      # Going to short mode and back again did indeed matter. Since short mode is
18759      # case insensitive, let's make it lowercase to improve readability.
18760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18761      # Now convert it back to Unix-style (cygpath)
18762      input_path=`$CYGPATH -u "$shortmode_path"`
18763      new_path="$input_path"
18764    fi
18765  fi
18766
18767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18768  if test "x$test_cygdrive_prefix" = x; then
18769    # As a simple fix, exclude /usr/bin since it's not a real path.
18770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18772      # a path prefixed by /cygdrive for fixpath to work.
18773      new_path="$CYGWIN_ROOT_PATH$input_path"
18774    fi
18775  fi
18776
18777  # remove trailing .exe if any
18778  new_path="${new_path/%.exe/}"
18779
18780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18781
18782  # First separate the path from the arguments. This will split at the first
18783  # space.
18784  complete="$FOUND_MAKE"
18785  path="${complete%% *}"
18786  tmp="$complete EOL"
18787  arguments="${tmp#* }"
18788
18789  # Input might be given as Windows format, start by converting to
18790  # unix format.
18791  new_path="$path"
18792
18793  windows_path="$new_path"
18794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18795    unix_path=`$CYGPATH -u "$windows_path"`
18796    new_path="$unix_path"
18797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18799    new_path="$unix_path"
18800  fi
18801
18802
18803  # Now try to locate executable using which
18804  new_path=`$WHICH "$new_path" 2> /dev/null`
18805
18806  if test "x$new_path" = x; then
18807    # Oops. Which didn't find the executable.
18808    # The splitting of arguments from the executable at a space might have been incorrect,
18809    # since paths with space are more likely in Windows. Give it another try with the whole
18810    # argument.
18811    path="$complete"
18812    arguments="EOL"
18813    new_path="$path"
18814
18815  windows_path="$new_path"
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817    unix_path=`$CYGPATH -u "$windows_path"`
18818    new_path="$unix_path"
18819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18821    new_path="$unix_path"
18822  fi
18823
18824
18825    new_path=`$WHICH "$new_path" 2> /dev/null`
18826    # bat and cmd files are not always considered executable in MSYS causing which
18827    # to not find them
18828    if test "x$new_path" = x \
18829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18831      new_path="$path"
18832
18833  windows_path="$new_path"
18834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835    unix_path=`$CYGPATH -u "$windows_path"`
18836    new_path="$unix_path"
18837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18839    new_path="$unix_path"
18840  fi
18841
18842    fi
18843
18844    if test "x$new_path" = x; then
18845      # It's still not found. Now this is an unrecoverable error.
18846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18848      has_space=`$ECHO "$complete" | $GREP " "`
18849      if test "x$has_space" != x; then
18850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18852      fi
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  fi
18856
18857  # Now new_path has a complete unix path to the binary
18858  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18859    # Keep paths in /bin as-is, but remove trailing .exe if any
18860    new_path="${new_path/%.exe/}"
18861    # Do not save /bin paths to all_fixpath_prefixes!
18862  else
18863    # Not in mixed or Windows style, start by that.
18864    new_path=`cmd //c echo $new_path`
18865
18866  input_path="$new_path"
18867  # Check if we need to convert this using DOS-style short mode. If the path
18868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18869  # take no chances and rewrite it.
18870  # Note: m4 eats our [], so we need to use [ and ] instead.
18871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18872  if test "x$has_forbidden_chars" != x; then
18873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18875  fi
18876
18877    # Output is in $new_path
18878
18879  windows_path="$new_path"
18880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18881    unix_path=`$CYGPATH -u "$windows_path"`
18882    new_path="$unix_path"
18883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18885    new_path="$unix_path"
18886  fi
18887
18888    # remove trailing .exe if any
18889    new_path="${new_path/%.exe/}"
18890
18891    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18892    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18893  fi
18894
18895    else
18896      # We're on a unix platform. Hooray! :)
18897      # First separate the path from the arguments. This will split at the first
18898      # space.
18899      complete="$FOUND_MAKE"
18900      path="${complete%% *}"
18901      tmp="$complete EOL"
18902      arguments="${tmp#* }"
18903
18904      # Cannot rely on the command "which" here since it doesn't always work.
18905      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18906      if test -z "$is_absolute_path"; then
18907        # Path to executable is not absolute. Find it.
18908        IFS_save="$IFS"
18909        IFS=:
18910        for p in $PATH; do
18911          if test -f "$p/$path" && test -x "$p/$path"; then
18912            new_path="$p/$path"
18913            break
18914          fi
18915        done
18916        IFS="$IFS_save"
18917      else
18918        # This is an absolute path, we can use it without further modifications.
18919        new_path="$path"
18920      fi
18921
18922      if test "x$new_path" = x; then
18923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18925        has_space=`$ECHO "$complete" | $GREP " "`
18926        if test "x$has_space" != x; then
18927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18929        fi
18930        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18931      fi
18932    fi
18933
18934    # Now join together the path and the arguments once again
18935    if test "x$arguments" != xEOL; then
18936      new_complete="$new_path ${arguments% *}"
18937    else
18938      new_complete="$new_path"
18939    fi
18940
18941    if test "x$complete" != "x$new_complete"; then
18942      FOUND_MAKE="$new_complete"
18943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18944$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18945    fi
18946  fi
18947
18948        fi
18949      fi
18950    fi
18951  fi
18952
18953        if test "x$FOUND_MAKE" = x; then
18954          for ac_prog in make
18955do
18956  # Extract the first word of "$ac_prog", so it can be a program name with args.
18957set dummy $ac_prog; ac_word=$2
18958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18959$as_echo_n "checking for $ac_word... " >&6; }
18960if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18961  $as_echo_n "(cached) " >&6
18962else
18963  case $CHECK_TOOLSDIR_MAKE in
18964  [\\/]* | ?:[\\/]*)
18965  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18966  ;;
18967  *)
18968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18969for as_dir in $PATH
18970do
18971  IFS=$as_save_IFS
18972  test -z "$as_dir" && as_dir=.
18973    for ac_exec_ext in '' $ac_executable_extensions; do
18974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18975    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18977    break 2
18978  fi
18979done
18980  done
18981IFS=$as_save_IFS
18982
18983  ;;
18984esac
18985fi
18986CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18987if test -n "$CHECK_TOOLSDIR_MAKE"; then
18988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18989$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18990else
18991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18992$as_echo "no" >&6; }
18993fi
18994
18995
18996  test -n "$CHECK_TOOLSDIR_MAKE" && break
18997done
18998
18999
19000  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19001  DESCRIPTION="make in tools-dir"
19002
19003  # On Cygwin, we require a newer version of make than on other platforms
19004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005    MAKE_VERSION_EXPR="-e 4\."
19006    MAKE_REQUIRED_VERSION="4.0"
19007   else
19008    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19009    MAKE_REQUIRED_VERSION="3.81"
19010  fi
19011
19012  if test "x$MAKE_CANDIDATE" != x; then
19013    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19014$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19015    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19016    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19017    if test "x$IS_GNU_MAKE" = x; then
19018      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19019$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19020    else
19021      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19022      if test "x$IS_MODERN_MAKE" = x; then
19023        { $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
19024$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;}
19025      else
19026        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19027          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19028            MAKE_EXPECTED_ENV='cygwin'
19029          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19030            MAKE_EXPECTED_ENV='msys'
19031          else
19032            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19033          fi
19034          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19035          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19036        else
19037          # Not relevant for non-Windows
19038          IS_MAKE_CORRECT_ENV=true
19039        fi
19040        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19041          { $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
19042$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;}
19043        else
19044          FOUND_MAKE=$MAKE_CANDIDATE
19045
19046  # Only process if variable expands to non-empty
19047
19048  if test "x$FOUND_MAKE" != x; then
19049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19050
19051  # First separate the path from the arguments. This will split at the first
19052  # space.
19053  complete="$FOUND_MAKE"
19054  path="${complete%% *}"
19055  tmp="$complete EOL"
19056  arguments="${tmp#* }"
19057
19058  # Input might be given as Windows format, start by converting to
19059  # unix format.
19060  new_path=`$CYGPATH -u "$path"`
19061
19062  # Now try to locate executable using which
19063  new_path=`$WHICH "$new_path" 2> /dev/null`
19064  # bat and cmd files are not always considered executable in cygwin causing which
19065  # to not find them
19066  if test "x$new_path" = x \
19067      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19068      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19069    new_path=`$CYGPATH -u "$path"`
19070  fi
19071  if test "x$new_path" = x; then
19072    # Oops. Which didn't find the executable.
19073    # The splitting of arguments from the executable at a space might have been incorrect,
19074    # since paths with space are more likely in Windows. Give it another try with the whole
19075    # argument.
19076    path="$complete"
19077    arguments="EOL"
19078    new_path=`$CYGPATH -u "$path"`
19079    new_path=`$WHICH "$new_path" 2> /dev/null`
19080    # bat and cmd files are not always considered executable in cygwin causing which
19081    # to not find them
19082    if test "x$new_path" = x \
19083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19085      new_path=`$CYGPATH -u "$path"`
19086    fi
19087    if test "x$new_path" = x; then
19088      # It's still not found. Now this is an unrecoverable error.
19089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19091      has_space=`$ECHO "$complete" | $GREP " "`
19092      if test "x$has_space" != x; then
19093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19095      fi
19096      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19097    fi
19098  fi
19099
19100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19103  # "foo.exe" is OK but "foo" is an error.
19104  #
19105  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19106  # It is also a way to make sure we got the proper file name for the real test later on.
19107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19108  if test "x$test_shortpath" = x; then
19109    # Short path failed, file does not exist as specified.
19110    # Try adding .exe or .cmd
19111    if test -f "${new_path}.exe"; then
19112      input_to_shortpath="${new_path}.exe"
19113    elif test -f "${new_path}.cmd"; then
19114      input_to_shortpath="${new_path}.cmd"
19115    else
19116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19120      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19121    fi
19122  else
19123    input_to_shortpath="$new_path"
19124  fi
19125
19126  # Call helper function which possibly converts this using DOS-style short mode.
19127  # If so, the updated path is stored in $new_path.
19128  new_path="$input_to_shortpath"
19129
19130  input_path="$input_to_shortpath"
19131  # Check if we need to convert this using DOS-style short mode. If the path
19132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19133  # take no chances and rewrite it.
19134  # Note: m4 eats our [], so we need to use [ and ] instead.
19135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19136  if test "x$has_forbidden_chars" != x; then
19137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19141      # Going to short mode and back again did indeed matter. Since short mode is
19142      # case insensitive, let's make it lowercase to improve readability.
19143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19144      # Now convert it back to Unix-style (cygpath)
19145      input_path=`$CYGPATH -u "$shortmode_path"`
19146      new_path="$input_path"
19147    fi
19148  fi
19149
19150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19151  if test "x$test_cygdrive_prefix" = x; then
19152    # As a simple fix, exclude /usr/bin since it's not a real path.
19153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19155      # a path prefixed by /cygdrive for fixpath to work.
19156      new_path="$CYGWIN_ROOT_PATH$input_path"
19157    fi
19158  fi
19159
19160  # remove trailing .exe if any
19161  new_path="${new_path/%.exe/}"
19162
19163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19164
19165  # First separate the path from the arguments. This will split at the first
19166  # space.
19167  complete="$FOUND_MAKE"
19168  path="${complete%% *}"
19169  tmp="$complete EOL"
19170  arguments="${tmp#* }"
19171
19172  # Input might be given as Windows format, start by converting to
19173  # unix format.
19174  new_path="$path"
19175
19176  windows_path="$new_path"
19177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19178    unix_path=`$CYGPATH -u "$windows_path"`
19179    new_path="$unix_path"
19180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19182    new_path="$unix_path"
19183  fi
19184
19185
19186  # Now try to locate executable using which
19187  new_path=`$WHICH "$new_path" 2> /dev/null`
19188
19189  if test "x$new_path" = x; then
19190    # Oops. Which didn't find the executable.
19191    # The splitting of arguments from the executable at a space might have been incorrect,
19192    # since paths with space are more likely in Windows. Give it another try with the whole
19193    # argument.
19194    path="$complete"
19195    arguments="EOL"
19196    new_path="$path"
19197
19198  windows_path="$new_path"
19199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19200    unix_path=`$CYGPATH -u "$windows_path"`
19201    new_path="$unix_path"
19202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19204    new_path="$unix_path"
19205  fi
19206
19207
19208    new_path=`$WHICH "$new_path" 2> /dev/null`
19209    # bat and cmd files are not always considered executable in MSYS causing which
19210    # to not find them
19211    if test "x$new_path" = x \
19212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19214      new_path="$path"
19215
19216  windows_path="$new_path"
19217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19218    unix_path=`$CYGPATH -u "$windows_path"`
19219    new_path="$unix_path"
19220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19222    new_path="$unix_path"
19223  fi
19224
19225    fi
19226
19227    if test "x$new_path" = x; then
19228      # It's still not found. Now this is an unrecoverable error.
19229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19231      has_space=`$ECHO "$complete" | $GREP " "`
19232      if test "x$has_space" != x; then
19233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19235      fi
19236      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19237    fi
19238  fi
19239
19240  # Now new_path has a complete unix path to the binary
19241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19242    # Keep paths in /bin as-is, but remove trailing .exe if any
19243    new_path="${new_path/%.exe/}"
19244    # Do not save /bin paths to all_fixpath_prefixes!
19245  else
19246    # Not in mixed or Windows style, start by that.
19247    new_path=`cmd //c echo $new_path`
19248
19249  input_path="$new_path"
19250  # Check if we need to convert this using DOS-style short mode. If the path
19251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19252  # take no chances and rewrite it.
19253  # Note: m4 eats our [], so we need to use [ and ] instead.
19254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19255  if test "x$has_forbidden_chars" != x; then
19256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19258  fi
19259
19260    # Output is in $new_path
19261
19262  windows_path="$new_path"
19263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19264    unix_path=`$CYGPATH -u "$windows_path"`
19265    new_path="$unix_path"
19266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19268    new_path="$unix_path"
19269  fi
19270
19271    # remove trailing .exe if any
19272    new_path="${new_path/%.exe/}"
19273
19274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19276  fi
19277
19278    else
19279      # We're on a unix platform. Hooray! :)
19280      # First separate the path from the arguments. This will split at the first
19281      # space.
19282      complete="$FOUND_MAKE"
19283      path="${complete%% *}"
19284      tmp="$complete EOL"
19285      arguments="${tmp#* }"
19286
19287      # Cannot rely on the command "which" here since it doesn't always work.
19288      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19289      if test -z "$is_absolute_path"; then
19290        # Path to executable is not absolute. Find it.
19291        IFS_save="$IFS"
19292        IFS=:
19293        for p in $PATH; do
19294          if test -f "$p/$path" && test -x "$p/$path"; then
19295            new_path="$p/$path"
19296            break
19297          fi
19298        done
19299        IFS="$IFS_save"
19300      else
19301        # This is an absolute path, we can use it without further modifications.
19302        new_path="$path"
19303      fi
19304
19305      if test "x$new_path" = x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19307$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19308        has_space=`$ECHO "$complete" | $GREP " "`
19309        if test "x$has_space" != x; then
19310          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19311$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19312        fi
19313        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19314      fi
19315    fi
19316
19317    # Now join together the path and the arguments once again
19318    if test "x$arguments" != xEOL; then
19319      new_complete="$new_path ${arguments% *}"
19320    else
19321      new_complete="$new_path"
19322    fi
19323
19324    if test "x$complete" != "x$new_complete"; then
19325      FOUND_MAKE="$new_complete"
19326      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19327$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19328    fi
19329  fi
19330
19331        fi
19332      fi
19333    fi
19334  fi
19335
19336        fi
19337        PATH=$OLD_PATH
19338      fi
19339    fi
19340
19341    if test "x$FOUND_MAKE" = x; then
19342      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
19343    fi
19344
19345  else
19346    # The variable is set, but is it from the command line or the environment?
19347
19348    # Try to remove the string !MAKE! from our list.
19349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19351      # If it failed, the variable was not from the command line. Ignore it,
19352      # but warn the user (except for BASH, which is always set by the calling BASH).
19353      if test "xMAKE" != xBASH; then
19354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19355$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19356      fi
19357      # Try to locate tool using the code snippet
19358
19359    # Try our hardest to locate a correct version of GNU make
19360    for ac_prog in gmake
19361do
19362  # Extract the first word of "$ac_prog", so it can be a program name with args.
19363set dummy $ac_prog; ac_word=$2
19364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19365$as_echo_n "checking for $ac_word... " >&6; }
19366if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19367  $as_echo_n "(cached) " >&6
19368else
19369  case $CHECK_GMAKE in
19370  [\\/]* | ?:[\\/]*)
19371  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19372  ;;
19373  *)
19374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19375for as_dir in $PATH
19376do
19377  IFS=$as_save_IFS
19378  test -z "$as_dir" && as_dir=.
19379    for ac_exec_ext in '' $ac_executable_extensions; do
19380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19381    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19383    break 2
19384  fi
19385done
19386  done
19387IFS=$as_save_IFS
19388
19389  ;;
19390esac
19391fi
19392CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19393if test -n "$CHECK_GMAKE"; then
19394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19395$as_echo "$CHECK_GMAKE" >&6; }
19396else
19397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19398$as_echo "no" >&6; }
19399fi
19400
19401
19402  test -n "$CHECK_GMAKE" && break
19403done
19404
19405
19406  MAKE_CANDIDATE=""$CHECK_GMAKE""
19407  DESCRIPTION="gmake in PATH"
19408
19409  # On Cygwin, we require a newer version of make than on other platforms
19410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411    MAKE_VERSION_EXPR="-e 4\."
19412    MAKE_REQUIRED_VERSION="4.0"
19413   else
19414    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19415    MAKE_REQUIRED_VERSION="3.81"
19416  fi
19417
19418  if test "x$MAKE_CANDIDATE" != x; then
19419    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19420$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19421    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19422    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19423    if test "x$IS_GNU_MAKE" = x; then
19424      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19425$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19426    else
19427      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19428      if test "x$IS_MODERN_MAKE" = x; then
19429        { $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
19430$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;}
19431      else
19432        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19433          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19434            MAKE_EXPECTED_ENV='cygwin'
19435          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19436            MAKE_EXPECTED_ENV='msys'
19437          else
19438            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19439          fi
19440          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19441          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19442        else
19443          # Not relevant for non-Windows
19444          IS_MAKE_CORRECT_ENV=true
19445        fi
19446        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19447          { $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
19448$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;}
19449        else
19450          FOUND_MAKE=$MAKE_CANDIDATE
19451
19452  # Only process if variable expands to non-empty
19453
19454  if test "x$FOUND_MAKE" != x; then
19455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19456
19457  # First separate the path from the arguments. This will split at the first
19458  # space.
19459  complete="$FOUND_MAKE"
19460  path="${complete%% *}"
19461  tmp="$complete EOL"
19462  arguments="${tmp#* }"
19463
19464  # Input might be given as Windows format, start by converting to
19465  # unix format.
19466  new_path=`$CYGPATH -u "$path"`
19467
19468  # Now try to locate executable using which
19469  new_path=`$WHICH "$new_path" 2> /dev/null`
19470  # bat and cmd files are not always considered executable in cygwin causing which
19471  # to not find them
19472  if test "x$new_path" = x \
19473      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19474      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19475    new_path=`$CYGPATH -u "$path"`
19476  fi
19477  if test "x$new_path" = x; then
19478    # Oops. Which didn't find the executable.
19479    # The splitting of arguments from the executable at a space might have been incorrect,
19480    # since paths with space are more likely in Windows. Give it another try with the whole
19481    # argument.
19482    path="$complete"
19483    arguments="EOL"
19484    new_path=`$CYGPATH -u "$path"`
19485    new_path=`$WHICH "$new_path" 2> /dev/null`
19486    # bat and cmd files are not always considered executable in cygwin causing which
19487    # to not find them
19488    if test "x$new_path" = x \
19489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19491      new_path=`$CYGPATH -u "$path"`
19492    fi
19493    if test "x$new_path" = x; then
19494      # It's still not found. Now this is an unrecoverable error.
19495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19497      has_space=`$ECHO "$complete" | $GREP " "`
19498      if test "x$has_space" != x; then
19499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19501      fi
19502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19503    fi
19504  fi
19505
19506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19509  # "foo.exe" is OK but "foo" is an error.
19510  #
19511  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19512  # It is also a way to make sure we got the proper file name for the real test later on.
19513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19514  if test "x$test_shortpath" = x; then
19515    # Short path failed, file does not exist as specified.
19516    # Try adding .exe or .cmd
19517    if test -f "${new_path}.exe"; then
19518      input_to_shortpath="${new_path}.exe"
19519    elif test -f "${new_path}.cmd"; then
19520      input_to_shortpath="${new_path}.cmd"
19521    else
19522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19524      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19525$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19526      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19527    fi
19528  else
19529    input_to_shortpath="$new_path"
19530  fi
19531
19532  # Call helper function which possibly converts this using DOS-style short mode.
19533  # If so, the updated path is stored in $new_path.
19534  new_path="$input_to_shortpath"
19535
19536  input_path="$input_to_shortpath"
19537  # Check if we need to convert this using DOS-style short mode. If the path
19538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19539  # take no chances and rewrite it.
19540  # Note: m4 eats our [], so we need to use [ and ] instead.
19541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19542  if test "x$has_forbidden_chars" != x; then
19543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19547      # Going to short mode and back again did indeed matter. Since short mode is
19548      # case insensitive, let's make it lowercase to improve readability.
19549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19550      # Now convert it back to Unix-style (cygpath)
19551      input_path=`$CYGPATH -u "$shortmode_path"`
19552      new_path="$input_path"
19553    fi
19554  fi
19555
19556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19557  if test "x$test_cygdrive_prefix" = x; then
19558    # As a simple fix, exclude /usr/bin since it's not a real path.
19559    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19561      # a path prefixed by /cygdrive for fixpath to work.
19562      new_path="$CYGWIN_ROOT_PATH$input_path"
19563    fi
19564  fi
19565
19566  # remove trailing .exe if any
19567  new_path="${new_path/%.exe/}"
19568
19569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19570
19571  # First separate the path from the arguments. This will split at the first
19572  # space.
19573  complete="$FOUND_MAKE"
19574  path="${complete%% *}"
19575  tmp="$complete EOL"
19576  arguments="${tmp#* }"
19577
19578  # Input might be given as Windows format, start by converting to
19579  # unix format.
19580  new_path="$path"
19581
19582  windows_path="$new_path"
19583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19584    unix_path=`$CYGPATH -u "$windows_path"`
19585    new_path="$unix_path"
19586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19588    new_path="$unix_path"
19589  fi
19590
19591
19592  # Now try to locate executable using which
19593  new_path=`$WHICH "$new_path" 2> /dev/null`
19594
19595  if test "x$new_path" = x; then
19596    # Oops. Which didn't find the executable.
19597    # The splitting of arguments from the executable at a space might have been incorrect,
19598    # since paths with space are more likely in Windows. Give it another try with the whole
19599    # argument.
19600    path="$complete"
19601    arguments="EOL"
19602    new_path="$path"
19603
19604  windows_path="$new_path"
19605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19606    unix_path=`$CYGPATH -u "$windows_path"`
19607    new_path="$unix_path"
19608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19610    new_path="$unix_path"
19611  fi
19612
19613
19614    new_path=`$WHICH "$new_path" 2> /dev/null`
19615    # bat and cmd files are not always considered executable in MSYS causing which
19616    # to not find them
19617    if test "x$new_path" = x \
19618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19620      new_path="$path"
19621
19622  windows_path="$new_path"
19623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19624    unix_path=`$CYGPATH -u "$windows_path"`
19625    new_path="$unix_path"
19626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19628    new_path="$unix_path"
19629  fi
19630
19631    fi
19632
19633    if test "x$new_path" = x; then
19634      # It's still not found. Now this is an unrecoverable error.
19635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19636$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19637      has_space=`$ECHO "$complete" | $GREP " "`
19638      if test "x$has_space" != x; then
19639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19641      fi
19642      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19643    fi
19644  fi
19645
19646  # Now new_path has a complete unix path to the binary
19647  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19648    # Keep paths in /bin as-is, but remove trailing .exe if any
19649    new_path="${new_path/%.exe/}"
19650    # Do not save /bin paths to all_fixpath_prefixes!
19651  else
19652    # Not in mixed or Windows style, start by that.
19653    new_path=`cmd //c echo $new_path`
19654
19655  input_path="$new_path"
19656  # Check if we need to convert this using DOS-style short mode. If the path
19657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19658  # take no chances and rewrite it.
19659  # Note: m4 eats our [], so we need to use [ and ] instead.
19660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19661  if test "x$has_forbidden_chars" != x; then
19662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19664  fi
19665
19666    # Output is in $new_path
19667
19668  windows_path="$new_path"
19669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19670    unix_path=`$CYGPATH -u "$windows_path"`
19671    new_path="$unix_path"
19672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19674    new_path="$unix_path"
19675  fi
19676
19677    # remove trailing .exe if any
19678    new_path="${new_path/%.exe/}"
19679
19680    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19681    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19682  fi
19683
19684    else
19685      # We're on a unix platform. Hooray! :)
19686      # First separate the path from the arguments. This will split at the first
19687      # space.
19688      complete="$FOUND_MAKE"
19689      path="${complete%% *}"
19690      tmp="$complete EOL"
19691      arguments="${tmp#* }"
19692
19693      # Cannot rely on the command "which" here since it doesn't always work.
19694      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19695      if test -z "$is_absolute_path"; then
19696        # Path to executable is not absolute. Find it.
19697        IFS_save="$IFS"
19698        IFS=:
19699        for p in $PATH; do
19700          if test -f "$p/$path" && test -x "$p/$path"; then
19701            new_path="$p/$path"
19702            break
19703          fi
19704        done
19705        IFS="$IFS_save"
19706      else
19707        # This is an absolute path, we can use it without further modifications.
19708        new_path="$path"
19709      fi
19710
19711      if test "x$new_path" = x; then
19712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19713$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19714        has_space=`$ECHO "$complete" | $GREP " "`
19715        if test "x$has_space" != x; then
19716          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19717$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19718        fi
19719        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19720      fi
19721    fi
19722
19723    # Now join together the path and the arguments once again
19724    if test "x$arguments" != xEOL; then
19725      new_complete="$new_path ${arguments% *}"
19726    else
19727      new_complete="$new_path"
19728    fi
19729
19730    if test "x$complete" != "x$new_complete"; then
19731      FOUND_MAKE="$new_complete"
19732      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19733$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19734    fi
19735  fi
19736
19737        fi
19738      fi
19739    fi
19740  fi
19741
19742
19743    if test "x$FOUND_MAKE" = x; then
19744      for ac_prog in make
19745do
19746  # Extract the first word of "$ac_prog", so it can be a program name with args.
19747set dummy $ac_prog; ac_word=$2
19748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19749$as_echo_n "checking for $ac_word... " >&6; }
19750if ${ac_cv_path_CHECK_MAKE+:} false; then :
19751  $as_echo_n "(cached) " >&6
19752else
19753  case $CHECK_MAKE in
19754  [\\/]* | ?:[\\/]*)
19755  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19756  ;;
19757  *)
19758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19759for as_dir in $PATH
19760do
19761  IFS=$as_save_IFS
19762  test -z "$as_dir" && as_dir=.
19763    for ac_exec_ext in '' $ac_executable_extensions; do
19764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19765    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19767    break 2
19768  fi
19769done
19770  done
19771IFS=$as_save_IFS
19772
19773  ;;
19774esac
19775fi
19776CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19777if test -n "$CHECK_MAKE"; then
19778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19779$as_echo "$CHECK_MAKE" >&6; }
19780else
19781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19782$as_echo "no" >&6; }
19783fi
19784
19785
19786  test -n "$CHECK_MAKE" && break
19787done
19788
19789
19790  MAKE_CANDIDATE=""$CHECK_MAKE""
19791  DESCRIPTION="make in PATH"
19792
19793  # On Cygwin, we require a newer version of make than on other platforms
19794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795    MAKE_VERSION_EXPR="-e 4\."
19796    MAKE_REQUIRED_VERSION="4.0"
19797   else
19798    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19799    MAKE_REQUIRED_VERSION="3.81"
19800  fi
19801
19802  if test "x$MAKE_CANDIDATE" != x; then
19803    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19804$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19805    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19806    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19807    if test "x$IS_GNU_MAKE" = x; then
19808      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19809$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19810    else
19811      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19812      if test "x$IS_MODERN_MAKE" = x; then
19813        { $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
19814$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;}
19815      else
19816        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19817          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19818            MAKE_EXPECTED_ENV='cygwin'
19819          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19820            MAKE_EXPECTED_ENV='msys'
19821          else
19822            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19823          fi
19824          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19825          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19826        else
19827          # Not relevant for non-Windows
19828          IS_MAKE_CORRECT_ENV=true
19829        fi
19830        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19831          { $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
19832$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;}
19833        else
19834          FOUND_MAKE=$MAKE_CANDIDATE
19835
19836  # Only process if variable expands to non-empty
19837
19838  if test "x$FOUND_MAKE" != x; then
19839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19840
19841  # First separate the path from the arguments. This will split at the first
19842  # space.
19843  complete="$FOUND_MAKE"
19844  path="${complete%% *}"
19845  tmp="$complete EOL"
19846  arguments="${tmp#* }"
19847
19848  # Input might be given as Windows format, start by converting to
19849  # unix format.
19850  new_path=`$CYGPATH -u "$path"`
19851
19852  # Now try to locate executable using which
19853  new_path=`$WHICH "$new_path" 2> /dev/null`
19854  # bat and cmd files are not always considered executable in cygwin causing which
19855  # to not find them
19856  if test "x$new_path" = x \
19857      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19858      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19859    new_path=`$CYGPATH -u "$path"`
19860  fi
19861  if test "x$new_path" = x; then
19862    # Oops. Which didn't find the executable.
19863    # The splitting of arguments from the executable at a space might have been incorrect,
19864    # since paths with space are more likely in Windows. Give it another try with the whole
19865    # argument.
19866    path="$complete"
19867    arguments="EOL"
19868    new_path=`$CYGPATH -u "$path"`
19869    new_path=`$WHICH "$new_path" 2> /dev/null`
19870    # bat and cmd files are not always considered executable in cygwin causing which
19871    # to not find them
19872    if test "x$new_path" = x \
19873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19875      new_path=`$CYGPATH -u "$path"`
19876    fi
19877    if test "x$new_path" = x; then
19878      # It's still not found. Now this is an unrecoverable error.
19879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19881      has_space=`$ECHO "$complete" | $GREP " "`
19882      if test "x$has_space" != x; then
19883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19885      fi
19886      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19887    fi
19888  fi
19889
19890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19893  # "foo.exe" is OK but "foo" is an error.
19894  #
19895  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19896  # It is also a way to make sure we got the proper file name for the real test later on.
19897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19898  if test "x$test_shortpath" = x; then
19899    # Short path failed, file does not exist as specified.
19900    # Try adding .exe or .cmd
19901    if test -f "${new_path}.exe"; then
19902      input_to_shortpath="${new_path}.exe"
19903    elif test -f "${new_path}.cmd"; then
19904      input_to_shortpath="${new_path}.cmd"
19905    else
19906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19910      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19911    fi
19912  else
19913    input_to_shortpath="$new_path"
19914  fi
19915
19916  # Call helper function which possibly converts this using DOS-style short mode.
19917  # If so, the updated path is stored in $new_path.
19918  new_path="$input_to_shortpath"
19919
19920  input_path="$input_to_shortpath"
19921  # Check if we need to convert this using DOS-style short mode. If the path
19922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19923  # take no chances and rewrite it.
19924  # Note: m4 eats our [], so we need to use [ and ] instead.
19925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19926  if test "x$has_forbidden_chars" != x; then
19927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19931      # Going to short mode and back again did indeed matter. Since short mode is
19932      # case insensitive, let's make it lowercase to improve readability.
19933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19934      # Now convert it back to Unix-style (cygpath)
19935      input_path=`$CYGPATH -u "$shortmode_path"`
19936      new_path="$input_path"
19937    fi
19938  fi
19939
19940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19941  if test "x$test_cygdrive_prefix" = x; then
19942    # As a simple fix, exclude /usr/bin since it's not a real path.
19943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19945      # a path prefixed by /cygdrive for fixpath to work.
19946      new_path="$CYGWIN_ROOT_PATH$input_path"
19947    fi
19948  fi
19949
19950  # remove trailing .exe if any
19951  new_path="${new_path/%.exe/}"
19952
19953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19954
19955  # First separate the path from the arguments. This will split at the first
19956  # space.
19957  complete="$FOUND_MAKE"
19958  path="${complete%% *}"
19959  tmp="$complete EOL"
19960  arguments="${tmp#* }"
19961
19962  # Input might be given as Windows format, start by converting to
19963  # unix format.
19964  new_path="$path"
19965
19966  windows_path="$new_path"
19967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19968    unix_path=`$CYGPATH -u "$windows_path"`
19969    new_path="$unix_path"
19970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19972    new_path="$unix_path"
19973  fi
19974
19975
19976  # Now try to locate executable using which
19977  new_path=`$WHICH "$new_path" 2> /dev/null`
19978
19979  if test "x$new_path" = x; then
19980    # Oops. Which didn't find the executable.
19981    # The splitting of arguments from the executable at a space might have been incorrect,
19982    # since paths with space are more likely in Windows. Give it another try with the whole
19983    # argument.
19984    path="$complete"
19985    arguments="EOL"
19986    new_path="$path"
19987
19988  windows_path="$new_path"
19989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19990    unix_path=`$CYGPATH -u "$windows_path"`
19991    new_path="$unix_path"
19992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19994    new_path="$unix_path"
19995  fi
19996
19997
19998    new_path=`$WHICH "$new_path" 2> /dev/null`
19999    # bat and cmd files are not always considered executable in MSYS causing which
20000    # to not find them
20001    if test "x$new_path" = x \
20002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20004      new_path="$path"
20005
20006  windows_path="$new_path"
20007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20008    unix_path=`$CYGPATH -u "$windows_path"`
20009    new_path="$unix_path"
20010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20012    new_path="$unix_path"
20013  fi
20014
20015    fi
20016
20017    if test "x$new_path" = x; then
20018      # It's still not found. Now this is an unrecoverable error.
20019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20020$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20021      has_space=`$ECHO "$complete" | $GREP " "`
20022      if test "x$has_space" != x; then
20023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20025      fi
20026      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20027    fi
20028  fi
20029
20030  # Now new_path has a complete unix path to the binary
20031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20032    # Keep paths in /bin as-is, but remove trailing .exe if any
20033    new_path="${new_path/%.exe/}"
20034    # Do not save /bin paths to all_fixpath_prefixes!
20035  else
20036    # Not in mixed or Windows style, start by that.
20037    new_path=`cmd //c echo $new_path`
20038
20039  input_path="$new_path"
20040  # Check if we need to convert this using DOS-style short mode. If the path
20041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20042  # take no chances and rewrite it.
20043  # Note: m4 eats our [], so we need to use [ and ] instead.
20044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20045  if test "x$has_forbidden_chars" != x; then
20046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20048  fi
20049
20050    # Output is in $new_path
20051
20052  windows_path="$new_path"
20053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20054    unix_path=`$CYGPATH -u "$windows_path"`
20055    new_path="$unix_path"
20056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20058    new_path="$unix_path"
20059  fi
20060
20061    # remove trailing .exe if any
20062    new_path="${new_path/%.exe/}"
20063
20064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20066  fi
20067
20068    else
20069      # We're on a unix platform. Hooray! :)
20070      # First separate the path from the arguments. This will split at the first
20071      # space.
20072      complete="$FOUND_MAKE"
20073      path="${complete%% *}"
20074      tmp="$complete EOL"
20075      arguments="${tmp#* }"
20076
20077      # Cannot rely on the command "which" here since it doesn't always work.
20078      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20079      if test -z "$is_absolute_path"; then
20080        # Path to executable is not absolute. Find it.
20081        IFS_save="$IFS"
20082        IFS=:
20083        for p in $PATH; do
20084          if test -f "$p/$path" && test -x "$p/$path"; then
20085            new_path="$p/$path"
20086            break
20087          fi
20088        done
20089        IFS="$IFS_save"
20090      else
20091        # This is an absolute path, we can use it without further modifications.
20092        new_path="$path"
20093      fi
20094
20095      if test "x$new_path" = x; then
20096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20097$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20098        has_space=`$ECHO "$complete" | $GREP " "`
20099        if test "x$has_space" != x; then
20100          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20102        fi
20103        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20104      fi
20105    fi
20106
20107    # Now join together the path and the arguments once again
20108    if test "x$arguments" != xEOL; then
20109      new_complete="$new_path ${arguments% *}"
20110    else
20111      new_complete="$new_path"
20112    fi
20113
20114    if test "x$complete" != "x$new_complete"; then
20115      FOUND_MAKE="$new_complete"
20116      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20117$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20118    fi
20119  fi
20120
20121        fi
20122      fi
20123    fi
20124  fi
20125
20126    fi
20127
20128    if test "x$FOUND_MAKE" = x; then
20129      if test "x$TOOLCHAIN_PATH" != x; then
20130        # We have a toolchain path, check that as well before giving up.
20131        OLD_PATH=$PATH
20132        PATH=$TOOLCHAIN_PATH:$PATH
20133        for ac_prog in gmake
20134do
20135  # Extract the first word of "$ac_prog", so it can be a program name with args.
20136set dummy $ac_prog; ac_word=$2
20137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20138$as_echo_n "checking for $ac_word... " >&6; }
20139if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20140  $as_echo_n "(cached) " >&6
20141else
20142  case $CHECK_TOOLSDIR_GMAKE in
20143  [\\/]* | ?:[\\/]*)
20144  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20145  ;;
20146  *)
20147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20148for as_dir in $PATH
20149do
20150  IFS=$as_save_IFS
20151  test -z "$as_dir" && as_dir=.
20152    for ac_exec_ext in '' $ac_executable_extensions; do
20153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20154    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20156    break 2
20157  fi
20158done
20159  done
20160IFS=$as_save_IFS
20161
20162  ;;
20163esac
20164fi
20165CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20166if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20168$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20169else
20170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20171$as_echo "no" >&6; }
20172fi
20173
20174
20175  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20176done
20177
20178
20179  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20180  DESCRIPTION="gmake in tools-dir"
20181
20182  # On Cygwin, we require a newer version of make than on other platforms
20183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184    MAKE_VERSION_EXPR="-e 4\."
20185    MAKE_REQUIRED_VERSION="4.0"
20186   else
20187    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20188    MAKE_REQUIRED_VERSION="3.81"
20189  fi
20190
20191  if test "x$MAKE_CANDIDATE" != x; then
20192    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20193$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20194    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20195    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20196    if test "x$IS_GNU_MAKE" = x; then
20197      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20198$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20199    else
20200      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20201      if test "x$IS_MODERN_MAKE" = x; then
20202        { $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
20203$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;}
20204      else
20205        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20206          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20207            MAKE_EXPECTED_ENV='cygwin'
20208          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20209            MAKE_EXPECTED_ENV='msys'
20210          else
20211            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20212          fi
20213          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20214          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20215        else
20216          # Not relevant for non-Windows
20217          IS_MAKE_CORRECT_ENV=true
20218        fi
20219        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20220          { $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
20221$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;}
20222        else
20223          FOUND_MAKE=$MAKE_CANDIDATE
20224
20225  # Only process if variable expands to non-empty
20226
20227  if test "x$FOUND_MAKE" != x; then
20228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20229
20230  # First separate the path from the arguments. This will split at the first
20231  # space.
20232  complete="$FOUND_MAKE"
20233  path="${complete%% *}"
20234  tmp="$complete EOL"
20235  arguments="${tmp#* }"
20236
20237  # Input might be given as Windows format, start by converting to
20238  # unix format.
20239  new_path=`$CYGPATH -u "$path"`
20240
20241  # Now try to locate executable using which
20242  new_path=`$WHICH "$new_path" 2> /dev/null`
20243  # bat and cmd files are not always considered executable in cygwin causing which
20244  # to not find them
20245  if test "x$new_path" = x \
20246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20248    new_path=`$CYGPATH -u "$path"`
20249  fi
20250  if test "x$new_path" = x; then
20251    # Oops. Which didn't find the executable.
20252    # The splitting of arguments from the executable at a space might have been incorrect,
20253    # since paths with space are more likely in Windows. Give it another try with the whole
20254    # argument.
20255    path="$complete"
20256    arguments="EOL"
20257    new_path=`$CYGPATH -u "$path"`
20258    new_path=`$WHICH "$new_path" 2> /dev/null`
20259    # bat and cmd files are not always considered executable in cygwin causing which
20260    # to not find them
20261    if test "x$new_path" = x \
20262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20264      new_path=`$CYGPATH -u "$path"`
20265    fi
20266    if test "x$new_path" = x; then
20267      # It's still not found. Now this is an unrecoverable error.
20268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20269$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20270      has_space=`$ECHO "$complete" | $GREP " "`
20271      if test "x$has_space" != x; then
20272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20274      fi
20275      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20276    fi
20277  fi
20278
20279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20282  # "foo.exe" is OK but "foo" is an error.
20283  #
20284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20285  # It is also a way to make sure we got the proper file name for the real test later on.
20286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20287  if test "x$test_shortpath" = x; then
20288    # Short path failed, file does not exist as specified.
20289    # Try adding .exe or .cmd
20290    if test -f "${new_path}.exe"; then
20291      input_to_shortpath="${new_path}.exe"
20292    elif test -f "${new_path}.cmd"; then
20293      input_to_shortpath="${new_path}.cmd"
20294    else
20295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20296$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20299      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20300    fi
20301  else
20302    input_to_shortpath="$new_path"
20303  fi
20304
20305  # Call helper function which possibly converts this using DOS-style short mode.
20306  # If so, the updated path is stored in $new_path.
20307  new_path="$input_to_shortpath"
20308
20309  input_path="$input_to_shortpath"
20310  # Check if we need to convert this using DOS-style short mode. If the path
20311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20312  # take no chances and rewrite it.
20313  # Note: m4 eats our [], so we need to use [ and ] instead.
20314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20315  if test "x$has_forbidden_chars" != x; then
20316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20320      # Going to short mode and back again did indeed matter. Since short mode is
20321      # case insensitive, let's make it lowercase to improve readability.
20322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20323      # Now convert it back to Unix-style (cygpath)
20324      input_path=`$CYGPATH -u "$shortmode_path"`
20325      new_path="$input_path"
20326    fi
20327  fi
20328
20329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20330  if test "x$test_cygdrive_prefix" = x; then
20331    # As a simple fix, exclude /usr/bin since it's not a real path.
20332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20334      # a path prefixed by /cygdrive for fixpath to work.
20335      new_path="$CYGWIN_ROOT_PATH$input_path"
20336    fi
20337  fi
20338
20339  # remove trailing .exe if any
20340  new_path="${new_path/%.exe/}"
20341
20342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20343
20344  # First separate the path from the arguments. This will split at the first
20345  # space.
20346  complete="$FOUND_MAKE"
20347  path="${complete%% *}"
20348  tmp="$complete EOL"
20349  arguments="${tmp#* }"
20350
20351  # Input might be given as Windows format, start by converting to
20352  # unix format.
20353  new_path="$path"
20354
20355  windows_path="$new_path"
20356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20357    unix_path=`$CYGPATH -u "$windows_path"`
20358    new_path="$unix_path"
20359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20361    new_path="$unix_path"
20362  fi
20363
20364
20365  # Now try to locate executable using which
20366  new_path=`$WHICH "$new_path" 2> /dev/null`
20367
20368  if test "x$new_path" = x; then
20369    # Oops. Which didn't find the executable.
20370    # The splitting of arguments from the executable at a space might have been incorrect,
20371    # since paths with space are more likely in Windows. Give it another try with the whole
20372    # argument.
20373    path="$complete"
20374    arguments="EOL"
20375    new_path="$path"
20376
20377  windows_path="$new_path"
20378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20379    unix_path=`$CYGPATH -u "$windows_path"`
20380    new_path="$unix_path"
20381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20383    new_path="$unix_path"
20384  fi
20385
20386
20387    new_path=`$WHICH "$new_path" 2> /dev/null`
20388    # bat and cmd files are not always considered executable in MSYS causing which
20389    # to not find them
20390    if test "x$new_path" = x \
20391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20393      new_path="$path"
20394
20395  windows_path="$new_path"
20396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20397    unix_path=`$CYGPATH -u "$windows_path"`
20398    new_path="$unix_path"
20399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20401    new_path="$unix_path"
20402  fi
20403
20404    fi
20405
20406    if test "x$new_path" = x; then
20407      # It's still not found. Now this is an unrecoverable error.
20408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20410      has_space=`$ECHO "$complete" | $GREP " "`
20411      if test "x$has_space" != x; then
20412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20414      fi
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  fi
20418
20419  # Now new_path has a complete unix path to the binary
20420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20421    # Keep paths in /bin as-is, but remove trailing .exe if any
20422    new_path="${new_path/%.exe/}"
20423    # Do not save /bin paths to all_fixpath_prefixes!
20424  else
20425    # Not in mixed or Windows style, start by that.
20426    new_path=`cmd //c echo $new_path`
20427
20428  input_path="$new_path"
20429  # Check if we need to convert this using DOS-style short mode. If the path
20430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20431  # take no chances and rewrite it.
20432  # Note: m4 eats our [], so we need to use [ and ] instead.
20433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20434  if test "x$has_forbidden_chars" != x; then
20435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20437  fi
20438
20439    # Output is in $new_path
20440
20441  windows_path="$new_path"
20442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20443    unix_path=`$CYGPATH -u "$windows_path"`
20444    new_path="$unix_path"
20445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20447    new_path="$unix_path"
20448  fi
20449
20450    # remove trailing .exe if any
20451    new_path="${new_path/%.exe/}"
20452
20453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20455  fi
20456
20457    else
20458      # We're on a unix platform. Hooray! :)
20459      # First separate the path from the arguments. This will split at the first
20460      # space.
20461      complete="$FOUND_MAKE"
20462      path="${complete%% *}"
20463      tmp="$complete EOL"
20464      arguments="${tmp#* }"
20465
20466      # Cannot rely on the command "which" here since it doesn't always work.
20467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20468      if test -z "$is_absolute_path"; then
20469        # Path to executable is not absolute. Find it.
20470        IFS_save="$IFS"
20471        IFS=:
20472        for p in $PATH; do
20473          if test -f "$p/$path" && test -x "$p/$path"; then
20474            new_path="$p/$path"
20475            break
20476          fi
20477        done
20478        IFS="$IFS_save"
20479      else
20480        # This is an absolute path, we can use it without further modifications.
20481        new_path="$path"
20482      fi
20483
20484      if test "x$new_path" = x; then
20485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20487        has_space=`$ECHO "$complete" | $GREP " "`
20488        if test "x$has_space" != x; then
20489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20491        fi
20492        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20493      fi
20494    fi
20495
20496    # Now join together the path and the arguments once again
20497    if test "x$arguments" != xEOL; then
20498      new_complete="$new_path ${arguments% *}"
20499    else
20500      new_complete="$new_path"
20501    fi
20502
20503    if test "x$complete" != "x$new_complete"; then
20504      FOUND_MAKE="$new_complete"
20505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20506$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20507    fi
20508  fi
20509
20510        fi
20511      fi
20512    fi
20513  fi
20514
20515        if test "x$FOUND_MAKE" = x; then
20516          for ac_prog in make
20517do
20518  # Extract the first word of "$ac_prog", so it can be a program name with args.
20519set dummy $ac_prog; ac_word=$2
20520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20521$as_echo_n "checking for $ac_word... " >&6; }
20522if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20523  $as_echo_n "(cached) " >&6
20524else
20525  case $CHECK_TOOLSDIR_MAKE in
20526  [\\/]* | ?:[\\/]*)
20527  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20528  ;;
20529  *)
20530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20531for as_dir in $PATH
20532do
20533  IFS=$as_save_IFS
20534  test -z "$as_dir" && as_dir=.
20535    for ac_exec_ext in '' $ac_executable_extensions; do
20536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20537    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20539    break 2
20540  fi
20541done
20542  done
20543IFS=$as_save_IFS
20544
20545  ;;
20546esac
20547fi
20548CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20549if test -n "$CHECK_TOOLSDIR_MAKE"; then
20550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20551$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20552else
20553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20554$as_echo "no" >&6; }
20555fi
20556
20557
20558  test -n "$CHECK_TOOLSDIR_MAKE" && break
20559done
20560
20561
20562  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20563  DESCRIPTION="make in tools-dir"
20564
20565  # On Cygwin, we require a newer version of make than on other platforms
20566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20567    MAKE_VERSION_EXPR="-e 4\."
20568    MAKE_REQUIRED_VERSION="4.0"
20569   else
20570    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20571    MAKE_REQUIRED_VERSION="3.81"
20572  fi
20573
20574  if test "x$MAKE_CANDIDATE" != x; then
20575    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20576$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20577    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20578    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20579    if test "x$IS_GNU_MAKE" = x; then
20580      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20581$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20582    else
20583      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20584      if test "x$IS_MODERN_MAKE" = x; then
20585        { $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
20586$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;}
20587      else
20588        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20589          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20590            MAKE_EXPECTED_ENV='cygwin'
20591          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20592            MAKE_EXPECTED_ENV='msys'
20593          else
20594            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20595          fi
20596          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20597          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20598        else
20599          # Not relevant for non-Windows
20600          IS_MAKE_CORRECT_ENV=true
20601        fi
20602        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20603          { $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
20604$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;}
20605        else
20606          FOUND_MAKE=$MAKE_CANDIDATE
20607
20608  # Only process if variable expands to non-empty
20609
20610  if test "x$FOUND_MAKE" != x; then
20611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20612
20613  # First separate the path from the arguments. This will split at the first
20614  # space.
20615  complete="$FOUND_MAKE"
20616  path="${complete%% *}"
20617  tmp="$complete EOL"
20618  arguments="${tmp#* }"
20619
20620  # Input might be given as Windows format, start by converting to
20621  # unix format.
20622  new_path=`$CYGPATH -u "$path"`
20623
20624  # Now try to locate executable using which
20625  new_path=`$WHICH "$new_path" 2> /dev/null`
20626  # bat and cmd files are not always considered executable in cygwin causing which
20627  # to not find them
20628  if test "x$new_path" = x \
20629      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20630      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20631    new_path=`$CYGPATH -u "$path"`
20632  fi
20633  if test "x$new_path" = x; then
20634    # Oops. Which didn't find the executable.
20635    # The splitting of arguments from the executable at a space might have been incorrect,
20636    # since paths with space are more likely in Windows. Give it another try with the whole
20637    # argument.
20638    path="$complete"
20639    arguments="EOL"
20640    new_path=`$CYGPATH -u "$path"`
20641    new_path=`$WHICH "$new_path" 2> /dev/null`
20642    # bat and cmd files are not always considered executable in cygwin causing which
20643    # to not find them
20644    if test "x$new_path" = x \
20645        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20646        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20647      new_path=`$CYGPATH -u "$path"`
20648    fi
20649    if test "x$new_path" = x; then
20650      # It's still not found. Now this is an unrecoverable error.
20651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20652$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20653      has_space=`$ECHO "$complete" | $GREP " "`
20654      if test "x$has_space" != x; then
20655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20657      fi
20658      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20659    fi
20660  fi
20661
20662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20665  # "foo.exe" is OK but "foo" is an error.
20666  #
20667  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20668  # It is also a way to make sure we got the proper file name for the real test later on.
20669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20670  if test "x$test_shortpath" = x; then
20671    # Short path failed, file does not exist as specified.
20672    # Try adding .exe or .cmd
20673    if test -f "${new_path}.exe"; then
20674      input_to_shortpath="${new_path}.exe"
20675    elif test -f "${new_path}.cmd"; then
20676      input_to_shortpath="${new_path}.cmd"
20677    else
20678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20679$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20682      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20683    fi
20684  else
20685    input_to_shortpath="$new_path"
20686  fi
20687
20688  # Call helper function which possibly converts this using DOS-style short mode.
20689  # If so, the updated path is stored in $new_path.
20690  new_path="$input_to_shortpath"
20691
20692  input_path="$input_to_shortpath"
20693  # Check if we need to convert this using DOS-style short mode. If the path
20694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20695  # take no chances and rewrite it.
20696  # Note: m4 eats our [], so we need to use [ and ] instead.
20697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20698  if test "x$has_forbidden_chars" != x; then
20699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20703      # Going to short mode and back again did indeed matter. Since short mode is
20704      # case insensitive, let's make it lowercase to improve readability.
20705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20706      # Now convert it back to Unix-style (cygpath)
20707      input_path=`$CYGPATH -u "$shortmode_path"`
20708      new_path="$input_path"
20709    fi
20710  fi
20711
20712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20713  if test "x$test_cygdrive_prefix" = x; then
20714    # As a simple fix, exclude /usr/bin since it's not a real path.
20715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20717      # a path prefixed by /cygdrive for fixpath to work.
20718      new_path="$CYGWIN_ROOT_PATH$input_path"
20719    fi
20720  fi
20721
20722  # remove trailing .exe if any
20723  new_path="${new_path/%.exe/}"
20724
20725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20726
20727  # First separate the path from the arguments. This will split at the first
20728  # space.
20729  complete="$FOUND_MAKE"
20730  path="${complete%% *}"
20731  tmp="$complete EOL"
20732  arguments="${tmp#* }"
20733
20734  # Input might be given as Windows format, start by converting to
20735  # unix format.
20736  new_path="$path"
20737
20738  windows_path="$new_path"
20739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20740    unix_path=`$CYGPATH -u "$windows_path"`
20741    new_path="$unix_path"
20742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20744    new_path="$unix_path"
20745  fi
20746
20747
20748  # Now try to locate executable using which
20749  new_path=`$WHICH "$new_path" 2> /dev/null`
20750
20751  if test "x$new_path" = x; then
20752    # Oops. Which didn't find the executable.
20753    # The splitting of arguments from the executable at a space might have been incorrect,
20754    # since paths with space are more likely in Windows. Give it another try with the whole
20755    # argument.
20756    path="$complete"
20757    arguments="EOL"
20758    new_path="$path"
20759
20760  windows_path="$new_path"
20761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762    unix_path=`$CYGPATH -u "$windows_path"`
20763    new_path="$unix_path"
20764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20766    new_path="$unix_path"
20767  fi
20768
20769
20770    new_path=`$WHICH "$new_path" 2> /dev/null`
20771    # bat and cmd files are not always considered executable in MSYS causing which
20772    # to not find them
20773    if test "x$new_path" = x \
20774        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20775        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20776      new_path="$path"
20777
20778  windows_path="$new_path"
20779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780    unix_path=`$CYGPATH -u "$windows_path"`
20781    new_path="$unix_path"
20782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20784    new_path="$unix_path"
20785  fi
20786
20787    fi
20788
20789    if test "x$new_path" = x; then
20790      # It's still not found. Now this is an unrecoverable error.
20791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20793      has_space=`$ECHO "$complete" | $GREP " "`
20794      if test "x$has_space" != x; then
20795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20797      fi
20798      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20799    fi
20800  fi
20801
20802  # Now new_path has a complete unix path to the binary
20803  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20804    # Keep paths in /bin as-is, but remove trailing .exe if any
20805    new_path="${new_path/%.exe/}"
20806    # Do not save /bin paths to all_fixpath_prefixes!
20807  else
20808    # Not in mixed or Windows style, start by that.
20809    new_path=`cmd //c echo $new_path`
20810
20811  input_path="$new_path"
20812  # Check if we need to convert this using DOS-style short mode. If the path
20813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20814  # take no chances and rewrite it.
20815  # Note: m4 eats our [], so we need to use [ and ] instead.
20816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20817  if test "x$has_forbidden_chars" != x; then
20818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20820  fi
20821
20822    # Output is in $new_path
20823
20824  windows_path="$new_path"
20825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826    unix_path=`$CYGPATH -u "$windows_path"`
20827    new_path="$unix_path"
20828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20830    new_path="$unix_path"
20831  fi
20832
20833    # remove trailing .exe if any
20834    new_path="${new_path/%.exe/}"
20835
20836    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20837    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20838  fi
20839
20840    else
20841      # We're on a unix platform. Hooray! :)
20842      # First separate the path from the arguments. This will split at the first
20843      # space.
20844      complete="$FOUND_MAKE"
20845      path="${complete%% *}"
20846      tmp="$complete EOL"
20847      arguments="${tmp#* }"
20848
20849      # Cannot rely on the command "which" here since it doesn't always work.
20850      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20851      if test -z "$is_absolute_path"; then
20852        # Path to executable is not absolute. Find it.
20853        IFS_save="$IFS"
20854        IFS=:
20855        for p in $PATH; do
20856          if test -f "$p/$path" && test -x "$p/$path"; then
20857            new_path="$p/$path"
20858            break
20859          fi
20860        done
20861        IFS="$IFS_save"
20862      else
20863        # This is an absolute path, we can use it without further modifications.
20864        new_path="$path"
20865      fi
20866
20867      if test "x$new_path" = x; then
20868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20870        has_space=`$ECHO "$complete" | $GREP " "`
20871        if test "x$has_space" != x; then
20872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20874        fi
20875        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20876      fi
20877    fi
20878
20879    # Now join together the path and the arguments once again
20880    if test "x$arguments" != xEOL; then
20881      new_complete="$new_path ${arguments% *}"
20882    else
20883      new_complete="$new_path"
20884    fi
20885
20886    if test "x$complete" != "x$new_complete"; then
20887      FOUND_MAKE="$new_complete"
20888      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20889$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20890    fi
20891  fi
20892
20893        fi
20894      fi
20895    fi
20896  fi
20897
20898        fi
20899        PATH=$OLD_PATH
20900      fi
20901    fi
20902
20903    if test "x$FOUND_MAKE" = x; then
20904      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
20905    fi
20906
20907    else
20908      # If it succeeded, then it was overridden by the user. We will use it
20909      # for the tool.
20910
20911      # First remove it from the list of overridden variables, so we can test
20912      # for unknown variables in the end.
20913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20914
20915      # Check if we try to supply an empty value
20916      if test "x$MAKE" = x; then
20917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20918$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20920$as_echo_n "checking for MAKE... " >&6; }
20921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20922$as_echo "disabled" >&6; }
20923      else
20924        # Check if the provided tool contains a complete path.
20925        tool_specified="$MAKE"
20926        tool_basename="${tool_specified##*/}"
20927        if test "x$tool_basename" = "x$tool_specified"; then
20928          # A command without a complete path is provided, search $PATH.
20929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20930$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20931          # Extract the first word of "$tool_basename", so it can be a program name with args.
20932set dummy $tool_basename; ac_word=$2
20933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20934$as_echo_n "checking for $ac_word... " >&6; }
20935if ${ac_cv_path_MAKE+:} false; then :
20936  $as_echo_n "(cached) " >&6
20937else
20938  case $MAKE in
20939  [\\/]* | ?:[\\/]*)
20940  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20941  ;;
20942  *)
20943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20944for as_dir in $PATH
20945do
20946  IFS=$as_save_IFS
20947  test -z "$as_dir" && as_dir=.
20948    for ac_exec_ext in '' $ac_executable_extensions; do
20949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20950    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20952    break 2
20953  fi
20954done
20955  done
20956IFS=$as_save_IFS
20957
20958  ;;
20959esac
20960fi
20961MAKE=$ac_cv_path_MAKE
20962if test -n "$MAKE"; then
20963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20964$as_echo "$MAKE" >&6; }
20965else
20966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20967$as_echo "no" >&6; }
20968fi
20969
20970
20971          if test "x$MAKE" = x; then
20972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20973          fi
20974        else
20975          # Otherwise we believe it is a complete path. Use it as it is.
20976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20977$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20979$as_echo_n "checking for MAKE... " >&6; }
20980          if test ! -x "$tool_specified"; then
20981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20982$as_echo "not found" >&6; }
20983            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20984          fi
20985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20986$as_echo "$tool_specified" >&6; }
20987        fi
20988      fi
20989    fi
20990
20991    # If MAKE was set by user, verify the version
20992
20993  MAKE_CANDIDATE=""$MAKE""
20994  DESCRIPTION="user supplied MAKE=$MAKE"
20995
20996  # On Cygwin, we require a newer version of make than on other platforms
20997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998    MAKE_VERSION_EXPR="-e 4\."
20999    MAKE_REQUIRED_VERSION="4.0"
21000   else
21001    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21002    MAKE_REQUIRED_VERSION="3.81"
21003  fi
21004
21005  if test "x$MAKE_CANDIDATE" != x; then
21006    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21007$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21008    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21009    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21010    if test "x$IS_GNU_MAKE" = x; then
21011      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21012$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21013    else
21014      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21015      if test "x$IS_MODERN_MAKE" = x; then
21016        { $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
21017$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;}
21018      else
21019        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21020          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21021            MAKE_EXPECTED_ENV='cygwin'
21022          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21023            MAKE_EXPECTED_ENV='msys'
21024          else
21025            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21026          fi
21027          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21028          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21029        else
21030          # Not relevant for non-Windows
21031          IS_MAKE_CORRECT_ENV=true
21032        fi
21033        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21034          { $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
21035$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;}
21036        else
21037          FOUND_MAKE=$MAKE_CANDIDATE
21038
21039  # Only process if variable expands to non-empty
21040
21041  if test "x$FOUND_MAKE" != x; then
21042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21043
21044  # First separate the path from the arguments. This will split at the first
21045  # space.
21046  complete="$FOUND_MAKE"
21047  path="${complete%% *}"
21048  tmp="$complete EOL"
21049  arguments="${tmp#* }"
21050
21051  # Input might be given as Windows format, start by converting to
21052  # unix format.
21053  new_path=`$CYGPATH -u "$path"`
21054
21055  # Now try to locate executable using which
21056  new_path=`$WHICH "$new_path" 2> /dev/null`
21057  # bat and cmd files are not always considered executable in cygwin causing which
21058  # to not find them
21059  if test "x$new_path" = x \
21060      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21061      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21062    new_path=`$CYGPATH -u "$path"`
21063  fi
21064  if test "x$new_path" = x; then
21065    # Oops. Which didn't find the executable.
21066    # The splitting of arguments from the executable at a space might have been incorrect,
21067    # since paths with space are more likely in Windows. Give it another try with the whole
21068    # argument.
21069    path="$complete"
21070    arguments="EOL"
21071    new_path=`$CYGPATH -u "$path"`
21072    new_path=`$WHICH "$new_path" 2> /dev/null`
21073    # bat and cmd files are not always considered executable in cygwin causing which
21074    # to not find them
21075    if test "x$new_path" = x \
21076        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21077        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21078      new_path=`$CYGPATH -u "$path"`
21079    fi
21080    if test "x$new_path" = x; then
21081      # It's still not found. Now this is an unrecoverable error.
21082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21084      has_space=`$ECHO "$complete" | $GREP " "`
21085      if test "x$has_space" != x; then
21086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21088      fi
21089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21090    fi
21091  fi
21092
21093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21096  # "foo.exe" is OK but "foo" is an error.
21097  #
21098  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21099  # It is also a way to make sure we got the proper file name for the real test later on.
21100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21101  if test "x$test_shortpath" = x; then
21102    # Short path failed, file does not exist as specified.
21103    # Try adding .exe or .cmd
21104    if test -f "${new_path}.exe"; then
21105      input_to_shortpath="${new_path}.exe"
21106    elif test -f "${new_path}.cmd"; then
21107      input_to_shortpath="${new_path}.cmd"
21108    else
21109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21110$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21113      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21114    fi
21115  else
21116    input_to_shortpath="$new_path"
21117  fi
21118
21119  # Call helper function which possibly converts this using DOS-style short mode.
21120  # If so, the updated path is stored in $new_path.
21121  new_path="$input_to_shortpath"
21122
21123  input_path="$input_to_shortpath"
21124  # Check if we need to convert this using DOS-style short mode. If the path
21125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21126  # take no chances and rewrite it.
21127  # Note: m4 eats our [], so we need to use [ and ] instead.
21128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21129  if test "x$has_forbidden_chars" != x; then
21130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21134      # Going to short mode and back again did indeed matter. Since short mode is
21135      # case insensitive, let's make it lowercase to improve readability.
21136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21137      # Now convert it back to Unix-style (cygpath)
21138      input_path=`$CYGPATH -u "$shortmode_path"`
21139      new_path="$input_path"
21140    fi
21141  fi
21142
21143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21144  if test "x$test_cygdrive_prefix" = x; then
21145    # As a simple fix, exclude /usr/bin since it's not a real path.
21146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21148      # a path prefixed by /cygdrive for fixpath to work.
21149      new_path="$CYGWIN_ROOT_PATH$input_path"
21150    fi
21151  fi
21152
21153  # remove trailing .exe if any
21154  new_path="${new_path/%.exe/}"
21155
21156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21157
21158  # First separate the path from the arguments. This will split at the first
21159  # space.
21160  complete="$FOUND_MAKE"
21161  path="${complete%% *}"
21162  tmp="$complete EOL"
21163  arguments="${tmp#* }"
21164
21165  # Input might be given as Windows format, start by converting to
21166  # unix format.
21167  new_path="$path"
21168
21169  windows_path="$new_path"
21170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21171    unix_path=`$CYGPATH -u "$windows_path"`
21172    new_path="$unix_path"
21173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21175    new_path="$unix_path"
21176  fi
21177
21178
21179  # Now try to locate executable using which
21180  new_path=`$WHICH "$new_path" 2> /dev/null`
21181
21182  if test "x$new_path" = x; then
21183    # Oops. Which didn't find the executable.
21184    # The splitting of arguments from the executable at a space might have been incorrect,
21185    # since paths with space are more likely in Windows. Give it another try with the whole
21186    # argument.
21187    path="$complete"
21188    arguments="EOL"
21189    new_path="$path"
21190
21191  windows_path="$new_path"
21192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21193    unix_path=`$CYGPATH -u "$windows_path"`
21194    new_path="$unix_path"
21195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21197    new_path="$unix_path"
21198  fi
21199
21200
21201    new_path=`$WHICH "$new_path" 2> /dev/null`
21202    # bat and cmd files are not always considered executable in MSYS causing which
21203    # to not find them
21204    if test "x$new_path" = x \
21205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21207      new_path="$path"
21208
21209  windows_path="$new_path"
21210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21211    unix_path=`$CYGPATH -u "$windows_path"`
21212    new_path="$unix_path"
21213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21215    new_path="$unix_path"
21216  fi
21217
21218    fi
21219
21220    if test "x$new_path" = x; then
21221      # It's still not found. Now this is an unrecoverable error.
21222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21224      has_space=`$ECHO "$complete" | $GREP " "`
21225      if test "x$has_space" != x; then
21226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21228      fi
21229      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21230    fi
21231  fi
21232
21233  # Now new_path has a complete unix path to the binary
21234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21235    # Keep paths in /bin as-is, but remove trailing .exe if any
21236    new_path="${new_path/%.exe/}"
21237    # Do not save /bin paths to all_fixpath_prefixes!
21238  else
21239    # Not in mixed or Windows style, start by that.
21240    new_path=`cmd //c echo $new_path`
21241
21242  input_path="$new_path"
21243  # Check if we need to convert this using DOS-style short mode. If the path
21244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21245  # take no chances and rewrite it.
21246  # Note: m4 eats our [], so we need to use [ and ] instead.
21247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21248  if test "x$has_forbidden_chars" != x; then
21249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21251  fi
21252
21253    # Output is in $new_path
21254
21255  windows_path="$new_path"
21256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21257    unix_path=`$CYGPATH -u "$windows_path"`
21258    new_path="$unix_path"
21259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21261    new_path="$unix_path"
21262  fi
21263
21264    # remove trailing .exe if any
21265    new_path="${new_path/%.exe/}"
21266
21267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21269  fi
21270
21271    else
21272      # We're on a unix platform. Hooray! :)
21273      # First separate the path from the arguments. This will split at the first
21274      # space.
21275      complete="$FOUND_MAKE"
21276      path="${complete%% *}"
21277      tmp="$complete EOL"
21278      arguments="${tmp#* }"
21279
21280      # Cannot rely on the command "which" here since it doesn't always work.
21281      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21282      if test -z "$is_absolute_path"; then
21283        # Path to executable is not absolute. Find it.
21284        IFS_save="$IFS"
21285        IFS=:
21286        for p in $PATH; do
21287          if test -f "$p/$path" && test -x "$p/$path"; then
21288            new_path="$p/$path"
21289            break
21290          fi
21291        done
21292        IFS="$IFS_save"
21293      else
21294        # This is an absolute path, we can use it without further modifications.
21295        new_path="$path"
21296      fi
21297
21298      if test "x$new_path" = x; then
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21300$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21301        has_space=`$ECHO "$complete" | $GREP " "`
21302        if test "x$has_space" != x; then
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21304$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21305        fi
21306        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21307      fi
21308    fi
21309
21310    # Now join together the path and the arguments once again
21311    if test "x$arguments" != xEOL; then
21312      new_complete="$new_path ${arguments% *}"
21313    else
21314      new_complete="$new_path"
21315    fi
21316
21317    if test "x$complete" != "x$new_complete"; then
21318      FOUND_MAKE="$new_complete"
21319      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21320$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21321    fi
21322  fi
21323
21324        fi
21325      fi
21326    fi
21327  fi
21328
21329    if test "x$FOUND_MAKE" = x; then
21330      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21331    fi
21332
21333  fi
21334
21335
21336  MAKE=$FOUND_MAKE
21337
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21339$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21340
21341
21342  # Check if make supports the output sync option and if so, setup using it.
21343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21344$as_echo_n "checking if make --output-sync is supported... " >&6; }
21345  if $MAKE --version -O > /dev/null 2>&1; then
21346    OUTPUT_SYNC_SUPPORTED=true
21347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21348$as_echo "yes" >&6; }
21349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21350$as_echo_n "checking for output-sync value... " >&6; }
21351
21352# Check whether --with-output-sync was given.
21353if test "${with_output_sync+set}" = set; then :
21354  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21355fi
21356
21357    if test "x$OUTPUT_SYNC" = "x"; then
21358      OUTPUT_SYNC=none
21359    fi
21360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21361$as_echo "$OUTPUT_SYNC" >&6; }
21362    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21363      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21364    fi
21365  else
21366    OUTPUT_SYNC_SUPPORTED=false
21367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21368$as_echo "no" >&6; }
21369  fi
21370
21371
21372
21373
21374
21375
21376  # Test if find supports -delete
21377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21378$as_echo_n "checking if find supports -delete... " >&6; }
21379  FIND_DELETE="-delete"
21380
21381  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21382
21383  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21384
21385  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21386  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21387    # No, it does not.
21388    $RM $DELETEDIR/TestIfFindSupportsDelete
21389    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21390      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21391      FIND_DELETE="-print | $XARGS $RM"
21392    else
21393      FIND_DELETE="-exec $RM \{\} \+"
21394    fi
21395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21396$as_echo "no" >&6; }
21397  else
21398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21399$as_echo "yes" >&6; }
21400  fi
21401  $RMDIR $DELETEDIR
21402
21403
21404
21405  # Test which kind of tar was found
21406  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21407    TAR_TYPE="gnu"
21408  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21409    TAR_TYPE="bsd"
21410  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21411    TAR_TYPE="bsd"
21412  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21413    TAR_TYPE="solaris"
21414  fi
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21416$as_echo_n "checking what type of tar was found... " >&6; }
21417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21418$as_echo "$TAR_TYPE" >&6; }
21419
21420  TAR_CREATE_FILE_PARAM=""
21421
21422  if test "x$TAR_TYPE" = "xgnu"; then
21423    TAR_INCLUDE_PARAM="T"
21424    TAR_SUPPORTS_TRANSFORM="true"
21425    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21426      # When using gnu tar for Solaris targets, need to use compatibility mode
21427      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21428    fi
21429  else
21430    TAR_INCLUDE_PARAM="I"
21431    TAR_SUPPORTS_TRANSFORM="false"
21432  fi
21433
21434
21435
21436
21437
21438
21439  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21440  # This is a problem for the grep resident on AIX.
21441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21442$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21443  # Multiple subsequent spaces..
21444  STACK_SPACES='aaa   bbb   ccc'
21445  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21446  # patterns in it.
21447  STACK_LIST=${STACK_SPACES// /$'\n'}
21448  NEEDLE_SPACES='ccc bbb aaa'
21449  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21450  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21451  if test "x$RESULT" == "x"; then
21452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21453$as_echo "yes" >&6; }
21454  else
21455    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21456      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21457    fi
21458    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21459  fi
21460
21461
21462  # These tools might not be installed by default,
21463  # need hint on how to install them.
21464
21465
21466
21467  # Publish this variable in the help.
21468
21469
21470  if [ -z "${UNZIP+x}" ]; then
21471    # The variable is not set by user, try to locate tool using the code snippet
21472    for ac_prog in unzip
21473do
21474  # Extract the first word of "$ac_prog", so it can be a program name with args.
21475set dummy $ac_prog; ac_word=$2
21476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21477$as_echo_n "checking for $ac_word... " >&6; }
21478if ${ac_cv_path_UNZIP+:} false; then :
21479  $as_echo_n "(cached) " >&6
21480else
21481  case $UNZIP in
21482  [\\/]* | ?:[\\/]*)
21483  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21484  ;;
21485  *)
21486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21487for as_dir in $PATH
21488do
21489  IFS=$as_save_IFS
21490  test -z "$as_dir" && as_dir=.
21491    for ac_exec_ext in '' $ac_executable_extensions; do
21492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21493    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21495    break 2
21496  fi
21497done
21498  done
21499IFS=$as_save_IFS
21500
21501  ;;
21502esac
21503fi
21504UNZIP=$ac_cv_path_UNZIP
21505if test -n "$UNZIP"; then
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21507$as_echo "$UNZIP" >&6; }
21508else
21509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21510$as_echo "no" >&6; }
21511fi
21512
21513
21514  test -n "$UNZIP" && break
21515done
21516
21517  else
21518    # The variable is set, but is it from the command line or the environment?
21519
21520    # Try to remove the string !UNZIP! from our list.
21521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21523      # If it failed, the variable was not from the command line. Ignore it,
21524      # but warn the user (except for BASH, which is always set by the calling BASH).
21525      if test "xUNZIP" != xBASH; then
21526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21527$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21528      fi
21529      # Try to locate tool using the code snippet
21530      for ac_prog in unzip
21531do
21532  # Extract the first word of "$ac_prog", so it can be a program name with args.
21533set dummy $ac_prog; ac_word=$2
21534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21535$as_echo_n "checking for $ac_word... " >&6; }
21536if ${ac_cv_path_UNZIP+:} false; then :
21537  $as_echo_n "(cached) " >&6
21538else
21539  case $UNZIP in
21540  [\\/]* | ?:[\\/]*)
21541  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21542  ;;
21543  *)
21544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21545for as_dir in $PATH
21546do
21547  IFS=$as_save_IFS
21548  test -z "$as_dir" && as_dir=.
21549    for ac_exec_ext in '' $ac_executable_extensions; do
21550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21551    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21553    break 2
21554  fi
21555done
21556  done
21557IFS=$as_save_IFS
21558
21559  ;;
21560esac
21561fi
21562UNZIP=$ac_cv_path_UNZIP
21563if test -n "$UNZIP"; then
21564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21565$as_echo "$UNZIP" >&6; }
21566else
21567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21568$as_echo "no" >&6; }
21569fi
21570
21571
21572  test -n "$UNZIP" && break
21573done
21574
21575    else
21576      # If it succeeded, then it was overridden by the user. We will use it
21577      # for the tool.
21578
21579      # First remove it from the list of overridden variables, so we can test
21580      # for unknown variables in the end.
21581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21582
21583      # Check if we try to supply an empty value
21584      if test "x$UNZIP" = x; then
21585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21586$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21588$as_echo_n "checking for UNZIP... " >&6; }
21589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21590$as_echo "disabled" >&6; }
21591      else
21592        # Check if the provided tool contains a complete path.
21593        tool_specified="$UNZIP"
21594        tool_basename="${tool_specified##*/}"
21595        if test "x$tool_basename" = "x$tool_specified"; then
21596          # A command without a complete path is provided, search $PATH.
21597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21598$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21599          # Extract the first word of "$tool_basename", so it can be a program name with args.
21600set dummy $tool_basename; ac_word=$2
21601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21602$as_echo_n "checking for $ac_word... " >&6; }
21603if ${ac_cv_path_UNZIP+:} false; then :
21604  $as_echo_n "(cached) " >&6
21605else
21606  case $UNZIP in
21607  [\\/]* | ?:[\\/]*)
21608  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21609  ;;
21610  *)
21611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21612for as_dir in $PATH
21613do
21614  IFS=$as_save_IFS
21615  test -z "$as_dir" && as_dir=.
21616    for ac_exec_ext in '' $ac_executable_extensions; do
21617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21618    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21620    break 2
21621  fi
21622done
21623  done
21624IFS=$as_save_IFS
21625
21626  ;;
21627esac
21628fi
21629UNZIP=$ac_cv_path_UNZIP
21630if test -n "$UNZIP"; then
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21632$as_echo "$UNZIP" >&6; }
21633else
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21635$as_echo "no" >&6; }
21636fi
21637
21638
21639          if test "x$UNZIP" = x; then
21640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21641          fi
21642        else
21643          # Otherwise we believe it is a complete path. Use it as it is.
21644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21645$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21647$as_echo_n "checking for UNZIP... " >&6; }
21648          if test ! -x "$tool_specified"; then
21649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21650$as_echo "not found" >&6; }
21651            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21652          fi
21653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21654$as_echo "$tool_specified" >&6; }
21655        fi
21656      fi
21657    fi
21658
21659  fi
21660
21661
21662
21663  if test "x$UNZIP" = x; then
21664    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21665  fi
21666
21667
21668  # Since zip uses "ZIP" as a environment variable for passing options, we need
21669  # to name our variable differently, hence ZIPEXE.
21670
21671
21672
21673  # Publish this variable in the help.
21674
21675
21676  if [ -z "${ZIPEXE+x}" ]; then
21677    # The variable is not set by user, try to locate tool using the code snippet
21678    for ac_prog in zip
21679do
21680  # Extract the first word of "$ac_prog", so it can be a program name with args.
21681set dummy $ac_prog; ac_word=$2
21682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21683$as_echo_n "checking for $ac_word... " >&6; }
21684if ${ac_cv_path_ZIPEXE+:} false; then :
21685  $as_echo_n "(cached) " >&6
21686else
21687  case $ZIPEXE in
21688  [\\/]* | ?:[\\/]*)
21689  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21690  ;;
21691  *)
21692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21693for as_dir in $PATH
21694do
21695  IFS=$as_save_IFS
21696  test -z "$as_dir" && as_dir=.
21697    for ac_exec_ext in '' $ac_executable_extensions; do
21698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21699    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21701    break 2
21702  fi
21703done
21704  done
21705IFS=$as_save_IFS
21706
21707  ;;
21708esac
21709fi
21710ZIPEXE=$ac_cv_path_ZIPEXE
21711if test -n "$ZIPEXE"; then
21712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21713$as_echo "$ZIPEXE" >&6; }
21714else
21715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21716$as_echo "no" >&6; }
21717fi
21718
21719
21720  test -n "$ZIPEXE" && break
21721done
21722
21723  else
21724    # The variable is set, but is it from the command line or the environment?
21725
21726    # Try to remove the string !ZIPEXE! from our list.
21727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21729      # If it failed, the variable was not from the command line. Ignore it,
21730      # but warn the user (except for BASH, which is always set by the calling BASH).
21731      if test "xZIPEXE" != xBASH; then
21732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21733$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21734      fi
21735      # Try to locate tool using the code snippet
21736      for ac_prog in zip
21737do
21738  # Extract the first word of "$ac_prog", so it can be a program name with args.
21739set dummy $ac_prog; ac_word=$2
21740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21741$as_echo_n "checking for $ac_word... " >&6; }
21742if ${ac_cv_path_ZIPEXE+:} false; then :
21743  $as_echo_n "(cached) " >&6
21744else
21745  case $ZIPEXE in
21746  [\\/]* | ?:[\\/]*)
21747  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21748  ;;
21749  *)
21750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21751for as_dir in $PATH
21752do
21753  IFS=$as_save_IFS
21754  test -z "$as_dir" && as_dir=.
21755    for ac_exec_ext in '' $ac_executable_extensions; do
21756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21757    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21759    break 2
21760  fi
21761done
21762  done
21763IFS=$as_save_IFS
21764
21765  ;;
21766esac
21767fi
21768ZIPEXE=$ac_cv_path_ZIPEXE
21769if test -n "$ZIPEXE"; then
21770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21771$as_echo "$ZIPEXE" >&6; }
21772else
21773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21774$as_echo "no" >&6; }
21775fi
21776
21777
21778  test -n "$ZIPEXE" && break
21779done
21780
21781    else
21782      # If it succeeded, then it was overridden by the user. We will use it
21783      # for the tool.
21784
21785      # First remove it from the list of overridden variables, so we can test
21786      # for unknown variables in the end.
21787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21788
21789      # Check if we try to supply an empty value
21790      if test "x$ZIPEXE" = x; then
21791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21792$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21794$as_echo_n "checking for ZIPEXE... " >&6; }
21795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21796$as_echo "disabled" >&6; }
21797      else
21798        # Check if the provided tool contains a complete path.
21799        tool_specified="$ZIPEXE"
21800        tool_basename="${tool_specified##*/}"
21801        if test "x$tool_basename" = "x$tool_specified"; then
21802          # A command without a complete path is provided, search $PATH.
21803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21804$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21805          # Extract the first word of "$tool_basename", so it can be a program name with args.
21806set dummy $tool_basename; ac_word=$2
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808$as_echo_n "checking for $ac_word... " >&6; }
21809if ${ac_cv_path_ZIPEXE+:} false; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  case $ZIPEXE in
21813  [\\/]* | ?:[\\/]*)
21814  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21815  ;;
21816  *)
21817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818for as_dir in $PATH
21819do
21820  IFS=$as_save_IFS
21821  test -z "$as_dir" && as_dir=.
21822    for ac_exec_ext in '' $ac_executable_extensions; do
21823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21824    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826    break 2
21827  fi
21828done
21829  done
21830IFS=$as_save_IFS
21831
21832  ;;
21833esac
21834fi
21835ZIPEXE=$ac_cv_path_ZIPEXE
21836if test -n "$ZIPEXE"; then
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21838$as_echo "$ZIPEXE" >&6; }
21839else
21840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21841$as_echo "no" >&6; }
21842fi
21843
21844
21845          if test "x$ZIPEXE" = x; then
21846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21847          fi
21848        else
21849          # Otherwise we believe it is a complete path. Use it as it is.
21850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21851$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21853$as_echo_n "checking for ZIPEXE... " >&6; }
21854          if test ! -x "$tool_specified"; then
21855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21856$as_echo "not found" >&6; }
21857            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21858          fi
21859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21860$as_echo "$tool_specified" >&6; }
21861        fi
21862      fi
21863    fi
21864
21865  fi
21866
21867
21868
21869  if test "x$ZIPEXE" = x; then
21870    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21871  fi
21872
21873
21874
21875  # Non-required basic tools
21876
21877
21878
21879  # Publish this variable in the help.
21880
21881
21882  if [ -z "${LDD+x}" ]; then
21883    # The variable is not set by user, try to locate tool using the code snippet
21884    for ac_prog in ldd
21885do
21886  # Extract the first word of "$ac_prog", so it can be a program name with args.
21887set dummy $ac_prog; ac_word=$2
21888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21889$as_echo_n "checking for $ac_word... " >&6; }
21890if ${ac_cv_path_LDD+:} false; then :
21891  $as_echo_n "(cached) " >&6
21892else
21893  case $LDD in
21894  [\\/]* | ?:[\\/]*)
21895  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21896  ;;
21897  *)
21898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21899for as_dir in $PATH
21900do
21901  IFS=$as_save_IFS
21902  test -z "$as_dir" && as_dir=.
21903    for ac_exec_ext in '' $ac_executable_extensions; do
21904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21905    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21907    break 2
21908  fi
21909done
21910  done
21911IFS=$as_save_IFS
21912
21913  ;;
21914esac
21915fi
21916LDD=$ac_cv_path_LDD
21917if test -n "$LDD"; then
21918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21919$as_echo "$LDD" >&6; }
21920else
21921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21922$as_echo "no" >&6; }
21923fi
21924
21925
21926  test -n "$LDD" && break
21927done
21928
21929  else
21930    # The variable is set, but is it from the command line or the environment?
21931
21932    # Try to remove the string !LDD! from our list.
21933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21935      # If it failed, the variable was not from the command line. Ignore it,
21936      # but warn the user (except for BASH, which is always set by the calling BASH).
21937      if test "xLDD" != xBASH; then
21938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21939$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21940      fi
21941      # Try to locate tool using the code snippet
21942      for ac_prog in ldd
21943do
21944  # Extract the first word of "$ac_prog", so it can be a program name with args.
21945set dummy $ac_prog; ac_word=$2
21946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21947$as_echo_n "checking for $ac_word... " >&6; }
21948if ${ac_cv_path_LDD+:} false; then :
21949  $as_echo_n "(cached) " >&6
21950else
21951  case $LDD in
21952  [\\/]* | ?:[\\/]*)
21953  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21954  ;;
21955  *)
21956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21957for as_dir in $PATH
21958do
21959  IFS=$as_save_IFS
21960  test -z "$as_dir" && as_dir=.
21961    for ac_exec_ext in '' $ac_executable_extensions; do
21962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21963    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21965    break 2
21966  fi
21967done
21968  done
21969IFS=$as_save_IFS
21970
21971  ;;
21972esac
21973fi
21974LDD=$ac_cv_path_LDD
21975if test -n "$LDD"; then
21976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21977$as_echo "$LDD" >&6; }
21978else
21979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21980$as_echo "no" >&6; }
21981fi
21982
21983
21984  test -n "$LDD" && break
21985done
21986
21987    else
21988      # If it succeeded, then it was overridden by the user. We will use it
21989      # for the tool.
21990
21991      # First remove it from the list of overridden variables, so we can test
21992      # for unknown variables in the end.
21993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21994
21995      # Check if we try to supply an empty value
21996      if test "x$LDD" = x; then
21997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21998$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22000$as_echo_n "checking for LDD... " >&6; }
22001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22002$as_echo "disabled" >&6; }
22003      else
22004        # Check if the provided tool contains a complete path.
22005        tool_specified="$LDD"
22006        tool_basename="${tool_specified##*/}"
22007        if test "x$tool_basename" = "x$tool_specified"; then
22008          # A command without a complete path is provided, search $PATH.
22009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22010$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22011          # Extract the first word of "$tool_basename", so it can be a program name with args.
22012set dummy $tool_basename; ac_word=$2
22013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22014$as_echo_n "checking for $ac_word... " >&6; }
22015if ${ac_cv_path_LDD+:} false; then :
22016  $as_echo_n "(cached) " >&6
22017else
22018  case $LDD in
22019  [\\/]* | ?:[\\/]*)
22020  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22021  ;;
22022  *)
22023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22024for as_dir in $PATH
22025do
22026  IFS=$as_save_IFS
22027  test -z "$as_dir" && as_dir=.
22028    for ac_exec_ext in '' $ac_executable_extensions; do
22029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22030    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22032    break 2
22033  fi
22034done
22035  done
22036IFS=$as_save_IFS
22037
22038  ;;
22039esac
22040fi
22041LDD=$ac_cv_path_LDD
22042if test -n "$LDD"; then
22043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22044$as_echo "$LDD" >&6; }
22045else
22046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047$as_echo "no" >&6; }
22048fi
22049
22050
22051          if test "x$LDD" = x; then
22052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22053          fi
22054        else
22055          # Otherwise we believe it is a complete path. Use it as it is.
22056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22057$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22059$as_echo_n "checking for LDD... " >&6; }
22060          if test ! -x "$tool_specified"; then
22061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22062$as_echo "not found" >&6; }
22063            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22064          fi
22065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22066$as_echo "$tool_specified" >&6; }
22067        fi
22068      fi
22069    fi
22070
22071  fi
22072
22073
22074  if test "x$LDD" = "x"; then
22075    # List shared lib dependencies is used for
22076    # debug output and checking for forbidden dependencies.
22077    # We can build without it.
22078    LDD="true"
22079  fi
22080
22081
22082  # Publish this variable in the help.
22083
22084
22085  if [ -z "${OTOOL+x}" ]; then
22086    # The variable is not set by user, try to locate tool using the code snippet
22087    for ac_prog in otool
22088do
22089  # Extract the first word of "$ac_prog", so it can be a program name with args.
22090set dummy $ac_prog; ac_word=$2
22091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22092$as_echo_n "checking for $ac_word... " >&6; }
22093if ${ac_cv_path_OTOOL+:} false; then :
22094  $as_echo_n "(cached) " >&6
22095else
22096  case $OTOOL in
22097  [\\/]* | ?:[\\/]*)
22098  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22099  ;;
22100  *)
22101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22102for as_dir in $PATH
22103do
22104  IFS=$as_save_IFS
22105  test -z "$as_dir" && as_dir=.
22106    for ac_exec_ext in '' $ac_executable_extensions; do
22107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22108    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22110    break 2
22111  fi
22112done
22113  done
22114IFS=$as_save_IFS
22115
22116  ;;
22117esac
22118fi
22119OTOOL=$ac_cv_path_OTOOL
22120if test -n "$OTOOL"; then
22121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22122$as_echo "$OTOOL" >&6; }
22123else
22124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22125$as_echo "no" >&6; }
22126fi
22127
22128
22129  test -n "$OTOOL" && break
22130done
22131
22132  else
22133    # The variable is set, but is it from the command line or the environment?
22134
22135    # Try to remove the string !OTOOL! from our list.
22136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22138      # If it failed, the variable was not from the command line. Ignore it,
22139      # but warn the user (except for BASH, which is always set by the calling BASH).
22140      if test "xOTOOL" != xBASH; then
22141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22142$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22143      fi
22144      # Try to locate tool using the code snippet
22145      for ac_prog in otool
22146do
22147  # Extract the first word of "$ac_prog", so it can be a program name with args.
22148set dummy $ac_prog; ac_word=$2
22149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22150$as_echo_n "checking for $ac_word... " >&6; }
22151if ${ac_cv_path_OTOOL+:} false; then :
22152  $as_echo_n "(cached) " >&6
22153else
22154  case $OTOOL in
22155  [\\/]* | ?:[\\/]*)
22156  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22157  ;;
22158  *)
22159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22160for as_dir in $PATH
22161do
22162  IFS=$as_save_IFS
22163  test -z "$as_dir" && as_dir=.
22164    for ac_exec_ext in '' $ac_executable_extensions; do
22165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22166    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22168    break 2
22169  fi
22170done
22171  done
22172IFS=$as_save_IFS
22173
22174  ;;
22175esac
22176fi
22177OTOOL=$ac_cv_path_OTOOL
22178if test -n "$OTOOL"; then
22179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22180$as_echo "$OTOOL" >&6; }
22181else
22182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22183$as_echo "no" >&6; }
22184fi
22185
22186
22187  test -n "$OTOOL" && break
22188done
22189
22190    else
22191      # If it succeeded, then it was overridden by the user. We will use it
22192      # for the tool.
22193
22194      # First remove it from the list of overridden variables, so we can test
22195      # for unknown variables in the end.
22196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22197
22198      # Check if we try to supply an empty value
22199      if test "x$OTOOL" = x; then
22200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22201$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22203$as_echo_n "checking for OTOOL... " >&6; }
22204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22205$as_echo "disabled" >&6; }
22206      else
22207        # Check if the provided tool contains a complete path.
22208        tool_specified="$OTOOL"
22209        tool_basename="${tool_specified##*/}"
22210        if test "x$tool_basename" = "x$tool_specified"; then
22211          # A command without a complete path is provided, search $PATH.
22212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22213$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22214          # Extract the first word of "$tool_basename", so it can be a program name with args.
22215set dummy $tool_basename; ac_word=$2
22216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22217$as_echo_n "checking for $ac_word... " >&6; }
22218if ${ac_cv_path_OTOOL+:} false; then :
22219  $as_echo_n "(cached) " >&6
22220else
22221  case $OTOOL in
22222  [\\/]* | ?:[\\/]*)
22223  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22224  ;;
22225  *)
22226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22227for as_dir in $PATH
22228do
22229  IFS=$as_save_IFS
22230  test -z "$as_dir" && as_dir=.
22231    for ac_exec_ext in '' $ac_executable_extensions; do
22232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22233    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22235    break 2
22236  fi
22237done
22238  done
22239IFS=$as_save_IFS
22240
22241  ;;
22242esac
22243fi
22244OTOOL=$ac_cv_path_OTOOL
22245if test -n "$OTOOL"; then
22246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22247$as_echo "$OTOOL" >&6; }
22248else
22249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22250$as_echo "no" >&6; }
22251fi
22252
22253
22254          if test "x$OTOOL" = x; then
22255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22256          fi
22257        else
22258          # Otherwise we believe it is a complete path. Use it as it is.
22259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22260$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22262$as_echo_n "checking for OTOOL... " >&6; }
22263          if test ! -x "$tool_specified"; then
22264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22265$as_echo "not found" >&6; }
22266            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22267          fi
22268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22269$as_echo "$tool_specified" >&6; }
22270        fi
22271      fi
22272    fi
22273
22274  fi
22275
22276
22277  if test "x$OTOOL" = "x"; then
22278    OTOOL="true"
22279  fi
22280
22281
22282  # Publish this variable in the help.
22283
22284
22285  if [ -z "${READELF+x}" ]; then
22286    # The variable is not set by user, try to locate tool using the code snippet
22287    for ac_prog in greadelf readelf
22288do
22289  # Extract the first word of "$ac_prog", so it can be a program name with args.
22290set dummy $ac_prog; ac_word=$2
22291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22292$as_echo_n "checking for $ac_word... " >&6; }
22293if ${ac_cv_path_READELF+:} false; then :
22294  $as_echo_n "(cached) " >&6
22295else
22296  case $READELF in
22297  [\\/]* | ?:[\\/]*)
22298  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22299  ;;
22300  *)
22301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22302for as_dir in $PATH
22303do
22304  IFS=$as_save_IFS
22305  test -z "$as_dir" && as_dir=.
22306    for ac_exec_ext in '' $ac_executable_extensions; do
22307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22308    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22310    break 2
22311  fi
22312done
22313  done
22314IFS=$as_save_IFS
22315
22316  ;;
22317esac
22318fi
22319READELF=$ac_cv_path_READELF
22320if test -n "$READELF"; then
22321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22322$as_echo "$READELF" >&6; }
22323else
22324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22325$as_echo "no" >&6; }
22326fi
22327
22328
22329  test -n "$READELF" && break
22330done
22331
22332  else
22333    # The variable is set, but is it from the command line or the environment?
22334
22335    # Try to remove the string !READELF! from our list.
22336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22338      # If it failed, the variable was not from the command line. Ignore it,
22339      # but warn the user (except for BASH, which is always set by the calling BASH).
22340      if test "xREADELF" != xBASH; then
22341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22342$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22343      fi
22344      # Try to locate tool using the code snippet
22345      for ac_prog in greadelf readelf
22346do
22347  # Extract the first word of "$ac_prog", so it can be a program name with args.
22348set dummy $ac_prog; ac_word=$2
22349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22350$as_echo_n "checking for $ac_word... " >&6; }
22351if ${ac_cv_path_READELF+:} false; then :
22352  $as_echo_n "(cached) " >&6
22353else
22354  case $READELF in
22355  [\\/]* | ?:[\\/]*)
22356  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22357  ;;
22358  *)
22359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22360for as_dir in $PATH
22361do
22362  IFS=$as_save_IFS
22363  test -z "$as_dir" && as_dir=.
22364    for ac_exec_ext in '' $ac_executable_extensions; do
22365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22366    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22368    break 2
22369  fi
22370done
22371  done
22372IFS=$as_save_IFS
22373
22374  ;;
22375esac
22376fi
22377READELF=$ac_cv_path_READELF
22378if test -n "$READELF"; then
22379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22380$as_echo "$READELF" >&6; }
22381else
22382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22383$as_echo "no" >&6; }
22384fi
22385
22386
22387  test -n "$READELF" && break
22388done
22389
22390    else
22391      # If it succeeded, then it was overridden by the user. We will use it
22392      # for the tool.
22393
22394      # First remove it from the list of overridden variables, so we can test
22395      # for unknown variables in the end.
22396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22397
22398      # Check if we try to supply an empty value
22399      if test "x$READELF" = x; then
22400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22401$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22403$as_echo_n "checking for READELF... " >&6; }
22404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22405$as_echo "disabled" >&6; }
22406      else
22407        # Check if the provided tool contains a complete path.
22408        tool_specified="$READELF"
22409        tool_basename="${tool_specified##*/}"
22410        if test "x$tool_basename" = "x$tool_specified"; then
22411          # A command without a complete path is provided, search $PATH.
22412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22413$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22414          # Extract the first word of "$tool_basename", so it can be a program name with args.
22415set dummy $tool_basename; ac_word=$2
22416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22417$as_echo_n "checking for $ac_word... " >&6; }
22418if ${ac_cv_path_READELF+:} false; then :
22419  $as_echo_n "(cached) " >&6
22420else
22421  case $READELF in
22422  [\\/]* | ?:[\\/]*)
22423  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22424  ;;
22425  *)
22426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22427for as_dir in $PATH
22428do
22429  IFS=$as_save_IFS
22430  test -z "$as_dir" && as_dir=.
22431    for ac_exec_ext in '' $ac_executable_extensions; do
22432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22433    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22435    break 2
22436  fi
22437done
22438  done
22439IFS=$as_save_IFS
22440
22441  ;;
22442esac
22443fi
22444READELF=$ac_cv_path_READELF
22445if test -n "$READELF"; then
22446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22447$as_echo "$READELF" >&6; }
22448else
22449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22450$as_echo "no" >&6; }
22451fi
22452
22453
22454          if test "x$READELF" = x; then
22455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22456          fi
22457        else
22458          # Otherwise we believe it is a complete path. Use it as it is.
22459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22460$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22462$as_echo_n "checking for READELF... " >&6; }
22463          if test ! -x "$tool_specified"; then
22464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22465$as_echo "not found" >&6; }
22466            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22467          fi
22468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22469$as_echo "$tool_specified" >&6; }
22470        fi
22471      fi
22472    fi
22473
22474  fi
22475
22476
22477
22478
22479  # Publish this variable in the help.
22480
22481
22482  if [ -z "${DOT+x}" ]; then
22483    # The variable is not set by user, try to locate tool using the code snippet
22484    for ac_prog in dot
22485do
22486  # Extract the first word of "$ac_prog", so it can be a program name with args.
22487set dummy $ac_prog; ac_word=$2
22488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22489$as_echo_n "checking for $ac_word... " >&6; }
22490if ${ac_cv_path_DOT+:} false; then :
22491  $as_echo_n "(cached) " >&6
22492else
22493  case $DOT in
22494  [\\/]* | ?:[\\/]*)
22495  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22496  ;;
22497  *)
22498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499for as_dir in $PATH
22500do
22501  IFS=$as_save_IFS
22502  test -z "$as_dir" && as_dir=.
22503    for ac_exec_ext in '' $ac_executable_extensions; do
22504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22505    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507    break 2
22508  fi
22509done
22510  done
22511IFS=$as_save_IFS
22512
22513  ;;
22514esac
22515fi
22516DOT=$ac_cv_path_DOT
22517if test -n "$DOT"; then
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22519$as_echo "$DOT" >&6; }
22520else
22521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22522$as_echo "no" >&6; }
22523fi
22524
22525
22526  test -n "$DOT" && break
22527done
22528
22529  else
22530    # The variable is set, but is it from the command line or the environment?
22531
22532    # Try to remove the string !DOT! from our list.
22533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22535      # If it failed, the variable was not from the command line. Ignore it,
22536      # but warn the user (except for BASH, which is always set by the calling BASH).
22537      if test "xDOT" != xBASH; then
22538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22539$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22540      fi
22541      # Try to locate tool using the code snippet
22542      for ac_prog in dot
22543do
22544  # Extract the first word of "$ac_prog", so it can be a program name with args.
22545set dummy $ac_prog; ac_word=$2
22546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22547$as_echo_n "checking for $ac_word... " >&6; }
22548if ${ac_cv_path_DOT+:} false; then :
22549  $as_echo_n "(cached) " >&6
22550else
22551  case $DOT in
22552  [\\/]* | ?:[\\/]*)
22553  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22554  ;;
22555  *)
22556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22557for as_dir in $PATH
22558do
22559  IFS=$as_save_IFS
22560  test -z "$as_dir" && as_dir=.
22561    for ac_exec_ext in '' $ac_executable_extensions; do
22562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22563    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22565    break 2
22566  fi
22567done
22568  done
22569IFS=$as_save_IFS
22570
22571  ;;
22572esac
22573fi
22574DOT=$ac_cv_path_DOT
22575if test -n "$DOT"; then
22576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22577$as_echo "$DOT" >&6; }
22578else
22579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22580$as_echo "no" >&6; }
22581fi
22582
22583
22584  test -n "$DOT" && break
22585done
22586
22587    else
22588      # If it succeeded, then it was overridden by the user. We will use it
22589      # for the tool.
22590
22591      # First remove it from the list of overridden variables, so we can test
22592      # for unknown variables in the end.
22593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22594
22595      # Check if we try to supply an empty value
22596      if test "x$DOT" = x; then
22597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22598$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22600$as_echo_n "checking for DOT... " >&6; }
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22602$as_echo "disabled" >&6; }
22603      else
22604        # Check if the provided tool contains a complete path.
22605        tool_specified="$DOT"
22606        tool_basename="${tool_specified##*/}"
22607        if test "x$tool_basename" = "x$tool_specified"; then
22608          # A command without a complete path is provided, search $PATH.
22609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22610$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22611          # Extract the first word of "$tool_basename", so it can be a program name with args.
22612set dummy $tool_basename; ac_word=$2
22613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22614$as_echo_n "checking for $ac_word... " >&6; }
22615if ${ac_cv_path_DOT+:} false; then :
22616  $as_echo_n "(cached) " >&6
22617else
22618  case $DOT in
22619  [\\/]* | ?:[\\/]*)
22620  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22621  ;;
22622  *)
22623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22624for as_dir in $PATH
22625do
22626  IFS=$as_save_IFS
22627  test -z "$as_dir" && as_dir=.
22628    for ac_exec_ext in '' $ac_executable_extensions; do
22629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22630    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22632    break 2
22633  fi
22634done
22635  done
22636IFS=$as_save_IFS
22637
22638  ;;
22639esac
22640fi
22641DOT=$ac_cv_path_DOT
22642if test -n "$DOT"; then
22643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22644$as_echo "$DOT" >&6; }
22645else
22646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22647$as_echo "no" >&6; }
22648fi
22649
22650
22651          if test "x$DOT" = x; then
22652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22653          fi
22654        else
22655          # Otherwise we believe it is a complete path. Use it as it is.
22656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22657$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22659$as_echo_n "checking for DOT... " >&6; }
22660          if test ! -x "$tool_specified"; then
22661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22662$as_echo "not found" >&6; }
22663            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22664          fi
22665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22666$as_echo "$tool_specified" >&6; }
22667        fi
22668      fi
22669    fi
22670
22671  fi
22672
22673
22674
22675
22676  # Publish this variable in the help.
22677
22678
22679  if [ -z "${HG+x}" ]; then
22680    # The variable is not set by user, try to locate tool using the code snippet
22681    for ac_prog in hg
22682do
22683  # Extract the first word of "$ac_prog", so it can be a program name with args.
22684set dummy $ac_prog; ac_word=$2
22685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22686$as_echo_n "checking for $ac_word... " >&6; }
22687if ${ac_cv_path_HG+:} false; then :
22688  $as_echo_n "(cached) " >&6
22689else
22690  case $HG in
22691  [\\/]* | ?:[\\/]*)
22692  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22693  ;;
22694  *)
22695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22696for as_dir in $PATH
22697do
22698  IFS=$as_save_IFS
22699  test -z "$as_dir" && as_dir=.
22700    for ac_exec_ext in '' $ac_executable_extensions; do
22701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22702    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22704    break 2
22705  fi
22706done
22707  done
22708IFS=$as_save_IFS
22709
22710  ;;
22711esac
22712fi
22713HG=$ac_cv_path_HG
22714if test -n "$HG"; then
22715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22716$as_echo "$HG" >&6; }
22717else
22718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22719$as_echo "no" >&6; }
22720fi
22721
22722
22723  test -n "$HG" && break
22724done
22725
22726  else
22727    # The variable is set, but is it from the command line or the environment?
22728
22729    # Try to remove the string !HG! from our list.
22730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22732      # If it failed, the variable was not from the command line. Ignore it,
22733      # but warn the user (except for BASH, which is always set by the calling BASH).
22734      if test "xHG" != xBASH; then
22735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22736$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22737      fi
22738      # Try to locate tool using the code snippet
22739      for ac_prog in hg
22740do
22741  # Extract the first word of "$ac_prog", so it can be a program name with args.
22742set dummy $ac_prog; ac_word=$2
22743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22744$as_echo_n "checking for $ac_word... " >&6; }
22745if ${ac_cv_path_HG+:} false; then :
22746  $as_echo_n "(cached) " >&6
22747else
22748  case $HG in
22749  [\\/]* | ?:[\\/]*)
22750  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22751  ;;
22752  *)
22753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22754for as_dir in $PATH
22755do
22756  IFS=$as_save_IFS
22757  test -z "$as_dir" && as_dir=.
22758    for ac_exec_ext in '' $ac_executable_extensions; do
22759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22760    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22762    break 2
22763  fi
22764done
22765  done
22766IFS=$as_save_IFS
22767
22768  ;;
22769esac
22770fi
22771HG=$ac_cv_path_HG
22772if test -n "$HG"; then
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22774$as_echo "$HG" >&6; }
22775else
22776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22777$as_echo "no" >&6; }
22778fi
22779
22780
22781  test -n "$HG" && break
22782done
22783
22784    else
22785      # If it succeeded, then it was overridden by the user. We will use it
22786      # for the tool.
22787
22788      # First remove it from the list of overridden variables, so we can test
22789      # for unknown variables in the end.
22790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22791
22792      # Check if we try to supply an empty value
22793      if test "x$HG" = x; then
22794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22795$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22797$as_echo_n "checking for HG... " >&6; }
22798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22799$as_echo "disabled" >&6; }
22800      else
22801        # Check if the provided tool contains a complete path.
22802        tool_specified="$HG"
22803        tool_basename="${tool_specified##*/}"
22804        if test "x$tool_basename" = "x$tool_specified"; then
22805          # A command without a complete path is provided, search $PATH.
22806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22807$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22808          # Extract the first word of "$tool_basename", so it can be a program name with args.
22809set dummy $tool_basename; ac_word=$2
22810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22811$as_echo_n "checking for $ac_word... " >&6; }
22812if ${ac_cv_path_HG+:} false; then :
22813  $as_echo_n "(cached) " >&6
22814else
22815  case $HG in
22816  [\\/]* | ?:[\\/]*)
22817  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22818  ;;
22819  *)
22820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22821for as_dir in $PATH
22822do
22823  IFS=$as_save_IFS
22824  test -z "$as_dir" && as_dir=.
22825    for ac_exec_ext in '' $ac_executable_extensions; do
22826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22827    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22829    break 2
22830  fi
22831done
22832  done
22833IFS=$as_save_IFS
22834
22835  ;;
22836esac
22837fi
22838HG=$ac_cv_path_HG
22839if test -n "$HG"; then
22840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22841$as_echo "$HG" >&6; }
22842else
22843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22844$as_echo "no" >&6; }
22845fi
22846
22847
22848          if test "x$HG" = x; then
22849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22850          fi
22851        else
22852          # Otherwise we believe it is a complete path. Use it as it is.
22853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22854$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22856$as_echo_n "checking for HG... " >&6; }
22857          if test ! -x "$tool_specified"; then
22858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22859$as_echo "not found" >&6; }
22860            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22861          fi
22862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22863$as_echo "$tool_specified" >&6; }
22864        fi
22865      fi
22866    fi
22867
22868  fi
22869
22870
22871
22872
22873  # Publish this variable in the help.
22874
22875
22876  if [ -z "${STAT+x}" ]; then
22877    # The variable is not set by user, try to locate tool using the code snippet
22878    for ac_prog in stat
22879do
22880  # Extract the first word of "$ac_prog", so it can be a program name with args.
22881set dummy $ac_prog; ac_word=$2
22882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22883$as_echo_n "checking for $ac_word... " >&6; }
22884if ${ac_cv_path_STAT+:} false; then :
22885  $as_echo_n "(cached) " >&6
22886else
22887  case $STAT in
22888  [\\/]* | ?:[\\/]*)
22889  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22890  ;;
22891  *)
22892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22893for as_dir in $PATH
22894do
22895  IFS=$as_save_IFS
22896  test -z "$as_dir" && as_dir=.
22897    for ac_exec_ext in '' $ac_executable_extensions; do
22898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22899    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22901    break 2
22902  fi
22903done
22904  done
22905IFS=$as_save_IFS
22906
22907  ;;
22908esac
22909fi
22910STAT=$ac_cv_path_STAT
22911if test -n "$STAT"; then
22912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22913$as_echo "$STAT" >&6; }
22914else
22915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22916$as_echo "no" >&6; }
22917fi
22918
22919
22920  test -n "$STAT" && break
22921done
22922
22923  else
22924    # The variable is set, but is it from the command line or the environment?
22925
22926    # Try to remove the string !STAT! from our list.
22927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22929      # If it failed, the variable was not from the command line. Ignore it,
22930      # but warn the user (except for BASH, which is always set by the calling BASH).
22931      if test "xSTAT" != xBASH; then
22932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22933$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22934      fi
22935      # Try to locate tool using the code snippet
22936      for ac_prog in stat
22937do
22938  # Extract the first word of "$ac_prog", so it can be a program name with args.
22939set dummy $ac_prog; ac_word=$2
22940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22941$as_echo_n "checking for $ac_word... " >&6; }
22942if ${ac_cv_path_STAT+:} false; then :
22943  $as_echo_n "(cached) " >&6
22944else
22945  case $STAT in
22946  [\\/]* | ?:[\\/]*)
22947  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22948  ;;
22949  *)
22950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22951for as_dir in $PATH
22952do
22953  IFS=$as_save_IFS
22954  test -z "$as_dir" && as_dir=.
22955    for ac_exec_ext in '' $ac_executable_extensions; do
22956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22957    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22959    break 2
22960  fi
22961done
22962  done
22963IFS=$as_save_IFS
22964
22965  ;;
22966esac
22967fi
22968STAT=$ac_cv_path_STAT
22969if test -n "$STAT"; then
22970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22971$as_echo "$STAT" >&6; }
22972else
22973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22974$as_echo "no" >&6; }
22975fi
22976
22977
22978  test -n "$STAT" && break
22979done
22980
22981    else
22982      # If it succeeded, then it was overridden by the user. We will use it
22983      # for the tool.
22984
22985      # First remove it from the list of overridden variables, so we can test
22986      # for unknown variables in the end.
22987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22988
22989      # Check if we try to supply an empty value
22990      if test "x$STAT" = x; then
22991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22992$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22994$as_echo_n "checking for STAT... " >&6; }
22995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22996$as_echo "disabled" >&6; }
22997      else
22998        # Check if the provided tool contains a complete path.
22999        tool_specified="$STAT"
23000        tool_basename="${tool_specified##*/}"
23001        if test "x$tool_basename" = "x$tool_specified"; then
23002          # A command without a complete path is provided, search $PATH.
23003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23004$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23005          # Extract the first word of "$tool_basename", so it can be a program name with args.
23006set dummy $tool_basename; ac_word=$2
23007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23008$as_echo_n "checking for $ac_word... " >&6; }
23009if ${ac_cv_path_STAT+:} false; then :
23010  $as_echo_n "(cached) " >&6
23011else
23012  case $STAT in
23013  [\\/]* | ?:[\\/]*)
23014  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23015  ;;
23016  *)
23017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23018for as_dir in $PATH
23019do
23020  IFS=$as_save_IFS
23021  test -z "$as_dir" && as_dir=.
23022    for ac_exec_ext in '' $ac_executable_extensions; do
23023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23024    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23026    break 2
23027  fi
23028done
23029  done
23030IFS=$as_save_IFS
23031
23032  ;;
23033esac
23034fi
23035STAT=$ac_cv_path_STAT
23036if test -n "$STAT"; then
23037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23038$as_echo "$STAT" >&6; }
23039else
23040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23041$as_echo "no" >&6; }
23042fi
23043
23044
23045          if test "x$STAT" = x; then
23046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23047          fi
23048        else
23049          # Otherwise we believe it is a complete path. Use it as it is.
23050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23051$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23053$as_echo_n "checking for STAT... " >&6; }
23054          if test ! -x "$tool_specified"; then
23055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23056$as_echo "not found" >&6; }
23057            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23058          fi
23059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23060$as_echo "$tool_specified" >&6; }
23061        fi
23062      fi
23063    fi
23064
23065  fi
23066
23067
23068
23069
23070  # Publish this variable in the help.
23071
23072
23073  if [ -z "${TIME+x}" ]; then
23074    # The variable is not set by user, try to locate tool using the code snippet
23075    for ac_prog in time
23076do
23077  # Extract the first word of "$ac_prog", so it can be a program name with args.
23078set dummy $ac_prog; ac_word=$2
23079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23080$as_echo_n "checking for $ac_word... " >&6; }
23081if ${ac_cv_path_TIME+:} false; then :
23082  $as_echo_n "(cached) " >&6
23083else
23084  case $TIME in
23085  [\\/]* | ?:[\\/]*)
23086  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23087  ;;
23088  *)
23089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23090for as_dir in $PATH
23091do
23092  IFS=$as_save_IFS
23093  test -z "$as_dir" && as_dir=.
23094    for ac_exec_ext in '' $ac_executable_extensions; do
23095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23096    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23098    break 2
23099  fi
23100done
23101  done
23102IFS=$as_save_IFS
23103
23104  ;;
23105esac
23106fi
23107TIME=$ac_cv_path_TIME
23108if test -n "$TIME"; then
23109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23110$as_echo "$TIME" >&6; }
23111else
23112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23113$as_echo "no" >&6; }
23114fi
23115
23116
23117  test -n "$TIME" && break
23118done
23119
23120  else
23121    # The variable is set, but is it from the command line or the environment?
23122
23123    # Try to remove the string !TIME! from our list.
23124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23126      # If it failed, the variable was not from the command line. Ignore it,
23127      # but warn the user (except for BASH, which is always set by the calling BASH).
23128      if test "xTIME" != xBASH; then
23129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23130$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23131      fi
23132      # Try to locate tool using the code snippet
23133      for ac_prog in time
23134do
23135  # Extract the first word of "$ac_prog", so it can be a program name with args.
23136set dummy $ac_prog; ac_word=$2
23137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23138$as_echo_n "checking for $ac_word... " >&6; }
23139if ${ac_cv_path_TIME+:} false; then :
23140  $as_echo_n "(cached) " >&6
23141else
23142  case $TIME in
23143  [\\/]* | ?:[\\/]*)
23144  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23145  ;;
23146  *)
23147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23148for as_dir in $PATH
23149do
23150  IFS=$as_save_IFS
23151  test -z "$as_dir" && as_dir=.
23152    for ac_exec_ext in '' $ac_executable_extensions; do
23153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23154    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23156    break 2
23157  fi
23158done
23159  done
23160IFS=$as_save_IFS
23161
23162  ;;
23163esac
23164fi
23165TIME=$ac_cv_path_TIME
23166if test -n "$TIME"; then
23167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23168$as_echo "$TIME" >&6; }
23169else
23170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23171$as_echo "no" >&6; }
23172fi
23173
23174
23175  test -n "$TIME" && break
23176done
23177
23178    else
23179      # If it succeeded, then it was overridden by the user. We will use it
23180      # for the tool.
23181
23182      # First remove it from the list of overridden variables, so we can test
23183      # for unknown variables in the end.
23184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23185
23186      # Check if we try to supply an empty value
23187      if test "x$TIME" = x; then
23188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23189$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23191$as_echo_n "checking for TIME... " >&6; }
23192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23193$as_echo "disabled" >&6; }
23194      else
23195        # Check if the provided tool contains a complete path.
23196        tool_specified="$TIME"
23197        tool_basename="${tool_specified##*/}"
23198        if test "x$tool_basename" = "x$tool_specified"; then
23199          # A command without a complete path is provided, search $PATH.
23200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23201$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23202          # Extract the first word of "$tool_basename", so it can be a program name with args.
23203set dummy $tool_basename; ac_word=$2
23204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23205$as_echo_n "checking for $ac_word... " >&6; }
23206if ${ac_cv_path_TIME+:} false; then :
23207  $as_echo_n "(cached) " >&6
23208else
23209  case $TIME in
23210  [\\/]* | ?:[\\/]*)
23211  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23212  ;;
23213  *)
23214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23215for as_dir in $PATH
23216do
23217  IFS=$as_save_IFS
23218  test -z "$as_dir" && as_dir=.
23219    for ac_exec_ext in '' $ac_executable_extensions; do
23220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23221    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23223    break 2
23224  fi
23225done
23226  done
23227IFS=$as_save_IFS
23228
23229  ;;
23230esac
23231fi
23232TIME=$ac_cv_path_TIME
23233if test -n "$TIME"; then
23234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23235$as_echo "$TIME" >&6; }
23236else
23237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23238$as_echo "no" >&6; }
23239fi
23240
23241
23242          if test "x$TIME" = x; then
23243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23244          fi
23245        else
23246          # Otherwise we believe it is a complete path. Use it as it is.
23247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23248$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23250$as_echo_n "checking for TIME... " >&6; }
23251          if test ! -x "$tool_specified"; then
23252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23253$as_echo "not found" >&6; }
23254            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23255          fi
23256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23257$as_echo "$tool_specified" >&6; }
23258        fi
23259      fi
23260    fi
23261
23262  fi
23263
23264
23265  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23266  # be in the user path.
23267
23268
23269  # Publish this variable in the help.
23270
23271
23272  if [ -z "${DTRACE+x}" ]; then
23273    # The variable is not set by user, try to locate tool using the code snippet
23274    for ac_prog in dtrace
23275do
23276  # Extract the first word of "$ac_prog", so it can be a program name with args.
23277set dummy $ac_prog; ac_word=$2
23278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23279$as_echo_n "checking for $ac_word... " >&6; }
23280if ${ac_cv_path_DTRACE+:} false; then :
23281  $as_echo_n "(cached) " >&6
23282else
23283  case $DTRACE in
23284  [\\/]* | ?:[\\/]*)
23285  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23286  ;;
23287  *)
23288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23289as_dummy="$PATH:/usr/sbin"
23290for as_dir in $as_dummy
23291do
23292  IFS=$as_save_IFS
23293  test -z "$as_dir" && as_dir=.
23294    for ac_exec_ext in '' $ac_executable_extensions; do
23295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23296    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23298    break 2
23299  fi
23300done
23301  done
23302IFS=$as_save_IFS
23303
23304  ;;
23305esac
23306fi
23307DTRACE=$ac_cv_path_DTRACE
23308if test -n "$DTRACE"; then
23309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23310$as_echo "$DTRACE" >&6; }
23311else
23312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23313$as_echo "no" >&6; }
23314fi
23315
23316
23317  test -n "$DTRACE" && break
23318done
23319
23320  else
23321    # The variable is set, but is it from the command line or the environment?
23322
23323    # Try to remove the string !DTRACE! from our list.
23324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23326      # If it failed, the variable was not from the command line. Ignore it,
23327      # but warn the user (except for BASH, which is always set by the calling BASH).
23328      if test "xDTRACE" != xBASH; then
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23330$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23331      fi
23332      # Try to locate tool using the code snippet
23333      for ac_prog in dtrace
23334do
23335  # Extract the first word of "$ac_prog", so it can be a program name with args.
23336set dummy $ac_prog; ac_word=$2
23337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23338$as_echo_n "checking for $ac_word... " >&6; }
23339if ${ac_cv_path_DTRACE+:} false; then :
23340  $as_echo_n "(cached) " >&6
23341else
23342  case $DTRACE in
23343  [\\/]* | ?:[\\/]*)
23344  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23345  ;;
23346  *)
23347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348as_dummy="$PATH:/usr/sbin"
23349for as_dir in $as_dummy
23350do
23351  IFS=$as_save_IFS
23352  test -z "$as_dir" && as_dir=.
23353    for ac_exec_ext in '' $ac_executable_extensions; do
23354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23355    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23357    break 2
23358  fi
23359done
23360  done
23361IFS=$as_save_IFS
23362
23363  ;;
23364esac
23365fi
23366DTRACE=$ac_cv_path_DTRACE
23367if test -n "$DTRACE"; then
23368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23369$as_echo "$DTRACE" >&6; }
23370else
23371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23372$as_echo "no" >&6; }
23373fi
23374
23375
23376  test -n "$DTRACE" && break
23377done
23378
23379    else
23380      # If it succeeded, then it was overridden by the user. We will use it
23381      # for the tool.
23382
23383      # First remove it from the list of overridden variables, so we can test
23384      # for unknown variables in the end.
23385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23386
23387      # Check if we try to supply an empty value
23388      if test "x$DTRACE" = x; then
23389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23390$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23392$as_echo_n "checking for DTRACE... " >&6; }
23393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23394$as_echo "disabled" >&6; }
23395      else
23396        # Check if the provided tool contains a complete path.
23397        tool_specified="$DTRACE"
23398        tool_basename="${tool_specified##*/}"
23399        if test "x$tool_basename" = "x$tool_specified"; then
23400          # A command without a complete path is provided, search $PATH.
23401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23402$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23403          # Extract the first word of "$tool_basename", so it can be a program name with args.
23404set dummy $tool_basename; ac_word=$2
23405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23406$as_echo_n "checking for $ac_word... " >&6; }
23407if ${ac_cv_path_DTRACE+:} false; then :
23408  $as_echo_n "(cached) " >&6
23409else
23410  case $DTRACE in
23411  [\\/]* | ?:[\\/]*)
23412  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23413  ;;
23414  *)
23415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23416for as_dir in $PATH
23417do
23418  IFS=$as_save_IFS
23419  test -z "$as_dir" && as_dir=.
23420    for ac_exec_ext in '' $ac_executable_extensions; do
23421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23422    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23424    break 2
23425  fi
23426done
23427  done
23428IFS=$as_save_IFS
23429
23430  ;;
23431esac
23432fi
23433DTRACE=$ac_cv_path_DTRACE
23434if test -n "$DTRACE"; then
23435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23436$as_echo "$DTRACE" >&6; }
23437else
23438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23439$as_echo "no" >&6; }
23440fi
23441
23442
23443          if test "x$DTRACE" = x; then
23444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23445          fi
23446        else
23447          # Otherwise we believe it is a complete path. Use it as it is.
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23449$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23451$as_echo_n "checking for DTRACE... " >&6; }
23452          if test ! -x "$tool_specified"; then
23453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23454$as_echo "not found" >&6; }
23455            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23456          fi
23457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23458$as_echo "$tool_specified" >&6; }
23459        fi
23460      fi
23461    fi
23462
23463  fi
23464
23465
23466
23467
23468  # Publish this variable in the help.
23469
23470
23471  if [ -z "${PATCH+x}" ]; then
23472    # The variable is not set by user, try to locate tool using the code snippet
23473    for ac_prog in gpatch patch
23474do
23475  # Extract the first word of "$ac_prog", so it can be a program name with args.
23476set dummy $ac_prog; ac_word=$2
23477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23478$as_echo_n "checking for $ac_word... " >&6; }
23479if ${ac_cv_path_PATCH+:} false; then :
23480  $as_echo_n "(cached) " >&6
23481else
23482  case $PATCH in
23483  [\\/]* | ?:[\\/]*)
23484  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23485  ;;
23486  *)
23487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23488for as_dir in $PATH
23489do
23490  IFS=$as_save_IFS
23491  test -z "$as_dir" && as_dir=.
23492    for ac_exec_ext in '' $ac_executable_extensions; do
23493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23494    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23496    break 2
23497  fi
23498done
23499  done
23500IFS=$as_save_IFS
23501
23502  ;;
23503esac
23504fi
23505PATCH=$ac_cv_path_PATCH
23506if test -n "$PATCH"; then
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23508$as_echo "$PATCH" >&6; }
23509else
23510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23511$as_echo "no" >&6; }
23512fi
23513
23514
23515  test -n "$PATCH" && break
23516done
23517
23518  else
23519    # The variable is set, but is it from the command line or the environment?
23520
23521    # Try to remove the string !PATCH! from our list.
23522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23524      # If it failed, the variable was not from the command line. Ignore it,
23525      # but warn the user (except for BASH, which is always set by the calling BASH).
23526      if test "xPATCH" != xBASH; then
23527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23528$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23529      fi
23530      # Try to locate tool using the code snippet
23531      for ac_prog in gpatch patch
23532do
23533  # Extract the first word of "$ac_prog", so it can be a program name with args.
23534set dummy $ac_prog; ac_word=$2
23535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23536$as_echo_n "checking for $ac_word... " >&6; }
23537if ${ac_cv_path_PATCH+:} false; then :
23538  $as_echo_n "(cached) " >&6
23539else
23540  case $PATCH in
23541  [\\/]* | ?:[\\/]*)
23542  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23543  ;;
23544  *)
23545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23546for as_dir in $PATH
23547do
23548  IFS=$as_save_IFS
23549  test -z "$as_dir" && as_dir=.
23550    for ac_exec_ext in '' $ac_executable_extensions; do
23551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23552    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23554    break 2
23555  fi
23556done
23557  done
23558IFS=$as_save_IFS
23559
23560  ;;
23561esac
23562fi
23563PATCH=$ac_cv_path_PATCH
23564if test -n "$PATCH"; then
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23566$as_echo "$PATCH" >&6; }
23567else
23568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23569$as_echo "no" >&6; }
23570fi
23571
23572
23573  test -n "$PATCH" && break
23574done
23575
23576    else
23577      # If it succeeded, then it was overridden by the user. We will use it
23578      # for the tool.
23579
23580      # First remove it from the list of overridden variables, so we can test
23581      # for unknown variables in the end.
23582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23583
23584      # Check if we try to supply an empty value
23585      if test "x$PATCH" = x; then
23586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23587$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23589$as_echo_n "checking for PATCH... " >&6; }
23590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23591$as_echo "disabled" >&6; }
23592      else
23593        # Check if the provided tool contains a complete path.
23594        tool_specified="$PATCH"
23595        tool_basename="${tool_specified##*/}"
23596        if test "x$tool_basename" = "x$tool_specified"; then
23597          # A command without a complete path is provided, search $PATH.
23598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23599$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23600          # Extract the first word of "$tool_basename", so it can be a program name with args.
23601set dummy $tool_basename; ac_word=$2
23602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23603$as_echo_n "checking for $ac_word... " >&6; }
23604if ${ac_cv_path_PATCH+:} false; then :
23605  $as_echo_n "(cached) " >&6
23606else
23607  case $PATCH in
23608  [\\/]* | ?:[\\/]*)
23609  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23610  ;;
23611  *)
23612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23613for as_dir in $PATH
23614do
23615  IFS=$as_save_IFS
23616  test -z "$as_dir" && as_dir=.
23617    for ac_exec_ext in '' $ac_executable_extensions; do
23618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23619    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23621    break 2
23622  fi
23623done
23624  done
23625IFS=$as_save_IFS
23626
23627  ;;
23628esac
23629fi
23630PATCH=$ac_cv_path_PATCH
23631if test -n "$PATCH"; then
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23633$as_echo "$PATCH" >&6; }
23634else
23635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23636$as_echo "no" >&6; }
23637fi
23638
23639
23640          if test "x$PATCH" = x; then
23641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23642          fi
23643        else
23644          # Otherwise we believe it is a complete path. Use it as it is.
23645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23646$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23648$as_echo_n "checking for PATCH... " >&6; }
23649          if test ! -x "$tool_specified"; then
23650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23651$as_echo "not found" >&6; }
23652            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23653          fi
23654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23655$as_echo "$tool_specified" >&6; }
23656        fi
23657      fi
23658    fi
23659
23660  fi
23661
23662
23663  # Check if it's GNU time
23664  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23665  if test "x$IS_GNU_TIME" != x; then
23666    IS_GNU_TIME=yes
23667  else
23668    IS_GNU_TIME=no
23669  fi
23670
23671
23672  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23673
23674
23675
23676  # Publish this variable in the help.
23677
23678
23679  if [ -z "${DSYMUTIL+x}" ]; then
23680    # The variable is not set by user, try to locate tool using the code snippet
23681    for ac_prog in dsymutil
23682do
23683  # Extract the first word of "$ac_prog", so it can be a program name with args.
23684set dummy $ac_prog; ac_word=$2
23685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23686$as_echo_n "checking for $ac_word... " >&6; }
23687if ${ac_cv_path_DSYMUTIL+:} false; then :
23688  $as_echo_n "(cached) " >&6
23689else
23690  case $DSYMUTIL in
23691  [\\/]* | ?:[\\/]*)
23692  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23693  ;;
23694  *)
23695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23696for as_dir in $PATH
23697do
23698  IFS=$as_save_IFS
23699  test -z "$as_dir" && as_dir=.
23700    for ac_exec_ext in '' $ac_executable_extensions; do
23701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23702    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23704    break 2
23705  fi
23706done
23707  done
23708IFS=$as_save_IFS
23709
23710  ;;
23711esac
23712fi
23713DSYMUTIL=$ac_cv_path_DSYMUTIL
23714if test -n "$DSYMUTIL"; then
23715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23716$as_echo "$DSYMUTIL" >&6; }
23717else
23718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23719$as_echo "no" >&6; }
23720fi
23721
23722
23723  test -n "$DSYMUTIL" && break
23724done
23725
23726  else
23727    # The variable is set, but is it from the command line or the environment?
23728
23729    # Try to remove the string !DSYMUTIL! from our list.
23730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23732      # If it failed, the variable was not from the command line. Ignore it,
23733      # but warn the user (except for BASH, which is always set by the calling BASH).
23734      if test "xDSYMUTIL" != xBASH; then
23735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23736$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23737      fi
23738      # Try to locate tool using the code snippet
23739      for ac_prog in dsymutil
23740do
23741  # Extract the first word of "$ac_prog", so it can be a program name with args.
23742set dummy $ac_prog; ac_word=$2
23743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23744$as_echo_n "checking for $ac_word... " >&6; }
23745if ${ac_cv_path_DSYMUTIL+:} false; then :
23746  $as_echo_n "(cached) " >&6
23747else
23748  case $DSYMUTIL in
23749  [\\/]* | ?:[\\/]*)
23750  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23751  ;;
23752  *)
23753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23754for as_dir in $PATH
23755do
23756  IFS=$as_save_IFS
23757  test -z "$as_dir" && as_dir=.
23758    for ac_exec_ext in '' $ac_executable_extensions; do
23759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23760    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23762    break 2
23763  fi
23764done
23765  done
23766IFS=$as_save_IFS
23767
23768  ;;
23769esac
23770fi
23771DSYMUTIL=$ac_cv_path_DSYMUTIL
23772if test -n "$DSYMUTIL"; then
23773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23774$as_echo "$DSYMUTIL" >&6; }
23775else
23776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23777$as_echo "no" >&6; }
23778fi
23779
23780
23781  test -n "$DSYMUTIL" && break
23782done
23783
23784    else
23785      # If it succeeded, then it was overridden by the user. We will use it
23786      # for the tool.
23787
23788      # First remove it from the list of overridden variables, so we can test
23789      # for unknown variables in the end.
23790      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23791
23792      # Check if we try to supply an empty value
23793      if test "x$DSYMUTIL" = x; then
23794        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23795$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23797$as_echo_n "checking for DSYMUTIL... " >&6; }
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23799$as_echo "disabled" >&6; }
23800      else
23801        # Check if the provided tool contains a complete path.
23802        tool_specified="$DSYMUTIL"
23803        tool_basename="${tool_specified##*/}"
23804        if test "x$tool_basename" = "x$tool_specified"; then
23805          # A command without a complete path is provided, search $PATH.
23806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23807$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23808          # Extract the first word of "$tool_basename", so it can be a program name with args.
23809set dummy $tool_basename; ac_word=$2
23810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23811$as_echo_n "checking for $ac_word... " >&6; }
23812if ${ac_cv_path_DSYMUTIL+:} false; then :
23813  $as_echo_n "(cached) " >&6
23814else
23815  case $DSYMUTIL in
23816  [\\/]* | ?:[\\/]*)
23817  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23818  ;;
23819  *)
23820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23821for as_dir in $PATH
23822do
23823  IFS=$as_save_IFS
23824  test -z "$as_dir" && as_dir=.
23825    for ac_exec_ext in '' $ac_executable_extensions; do
23826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23827    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23829    break 2
23830  fi
23831done
23832  done
23833IFS=$as_save_IFS
23834
23835  ;;
23836esac
23837fi
23838DSYMUTIL=$ac_cv_path_DSYMUTIL
23839if test -n "$DSYMUTIL"; then
23840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23841$as_echo "$DSYMUTIL" >&6; }
23842else
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844$as_echo "no" >&6; }
23845fi
23846
23847
23848          if test "x$DSYMUTIL" = x; then
23849            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23850          fi
23851        else
23852          # Otherwise we believe it is a complete path. Use it as it is.
23853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23854$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23856$as_echo_n "checking for DSYMUTIL... " >&6; }
23857          if test ! -x "$tool_specified"; then
23858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23859$as_echo "not found" >&6; }
23860            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23861          fi
23862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23863$as_echo "$tool_specified" >&6; }
23864        fi
23865      fi
23866    fi
23867
23868  fi
23869
23870
23871
23872  if test "x$DSYMUTIL" = x; then
23873    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23874  fi
23875
23876
23877
23878
23879
23880  # Publish this variable in the help.
23881
23882
23883  if [ -z "${XATTR+x}" ]; then
23884    # The variable is not set by user, try to locate tool using the code snippet
23885    for ac_prog in xattr
23886do
23887  # Extract the first word of "$ac_prog", so it can be a program name with args.
23888set dummy $ac_prog; ac_word=$2
23889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23890$as_echo_n "checking for $ac_word... " >&6; }
23891if ${ac_cv_path_XATTR+:} false; then :
23892  $as_echo_n "(cached) " >&6
23893else
23894  case $XATTR in
23895  [\\/]* | ?:[\\/]*)
23896  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23897  ;;
23898  *)
23899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23900for as_dir in $PATH
23901do
23902  IFS=$as_save_IFS
23903  test -z "$as_dir" && as_dir=.
23904    for ac_exec_ext in '' $ac_executable_extensions; do
23905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23906    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23908    break 2
23909  fi
23910done
23911  done
23912IFS=$as_save_IFS
23913
23914  ;;
23915esac
23916fi
23917XATTR=$ac_cv_path_XATTR
23918if test -n "$XATTR"; then
23919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23920$as_echo "$XATTR" >&6; }
23921else
23922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23923$as_echo "no" >&6; }
23924fi
23925
23926
23927  test -n "$XATTR" && break
23928done
23929
23930  else
23931    # The variable is set, but is it from the command line or the environment?
23932
23933    # Try to remove the string !XATTR! from our list.
23934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23936      # If it failed, the variable was not from the command line. Ignore it,
23937      # but warn the user (except for BASH, which is always set by the calling BASH).
23938      if test "xXATTR" != xBASH; then
23939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23940$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23941      fi
23942      # Try to locate tool using the code snippet
23943      for ac_prog in xattr
23944do
23945  # Extract the first word of "$ac_prog", so it can be a program name with args.
23946set dummy $ac_prog; ac_word=$2
23947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23948$as_echo_n "checking for $ac_word... " >&6; }
23949if ${ac_cv_path_XATTR+:} false; then :
23950  $as_echo_n "(cached) " >&6
23951else
23952  case $XATTR in
23953  [\\/]* | ?:[\\/]*)
23954  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23955  ;;
23956  *)
23957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23958for as_dir in $PATH
23959do
23960  IFS=$as_save_IFS
23961  test -z "$as_dir" && as_dir=.
23962    for ac_exec_ext in '' $ac_executable_extensions; do
23963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23964    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23966    break 2
23967  fi
23968done
23969  done
23970IFS=$as_save_IFS
23971
23972  ;;
23973esac
23974fi
23975XATTR=$ac_cv_path_XATTR
23976if test -n "$XATTR"; then
23977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23978$as_echo "$XATTR" >&6; }
23979else
23980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23981$as_echo "no" >&6; }
23982fi
23983
23984
23985  test -n "$XATTR" && break
23986done
23987
23988    else
23989      # If it succeeded, then it was overridden by the user. We will use it
23990      # for the tool.
23991
23992      # First remove it from the list of overridden variables, so we can test
23993      # for unknown variables in the end.
23994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23995
23996      # Check if we try to supply an empty value
23997      if test "x$XATTR" = x; then
23998        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23999$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24001$as_echo_n "checking for XATTR... " >&6; }
24002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24003$as_echo "disabled" >&6; }
24004      else
24005        # Check if the provided tool contains a complete path.
24006        tool_specified="$XATTR"
24007        tool_basename="${tool_specified##*/}"
24008        if test "x$tool_basename" = "x$tool_specified"; then
24009          # A command without a complete path is provided, search $PATH.
24010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24011$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24012          # Extract the first word of "$tool_basename", so it can be a program name with args.
24013set dummy $tool_basename; ac_word=$2
24014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24015$as_echo_n "checking for $ac_word... " >&6; }
24016if ${ac_cv_path_XATTR+:} false; then :
24017  $as_echo_n "(cached) " >&6
24018else
24019  case $XATTR in
24020  [\\/]* | ?:[\\/]*)
24021  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24022  ;;
24023  *)
24024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24025for as_dir in $PATH
24026do
24027  IFS=$as_save_IFS
24028  test -z "$as_dir" && as_dir=.
24029    for ac_exec_ext in '' $ac_executable_extensions; do
24030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24031    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24033    break 2
24034  fi
24035done
24036  done
24037IFS=$as_save_IFS
24038
24039  ;;
24040esac
24041fi
24042XATTR=$ac_cv_path_XATTR
24043if test -n "$XATTR"; then
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24045$as_echo "$XATTR" >&6; }
24046else
24047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24048$as_echo "no" >&6; }
24049fi
24050
24051
24052          if test "x$XATTR" = x; then
24053            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24054          fi
24055        else
24056          # Otherwise we believe it is a complete path. Use it as it is.
24057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24058$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24059          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24060$as_echo_n "checking for XATTR... " >&6; }
24061          if test ! -x "$tool_specified"; then
24062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24063$as_echo "not found" >&6; }
24064            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24065          fi
24066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24067$as_echo "$tool_specified" >&6; }
24068        fi
24069      fi
24070    fi
24071
24072  fi
24073
24074
24075
24076  if test "x$XATTR" = x; then
24077    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24078  fi
24079
24080
24081
24082
24083  # Publish this variable in the help.
24084
24085
24086  if [ -z "${CODESIGN+x}" ]; then
24087    # The variable is not set by user, try to locate tool using the code snippet
24088    for ac_prog in codesign
24089do
24090  # Extract the first word of "$ac_prog", so it can be a program name with args.
24091set dummy $ac_prog; ac_word=$2
24092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24093$as_echo_n "checking for $ac_word... " >&6; }
24094if ${ac_cv_path_CODESIGN+:} false; then :
24095  $as_echo_n "(cached) " >&6
24096else
24097  case $CODESIGN in
24098  [\\/]* | ?:[\\/]*)
24099  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24100  ;;
24101  *)
24102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24103for as_dir in $PATH
24104do
24105  IFS=$as_save_IFS
24106  test -z "$as_dir" && as_dir=.
24107    for ac_exec_ext in '' $ac_executable_extensions; do
24108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24109    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24111    break 2
24112  fi
24113done
24114  done
24115IFS=$as_save_IFS
24116
24117  ;;
24118esac
24119fi
24120CODESIGN=$ac_cv_path_CODESIGN
24121if test -n "$CODESIGN"; then
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24123$as_echo "$CODESIGN" >&6; }
24124else
24125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24126$as_echo "no" >&6; }
24127fi
24128
24129
24130  test -n "$CODESIGN" && break
24131done
24132
24133  else
24134    # The variable is set, but is it from the command line or the environment?
24135
24136    # Try to remove the string !CODESIGN! from our list.
24137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24139      # If it failed, the variable was not from the command line. Ignore it,
24140      # but warn the user (except for BASH, which is always set by the calling BASH).
24141      if test "xCODESIGN" != xBASH; then
24142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24143$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24144      fi
24145      # Try to locate tool using the code snippet
24146      for ac_prog in codesign
24147do
24148  # Extract the first word of "$ac_prog", so it can be a program name with args.
24149set dummy $ac_prog; ac_word=$2
24150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24151$as_echo_n "checking for $ac_word... " >&6; }
24152if ${ac_cv_path_CODESIGN+:} false; then :
24153  $as_echo_n "(cached) " >&6
24154else
24155  case $CODESIGN in
24156  [\\/]* | ?:[\\/]*)
24157  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24158  ;;
24159  *)
24160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24161for as_dir in $PATH
24162do
24163  IFS=$as_save_IFS
24164  test -z "$as_dir" && as_dir=.
24165    for ac_exec_ext in '' $ac_executable_extensions; do
24166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24167    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24169    break 2
24170  fi
24171done
24172  done
24173IFS=$as_save_IFS
24174
24175  ;;
24176esac
24177fi
24178CODESIGN=$ac_cv_path_CODESIGN
24179if test -n "$CODESIGN"; then
24180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24181$as_echo "$CODESIGN" >&6; }
24182else
24183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24184$as_echo "no" >&6; }
24185fi
24186
24187
24188  test -n "$CODESIGN" && break
24189done
24190
24191    else
24192      # If it succeeded, then it was overridden by the user. We will use it
24193      # for the tool.
24194
24195      # First remove it from the list of overridden variables, so we can test
24196      # for unknown variables in the end.
24197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24198
24199      # Check if we try to supply an empty value
24200      if test "x$CODESIGN" = x; then
24201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24202$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24204$as_echo_n "checking for CODESIGN... " >&6; }
24205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24206$as_echo "disabled" >&6; }
24207      else
24208        # Check if the provided tool contains a complete path.
24209        tool_specified="$CODESIGN"
24210        tool_basename="${tool_specified##*/}"
24211        if test "x$tool_basename" = "x$tool_specified"; then
24212          # A command without a complete path is provided, search $PATH.
24213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24214$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24215          # Extract the first word of "$tool_basename", so it can be a program name with args.
24216set dummy $tool_basename; ac_word=$2
24217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24218$as_echo_n "checking for $ac_word... " >&6; }
24219if ${ac_cv_path_CODESIGN+:} false; then :
24220  $as_echo_n "(cached) " >&6
24221else
24222  case $CODESIGN in
24223  [\\/]* | ?:[\\/]*)
24224  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24225  ;;
24226  *)
24227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24228for as_dir in $PATH
24229do
24230  IFS=$as_save_IFS
24231  test -z "$as_dir" && as_dir=.
24232    for ac_exec_ext in '' $ac_executable_extensions; do
24233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24234    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24236    break 2
24237  fi
24238done
24239  done
24240IFS=$as_save_IFS
24241
24242  ;;
24243esac
24244fi
24245CODESIGN=$ac_cv_path_CODESIGN
24246if test -n "$CODESIGN"; then
24247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24248$as_echo "$CODESIGN" >&6; }
24249else
24250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24251$as_echo "no" >&6; }
24252fi
24253
24254
24255          if test "x$CODESIGN" = x; then
24256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24257          fi
24258        else
24259          # Otherwise we believe it is a complete path. Use it as it is.
24260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24261$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24263$as_echo_n "checking for CODESIGN... " >&6; }
24264          if test ! -x "$tool_specified"; then
24265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24266$as_echo "not found" >&6; }
24267            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24268          fi
24269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24270$as_echo "$tool_specified" >&6; }
24271        fi
24272      fi
24273    fi
24274
24275  fi
24276
24277
24278    if test "x$CODESIGN" != "x"; then
24279      # Verify that the openjdk_codesign certificate is present
24280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24281$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24282      $RM codesign-testfile
24283      $TOUCH codesign-testfile
24284      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24285      $RM codesign-testfile
24286      if test "x$CODESIGN" = x; then
24287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24288$as_echo "no" >&6; }
24289      else
24290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24291$as_echo "yes" >&6; }
24292      fi
24293    fi
24294
24295
24296
24297  # Publish this variable in the help.
24298
24299
24300  if [ -z "${SETFILE+x}" ]; then
24301    # The variable is not set by user, try to locate tool using the code snippet
24302    for ac_prog in SetFile
24303do
24304  # Extract the first word of "$ac_prog", so it can be a program name with args.
24305set dummy $ac_prog; ac_word=$2
24306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24307$as_echo_n "checking for $ac_word... " >&6; }
24308if ${ac_cv_path_SETFILE+:} false; then :
24309  $as_echo_n "(cached) " >&6
24310else
24311  case $SETFILE in
24312  [\\/]* | ?:[\\/]*)
24313  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24314  ;;
24315  *)
24316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24317for as_dir in $PATH
24318do
24319  IFS=$as_save_IFS
24320  test -z "$as_dir" && as_dir=.
24321    for ac_exec_ext in '' $ac_executable_extensions; do
24322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24323    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24325    break 2
24326  fi
24327done
24328  done
24329IFS=$as_save_IFS
24330
24331  ;;
24332esac
24333fi
24334SETFILE=$ac_cv_path_SETFILE
24335if test -n "$SETFILE"; then
24336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24337$as_echo "$SETFILE" >&6; }
24338else
24339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24340$as_echo "no" >&6; }
24341fi
24342
24343
24344  test -n "$SETFILE" && break
24345done
24346
24347  else
24348    # The variable is set, but is it from the command line or the environment?
24349
24350    # Try to remove the string !SETFILE! from our list.
24351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24353      # If it failed, the variable was not from the command line. Ignore it,
24354      # but warn the user (except for BASH, which is always set by the calling BASH).
24355      if test "xSETFILE" != xBASH; then
24356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24357$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24358      fi
24359      # Try to locate tool using the code snippet
24360      for ac_prog in SetFile
24361do
24362  # Extract the first word of "$ac_prog", so it can be a program name with args.
24363set dummy $ac_prog; ac_word=$2
24364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24365$as_echo_n "checking for $ac_word... " >&6; }
24366if ${ac_cv_path_SETFILE+:} false; then :
24367  $as_echo_n "(cached) " >&6
24368else
24369  case $SETFILE in
24370  [\\/]* | ?:[\\/]*)
24371  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24372  ;;
24373  *)
24374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24375for as_dir in $PATH
24376do
24377  IFS=$as_save_IFS
24378  test -z "$as_dir" && as_dir=.
24379    for ac_exec_ext in '' $ac_executable_extensions; do
24380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24381    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24383    break 2
24384  fi
24385done
24386  done
24387IFS=$as_save_IFS
24388
24389  ;;
24390esac
24391fi
24392SETFILE=$ac_cv_path_SETFILE
24393if test -n "$SETFILE"; then
24394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24395$as_echo "$SETFILE" >&6; }
24396else
24397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24398$as_echo "no" >&6; }
24399fi
24400
24401
24402  test -n "$SETFILE" && break
24403done
24404
24405    else
24406      # If it succeeded, then it was overridden by the user. We will use it
24407      # for the tool.
24408
24409      # First remove it from the list of overridden variables, so we can test
24410      # for unknown variables in the end.
24411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24412
24413      # Check if we try to supply an empty value
24414      if test "x$SETFILE" = x; then
24415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24416$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24418$as_echo_n "checking for SETFILE... " >&6; }
24419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24420$as_echo "disabled" >&6; }
24421      else
24422        # Check if the provided tool contains a complete path.
24423        tool_specified="$SETFILE"
24424        tool_basename="${tool_specified##*/}"
24425        if test "x$tool_basename" = "x$tool_specified"; then
24426          # A command without a complete path is provided, search $PATH.
24427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24428$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24429          # Extract the first word of "$tool_basename", so it can be a program name with args.
24430set dummy $tool_basename; ac_word=$2
24431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24432$as_echo_n "checking for $ac_word... " >&6; }
24433if ${ac_cv_path_SETFILE+:} false; then :
24434  $as_echo_n "(cached) " >&6
24435else
24436  case $SETFILE in
24437  [\\/]* | ?:[\\/]*)
24438  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24439  ;;
24440  *)
24441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24442for as_dir in $PATH
24443do
24444  IFS=$as_save_IFS
24445  test -z "$as_dir" && as_dir=.
24446    for ac_exec_ext in '' $ac_executable_extensions; do
24447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24448    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24450    break 2
24451  fi
24452done
24453  done
24454IFS=$as_save_IFS
24455
24456  ;;
24457esac
24458fi
24459SETFILE=$ac_cv_path_SETFILE
24460if test -n "$SETFILE"; then
24461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24462$as_echo "$SETFILE" >&6; }
24463else
24464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24465$as_echo "no" >&6; }
24466fi
24467
24468
24469          if test "x$SETFILE" = x; then
24470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24471          fi
24472        else
24473          # Otherwise we believe it is a complete path. Use it as it is.
24474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24475$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24477$as_echo_n "checking for SETFILE... " >&6; }
24478          if test ! -x "$tool_specified"; then
24479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24480$as_echo "not found" >&6; }
24481            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24482          fi
24483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24484$as_echo "$tool_specified" >&6; }
24485        fi
24486      fi
24487    fi
24488
24489  fi
24490
24491
24492
24493  if test "x$SETFILE" = x; then
24494    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24495  fi
24496
24497
24498  fi
24499
24500
24501  # Check bash version
24502  # Extra [ ] to stop m4 mangling
24503   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24505$as_echo_n "checking bash version... " >&6; }
24506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24507$as_echo "$BASH_VER" >&6; }
24508
24509  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24510  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24511  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24512    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24513  fi
24514
24515  # Test if bash supports pipefail.
24516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24517$as_echo_n "checking if bash supports pipefail... " >&6; }
24518  if ${BASH} -c 'set -o pipefail'; then
24519    BASH_ARGS="$BASH_ARGS -o pipefail"
24520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24521$as_echo "yes" >&6; }
24522  else
24523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24524$as_echo "no" >&6; }
24525  fi
24526
24527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24528$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24529  if ${BASH} -e -c 'true'; then
24530    BASH_ARGS="$BASH_ARGS -e"
24531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24532$as_echo "yes" >&6; }
24533  else
24534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24535$as_echo "no" >&6; }
24536  fi
24537
24538
24539
24540
24541# Check if pkg-config is available.
24542
24543
24544if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24545	if test -n "$ac_tool_prefix"; then
24546  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24547set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24549$as_echo_n "checking for $ac_word... " >&6; }
24550if ${ac_cv_path_PKG_CONFIG+:} false; then :
24551  $as_echo_n "(cached) " >&6
24552else
24553  case $PKG_CONFIG in
24554  [\\/]* | ?:[\\/]*)
24555  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24556  ;;
24557  *)
24558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24559for as_dir in $PATH
24560do
24561  IFS=$as_save_IFS
24562  test -z "$as_dir" && as_dir=.
24563    for ac_exec_ext in '' $ac_executable_extensions; do
24564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24565    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24567    break 2
24568  fi
24569done
24570  done
24571IFS=$as_save_IFS
24572
24573  ;;
24574esac
24575fi
24576PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24577if test -n "$PKG_CONFIG"; then
24578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24579$as_echo "$PKG_CONFIG" >&6; }
24580else
24581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24582$as_echo "no" >&6; }
24583fi
24584
24585
24586fi
24587if test -z "$ac_cv_path_PKG_CONFIG"; then
24588  ac_pt_PKG_CONFIG=$PKG_CONFIG
24589  # Extract the first word of "pkg-config", so it can be a program name with args.
24590set dummy pkg-config; ac_word=$2
24591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24592$as_echo_n "checking for $ac_word... " >&6; }
24593if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24594  $as_echo_n "(cached) " >&6
24595else
24596  case $ac_pt_PKG_CONFIG in
24597  [\\/]* | ?:[\\/]*)
24598  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24599  ;;
24600  *)
24601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24602for as_dir in $PATH
24603do
24604  IFS=$as_save_IFS
24605  test -z "$as_dir" && as_dir=.
24606    for ac_exec_ext in '' $ac_executable_extensions; do
24607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24608    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24610    break 2
24611  fi
24612done
24613  done
24614IFS=$as_save_IFS
24615
24616  ;;
24617esac
24618fi
24619ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24620if test -n "$ac_pt_PKG_CONFIG"; then
24621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24622$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24623else
24624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24625$as_echo "no" >&6; }
24626fi
24627
24628  if test "x$ac_pt_PKG_CONFIG" = x; then
24629    PKG_CONFIG=""
24630  else
24631    case $cross_compiling:$ac_tool_warned in
24632yes:)
24633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24635ac_tool_warned=yes ;;
24636esac
24637    PKG_CONFIG=$ac_pt_PKG_CONFIG
24638  fi
24639else
24640  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24641fi
24642
24643fi
24644if test -n "$PKG_CONFIG"; then
24645	_pkg_min_version=0.9.0
24646	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24647$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24648	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24649		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24650$as_echo "yes" >&6; }
24651	else
24652		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24653$as_echo "no" >&6; }
24654		PKG_CONFIG=""
24655	fi
24656
24657fi
24658
24659# After basic tools have been setup, we can check build os specific details.
24660
24661  ###############################################################################
24662
24663  # Note that this is the build platform OS version!
24664
24665  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24666  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24667  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24668  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24669
24670
24671
24672
24673
24674# Misc basic settings
24675
24676
24677# Check whether --with-default-make-target was given.
24678if test "${with_default_make_target+set}" = set; then :
24679  withval=$with_default_make_target;
24680fi
24681
24682  if test "x$with_default_make_target" = "x" \
24683      || test "x$with_default_make_target" = "xyes"; then
24684    DEFAULT_MAKE_TARGET="exploded-image"
24685  elif test "x$with_default_make_target" = "xno"; then
24686    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24687  else
24688    DEFAULT_MAKE_TARGET="$with_default_make_target"
24689  fi
24690
24691
24692
24693
24694###############################################################################
24695#
24696# Determine OpenJDK variants, options and version numbers.
24697#
24698###############################################################################
24699
24700# We need build & target for this.
24701
24702  # Should we build a JDK without a graphical UI?
24703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24704$as_echo_n "checking headless only... " >&6; }
24705  # Check whether --enable-headless-only was given.
24706if test "${enable_headless_only+set}" = set; then :
24707  enableval=$enable_headless_only;
24708fi
24709
24710
24711  if test "x$enable_headless_only" = "xyes"; then
24712    ENABLE_HEADLESS_ONLY="true"
24713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24714$as_echo "yes" >&6; }
24715  elif test "x$enable_headless_only" = "xno"; then
24716    ENABLE_HEADLESS_ONLY="false"
24717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24718$as_echo "no" >&6; }
24719  elif test "x$enable_headless_only" = "x"; then
24720    ENABLE_HEADLESS_ONLY="false"
24721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24722$as_echo "no" >&6; }
24723  else
24724    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24725  fi
24726
24727
24728
24729  # Should we build the complete docs, or just a lightweight version?
24730  # Check whether --enable-full-docs was given.
24731if test "${enable_full_docs+set}" = set; then :
24732  enableval=$enable_full_docs;
24733fi
24734
24735
24736  # Verify dependencies
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24738$as_echo_n "checking for graphviz dot... " >&6; }
24739  if test "x$DOT" != "x"; then
24740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24741$as_echo "yes" >&6; }
24742  else
24743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24744$as_echo "no, cannot generate full docs" >&6; }
24745    FULL_DOCS_DEP_MISSING=true
24746  fi
24747
24748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24749$as_echo_n "checking full docs... " >&6; }
24750  if test "x$enable_full_docs" = xyes; then
24751    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24753$as_echo "no, missing dependencies" >&6; }
24754
24755  # Print a helpful message on how to acquire the necessary build dependency.
24756  # dot is the help tag: freetype, cups, alsa etc
24757  MISSING_DEPENDENCY=dot
24758
24759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24760    cygwin_help $MISSING_DEPENDENCY
24761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24762    msys_help $MISSING_DEPENDENCY
24763  else
24764    PKGHANDLER_COMMAND=
24765
24766    case $PKGHANDLER in
24767      apt-get)
24768        apt_help     $MISSING_DEPENDENCY ;;
24769      yum)
24770        yum_help     $MISSING_DEPENDENCY ;;
24771      brew)
24772        brew_help    $MISSING_DEPENDENCY ;;
24773      port)
24774        port_help    $MISSING_DEPENDENCY ;;
24775      pkgutil)
24776        pkgutil_help $MISSING_DEPENDENCY ;;
24777      pkgadd)
24778        pkgadd_help  $MISSING_DEPENDENCY ;;
24779    esac
24780
24781    if test "x$PKGHANDLER_COMMAND" != x; then
24782      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24783    fi
24784  fi
24785
24786      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24787    else
24788      ENABLE_FULL_DOCS=true
24789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24790$as_echo "yes, forced" >&6; }
24791    fi
24792  elif test "x$enable_full_docs" = xno; then
24793    ENABLE_FULL_DOCS=false
24794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24795$as_echo "no, forced" >&6; }
24796  elif test "x$enable_full_docs" = x; then
24797    ENABLE_FULL_DOCS=false
24798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, default" >&5
24799$as_echo "no, default" >&6; }
24800  else
24801    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24802  fi
24803
24804
24805
24806  # Choose cacerts source file
24807
24808# Check whether --with-cacerts-file was given.
24809if test "${with_cacerts_file+set}" = set; then :
24810  withval=$with_cacerts_file;
24811fi
24812
24813  if test "x$with_cacerts_file" != x; then
24814    CACERTS_FILE=$with_cacerts_file
24815  fi
24816
24817
24818  # Enable or disable unlimited crypto
24819  # Check whether --enable-unlimited-crypto was given.
24820if test "${enable_unlimited_crypto+set}" = set; then :
24821  enableval=$enable_unlimited_crypto;
24822else
24823  enable_unlimited_crypto=yes
24824fi
24825
24826  if test "x$enable_unlimited_crypto" = "xyes"; then
24827    UNLIMITED_CRYPTO=true
24828  else
24829    UNLIMITED_CRYPTO=false
24830  fi
24831
24832
24833  # Should we build the serviceability agent (SA)?
24834  INCLUDE_SA=true
24835  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24836    INCLUDE_SA=false
24837  fi
24838  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24839    INCLUDE_SA=false
24840  fi
24841
24842
24843  # Compress jars
24844  COMPRESS_JARS=false
24845
24846
24847
24848  # Setup default copyright year. Mostly overridden when building close to a new year.
24849
24850# Check whether --with-copyright-year was given.
24851if test "${with_copyright_year+set}" = set; then :
24852  withval=$with_copyright_year;
24853fi
24854
24855  if test "x$with_copyright_year" = xyes; then
24856    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24857  elif test "x$with_copyright_year" != x; then
24858    COPYRIGHT_YEAR="$with_copyright_year"
24859  else
24860    COPYRIGHT_YEAR=`$DATE +'%Y'`
24861  fi
24862
24863
24864
24865  # Check whether --enable-keep-packaged-modules was given.
24866if test "${enable_keep_packaged_modules+set}" = set; then :
24867  enableval=$enable_keep_packaged_modules;
24868fi
24869
24870
24871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24872$as_echo_n "checking if packaged modules are kept... " >&6; }
24873  if test "x$enable_keep_packaged_modules" = "xyes"; then
24874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24875$as_echo "yes" >&6; }
24876    JLINK_KEEP_PACKAGED_MODULES=true
24877  elif test "x$enable_keep_packaged_modules" = "xno"; then
24878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24879$as_echo "no" >&6; }
24880    JLINK_KEEP_PACKAGED_MODULES=false
24881  elif test "x$enable_keep_packaged_modules" = "x"; then
24882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24883$as_echo "yes (default)" >&6; }
24884    JLINK_KEEP_PACKAGED_MODULES=true
24885  else
24886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24887$as_echo "error" >&6; }
24888    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24889  fi
24890
24891
24892
24893
24894  # Warn user that old version arguments are deprecated.
24895
24896
24897# Check whether --with-milestone was given.
24898if test "${with_milestone+set}" = set; then :
24899  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24900$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24901fi
24902
24903
24904
24905
24906# Check whether --with-update-version was given.
24907if test "${with_update_version+set}" = set; then :
24908  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24909$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24910fi
24911
24912
24913
24914
24915# Check whether --with-user-release-suffix was given.
24916if test "${with_user_release_suffix+set}" = set; then :
24917  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
24918$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24919fi
24920
24921
24922
24923
24924# Check whether --with-build-number was given.
24925if test "${with_build_number+set}" = set; then :
24926  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24927$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24928fi
24929
24930
24931
24932  # Source the version numbers file
24933  . $AUTOCONF_DIR/version-numbers
24934
24935  # Some non-version number information is set in that file
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945  # Override version from arguments
24946
24947  # If --with-version-string is set, process it first. It is possible to
24948  # override parts with more specific flags, since these are processed later.
24949
24950# Check whether --with-version-string was given.
24951if test "${with_version_string+set}" = set; then :
24952  withval=$with_version_string;
24953fi
24954
24955  if test "x$with_version_string" = xyes; then
24956    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24957  elif test "x$with_version_string" != x; then
24958    # Additional [] needed to keep m4 from mangling shell constructs.
24959    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24960      VERSION_MAJOR=${BASH_REMATCH[1]}
24961      VERSION_MINOR=${BASH_REMATCH[3]}
24962      VERSION_SECURITY=${BASH_REMATCH[5]}
24963      VERSION_PATCH=${BASH_REMATCH[7]}
24964      VERSION_PRE=${BASH_REMATCH[9]}
24965      version_plus_separator=${BASH_REMATCH[11]}
24966      VERSION_BUILD=${BASH_REMATCH[12]}
24967      VERSION_OPT=${BASH_REMATCH[14]}
24968      # Unspecified numerical fields are interpreted as 0.
24969      if test "x$VERSION_MINOR" = x; then
24970        VERSION_MINOR=0
24971      fi
24972      if test "x$VERSION_SECURITY" = x; then
24973        VERSION_SECURITY=0
24974      fi
24975      if test "x$VERSION_PATCH" = x; then
24976        VERSION_PATCH=0
24977      fi
24978      if test "x$version_plus_separator" != x \
24979          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24980        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24981      fi
24982      # Stop the version part process from setting default values.
24983      # We still allow them to explicitly override though.
24984      NO_DEFAULT_VERSION_PARTS=true
24985    else
24986      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24987    fi
24988  fi
24989
24990
24991# Check whether --with-version-pre was given.
24992if test "${with_version_pre+set}" = set; then :
24993  withval=$with_version_pre; with_version_pre_present=true
24994else
24995  with_version_pre_present=false
24996fi
24997
24998
24999  if test "x$with_version_pre_present" = xtrue; then
25000    if test "x$with_version_pre" = xyes; then
25001      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25002    elif test "x$with_version_pre" = xno; then
25003      # Interpret --without-* as empty string instead of the literal "no"
25004      VERSION_PRE=
25005    else
25006      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25007       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25008      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25010$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25011      fi
25012    fi
25013  else
25014    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25015      # Default is to use "internal" as pre
25016      VERSION_PRE="internal"
25017    fi
25018  fi
25019
25020
25021# Check whether --with-version-opt was given.
25022if test "${with_version_opt+set}" = set; then :
25023  withval=$with_version_opt; with_version_opt_present=true
25024else
25025  with_version_opt_present=false
25026fi
25027
25028
25029  if test "x$with_version_opt_present" = xtrue; then
25030    if test "x$with_version_opt" = xyes; then
25031      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25032    elif test "x$with_version_opt" = xno; then
25033      # Interpret --without-* as empty string instead of the literal "no"
25034      VERSION_OPT=
25035    else
25036      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25037       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25038      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25040$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25041      fi
25042    fi
25043  else
25044    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25045      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25046      # Outer [ ] to quote m4.
25047       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25048      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25049    fi
25050  fi
25051
25052
25053# Check whether --with-version-build was given.
25054if test "${with_version_build+set}" = set; then :
25055  withval=$with_version_build; with_version_build_present=true
25056else
25057  with_version_build_present=false
25058fi
25059
25060
25061  if test "x$with_version_build_present" = xtrue; then
25062    if test "x$with_version_build" = xyes; then
25063      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25064    elif test "x$with_version_build" = xno; then
25065      # Interpret --without-* as empty string instead of the literal "no"
25066      VERSION_BUILD=
25067    elif test "x$with_version_build" = x; then
25068      VERSION_BUILD=
25069    else
25070
25071  # Additional [] needed to keep m4 from mangling shell constructs.
25072  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25073    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25074  fi
25075  # Extract the version number without leading zeros.
25076  cleaned_value=${BASH_REMATCH[1]}
25077  if test "x$cleaned_value" = x; then
25078    # Special case for zero
25079    cleaned_value=${BASH_REMATCH[2]}
25080  fi
25081
25082  if test $cleaned_value -gt 255; then
25083    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25084  fi
25085  if test "x$cleaned_value" != "x$with_version_build"; then
25086    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25087$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25088  fi
25089  VERSION_BUILD=$cleaned_value
25090
25091    fi
25092  else
25093    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25094      # Default is to not have a build number.
25095      VERSION_BUILD=""
25096      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25097      VERSION_BUILD=0
25098    fi
25099  fi
25100
25101
25102# Check whether --with-version-major was given.
25103if test "${with_version_major+set}" = set; then :
25104  withval=$with_version_major; with_version_major_present=true
25105else
25106  with_version_major_present=false
25107fi
25108
25109
25110  if test "x$with_version_major_present" = xtrue; then
25111    if test "x$with_version_major" = xyes; then
25112      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25113    else
25114
25115  # Additional [] needed to keep m4 from mangling shell constructs.
25116  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25117    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25118  fi
25119  # Extract the version number without leading zeros.
25120  cleaned_value=${BASH_REMATCH[1]}
25121  if test "x$cleaned_value" = x; then
25122    # Special case for zero
25123    cleaned_value=${BASH_REMATCH[2]}
25124  fi
25125
25126  if test $cleaned_value -gt 255; then
25127    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25128  fi
25129  if test "x$cleaned_value" != "x$with_version_major"; then
25130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25131$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25132  fi
25133  VERSION_MAJOR=$cleaned_value
25134
25135    fi
25136  else
25137    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25138      # Default is to get value from version-numbers
25139      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25140    fi
25141  fi
25142
25143
25144# Check whether --with-version-minor was given.
25145if test "${with_version_minor+set}" = set; then :
25146  withval=$with_version_minor; with_version_minor_present=true
25147else
25148  with_version_minor_present=false
25149fi
25150
25151
25152  if test "x$with_version_minor_present" = xtrue; then
25153    if test "x$with_version_minor" = xyes; then
25154      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25155    elif test "x$with_version_minor" = xno; then
25156      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25157      VERSION_MINOR=0
25158    elif test "x$with_version_minor" = x; then
25159      VERSION_MINOR=0
25160    else
25161
25162  # Additional [] needed to keep m4 from mangling shell constructs.
25163  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25164    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25165  fi
25166  # Extract the version number without leading zeros.
25167  cleaned_value=${BASH_REMATCH[1]}
25168  if test "x$cleaned_value" = x; then
25169    # Special case for zero
25170    cleaned_value=${BASH_REMATCH[2]}
25171  fi
25172
25173  if test $cleaned_value -gt 255; then
25174    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25175  fi
25176  if test "x$cleaned_value" != "x$with_version_minor"; then
25177    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25178$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25179  fi
25180  VERSION_MINOR=$cleaned_value
25181
25182    fi
25183  else
25184    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25185      # Default is 0, if unspecified
25186      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25187    fi
25188  fi
25189
25190
25191# Check whether --with-version-security was given.
25192if test "${with_version_security+set}" = set; then :
25193  withval=$with_version_security; with_version_security_present=true
25194else
25195  with_version_security_present=false
25196fi
25197
25198
25199  if test "x$with_version_security_present" = xtrue; then
25200    if test "x$with_version_security" = xyes; then
25201      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25202    elif test "x$with_version_security" = xno; then
25203      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25204      VERSION_SECURITY=0
25205    elif test "x$with_version_security" = x; then
25206      VERSION_SECURITY=0
25207    else
25208
25209  # Additional [] needed to keep m4 from mangling shell constructs.
25210  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25211    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25212  fi
25213  # Extract the version number without leading zeros.
25214  cleaned_value=${BASH_REMATCH[1]}
25215  if test "x$cleaned_value" = x; then
25216    # Special case for zero
25217    cleaned_value=${BASH_REMATCH[2]}
25218  fi
25219
25220  if test $cleaned_value -gt 255; then
25221    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25222  fi
25223  if test "x$cleaned_value" != "x$with_version_security"; then
25224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25225$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25226  fi
25227  VERSION_SECURITY=$cleaned_value
25228
25229    fi
25230  else
25231    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25232      # Default is 0, if unspecified
25233      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25234    fi
25235  fi
25236
25237
25238# Check whether --with-version-patch was given.
25239if test "${with_version_patch+set}" = set; then :
25240  withval=$with_version_patch; with_version_patch_present=true
25241else
25242  with_version_patch_present=false
25243fi
25244
25245
25246  if test "x$with_version_patch_present" = xtrue; then
25247    if test "x$with_version_patch" = xyes; then
25248      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25249    elif test "x$with_version_patch" = xno; then
25250      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25251      VERSION_PATCH=0
25252    elif test "x$with_version_patch" = x; then
25253      VERSION_PATCH=0
25254    else
25255
25256  # Additional [] needed to keep m4 from mangling shell constructs.
25257  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25258    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25259  fi
25260  # Extract the version number without leading zeros.
25261  cleaned_value=${BASH_REMATCH[1]}
25262  if test "x$cleaned_value" = x; then
25263    # Special case for zero
25264    cleaned_value=${BASH_REMATCH[2]}
25265  fi
25266
25267  if test $cleaned_value -gt 255; then
25268    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25269  fi
25270  if test "x$cleaned_value" != "x$with_version_patch"; then
25271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25272$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25273  fi
25274  VERSION_PATCH=$cleaned_value
25275
25276    fi
25277  else
25278    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25279      # Default is 0, if unspecified
25280      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25281    fi
25282  fi
25283
25284  # Calculate derived version properties
25285
25286  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25287  if test "x$VERSION_PRE" = x; then
25288    VERSION_IS_GA=true
25289  else
25290    VERSION_IS_GA=false
25291  fi
25292
25293  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25294  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25295
25296  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25297  # Strip trailing zeroes from stripped_version_number
25298  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25299  VERSION_NUMBER=$stripped_version_number
25300
25301  # The complete version string, with additional build information
25302  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25303    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25304  else
25305    # If either build or opt is set, we need a + separator
25306    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25307  fi
25308
25309  # The short version string, just VERSION_NUMBER and PRE, if present.
25310  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25311
25312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25313$as_echo_n "checking for version string... " >&6; }
25314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25315$as_echo "$VERSION_STRING" >&6; }
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331###############################################################################
25332#
25333# Setup BootJDK, used to bootstrap the build.
25334#
25335###############################################################################
25336
25337
25338  BOOT_JDK_FOUND=no
25339
25340# Check whether --with-boot-jdk was given.
25341if test "${with_boot_jdk+set}" = set; then :
25342  withval=$with_boot_jdk;
25343fi
25344
25345
25346  # We look for the Boot JDK through various means, going from more certain to
25347  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25348  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25349  # must check if this is indeed valid; otherwise we'll continue looking.
25350
25351  # Test: Is bootjdk explicitly set by command line arguments?
25352
25353  if test "x$BOOT_JDK_FOUND" = xno; then
25354    # Now execute the test
25355
25356  if test "x$with_boot_jdk" != x; then
25357    BOOT_JDK=$with_boot_jdk
25358    BOOT_JDK_FOUND=maybe
25359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25360$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25361  fi
25362
25363
25364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25366      # Do we have a bin/java?
25367      if test ! -x "$BOOT_JDK/bin/java"; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25370        BOOT_JDK_FOUND=no
25371      else
25372        # Do we have a bin/javac?
25373        if test ! -x "$BOOT_JDK/bin/javac"; then
25374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25378          BOOT_JDK_FOUND=no
25379        else
25380          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25381          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25382
25383          # Extra M4 quote needed to protect [] in grep expression.
25384          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25385          if test "x$FOUND_CORRECT_VERSION" = x; then
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25390            BOOT_JDK_FOUND=no
25391          else
25392            # We're done! :-)
25393            BOOT_JDK_FOUND=yes
25394
25395  # Only process if variable expands to non-empty
25396
25397  if test "x$BOOT_JDK" != x; then
25398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25399
25400  # Input might be given as Windows format, start by converting to
25401  # unix format.
25402  path="$BOOT_JDK"
25403  new_path=`$CYGPATH -u "$path"`
25404
25405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25408  # "foo.exe" is OK but "foo" is an error.
25409  #
25410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25411  # It is also a way to make sure we got the proper file name for the real test later on.
25412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25413  if test "x$test_shortpath" = x; then
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25417  fi
25418
25419  # Call helper function which possibly converts this using DOS-style short mode.
25420  # If so, the updated path is stored in $new_path.
25421
25422  input_path="$new_path"
25423  # Check if we need to convert this using DOS-style short mode. If the path
25424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425  # take no chances and rewrite it.
25426  # Note: m4 eats our [], so we need to use [ and ] instead.
25427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25428  if test "x$has_forbidden_chars" != x; then
25429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25433      # Going to short mode and back again did indeed matter. Since short mode is
25434      # case insensitive, let's make it lowercase to improve readability.
25435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436      # Now convert it back to Unix-style (cygpath)
25437      input_path=`$CYGPATH -u "$shortmode_path"`
25438      new_path="$input_path"
25439    fi
25440  fi
25441
25442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25443  if test "x$test_cygdrive_prefix" = x; then
25444    # As a simple fix, exclude /usr/bin since it's not a real path.
25445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25447      # a path prefixed by /cygdrive for fixpath to work.
25448      new_path="$CYGWIN_ROOT_PATH$input_path"
25449    fi
25450  fi
25451
25452
25453  if test "x$path" != "x$new_path"; then
25454    BOOT_JDK="$new_path"
25455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25457  fi
25458
25459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25460
25461  path="$BOOT_JDK"
25462  has_colon=`$ECHO $path | $GREP ^.:`
25463  new_path="$path"
25464  if test "x$has_colon" = x; then
25465    # Not in mixed or Windows style, start by that.
25466    new_path=`cmd //c echo $path`
25467  fi
25468
25469
25470  input_path="$new_path"
25471  # Check if we need to convert this using DOS-style short mode. If the path
25472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25473  # take no chances and rewrite it.
25474  # Note: m4 eats our [], so we need to use [ and ] instead.
25475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25476  if test "x$has_forbidden_chars" != x; then
25477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479  fi
25480
25481
25482  windows_path="$new_path"
25483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484    unix_path=`$CYGPATH -u "$windows_path"`
25485    new_path="$unix_path"
25486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25488    new_path="$unix_path"
25489  fi
25490
25491  if test "x$path" != "x$new_path"; then
25492    BOOT_JDK="$new_path"
25493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25495  fi
25496
25497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25499
25500    else
25501      # We're on a unix platform. Hooray! :)
25502      path="$BOOT_JDK"
25503      has_space=`$ECHO "$path" | $GREP " "`
25504      if test "x$has_space" != x; then
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25508      fi
25509
25510      # Use eval to expand a potential ~
25511      eval path="$path"
25512      if test ! -f "$path" && test ! -d "$path"; then
25513        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25514      fi
25515
25516      if test -d "$path"; then
25517        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25518      else
25519        dir="`$DIRNAME "$path"`"
25520        base="`$BASENAME "$path"`"
25521        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25522      fi
25523    fi
25524  fi
25525
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25527$as_echo_n "checking for Boot JDK... " >&6; }
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25529$as_echo "$BOOT_JDK" >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25531$as_echo_n "checking Boot JDK version... " >&6; }
25532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25534$as_echo "$BOOT_JDK_VERSION" >&6; }
25535          fi # end check jdk version
25536        fi # end check javac
25537      fi # end check java
25538    fi # end check boot jdk found
25539  fi
25540
25541  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25542    # Having specified an argument which is incorrect will produce an instant failure;
25543    # we should not go on looking
25544    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25545  fi
25546
25547  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25548
25549  if test "x$BOOT_JDK_FOUND" = xno; then
25550    # Now execute the test
25551
25552  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25553    # First check at user selected default
25554
25555  if test "x$BOOT_JDK_FOUND" = xno; then
25556    # Now execute the test
25557
25558  if test -x /usr/libexec/java_home; then
25559    BOOT_JDK=`/usr/libexec/java_home `
25560    BOOT_JDK_FOUND=maybe
25561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25562$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25563  fi
25564
25565
25566    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25567    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25568      # Do we have a bin/java?
25569      if test ! -x "$BOOT_JDK/bin/java"; then
25570        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25572        BOOT_JDK_FOUND=no
25573      else
25574        # Do we have a bin/javac?
25575        if test ! -x "$BOOT_JDK/bin/javac"; then
25576          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25578          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25579$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25580          BOOT_JDK_FOUND=no
25581        else
25582          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25583          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25584
25585          # Extra M4 quote needed to protect [] in grep expression.
25586          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25587          if test "x$FOUND_CORRECT_VERSION" = x; then
25588            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25590            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25591$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25592            BOOT_JDK_FOUND=no
25593          else
25594            # We're done! :-)
25595            BOOT_JDK_FOUND=yes
25596
25597  # Only process if variable expands to non-empty
25598
25599  if test "x$BOOT_JDK" != x; then
25600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25601
25602  # Input might be given as Windows format, start by converting to
25603  # unix format.
25604  path="$BOOT_JDK"
25605  new_path=`$CYGPATH -u "$path"`
25606
25607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25610  # "foo.exe" is OK but "foo" is an error.
25611  #
25612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25613  # It is also a way to make sure we got the proper file name for the real test later on.
25614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25615  if test "x$test_shortpath" = x; then
25616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25618    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25619  fi
25620
25621  # Call helper function which possibly converts this using DOS-style short mode.
25622  # If so, the updated path is stored in $new_path.
25623
25624  input_path="$new_path"
25625  # Check if we need to convert this using DOS-style short mode. If the path
25626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25627  # take no chances and rewrite it.
25628  # Note: m4 eats our [], so we need to use [ and ] instead.
25629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25630  if test "x$has_forbidden_chars" != x; then
25631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25635      # Going to short mode and back again did indeed matter. Since short mode is
25636      # case insensitive, let's make it lowercase to improve readability.
25637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25638      # Now convert it back to Unix-style (cygpath)
25639      input_path=`$CYGPATH -u "$shortmode_path"`
25640      new_path="$input_path"
25641    fi
25642  fi
25643
25644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25645  if test "x$test_cygdrive_prefix" = x; then
25646    # As a simple fix, exclude /usr/bin since it's not a real path.
25647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25649      # a path prefixed by /cygdrive for fixpath to work.
25650      new_path="$CYGWIN_ROOT_PATH$input_path"
25651    fi
25652  fi
25653
25654
25655  if test "x$path" != "x$new_path"; then
25656    BOOT_JDK="$new_path"
25657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25659  fi
25660
25661    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25662
25663  path="$BOOT_JDK"
25664  has_colon=`$ECHO $path | $GREP ^.:`
25665  new_path="$path"
25666  if test "x$has_colon" = x; then
25667    # Not in mixed or Windows style, start by that.
25668    new_path=`cmd //c echo $path`
25669  fi
25670
25671
25672  input_path="$new_path"
25673  # Check if we need to convert this using DOS-style short mode. If the path
25674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25675  # take no chances and rewrite it.
25676  # Note: m4 eats our [], so we need to use [ and ] instead.
25677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25678  if test "x$has_forbidden_chars" != x; then
25679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25681  fi
25682
25683
25684  windows_path="$new_path"
25685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686    unix_path=`$CYGPATH -u "$windows_path"`
25687    new_path="$unix_path"
25688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25690    new_path="$unix_path"
25691  fi
25692
25693  if test "x$path" != "x$new_path"; then
25694    BOOT_JDK="$new_path"
25695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25697  fi
25698
25699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25701
25702    else
25703      # We're on a unix platform. Hooray! :)
25704      path="$BOOT_JDK"
25705      has_space=`$ECHO "$path" | $GREP " "`
25706      if test "x$has_space" != x; then
25707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25709        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25710      fi
25711
25712      # Use eval to expand a potential ~
25713      eval path="$path"
25714      if test ! -f "$path" && test ! -d "$path"; then
25715        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25716      fi
25717
25718      if test -d "$path"; then
25719        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25720      else
25721        dir="`$DIRNAME "$path"`"
25722        base="`$BASENAME "$path"`"
25723        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25724      fi
25725    fi
25726  fi
25727
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25729$as_echo_n "checking for Boot JDK... " >&6; }
25730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25731$as_echo "$BOOT_JDK" >&6; }
25732            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25733$as_echo_n "checking Boot JDK version... " >&6; }
25734            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25736$as_echo "$BOOT_JDK_VERSION" >&6; }
25737          fi # end check jdk version
25738        fi # end check javac
25739      fi # end check java
25740    fi # end check boot jdk found
25741  fi
25742
25743    # If that did not work out (e.g. too old), try explicit versions instead
25744
25745  if test "x$BOOT_JDK_FOUND" = xno; then
25746    # Now execute the test
25747
25748  if test -x /usr/libexec/java_home; then
25749    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25750    BOOT_JDK_FOUND=maybe
25751    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25752$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25753  fi
25754
25755
25756    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25757    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25758      # Do we have a bin/java?
25759      if test ! -x "$BOOT_JDK/bin/java"; then
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25762        BOOT_JDK_FOUND=no
25763      else
25764        # Do we have a bin/javac?
25765        if test ! -x "$BOOT_JDK/bin/javac"; then
25766          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25768          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25769$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25770          BOOT_JDK_FOUND=no
25771        else
25772          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25773          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25774
25775          # Extra M4 quote needed to protect [] in grep expression.
25776          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25777          if test "x$FOUND_CORRECT_VERSION" = x; then
25778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25780            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25781$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25782            BOOT_JDK_FOUND=no
25783          else
25784            # We're done! :-)
25785            BOOT_JDK_FOUND=yes
25786
25787  # Only process if variable expands to non-empty
25788
25789  if test "x$BOOT_JDK" != x; then
25790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25791
25792  # Input might be given as Windows format, start by converting to
25793  # unix format.
25794  path="$BOOT_JDK"
25795  new_path=`$CYGPATH -u "$path"`
25796
25797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25800  # "foo.exe" is OK but "foo" is an error.
25801  #
25802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25803  # It is also a way to make sure we got the proper file name for the real test later on.
25804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25805  if test "x$test_shortpath" = x; then
25806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25807$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25808    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25809  fi
25810
25811  # Call helper function which possibly converts this using DOS-style short mode.
25812  # If so, the updated path is stored in $new_path.
25813
25814  input_path="$new_path"
25815  # Check if we need to convert this using DOS-style short mode. If the path
25816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25817  # take no chances and rewrite it.
25818  # Note: m4 eats our [], so we need to use [ and ] instead.
25819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25820  if test "x$has_forbidden_chars" != x; then
25821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25825      # Going to short mode and back again did indeed matter. Since short mode is
25826      # case insensitive, let's make it lowercase to improve readability.
25827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25828      # Now convert it back to Unix-style (cygpath)
25829      input_path=`$CYGPATH -u "$shortmode_path"`
25830      new_path="$input_path"
25831    fi
25832  fi
25833
25834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25835  if test "x$test_cygdrive_prefix" = x; then
25836    # As a simple fix, exclude /usr/bin since it's not a real path.
25837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25839      # a path prefixed by /cygdrive for fixpath to work.
25840      new_path="$CYGWIN_ROOT_PATH$input_path"
25841    fi
25842  fi
25843
25844
25845  if test "x$path" != "x$new_path"; then
25846    BOOT_JDK="$new_path"
25847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25849  fi
25850
25851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25852
25853  path="$BOOT_JDK"
25854  has_colon=`$ECHO $path | $GREP ^.:`
25855  new_path="$path"
25856  if test "x$has_colon" = x; then
25857    # Not in mixed or Windows style, start by that.
25858    new_path=`cmd //c echo $path`
25859  fi
25860
25861
25862  input_path="$new_path"
25863  # Check if we need to convert this using DOS-style short mode. If the path
25864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25865  # take no chances and rewrite it.
25866  # Note: m4 eats our [], so we need to use [ and ] instead.
25867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25868  if test "x$has_forbidden_chars" != x; then
25869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25871  fi
25872
25873
25874  windows_path="$new_path"
25875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25876    unix_path=`$CYGPATH -u "$windows_path"`
25877    new_path="$unix_path"
25878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25880    new_path="$unix_path"
25881  fi
25882
25883  if test "x$path" != "x$new_path"; then
25884    BOOT_JDK="$new_path"
25885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25887  fi
25888
25889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25891
25892    else
25893      # We're on a unix platform. Hooray! :)
25894      path="$BOOT_JDK"
25895      has_space=`$ECHO "$path" | $GREP " "`
25896      if test "x$has_space" != x; then
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25900      fi
25901
25902      # Use eval to expand a potential ~
25903      eval path="$path"
25904      if test ! -f "$path" && test ! -d "$path"; then
25905        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25906      fi
25907
25908      if test -d "$path"; then
25909        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25910      else
25911        dir="`$DIRNAME "$path"`"
25912        base="`$BASENAME "$path"`"
25913        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25914      fi
25915    fi
25916  fi
25917
25918            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25919$as_echo_n "checking for Boot JDK... " >&6; }
25920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25921$as_echo "$BOOT_JDK" >&6; }
25922            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25923$as_echo_n "checking Boot JDK version... " >&6; }
25924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25926$as_echo "$BOOT_JDK_VERSION" >&6; }
25927          fi # end check jdk version
25928        fi # end check javac
25929      fi # end check java
25930    fi # end check boot jdk found
25931  fi
25932
25933
25934  if test "x$BOOT_JDK_FOUND" = xno; then
25935    # Now execute the test
25936
25937  if test -x /usr/libexec/java_home; then
25938    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25939    BOOT_JDK_FOUND=maybe
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25941$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25942  fi
25943
25944
25945    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25946    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25947      # Do we have a bin/java?
25948      if test ! -x "$BOOT_JDK/bin/java"; then
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25951        BOOT_JDK_FOUND=no
25952      else
25953        # Do we have a bin/javac?
25954        if test ! -x "$BOOT_JDK/bin/javac"; then
25955          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25957          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25958$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25959          BOOT_JDK_FOUND=no
25960        else
25961          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25962          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25963
25964          # Extra M4 quote needed to protect [] in grep expression.
25965          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25966          if test "x$FOUND_CORRECT_VERSION" = x; then
25967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25969            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25970$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25971            BOOT_JDK_FOUND=no
25972          else
25973            # We're done! :-)
25974            BOOT_JDK_FOUND=yes
25975
25976  # Only process if variable expands to non-empty
25977
25978  if test "x$BOOT_JDK" != x; then
25979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25980
25981  # Input might be given as Windows format, start by converting to
25982  # unix format.
25983  path="$BOOT_JDK"
25984  new_path=`$CYGPATH -u "$path"`
25985
25986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25989  # "foo.exe" is OK but "foo" is an error.
25990  #
25991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25992  # It is also a way to make sure we got the proper file name for the real test later on.
25993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25994  if test "x$test_shortpath" = x; then
25995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25998  fi
25999
26000  # Call helper function which possibly converts this using DOS-style short mode.
26001  # If so, the updated path is stored in $new_path.
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26014      # Going to short mode and back again did indeed matter. Since short mode is
26015      # case insensitive, let's make it lowercase to improve readability.
26016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26017      # Now convert it back to Unix-style (cygpath)
26018      input_path=`$CYGPATH -u "$shortmode_path"`
26019      new_path="$input_path"
26020    fi
26021  fi
26022
26023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26024  if test "x$test_cygdrive_prefix" = x; then
26025    # As a simple fix, exclude /usr/bin since it's not a real path.
26026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26028      # a path prefixed by /cygdrive for fixpath to work.
26029      new_path="$CYGWIN_ROOT_PATH$input_path"
26030    fi
26031  fi
26032
26033
26034  if test "x$path" != "x$new_path"; then
26035    BOOT_JDK="$new_path"
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26038  fi
26039
26040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26041
26042  path="$BOOT_JDK"
26043  has_colon=`$ECHO $path | $GREP ^.:`
26044  new_path="$path"
26045  if test "x$has_colon" = x; then
26046    # Not in mixed or Windows style, start by that.
26047    new_path=`cmd //c echo $path`
26048  fi
26049
26050
26051  input_path="$new_path"
26052  # Check if we need to convert this using DOS-style short mode. If the path
26053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26054  # take no chances and rewrite it.
26055  # Note: m4 eats our [], so we need to use [ and ] instead.
26056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26057  if test "x$has_forbidden_chars" != x; then
26058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26060  fi
26061
26062
26063  windows_path="$new_path"
26064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26065    unix_path=`$CYGPATH -u "$windows_path"`
26066    new_path="$unix_path"
26067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26069    new_path="$unix_path"
26070  fi
26071
26072  if test "x$path" != "x$new_path"; then
26073    BOOT_JDK="$new_path"
26074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26076  fi
26077
26078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26080
26081    else
26082      # We're on a unix platform. Hooray! :)
26083      path="$BOOT_JDK"
26084      has_space=`$ECHO "$path" | $GREP " "`
26085      if test "x$has_space" != x; then
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26089      fi
26090
26091      # Use eval to expand a potential ~
26092      eval path="$path"
26093      if test ! -f "$path" && test ! -d "$path"; then
26094        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26095      fi
26096
26097      if test -d "$path"; then
26098        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26099      else
26100        dir="`$DIRNAME "$path"`"
26101        base="`$BASENAME "$path"`"
26102        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26103      fi
26104    fi
26105  fi
26106
26107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26108$as_echo_n "checking for Boot JDK... " >&6; }
26109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26110$as_echo "$BOOT_JDK" >&6; }
26111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26112$as_echo_n "checking Boot JDK version... " >&6; }
26113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26115$as_echo "$BOOT_JDK_VERSION" >&6; }
26116          fi # end check jdk version
26117        fi # end check javac
26118      fi # end check java
26119    fi # end check boot jdk found
26120  fi
26121
26122
26123  if test "x$BOOT_JDK_FOUND" = xno; then
26124    # Now execute the test
26125
26126  if test -x /usr/libexec/java_home; then
26127    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26128    BOOT_JDK_FOUND=maybe
26129    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26130$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26131  fi
26132
26133
26134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26136      # Do we have a bin/java?
26137      if test ! -x "$BOOT_JDK/bin/java"; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26140        BOOT_JDK_FOUND=no
26141      else
26142        # Do we have a bin/javac?
26143        if test ! -x "$BOOT_JDK/bin/javac"; then
26144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26148          BOOT_JDK_FOUND=no
26149        else
26150          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26151          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26152
26153          # Extra M4 quote needed to protect [] in grep expression.
26154          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26155          if test "x$FOUND_CORRECT_VERSION" = x; then
26156            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26158            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26159$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26160            BOOT_JDK_FOUND=no
26161          else
26162            # We're done! :-)
26163            BOOT_JDK_FOUND=yes
26164
26165  # Only process if variable expands to non-empty
26166
26167  if test "x$BOOT_JDK" != x; then
26168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26169
26170  # Input might be given as Windows format, start by converting to
26171  # unix format.
26172  path="$BOOT_JDK"
26173  new_path=`$CYGPATH -u "$path"`
26174
26175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26178  # "foo.exe" is OK but "foo" is an error.
26179  #
26180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26181  # It is also a way to make sure we got the proper file name for the real test later on.
26182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26183  if test "x$test_shortpath" = x; then
26184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26187  fi
26188
26189  # Call helper function which possibly converts this using DOS-style short mode.
26190  # If so, the updated path is stored in $new_path.
26191
26192  input_path="$new_path"
26193  # Check if we need to convert this using DOS-style short mode. If the path
26194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26195  # take no chances and rewrite it.
26196  # Note: m4 eats our [], so we need to use [ and ] instead.
26197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26198  if test "x$has_forbidden_chars" != x; then
26199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26203      # Going to short mode and back again did indeed matter. Since short mode is
26204      # case insensitive, let's make it lowercase to improve readability.
26205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206      # Now convert it back to Unix-style (cygpath)
26207      input_path=`$CYGPATH -u "$shortmode_path"`
26208      new_path="$input_path"
26209    fi
26210  fi
26211
26212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26213  if test "x$test_cygdrive_prefix" = x; then
26214    # As a simple fix, exclude /usr/bin since it's not a real path.
26215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26217      # a path prefixed by /cygdrive for fixpath to work.
26218      new_path="$CYGWIN_ROOT_PATH$input_path"
26219    fi
26220  fi
26221
26222
26223  if test "x$path" != "x$new_path"; then
26224    BOOT_JDK="$new_path"
26225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26227  fi
26228
26229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26230
26231  path="$BOOT_JDK"
26232  has_colon=`$ECHO $path | $GREP ^.:`
26233  new_path="$path"
26234  if test "x$has_colon" = x; then
26235    # Not in mixed or Windows style, start by that.
26236    new_path=`cmd //c echo $path`
26237  fi
26238
26239
26240  input_path="$new_path"
26241  # Check if we need to convert this using DOS-style short mode. If the path
26242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26243  # take no chances and rewrite it.
26244  # Note: m4 eats our [], so we need to use [ and ] instead.
26245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26246  if test "x$has_forbidden_chars" != x; then
26247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26249  fi
26250
26251
26252  windows_path="$new_path"
26253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26254    unix_path=`$CYGPATH -u "$windows_path"`
26255    new_path="$unix_path"
26256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26258    new_path="$unix_path"
26259  fi
26260
26261  if test "x$path" != "x$new_path"; then
26262    BOOT_JDK="$new_path"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26265  fi
26266
26267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26269
26270    else
26271      # We're on a unix platform. Hooray! :)
26272      path="$BOOT_JDK"
26273      has_space=`$ECHO "$path" | $GREP " "`
26274      if test "x$has_space" != x; then
26275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26278      fi
26279
26280      # Use eval to expand a potential ~
26281      eval path="$path"
26282      if test ! -f "$path" && test ! -d "$path"; then
26283        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26284      fi
26285
26286      if test -d "$path"; then
26287        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26288      else
26289        dir="`$DIRNAME "$path"`"
26290        base="`$BASENAME "$path"`"
26291        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26292      fi
26293    fi
26294  fi
26295
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26297$as_echo_n "checking for Boot JDK... " >&6; }
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26299$as_echo "$BOOT_JDK" >&6; }
26300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26301$as_echo_n "checking Boot JDK version... " >&6; }
26302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26304$as_echo "$BOOT_JDK_VERSION" >&6; }
26305          fi # end check jdk version
26306        fi # end check javac
26307      fi # end check java
26308    fi # end check boot jdk found
26309  fi
26310
26311  fi
26312
26313
26314    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26315    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26316      # Do we have a bin/java?
26317      if test ! -x "$BOOT_JDK/bin/java"; then
26318        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26320        BOOT_JDK_FOUND=no
26321      else
26322        # Do we have a bin/javac?
26323        if test ! -x "$BOOT_JDK/bin/javac"; then
26324          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26326          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26327$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26328          BOOT_JDK_FOUND=no
26329        else
26330          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26331          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26332
26333          # Extra M4 quote needed to protect [] in grep expression.
26334          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26335          if test "x$FOUND_CORRECT_VERSION" = x; then
26336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26338            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26339$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26340            BOOT_JDK_FOUND=no
26341          else
26342            # We're done! :-)
26343            BOOT_JDK_FOUND=yes
26344
26345  # Only process if variable expands to non-empty
26346
26347  if test "x$BOOT_JDK" != x; then
26348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26349
26350  # Input might be given as Windows format, start by converting to
26351  # unix format.
26352  path="$BOOT_JDK"
26353  new_path=`$CYGPATH -u "$path"`
26354
26355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26358  # "foo.exe" is OK but "foo" is an error.
26359  #
26360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26361  # It is also a way to make sure we got the proper file name for the real test later on.
26362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26363  if test "x$test_shortpath" = x; then
26364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26367  fi
26368
26369  # Call helper function which possibly converts this using DOS-style short mode.
26370  # If so, the updated path is stored in $new_path.
26371
26372  input_path="$new_path"
26373  # Check if we need to convert this using DOS-style short mode. If the path
26374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26375  # take no chances and rewrite it.
26376  # Note: m4 eats our [], so we need to use [ and ] instead.
26377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26378  if test "x$has_forbidden_chars" != x; then
26379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26383      # Going to short mode and back again did indeed matter. Since short mode is
26384      # case insensitive, let's make it lowercase to improve readability.
26385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26386      # Now convert it back to Unix-style (cygpath)
26387      input_path=`$CYGPATH -u "$shortmode_path"`
26388      new_path="$input_path"
26389    fi
26390  fi
26391
26392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26393  if test "x$test_cygdrive_prefix" = x; then
26394    # As a simple fix, exclude /usr/bin since it's not a real path.
26395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26397      # a path prefixed by /cygdrive for fixpath to work.
26398      new_path="$CYGWIN_ROOT_PATH$input_path"
26399    fi
26400  fi
26401
26402
26403  if test "x$path" != "x$new_path"; then
26404    BOOT_JDK="$new_path"
26405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26407  fi
26408
26409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26410
26411  path="$BOOT_JDK"
26412  has_colon=`$ECHO $path | $GREP ^.:`
26413  new_path="$path"
26414  if test "x$has_colon" = x; then
26415    # Not in mixed or Windows style, start by that.
26416    new_path=`cmd //c echo $path`
26417  fi
26418
26419
26420  input_path="$new_path"
26421  # Check if we need to convert this using DOS-style short mode. If the path
26422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26423  # take no chances and rewrite it.
26424  # Note: m4 eats our [], so we need to use [ and ] instead.
26425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26426  if test "x$has_forbidden_chars" != x; then
26427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26429  fi
26430
26431
26432  windows_path="$new_path"
26433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434    unix_path=`$CYGPATH -u "$windows_path"`
26435    new_path="$unix_path"
26436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26438    new_path="$unix_path"
26439  fi
26440
26441  if test "x$path" != "x$new_path"; then
26442    BOOT_JDK="$new_path"
26443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26445  fi
26446
26447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26449
26450    else
26451      # We're on a unix platform. Hooray! :)
26452      path="$BOOT_JDK"
26453      has_space=`$ECHO "$path" | $GREP " "`
26454      if test "x$has_space" != x; then
26455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26458      fi
26459
26460      # Use eval to expand a potential ~
26461      eval path="$path"
26462      if test ! -f "$path" && test ! -d "$path"; then
26463        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26464      fi
26465
26466      if test -d "$path"; then
26467        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26468      else
26469        dir="`$DIRNAME "$path"`"
26470        base="`$BASENAME "$path"`"
26471        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26472      fi
26473    fi
26474  fi
26475
26476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26477$as_echo_n "checking for Boot JDK... " >&6; }
26478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26479$as_echo "$BOOT_JDK" >&6; }
26480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26481$as_echo_n "checking Boot JDK version... " >&6; }
26482            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26484$as_echo "$BOOT_JDK_VERSION" >&6; }
26485          fi # end check jdk version
26486        fi # end check javac
26487      fi # end check java
26488    fi # end check boot jdk found
26489  fi
26490
26491
26492  # Test: Is $JAVA_HOME set?
26493
26494  if test "x$BOOT_JDK_FOUND" = xno; then
26495    # Now execute the test
26496
26497  if test "x$JAVA_HOME" != x; then
26498    JAVA_HOME_PROCESSED="$JAVA_HOME"
26499
26500  # Only process if variable expands to non-empty
26501
26502  if test "x$JAVA_HOME_PROCESSED" != x; then
26503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26504
26505  # Input might be given as Windows format, start by converting to
26506  # unix format.
26507  path="$JAVA_HOME_PROCESSED"
26508  new_path=`$CYGPATH -u "$path"`
26509
26510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26513  # "foo.exe" is OK but "foo" is an error.
26514  #
26515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26516  # It is also a way to make sure we got the proper file name for the real test later on.
26517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26518  if test "x$test_shortpath" = x; then
26519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26520$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26521    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26522  fi
26523
26524  # Call helper function which possibly converts this using DOS-style short mode.
26525  # If so, the updated path is stored in $new_path.
26526
26527  input_path="$new_path"
26528  # Check if we need to convert this using DOS-style short mode. If the path
26529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26530  # take no chances and rewrite it.
26531  # Note: m4 eats our [], so we need to use [ and ] instead.
26532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26533  if test "x$has_forbidden_chars" != x; then
26534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26538      # Going to short mode and back again did indeed matter. Since short mode is
26539      # case insensitive, let's make it lowercase to improve readability.
26540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26541      # Now convert it back to Unix-style (cygpath)
26542      input_path=`$CYGPATH -u "$shortmode_path"`
26543      new_path="$input_path"
26544    fi
26545  fi
26546
26547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26548  if test "x$test_cygdrive_prefix" = x; then
26549    # As a simple fix, exclude /usr/bin since it's not a real path.
26550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26552      # a path prefixed by /cygdrive for fixpath to work.
26553      new_path="$CYGWIN_ROOT_PATH$input_path"
26554    fi
26555  fi
26556
26557
26558  if test "x$path" != "x$new_path"; then
26559    JAVA_HOME_PROCESSED="$new_path"
26560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26561$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26562  fi
26563
26564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26565
26566  path="$JAVA_HOME_PROCESSED"
26567  has_colon=`$ECHO $path | $GREP ^.:`
26568  new_path="$path"
26569  if test "x$has_colon" = x; then
26570    # Not in mixed or Windows style, start by that.
26571    new_path=`cmd //c echo $path`
26572  fi
26573
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584  fi
26585
26586
26587  windows_path="$new_path"
26588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26589    unix_path=`$CYGPATH -u "$windows_path"`
26590    new_path="$unix_path"
26591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26593    new_path="$unix_path"
26594  fi
26595
26596  if test "x$path" != "x$new_path"; then
26597    JAVA_HOME_PROCESSED="$new_path"
26598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26599$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26600  fi
26601
26602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26604
26605    else
26606      # We're on a unix platform. Hooray! :)
26607      path="$JAVA_HOME_PROCESSED"
26608      has_space=`$ECHO "$path" | $GREP " "`
26609      if test "x$has_space" != x; then
26610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26611$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26613      fi
26614
26615      # Use eval to expand a potential ~
26616      eval path="$path"
26617      if test ! -f "$path" && test ! -d "$path"; then
26618        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26619      fi
26620
26621      if test -d "$path"; then
26622        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26623      else
26624        dir="`$DIRNAME "$path"`"
26625        base="`$BASENAME "$path"`"
26626        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26627      fi
26628    fi
26629  fi
26630
26631    if test ! -d "$JAVA_HOME_PROCESSED"; then
26632      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26633$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26634    else
26635      # Aha, the user has set a JAVA_HOME
26636      # let us use that as the Boot JDK.
26637      BOOT_JDK="$JAVA_HOME_PROCESSED"
26638      BOOT_JDK_FOUND=maybe
26639      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26640$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26641    fi
26642  fi
26643
26644
26645    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26646    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26647      # Do we have a bin/java?
26648      if test ! -x "$BOOT_JDK/bin/java"; then
26649        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26651        BOOT_JDK_FOUND=no
26652      else
26653        # Do we have a bin/javac?
26654        if test ! -x "$BOOT_JDK/bin/javac"; then
26655          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26657          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26658$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26659          BOOT_JDK_FOUND=no
26660        else
26661          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26662          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26663
26664          # Extra M4 quote needed to protect [] in grep expression.
26665          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26666          if test "x$FOUND_CORRECT_VERSION" = x; then
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26670$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26671            BOOT_JDK_FOUND=no
26672          else
26673            # We're done! :-)
26674            BOOT_JDK_FOUND=yes
26675
26676  # Only process if variable expands to non-empty
26677
26678  if test "x$BOOT_JDK" != x; then
26679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26680
26681  # Input might be given as Windows format, start by converting to
26682  # unix format.
26683  path="$BOOT_JDK"
26684  new_path=`$CYGPATH -u "$path"`
26685
26686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26689  # "foo.exe" is OK but "foo" is an error.
26690  #
26691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26692  # It is also a way to make sure we got the proper file name for the real test later on.
26693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26694  if test "x$test_shortpath" = x; then
26695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26697    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26698  fi
26699
26700  # Call helper function which possibly converts this using DOS-style short mode.
26701  # If so, the updated path is stored in $new_path.
26702
26703  input_path="$new_path"
26704  # Check if we need to convert this using DOS-style short mode. If the path
26705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26706  # take no chances and rewrite it.
26707  # Note: m4 eats our [], so we need to use [ and ] instead.
26708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26709  if test "x$has_forbidden_chars" != x; then
26710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26714      # Going to short mode and back again did indeed matter. Since short mode is
26715      # case insensitive, let's make it lowercase to improve readability.
26716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26717      # Now convert it back to Unix-style (cygpath)
26718      input_path=`$CYGPATH -u "$shortmode_path"`
26719      new_path="$input_path"
26720    fi
26721  fi
26722
26723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26724  if test "x$test_cygdrive_prefix" = x; then
26725    # As a simple fix, exclude /usr/bin since it's not a real path.
26726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26728      # a path prefixed by /cygdrive for fixpath to work.
26729      new_path="$CYGWIN_ROOT_PATH$input_path"
26730    fi
26731  fi
26732
26733
26734  if test "x$path" != "x$new_path"; then
26735    BOOT_JDK="$new_path"
26736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26738  fi
26739
26740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26741
26742  path="$BOOT_JDK"
26743  has_colon=`$ECHO $path | $GREP ^.:`
26744  new_path="$path"
26745  if test "x$has_colon" = x; then
26746    # Not in mixed or Windows style, start by that.
26747    new_path=`cmd //c echo $path`
26748  fi
26749
26750
26751  input_path="$new_path"
26752  # Check if we need to convert this using DOS-style short mode. If the path
26753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26754  # take no chances and rewrite it.
26755  # Note: m4 eats our [], so we need to use [ and ] instead.
26756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26757  if test "x$has_forbidden_chars" != x; then
26758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26760  fi
26761
26762
26763  windows_path="$new_path"
26764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26765    unix_path=`$CYGPATH -u "$windows_path"`
26766    new_path="$unix_path"
26767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26769    new_path="$unix_path"
26770  fi
26771
26772  if test "x$path" != "x$new_path"; then
26773    BOOT_JDK="$new_path"
26774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26776  fi
26777
26778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26780
26781    else
26782      # We're on a unix platform. Hooray! :)
26783      path="$BOOT_JDK"
26784      has_space=`$ECHO "$path" | $GREP " "`
26785      if test "x$has_space" != x; then
26786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26789      fi
26790
26791      # Use eval to expand a potential ~
26792      eval path="$path"
26793      if test ! -f "$path" && test ! -d "$path"; then
26794        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26795      fi
26796
26797      if test -d "$path"; then
26798        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26799      else
26800        dir="`$DIRNAME "$path"`"
26801        base="`$BASENAME "$path"`"
26802        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26803      fi
26804    fi
26805  fi
26806
26807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26808$as_echo_n "checking for Boot JDK... " >&6; }
26809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26810$as_echo "$BOOT_JDK" >&6; }
26811            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26812$as_echo_n "checking Boot JDK version... " >&6; }
26813            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26815$as_echo "$BOOT_JDK_VERSION" >&6; }
26816          fi # end check jdk version
26817        fi # end check javac
26818      fi # end check java
26819    fi # end check boot jdk found
26820  fi
26821
26822
26823  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26824
26825  if test "x$BOOT_JDK_FOUND" = xno; then
26826    # Now execute the test
26827
26828  # Extract the first word of "javac", so it can be a program name with args.
26829set dummy javac; ac_word=$2
26830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26831$as_echo_n "checking for $ac_word... " >&6; }
26832if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26833  $as_echo_n "(cached) " >&6
26834else
26835  case $JAVAC_CHECK in
26836  [\\/]* | ?:[\\/]*)
26837  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26838  ;;
26839  *)
26840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26841for as_dir in $PATH
26842do
26843  IFS=$as_save_IFS
26844  test -z "$as_dir" && as_dir=.
26845    for ac_exec_ext in '' $ac_executable_extensions; do
26846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26847    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26849    break 2
26850  fi
26851done
26852  done
26853IFS=$as_save_IFS
26854
26855  ;;
26856esac
26857fi
26858JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26859if test -n "$JAVAC_CHECK"; then
26860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26861$as_echo "$JAVAC_CHECK" >&6; }
26862else
26863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26864$as_echo "no" >&6; }
26865fi
26866
26867
26868  # Extract the first word of "java", so it can be a program name with args.
26869set dummy java; ac_word=$2
26870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26871$as_echo_n "checking for $ac_word... " >&6; }
26872if ${ac_cv_path_JAVA_CHECK+:} false; then :
26873  $as_echo_n "(cached) " >&6
26874else
26875  case $JAVA_CHECK in
26876  [\\/]* | ?:[\\/]*)
26877  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26878  ;;
26879  *)
26880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26881for as_dir in $PATH
26882do
26883  IFS=$as_save_IFS
26884  test -z "$as_dir" && as_dir=.
26885    for ac_exec_ext in '' $ac_executable_extensions; do
26886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26887    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26889    break 2
26890  fi
26891done
26892  done
26893IFS=$as_save_IFS
26894
26895  ;;
26896esac
26897fi
26898JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26899if test -n "$JAVA_CHECK"; then
26900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26901$as_echo "$JAVA_CHECK" >&6; }
26902else
26903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26904$as_echo "no" >&6; }
26905fi
26906
26907
26908  BINARY="$JAVAC_CHECK"
26909  if test "x$JAVAC_CHECK" = x; then
26910    BINARY="$JAVA_CHECK"
26911  fi
26912  if test "x$BINARY" != x; then
26913    # So there is a java(c) binary, it might be part of a JDK.
26914    # Lets find the JDK/JRE directory by following symbolic links.
26915    # Linux/GNU systems often have links from /usr/bin/java to
26916    # /etc/alternatives/java to the real JDK binary.
26917
26918  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26919    # Follow a chain of symbolic links. Use readlink
26920    # where it exists, else fall back to horribly
26921    # complicated shell code.
26922    if test "x$READLINK_TESTED" != yes; then
26923      # On MacOSX there is a readlink tool with a different
26924      # purpose than the GNU readlink tool. Check the found readlink.
26925      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26926      if test "x$ISGNU" = x; then
26927        # A readlink that we do not know how to use.
26928        # Are there other non-GNU readlinks out there?
26929        READLINK_TESTED=yes
26930        READLINK=
26931      fi
26932    fi
26933
26934    if test "x$READLINK" != x; then
26935      BINARY=`$READLINK -f $BINARY`
26936    else
26937      # Save the current directory for restoring afterwards
26938      STARTDIR=$PWD
26939      COUNTER=0
26940      sym_link_dir=`$DIRNAME $BINARY`
26941      sym_link_file=`$BASENAME $BINARY`
26942      cd $sym_link_dir
26943      # Use -P flag to resolve symlinks in directories.
26944      cd `$THEPWDCMD -P`
26945      sym_link_dir=`$THEPWDCMD -P`
26946      # Resolve file symlinks
26947      while test $COUNTER -lt 20; do
26948        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26949        if test "x$ISLINK" == x; then
26950          # This is not a symbolic link! We are done!
26951          break
26952        fi
26953        # Again resolve directory symlinks since the target of the just found
26954        # link could be in a different directory
26955        cd `$DIRNAME $ISLINK`
26956        sym_link_dir=`$THEPWDCMD -P`
26957        sym_link_file=`$BASENAME $ISLINK`
26958        let COUNTER=COUNTER+1
26959      done
26960      cd $STARTDIR
26961      BINARY=$sym_link_dir/$sym_link_file
26962    fi
26963  fi
26964
26965    BOOT_JDK=`dirname "$BINARY"`
26966    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26967    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26968      # Looks like we found ourselves an JDK
26969      BOOT_JDK_FOUND=maybe
26970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26971$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26972    fi
26973  fi
26974
26975
26976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26978      # Do we have a bin/java?
26979      if test ! -x "$BOOT_JDK/bin/java"; then
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26982        BOOT_JDK_FOUND=no
26983      else
26984        # Do we have a bin/javac?
26985        if test ! -x "$BOOT_JDK/bin/javac"; then
26986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26990          BOOT_JDK_FOUND=no
26991        else
26992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26994
26995          # Extra M4 quote needed to protect [] in grep expression.
26996          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26997          if test "x$FOUND_CORRECT_VERSION" = x; then
26998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27002            BOOT_JDK_FOUND=no
27003          else
27004            # We're done! :-)
27005            BOOT_JDK_FOUND=yes
27006
27007  # Only process if variable expands to non-empty
27008
27009  if test "x$BOOT_JDK" != x; then
27010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27011
27012  # Input might be given as Windows format, start by converting to
27013  # unix format.
27014  path="$BOOT_JDK"
27015  new_path=`$CYGPATH -u "$path"`
27016
27017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27020  # "foo.exe" is OK but "foo" is an error.
27021  #
27022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27023  # It is also a way to make sure we got the proper file name for the real test later on.
27024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27025  if test "x$test_shortpath" = x; then
27026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27029  fi
27030
27031  # Call helper function which possibly converts this using DOS-style short mode.
27032  # If so, the updated path is stored in $new_path.
27033
27034  input_path="$new_path"
27035  # Check if we need to convert this using DOS-style short mode. If the path
27036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27037  # take no chances and rewrite it.
27038  # Note: m4 eats our [], so we need to use [ and ] instead.
27039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27040  if test "x$has_forbidden_chars" != x; then
27041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27045      # Going to short mode and back again did indeed matter. Since short mode is
27046      # case insensitive, let's make it lowercase to improve readability.
27047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27048      # Now convert it back to Unix-style (cygpath)
27049      input_path=`$CYGPATH -u "$shortmode_path"`
27050      new_path="$input_path"
27051    fi
27052  fi
27053
27054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27055  if test "x$test_cygdrive_prefix" = x; then
27056    # As a simple fix, exclude /usr/bin since it's not a real path.
27057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27059      # a path prefixed by /cygdrive for fixpath to work.
27060      new_path="$CYGWIN_ROOT_PATH$input_path"
27061    fi
27062  fi
27063
27064
27065  if test "x$path" != "x$new_path"; then
27066    BOOT_JDK="$new_path"
27067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27069  fi
27070
27071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27072
27073  path="$BOOT_JDK"
27074  has_colon=`$ECHO $path | $GREP ^.:`
27075  new_path="$path"
27076  if test "x$has_colon" = x; then
27077    # Not in mixed or Windows style, start by that.
27078    new_path=`cmd //c echo $path`
27079  fi
27080
27081
27082  input_path="$new_path"
27083  # Check if we need to convert this using DOS-style short mode. If the path
27084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27085  # take no chances and rewrite it.
27086  # Note: m4 eats our [], so we need to use [ and ] instead.
27087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27088  if test "x$has_forbidden_chars" != x; then
27089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27091  fi
27092
27093
27094  windows_path="$new_path"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    new_path="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    new_path="$unix_path"
27101  fi
27102
27103  if test "x$path" != "x$new_path"; then
27104    BOOT_JDK="$new_path"
27105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27107  fi
27108
27109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27111
27112    else
27113      # We're on a unix platform. Hooray! :)
27114      path="$BOOT_JDK"
27115      has_space=`$ECHO "$path" | $GREP " "`
27116      if test "x$has_space" != x; then
27117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27120      fi
27121
27122      # Use eval to expand a potential ~
27123      eval path="$path"
27124      if test ! -f "$path" && test ! -d "$path"; then
27125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27126      fi
27127
27128      if test -d "$path"; then
27129        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27130      else
27131        dir="`$DIRNAME "$path"`"
27132        base="`$BASENAME "$path"`"
27133        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27134      fi
27135    fi
27136  fi
27137
27138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27139$as_echo_n "checking for Boot JDK... " >&6; }
27140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27141$as_echo "$BOOT_JDK" >&6; }
27142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27143$as_echo_n "checking Boot JDK version... " >&6; }
27144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27146$as_echo "$BOOT_JDK_VERSION" >&6; }
27147          fi # end check jdk version
27148        fi # end check javac
27149      fi # end check java
27150    fi # end check boot jdk found
27151  fi
27152
27153
27154  # Test: Is there a JDK installed in default, well-known locations?
27155
27156  if test "x$BOOT_JDK_FOUND" = xno; then
27157    # Now execute the test
27158
27159  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27160
27161  if test "x$BOOT_JDK_FOUND" = xno; then
27162    # Now execute the test
27163
27164  if test "x$ProgramW6432" != x; then
27165    VIRTUAL_DIR="$ProgramW6432/Java"
27166
27167  windows_path="$VIRTUAL_DIR"
27168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27169    unix_path=`$CYGPATH -u "$windows_path"`
27170    VIRTUAL_DIR="$unix_path"
27171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27173    VIRTUAL_DIR="$unix_path"
27174  fi
27175
27176
27177  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27178  BOOT_JDK_SUFFIX=""
27179  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27180  if test "x$ALL_JDKS_FOUND" != x; then
27181    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27182
27183  if test "x$BOOT_JDK_FOUND" = xno; then
27184    # Now execute the test
27185
27186        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27187        if test -d "$BOOT_JDK"; then
27188          BOOT_JDK_FOUND=maybe
27189          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27190$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27191        fi
27192
27193
27194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27196      # Do we have a bin/java?
27197      if test ! -x "$BOOT_JDK/bin/java"; then
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27200        BOOT_JDK_FOUND=no
27201      else
27202        # Do we have a bin/javac?
27203        if test ! -x "$BOOT_JDK/bin/javac"; then
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27208          BOOT_JDK_FOUND=no
27209        else
27210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27212
27213          # Extra M4 quote needed to protect [] in grep expression.
27214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27215          if test "x$FOUND_CORRECT_VERSION" = x; then
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27220            BOOT_JDK_FOUND=no
27221          else
27222            # We're done! :-)
27223            BOOT_JDK_FOUND=yes
27224
27225  # Only process if variable expands to non-empty
27226
27227  if test "x$BOOT_JDK" != x; then
27228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229
27230  # Input might be given as Windows format, start by converting to
27231  # unix format.
27232  path="$BOOT_JDK"
27233  new_path=`$CYGPATH -u "$path"`
27234
27235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27238  # "foo.exe" is OK but "foo" is an error.
27239  #
27240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27241  # It is also a way to make sure we got the proper file name for the real test later on.
27242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27243  if test "x$test_shortpath" = x; then
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27247  fi
27248
27249  # Call helper function which possibly converts this using DOS-style short mode.
27250  # If so, the updated path is stored in $new_path.
27251
27252  input_path="$new_path"
27253  # Check if we need to convert this using DOS-style short mode. If the path
27254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27255  # take no chances and rewrite it.
27256  # Note: m4 eats our [], so we need to use [ and ] instead.
27257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27258  if test "x$has_forbidden_chars" != x; then
27259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27263      # Going to short mode and back again did indeed matter. Since short mode is
27264      # case insensitive, let's make it lowercase to improve readability.
27265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27266      # Now convert it back to Unix-style (cygpath)
27267      input_path=`$CYGPATH -u "$shortmode_path"`
27268      new_path="$input_path"
27269    fi
27270  fi
27271
27272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27273  if test "x$test_cygdrive_prefix" = x; then
27274    # As a simple fix, exclude /usr/bin since it's not a real path.
27275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27277      # a path prefixed by /cygdrive for fixpath to work.
27278      new_path="$CYGWIN_ROOT_PATH$input_path"
27279    fi
27280  fi
27281
27282
27283  if test "x$path" != "x$new_path"; then
27284    BOOT_JDK="$new_path"
27285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27287  fi
27288
27289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290
27291  path="$BOOT_JDK"
27292  has_colon=`$ECHO $path | $GREP ^.:`
27293  new_path="$path"
27294  if test "x$has_colon" = x; then
27295    # Not in mixed or Windows style, start by that.
27296    new_path=`cmd //c echo $path`
27297  fi
27298
27299
27300  input_path="$new_path"
27301  # Check if we need to convert this using DOS-style short mode. If the path
27302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27303  # take no chances and rewrite it.
27304  # Note: m4 eats our [], so we need to use [ and ] instead.
27305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27306  if test "x$has_forbidden_chars" != x; then
27307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27309  fi
27310
27311
27312  windows_path="$new_path"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    new_path="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    new_path="$unix_path"
27319  fi
27320
27321  if test "x$path" != "x$new_path"; then
27322    BOOT_JDK="$new_path"
27323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27325  fi
27326
27327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27329
27330    else
27331      # We're on a unix platform. Hooray! :)
27332      path="$BOOT_JDK"
27333      has_space=`$ECHO "$path" | $GREP " "`
27334      if test "x$has_space" != x; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27338      fi
27339
27340      # Use eval to expand a potential ~
27341      eval path="$path"
27342      if test ! -f "$path" && test ! -d "$path"; then
27343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27344      fi
27345
27346      if test -d "$path"; then
27347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27348      else
27349        dir="`$DIRNAME "$path"`"
27350        base="`$BASENAME "$path"`"
27351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27352      fi
27353    fi
27354  fi
27355
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27357$as_echo_n "checking for Boot JDK... " >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27359$as_echo "$BOOT_JDK" >&6; }
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27361$as_echo_n "checking Boot JDK version... " >&6; }
27362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27364$as_echo "$BOOT_JDK_VERSION" >&6; }
27365          fi # end check jdk version
27366        fi # end check javac
27367      fi # end check java
27368    fi # end check boot jdk found
27369  fi
27370
27371    done
27372  fi
27373
27374  fi
27375
27376
27377    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27378    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27379      # Do we have a bin/java?
27380      if test ! -x "$BOOT_JDK/bin/java"; then
27381        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27383        BOOT_JDK_FOUND=no
27384      else
27385        # Do we have a bin/javac?
27386        if test ! -x "$BOOT_JDK/bin/javac"; then
27387          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27389          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27390$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27391          BOOT_JDK_FOUND=no
27392        else
27393          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27394          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27395
27396          # Extra M4 quote needed to protect [] in grep expression.
27397          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27398          if test "x$FOUND_CORRECT_VERSION" = x; then
27399            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27401            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27402$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27403            BOOT_JDK_FOUND=no
27404          else
27405            # We're done! :-)
27406            BOOT_JDK_FOUND=yes
27407
27408  # Only process if variable expands to non-empty
27409
27410  if test "x$BOOT_JDK" != x; then
27411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27412
27413  # Input might be given as Windows format, start by converting to
27414  # unix format.
27415  path="$BOOT_JDK"
27416  new_path=`$CYGPATH -u "$path"`
27417
27418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27421  # "foo.exe" is OK but "foo" is an error.
27422  #
27423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27424  # It is also a way to make sure we got the proper file name for the real test later on.
27425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27426  if test "x$test_shortpath" = x; then
27427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27429    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27430  fi
27431
27432  # Call helper function which possibly converts this using DOS-style short mode.
27433  # If so, the updated path is stored in $new_path.
27434
27435  input_path="$new_path"
27436  # Check if we need to convert this using DOS-style short mode. If the path
27437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27438  # take no chances and rewrite it.
27439  # Note: m4 eats our [], so we need to use [ and ] instead.
27440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27441  if test "x$has_forbidden_chars" != x; then
27442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27446      # Going to short mode and back again did indeed matter. Since short mode is
27447      # case insensitive, let's make it lowercase to improve readability.
27448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27449      # Now convert it back to Unix-style (cygpath)
27450      input_path=`$CYGPATH -u "$shortmode_path"`
27451      new_path="$input_path"
27452    fi
27453  fi
27454
27455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27456  if test "x$test_cygdrive_prefix" = x; then
27457    # As a simple fix, exclude /usr/bin since it's not a real path.
27458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27460      # a path prefixed by /cygdrive for fixpath to work.
27461      new_path="$CYGWIN_ROOT_PATH$input_path"
27462    fi
27463  fi
27464
27465
27466  if test "x$path" != "x$new_path"; then
27467    BOOT_JDK="$new_path"
27468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27470  fi
27471
27472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27473
27474  path="$BOOT_JDK"
27475  has_colon=`$ECHO $path | $GREP ^.:`
27476  new_path="$path"
27477  if test "x$has_colon" = x; then
27478    # Not in mixed or Windows style, start by that.
27479    new_path=`cmd //c echo $path`
27480  fi
27481
27482
27483  input_path="$new_path"
27484  # Check if we need to convert this using DOS-style short mode. If the path
27485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27486  # take no chances and rewrite it.
27487  # Note: m4 eats our [], so we need to use [ and ] instead.
27488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27489  if test "x$has_forbidden_chars" != x; then
27490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27492  fi
27493
27494
27495  windows_path="$new_path"
27496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497    unix_path=`$CYGPATH -u "$windows_path"`
27498    new_path="$unix_path"
27499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27501    new_path="$unix_path"
27502  fi
27503
27504  if test "x$path" != "x$new_path"; then
27505    BOOT_JDK="$new_path"
27506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27507$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27508  fi
27509
27510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27512
27513    else
27514      # We're on a unix platform. Hooray! :)
27515      path="$BOOT_JDK"
27516      has_space=`$ECHO "$path" | $GREP " "`
27517      if test "x$has_space" != x; then
27518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27519$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27521      fi
27522
27523      # Use eval to expand a potential ~
27524      eval path="$path"
27525      if test ! -f "$path" && test ! -d "$path"; then
27526        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27527      fi
27528
27529      if test -d "$path"; then
27530        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27531      else
27532        dir="`$DIRNAME "$path"`"
27533        base="`$BASENAME "$path"`"
27534        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27535      fi
27536    fi
27537  fi
27538
27539            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27540$as_echo_n "checking for Boot JDK... " >&6; }
27541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27542$as_echo "$BOOT_JDK" >&6; }
27543            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27544$as_echo_n "checking Boot JDK version... " >&6; }
27545            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27547$as_echo "$BOOT_JDK_VERSION" >&6; }
27548          fi # end check jdk version
27549        fi # end check javac
27550      fi # end check java
27551    fi # end check boot jdk found
27552  fi
27553
27554
27555  if test "x$BOOT_JDK_FOUND" = xno; then
27556    # Now execute the test
27557
27558  if test "x$PROGRAMW6432" != x; then
27559    VIRTUAL_DIR="$PROGRAMW6432/Java"
27560
27561  windows_path="$VIRTUAL_DIR"
27562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27563    unix_path=`$CYGPATH -u "$windows_path"`
27564    VIRTUAL_DIR="$unix_path"
27565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27567    VIRTUAL_DIR="$unix_path"
27568  fi
27569
27570
27571  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27572  BOOT_JDK_SUFFIX=""
27573  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27574  if test "x$ALL_JDKS_FOUND" != x; then
27575    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27576
27577  if test "x$BOOT_JDK_FOUND" = xno; then
27578    # Now execute the test
27579
27580        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27581        if test -d "$BOOT_JDK"; then
27582          BOOT_JDK_FOUND=maybe
27583          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27584$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27585        fi
27586
27587
27588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27590      # Do we have a bin/java?
27591      if test ! -x "$BOOT_JDK/bin/java"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27594        BOOT_JDK_FOUND=no
27595      else
27596        # Do we have a bin/javac?
27597        if test ! -x "$BOOT_JDK/bin/javac"; then
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27602          BOOT_JDK_FOUND=no
27603        else
27604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27606
27607          # Extra M4 quote needed to protect [] in grep expression.
27608          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27609          if test "x$FOUND_CORRECT_VERSION" = x; then
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27614            BOOT_JDK_FOUND=no
27615          else
27616            # We're done! :-)
27617            BOOT_JDK_FOUND=yes
27618
27619  # Only process if variable expands to non-empty
27620
27621  if test "x$BOOT_JDK" != x; then
27622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # Input might be given as Windows format, start by converting to
27625  # unix format.
27626  path="$BOOT_JDK"
27627  new_path=`$CYGPATH -u "$path"`
27628
27629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27632  # "foo.exe" is OK but "foo" is an error.
27633  #
27634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27635  # It is also a way to make sure we got the proper file name for the real test later on.
27636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27637  if test "x$test_shortpath" = x; then
27638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27641  fi
27642
27643  # Call helper function which possibly converts this using DOS-style short mode.
27644  # If so, the updated path is stored in $new_path.
27645
27646  input_path="$new_path"
27647  # Check if we need to convert this using DOS-style short mode. If the path
27648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27649  # take no chances and rewrite it.
27650  # Note: m4 eats our [], so we need to use [ and ] instead.
27651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27652  if test "x$has_forbidden_chars" != x; then
27653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27657      # Going to short mode and back again did indeed matter. Since short mode is
27658      # case insensitive, let's make it lowercase to improve readability.
27659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27660      # Now convert it back to Unix-style (cygpath)
27661      input_path=`$CYGPATH -u "$shortmode_path"`
27662      new_path="$input_path"
27663    fi
27664  fi
27665
27666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27667  if test "x$test_cygdrive_prefix" = x; then
27668    # As a simple fix, exclude /usr/bin since it's not a real path.
27669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27671      # a path prefixed by /cygdrive for fixpath to work.
27672      new_path="$CYGWIN_ROOT_PATH$input_path"
27673    fi
27674  fi
27675
27676
27677  if test "x$path" != "x$new_path"; then
27678    BOOT_JDK="$new_path"
27679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27681  fi
27682
27683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684
27685  path="$BOOT_JDK"
27686  has_colon=`$ECHO $path | $GREP ^.:`
27687  new_path="$path"
27688  if test "x$has_colon" = x; then
27689    # Not in mixed or Windows style, start by that.
27690    new_path=`cmd //c echo $path`
27691  fi
27692
27693
27694  input_path="$new_path"
27695  # Check if we need to convert this using DOS-style short mode. If the path
27696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27697  # take no chances and rewrite it.
27698  # Note: m4 eats our [], so we need to use [ and ] instead.
27699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27700  if test "x$has_forbidden_chars" != x; then
27701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27703  fi
27704
27705
27706  windows_path="$new_path"
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708    unix_path=`$CYGPATH -u "$windows_path"`
27709    new_path="$unix_path"
27710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712    new_path="$unix_path"
27713  fi
27714
27715  if test "x$path" != "x$new_path"; then
27716    BOOT_JDK="$new_path"
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27719  fi
27720
27721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27723
27724    else
27725      # We're on a unix platform. Hooray! :)
27726      path="$BOOT_JDK"
27727      has_space=`$ECHO "$path" | $GREP " "`
27728      if test "x$has_space" != x; then
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27732      fi
27733
27734      # Use eval to expand a potential ~
27735      eval path="$path"
27736      if test ! -f "$path" && test ! -d "$path"; then
27737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27738      fi
27739
27740      if test -d "$path"; then
27741        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27742      else
27743        dir="`$DIRNAME "$path"`"
27744        base="`$BASENAME "$path"`"
27745        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27746      fi
27747    fi
27748  fi
27749
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27751$as_echo_n "checking for Boot JDK... " >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27753$as_echo "$BOOT_JDK" >&6; }
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27755$as_echo_n "checking Boot JDK version... " >&6; }
27756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27758$as_echo "$BOOT_JDK_VERSION" >&6; }
27759          fi # end check jdk version
27760        fi # end check javac
27761      fi # end check java
27762    fi # end check boot jdk found
27763  fi
27764
27765    done
27766  fi
27767
27768  fi
27769
27770
27771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27773      # Do we have a bin/java?
27774      if test ! -x "$BOOT_JDK/bin/java"; then
27775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27777        BOOT_JDK_FOUND=no
27778      else
27779        # Do we have a bin/javac?
27780        if test ! -x "$BOOT_JDK/bin/javac"; then
27781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27785          BOOT_JDK_FOUND=no
27786        else
27787          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27788          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27789
27790          # Extra M4 quote needed to protect [] in grep expression.
27791          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27792          if test "x$FOUND_CORRECT_VERSION" = x; then
27793            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27795            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27796$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27797            BOOT_JDK_FOUND=no
27798          else
27799            # We're done! :-)
27800            BOOT_JDK_FOUND=yes
27801
27802  # Only process if variable expands to non-empty
27803
27804  if test "x$BOOT_JDK" != x; then
27805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27806
27807  # Input might be given as Windows format, start by converting to
27808  # unix format.
27809  path="$BOOT_JDK"
27810  new_path=`$CYGPATH -u "$path"`
27811
27812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27815  # "foo.exe" is OK but "foo" is an error.
27816  #
27817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27818  # It is also a way to make sure we got the proper file name for the real test later on.
27819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27820  if test "x$test_shortpath" = x; then
27821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27823    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27824  fi
27825
27826  # Call helper function which possibly converts this using DOS-style short mode.
27827  # If so, the updated path is stored in $new_path.
27828
27829  input_path="$new_path"
27830  # Check if we need to convert this using DOS-style short mode. If the path
27831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27832  # take no chances and rewrite it.
27833  # Note: m4 eats our [], so we need to use [ and ] instead.
27834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27835  if test "x$has_forbidden_chars" != x; then
27836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27840      # Going to short mode and back again did indeed matter. Since short mode is
27841      # case insensitive, let's make it lowercase to improve readability.
27842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27843      # Now convert it back to Unix-style (cygpath)
27844      input_path=`$CYGPATH -u "$shortmode_path"`
27845      new_path="$input_path"
27846    fi
27847  fi
27848
27849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27850  if test "x$test_cygdrive_prefix" = x; then
27851    # As a simple fix, exclude /usr/bin since it's not a real path.
27852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27854      # a path prefixed by /cygdrive for fixpath to work.
27855      new_path="$CYGWIN_ROOT_PATH$input_path"
27856    fi
27857  fi
27858
27859
27860  if test "x$path" != "x$new_path"; then
27861    BOOT_JDK="$new_path"
27862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27864  fi
27865
27866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867
27868  path="$BOOT_JDK"
27869  has_colon=`$ECHO $path | $GREP ^.:`
27870  new_path="$path"
27871  if test "x$has_colon" = x; then
27872    # Not in mixed or Windows style, start by that.
27873    new_path=`cmd //c echo $path`
27874  fi
27875
27876
27877  input_path="$new_path"
27878  # Check if we need to convert this using DOS-style short mode. If the path
27879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27880  # take no chances and rewrite it.
27881  # Note: m4 eats our [], so we need to use [ and ] instead.
27882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27883  if test "x$has_forbidden_chars" != x; then
27884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27886  fi
27887
27888
27889  windows_path="$new_path"
27890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27891    unix_path=`$CYGPATH -u "$windows_path"`
27892    new_path="$unix_path"
27893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27895    new_path="$unix_path"
27896  fi
27897
27898  if test "x$path" != "x$new_path"; then
27899    BOOT_JDK="$new_path"
27900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27902  fi
27903
27904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27906
27907    else
27908      # We're on a unix platform. Hooray! :)
27909      path="$BOOT_JDK"
27910      has_space=`$ECHO "$path" | $GREP " "`
27911      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
27915      fi
27916
27917      # Use eval to expand a potential ~
27918      eval path="$path"
27919      if test ! -f "$path" && test ! -d "$path"; then
27920        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27921      fi
27922
27923      if test -d "$path"; then
27924        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27925      else
27926        dir="`$DIRNAME "$path"`"
27927        base="`$BASENAME "$path"`"
27928        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27929      fi
27930    fi
27931  fi
27932
27933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27934$as_echo_n "checking for Boot JDK... " >&6; }
27935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27936$as_echo "$BOOT_JDK" >&6; }
27937            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27938$as_echo_n "checking Boot JDK version... " >&6; }
27939            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27941$as_echo "$BOOT_JDK_VERSION" >&6; }
27942          fi # end check jdk version
27943        fi # end check javac
27944      fi # end check java
27945    fi # end check boot jdk found
27946  fi
27947
27948
27949  if test "x$BOOT_JDK_FOUND" = xno; then
27950    # Now execute the test
27951
27952  if test "x$PROGRAMFILES" != x; then
27953    VIRTUAL_DIR="$PROGRAMFILES/Java"
27954
27955  windows_path="$VIRTUAL_DIR"
27956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27957    unix_path=`$CYGPATH -u "$windows_path"`
27958    VIRTUAL_DIR="$unix_path"
27959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27961    VIRTUAL_DIR="$unix_path"
27962  fi
27963
27964
27965  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27966  BOOT_JDK_SUFFIX=""
27967  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27968  if test "x$ALL_JDKS_FOUND" != x; then
27969    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27970
27971  if test "x$BOOT_JDK_FOUND" = xno; then
27972    # Now execute the test
27973
27974        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27975        if test -d "$BOOT_JDK"; then
27976          BOOT_JDK_FOUND=maybe
27977          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27978$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27979        fi
27980
27981
27982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27984      # Do we have a bin/java?
27985      if test ! -x "$BOOT_JDK/bin/java"; then
27986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27988        BOOT_JDK_FOUND=no
27989      else
27990        # Do we have a bin/javac?
27991        if test ! -x "$BOOT_JDK/bin/javac"; then
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27996          BOOT_JDK_FOUND=no
27997        else
27998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28000
28001          # Extra M4 quote needed to protect [] in grep expression.
28002          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28003          if test "x$FOUND_CORRECT_VERSION" = x; then
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28008            BOOT_JDK_FOUND=no
28009          else
28010            # We're done! :-)
28011            BOOT_JDK_FOUND=yes
28012
28013  # Only process if variable expands to non-empty
28014
28015  if test "x$BOOT_JDK" != x; then
28016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017
28018  # Input might be given as Windows format, start by converting to
28019  # unix format.
28020  path="$BOOT_JDK"
28021  new_path=`$CYGPATH -u "$path"`
28022
28023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28026  # "foo.exe" is OK but "foo" is an error.
28027  #
28028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28029  # It is also a way to make sure we got the proper file name for the real test later on.
28030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28031  if test "x$test_shortpath" = x; then
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28035  fi
28036
28037  # Call helper function which possibly converts this using DOS-style short mode.
28038  # If so, the updated path is stored in $new_path.
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28051      # Going to short mode and back again did indeed matter. Since short mode is
28052      # case insensitive, let's make it lowercase to improve readability.
28053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054      # Now convert it back to Unix-style (cygpath)
28055      input_path=`$CYGPATH -u "$shortmode_path"`
28056      new_path="$input_path"
28057    fi
28058  fi
28059
28060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28061  if test "x$test_cygdrive_prefix" = x; then
28062    # As a simple fix, exclude /usr/bin since it's not a real path.
28063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28065      # a path prefixed by /cygdrive for fixpath to work.
28066      new_path="$CYGWIN_ROOT_PATH$input_path"
28067    fi
28068  fi
28069
28070
28071  if test "x$path" != "x$new_path"; then
28072    BOOT_JDK="$new_path"
28073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28075  fi
28076
28077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078
28079  path="$BOOT_JDK"
28080  has_colon=`$ECHO $path | $GREP ^.:`
28081  new_path="$path"
28082  if test "x$has_colon" = x; then
28083    # Not in mixed or Windows style, start by that.
28084    new_path=`cmd //c echo $path`
28085  fi
28086
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28097  fi
28098
28099
28100  windows_path="$new_path"
28101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28102    unix_path=`$CYGPATH -u "$windows_path"`
28103    new_path="$unix_path"
28104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28106    new_path="$unix_path"
28107  fi
28108
28109  if test "x$path" != "x$new_path"; then
28110    BOOT_JDK="$new_path"
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28113  fi
28114
28115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28117
28118    else
28119      # We're on a unix platform. Hooray! :)
28120      path="$BOOT_JDK"
28121      has_space=`$ECHO "$path" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28126      fi
28127
28128      # Use eval to expand a potential ~
28129      eval path="$path"
28130      if test ! -f "$path" && test ! -d "$path"; then
28131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28132      fi
28133
28134      if test -d "$path"; then
28135        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28136      else
28137        dir="`$DIRNAME "$path"`"
28138        base="`$BASENAME "$path"`"
28139        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28140      fi
28141    fi
28142  fi
28143
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28145$as_echo_n "checking for Boot JDK... " >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28147$as_echo "$BOOT_JDK" >&6; }
28148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28149$as_echo_n "checking Boot JDK version... " >&6; }
28150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28152$as_echo "$BOOT_JDK_VERSION" >&6; }
28153          fi # end check jdk version
28154        fi # end check javac
28155      fi # end check java
28156    fi # end check boot jdk found
28157  fi
28158
28159    done
28160  fi
28161
28162  fi
28163
28164
28165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28167      # Do we have a bin/java?
28168      if test ! -x "$BOOT_JDK/bin/java"; then
28169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28171        BOOT_JDK_FOUND=no
28172      else
28173        # Do we have a bin/javac?
28174        if test ! -x "$BOOT_JDK/bin/javac"; then
28175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28179          BOOT_JDK_FOUND=no
28180        else
28181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28183
28184          # Extra M4 quote needed to protect [] in grep expression.
28185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28186          if test "x$FOUND_CORRECT_VERSION" = x; then
28187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28191            BOOT_JDK_FOUND=no
28192          else
28193            # We're done! :-)
28194            BOOT_JDK_FOUND=yes
28195
28196  # Only process if variable expands to non-empty
28197
28198  if test "x$BOOT_JDK" != x; then
28199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28200
28201  # Input might be given as Windows format, start by converting to
28202  # unix format.
28203  path="$BOOT_JDK"
28204  new_path=`$CYGPATH -u "$path"`
28205
28206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28209  # "foo.exe" is OK but "foo" is an error.
28210  #
28211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28212  # It is also a way to make sure we got the proper file name for the real test later on.
28213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28214  if test "x$test_shortpath" = x; then
28215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28218  fi
28219
28220  # Call helper function which possibly converts this using DOS-style short mode.
28221  # If so, the updated path is stored in $new_path.
28222
28223  input_path="$new_path"
28224  # Check if we need to convert this using DOS-style short mode. If the path
28225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28226  # take no chances and rewrite it.
28227  # Note: m4 eats our [], so we need to use [ and ] instead.
28228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28229  if test "x$has_forbidden_chars" != x; then
28230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28234      # Going to short mode and back again did indeed matter. Since short mode is
28235      # case insensitive, let's make it lowercase to improve readability.
28236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28237      # Now convert it back to Unix-style (cygpath)
28238      input_path=`$CYGPATH -u "$shortmode_path"`
28239      new_path="$input_path"
28240    fi
28241  fi
28242
28243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28244  if test "x$test_cygdrive_prefix" = x; then
28245    # As a simple fix, exclude /usr/bin since it's not a real path.
28246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28248      # a path prefixed by /cygdrive for fixpath to work.
28249      new_path="$CYGWIN_ROOT_PATH$input_path"
28250    fi
28251  fi
28252
28253
28254  if test "x$path" != "x$new_path"; then
28255    BOOT_JDK="$new_path"
28256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28258  fi
28259
28260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28261
28262  path="$BOOT_JDK"
28263  has_colon=`$ECHO $path | $GREP ^.:`
28264  new_path="$path"
28265  if test "x$has_colon" = x; then
28266    # Not in mixed or Windows style, start by that.
28267    new_path=`cmd //c echo $path`
28268  fi
28269
28270
28271  input_path="$new_path"
28272  # Check if we need to convert this using DOS-style short mode. If the path
28273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28274  # take no chances and rewrite it.
28275  # Note: m4 eats our [], so we need to use [ and ] instead.
28276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28277  if test "x$has_forbidden_chars" != x; then
28278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28280  fi
28281
28282
28283  windows_path="$new_path"
28284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28285    unix_path=`$CYGPATH -u "$windows_path"`
28286    new_path="$unix_path"
28287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28289    new_path="$unix_path"
28290  fi
28291
28292  if test "x$path" != "x$new_path"; then
28293    BOOT_JDK="$new_path"
28294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28296  fi
28297
28298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28300
28301    else
28302      # We're on a unix platform. Hooray! :)
28303      path="$BOOT_JDK"
28304      has_space=`$ECHO "$path" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28309      fi
28310
28311      # Use eval to expand a potential ~
28312      eval path="$path"
28313      if test ! -f "$path" && test ! -d "$path"; then
28314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28315      fi
28316
28317      if test -d "$path"; then
28318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28319      else
28320        dir="`$DIRNAME "$path"`"
28321        base="`$BASENAME "$path"`"
28322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28323      fi
28324    fi
28325  fi
28326
28327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28328$as_echo_n "checking for Boot JDK... " >&6; }
28329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28330$as_echo "$BOOT_JDK" >&6; }
28331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28332$as_echo_n "checking Boot JDK version... " >&6; }
28333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28335$as_echo "$BOOT_JDK_VERSION" >&6; }
28336          fi # end check jdk version
28337        fi # end check javac
28338      fi # end check java
28339    fi # end check boot jdk found
28340  fi
28341
28342
28343  if test "x$BOOT_JDK_FOUND" = xno; then
28344    # Now execute the test
28345
28346  if test "x$ProgramFiles" != x; then
28347    VIRTUAL_DIR="$ProgramFiles/Java"
28348
28349  windows_path="$VIRTUAL_DIR"
28350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28351    unix_path=`$CYGPATH -u "$windows_path"`
28352    VIRTUAL_DIR="$unix_path"
28353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28355    VIRTUAL_DIR="$unix_path"
28356  fi
28357
28358
28359  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28360  BOOT_JDK_SUFFIX=""
28361  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28362  if test "x$ALL_JDKS_FOUND" != x; then
28363    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28364
28365  if test "x$BOOT_JDK_FOUND" = xno; then
28366    # Now execute the test
28367
28368        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28369        if test -d "$BOOT_JDK"; then
28370          BOOT_JDK_FOUND=maybe
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28372$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28373        fi
28374
28375
28376    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28377    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28378      # Do we have a bin/java?
28379      if test ! -x "$BOOT_JDK/bin/java"; then
28380        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28382        BOOT_JDK_FOUND=no
28383      else
28384        # Do we have a bin/javac?
28385        if test ! -x "$BOOT_JDK/bin/javac"; then
28386          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28388          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28389$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28390          BOOT_JDK_FOUND=no
28391        else
28392          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28393          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28394
28395          # Extra M4 quote needed to protect [] in grep expression.
28396          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28397          if test "x$FOUND_CORRECT_VERSION" = x; then
28398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28400            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28401$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28402            BOOT_JDK_FOUND=no
28403          else
28404            # We're done! :-)
28405            BOOT_JDK_FOUND=yes
28406
28407  # Only process if variable expands to non-empty
28408
28409  if test "x$BOOT_JDK" != x; then
28410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28411
28412  # Input might be given as Windows format, start by converting to
28413  # unix format.
28414  path="$BOOT_JDK"
28415  new_path=`$CYGPATH -u "$path"`
28416
28417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28420  # "foo.exe" is OK but "foo" is an error.
28421  #
28422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28423  # It is also a way to make sure we got the proper file name for the real test later on.
28424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28425  if test "x$test_shortpath" = x; then
28426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28428    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28429  fi
28430
28431  # Call helper function which possibly converts this using DOS-style short mode.
28432  # If so, the updated path is stored in $new_path.
28433
28434  input_path="$new_path"
28435  # Check if we need to convert this using DOS-style short mode. If the path
28436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28437  # take no chances and rewrite it.
28438  # Note: m4 eats our [], so we need to use [ and ] instead.
28439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28440  if test "x$has_forbidden_chars" != x; then
28441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28445      # Going to short mode and back again did indeed matter. Since short mode is
28446      # case insensitive, let's make it lowercase to improve readability.
28447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28448      # Now convert it back to Unix-style (cygpath)
28449      input_path=`$CYGPATH -u "$shortmode_path"`
28450      new_path="$input_path"
28451    fi
28452  fi
28453
28454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28455  if test "x$test_cygdrive_prefix" = x; then
28456    # As a simple fix, exclude /usr/bin since it's not a real path.
28457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28459      # a path prefixed by /cygdrive for fixpath to work.
28460      new_path="$CYGWIN_ROOT_PATH$input_path"
28461    fi
28462  fi
28463
28464
28465  if test "x$path" != "x$new_path"; then
28466    BOOT_JDK="$new_path"
28467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28469  fi
28470
28471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28472
28473  path="$BOOT_JDK"
28474  has_colon=`$ECHO $path | $GREP ^.:`
28475  new_path="$path"
28476  if test "x$has_colon" = x; then
28477    # Not in mixed or Windows style, start by that.
28478    new_path=`cmd //c echo $path`
28479  fi
28480
28481
28482  input_path="$new_path"
28483  # Check if we need to convert this using DOS-style short mode. If the path
28484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28485  # take no chances and rewrite it.
28486  # Note: m4 eats our [], so we need to use [ and ] instead.
28487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28488  if test "x$has_forbidden_chars" != x; then
28489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28491  fi
28492
28493
28494  windows_path="$new_path"
28495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28496    unix_path=`$CYGPATH -u "$windows_path"`
28497    new_path="$unix_path"
28498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28500    new_path="$unix_path"
28501  fi
28502
28503  if test "x$path" != "x$new_path"; then
28504    BOOT_JDK="$new_path"
28505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28506$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28507  fi
28508
28509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28511
28512    else
28513      # We're on a unix platform. Hooray! :)
28514      path="$BOOT_JDK"
28515      has_space=`$ECHO "$path" | $GREP " "`
28516      if test "x$has_space" != x; then
28517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28520      fi
28521
28522      # Use eval to expand a potential ~
28523      eval path="$path"
28524      if test ! -f "$path" && test ! -d "$path"; then
28525        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28526      fi
28527
28528      if test -d "$path"; then
28529        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28530      else
28531        dir="`$DIRNAME "$path"`"
28532        base="`$BASENAME "$path"`"
28533        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28534      fi
28535    fi
28536  fi
28537
28538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28539$as_echo_n "checking for Boot JDK... " >&6; }
28540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28541$as_echo "$BOOT_JDK" >&6; }
28542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28543$as_echo_n "checking Boot JDK version... " >&6; }
28544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28546$as_echo "$BOOT_JDK_VERSION" >&6; }
28547          fi # end check jdk version
28548        fi # end check javac
28549      fi # end check java
28550    fi # end check boot jdk found
28551  fi
28552
28553    done
28554  fi
28555
28556  fi
28557
28558
28559    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28560    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28561      # Do we have a bin/java?
28562      if test ! -x "$BOOT_JDK/bin/java"; then
28563        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28565        BOOT_JDK_FOUND=no
28566      else
28567        # Do we have a bin/javac?
28568        if test ! -x "$BOOT_JDK/bin/javac"; then
28569          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28571          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28572$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28573          BOOT_JDK_FOUND=no
28574        else
28575          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28576          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28577
28578          # Extra M4 quote needed to protect [] in grep expression.
28579          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28580          if test "x$FOUND_CORRECT_VERSION" = x; then
28581            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28583            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28584$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28585            BOOT_JDK_FOUND=no
28586          else
28587            # We're done! :-)
28588            BOOT_JDK_FOUND=yes
28589
28590  # Only process if variable expands to non-empty
28591
28592  if test "x$BOOT_JDK" != x; then
28593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28594
28595  # Input might be given as Windows format, start by converting to
28596  # unix format.
28597  path="$BOOT_JDK"
28598  new_path=`$CYGPATH -u "$path"`
28599
28600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28603  # "foo.exe" is OK but "foo" is an error.
28604  #
28605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28606  # It is also a way to make sure we got the proper file name for the real test later on.
28607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28608  if test "x$test_shortpath" = x; then
28609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28611    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28612  fi
28613
28614  # Call helper function which possibly converts this using DOS-style short mode.
28615  # If so, the updated path is stored in $new_path.
28616
28617  input_path="$new_path"
28618  # Check if we need to convert this using DOS-style short mode. If the path
28619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28620  # take no chances and rewrite it.
28621  # Note: m4 eats our [], so we need to use [ and ] instead.
28622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28623  if test "x$has_forbidden_chars" != x; then
28624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28628      # Going to short mode and back again did indeed matter. Since short mode is
28629      # case insensitive, let's make it lowercase to improve readability.
28630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28631      # Now convert it back to Unix-style (cygpath)
28632      input_path=`$CYGPATH -u "$shortmode_path"`
28633      new_path="$input_path"
28634    fi
28635  fi
28636
28637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28638  if test "x$test_cygdrive_prefix" = x; then
28639    # As a simple fix, exclude /usr/bin since it's not a real path.
28640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28642      # a path prefixed by /cygdrive for fixpath to work.
28643      new_path="$CYGWIN_ROOT_PATH$input_path"
28644    fi
28645  fi
28646
28647
28648  if test "x$path" != "x$new_path"; then
28649    BOOT_JDK="$new_path"
28650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28652  fi
28653
28654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28655
28656  path="$BOOT_JDK"
28657  has_colon=`$ECHO $path | $GREP ^.:`
28658  new_path="$path"
28659  if test "x$has_colon" = x; then
28660    # Not in mixed or Windows style, start by that.
28661    new_path=`cmd //c echo $path`
28662  fi
28663
28664
28665  input_path="$new_path"
28666  # Check if we need to convert this using DOS-style short mode. If the path
28667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28668  # take no chances and rewrite it.
28669  # Note: m4 eats our [], so we need to use [ and ] instead.
28670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28671  if test "x$has_forbidden_chars" != x; then
28672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28674  fi
28675
28676
28677  windows_path="$new_path"
28678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28679    unix_path=`$CYGPATH -u "$windows_path"`
28680    new_path="$unix_path"
28681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28683    new_path="$unix_path"
28684  fi
28685
28686  if test "x$path" != "x$new_path"; then
28687    BOOT_JDK="$new_path"
28688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28690  fi
28691
28692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28694
28695    else
28696      # We're on a unix platform. Hooray! :)
28697      path="$BOOT_JDK"
28698      has_space=`$ECHO "$path" | $GREP " "`
28699      if test "x$has_space" != x; then
28700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28703      fi
28704
28705      # Use eval to expand a potential ~
28706      eval path="$path"
28707      if test ! -f "$path" && test ! -d "$path"; then
28708        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28709      fi
28710
28711      if test -d "$path"; then
28712        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28713      else
28714        dir="`$DIRNAME "$path"`"
28715        base="`$BASENAME "$path"`"
28716        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28717      fi
28718    fi
28719  fi
28720
28721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28722$as_echo_n "checking for Boot JDK... " >&6; }
28723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28724$as_echo "$BOOT_JDK" >&6; }
28725            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28726$as_echo_n "checking Boot JDK version... " >&6; }
28727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28729$as_echo "$BOOT_JDK_VERSION" >&6; }
28730          fi # end check jdk version
28731        fi # end check javac
28732      fi # end check java
28733    fi # end check boot jdk found
28734  fi
28735
28736
28737  if test "x$BOOT_JDK_FOUND" = xno; then
28738    # Now execute the test
28739
28740  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28741  BOOT_JDK_SUFFIX=""
28742  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28743  if test "x$ALL_JDKS_FOUND" != x; then
28744    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28745
28746  if test "x$BOOT_JDK_FOUND" = xno; then
28747    # Now execute the test
28748
28749        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28750        if test -d "$BOOT_JDK"; then
28751          BOOT_JDK_FOUND=maybe
28752          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28753$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28754        fi
28755
28756
28757    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28758    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28759      # Do we have a bin/java?
28760      if test ! -x "$BOOT_JDK/bin/java"; then
28761        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28763        BOOT_JDK_FOUND=no
28764      else
28765        # Do we have a bin/javac?
28766        if test ! -x "$BOOT_JDK/bin/javac"; then
28767          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28769          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28770$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28771          BOOT_JDK_FOUND=no
28772        else
28773          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28774          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28775
28776          # Extra M4 quote needed to protect [] in grep expression.
28777          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28778          if test "x$FOUND_CORRECT_VERSION" = x; then
28779            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28781            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28782$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28783            BOOT_JDK_FOUND=no
28784          else
28785            # We're done! :-)
28786            BOOT_JDK_FOUND=yes
28787
28788  # Only process if variable expands to non-empty
28789
28790  if test "x$BOOT_JDK" != x; then
28791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28792
28793  # Input might be given as Windows format, start by converting to
28794  # unix format.
28795  path="$BOOT_JDK"
28796  new_path=`$CYGPATH -u "$path"`
28797
28798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28801  # "foo.exe" is OK but "foo" is an error.
28802  #
28803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28804  # It is also a way to make sure we got the proper file name for the real test later on.
28805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28806  if test "x$test_shortpath" = x; then
28807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28809    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28810  fi
28811
28812  # Call helper function which possibly converts this using DOS-style short mode.
28813  # If so, the updated path is stored in $new_path.
28814
28815  input_path="$new_path"
28816  # Check if we need to convert this using DOS-style short mode. If the path
28817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28818  # take no chances and rewrite it.
28819  # Note: m4 eats our [], so we need to use [ and ] instead.
28820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28821  if test "x$has_forbidden_chars" != x; then
28822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28826      # Going to short mode and back again did indeed matter. Since short mode is
28827      # case insensitive, let's make it lowercase to improve readability.
28828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28829      # Now convert it back to Unix-style (cygpath)
28830      input_path=`$CYGPATH -u "$shortmode_path"`
28831      new_path="$input_path"
28832    fi
28833  fi
28834
28835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28836  if test "x$test_cygdrive_prefix" = x; then
28837    # As a simple fix, exclude /usr/bin since it's not a real path.
28838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28840      # a path prefixed by /cygdrive for fixpath to work.
28841      new_path="$CYGWIN_ROOT_PATH$input_path"
28842    fi
28843  fi
28844
28845
28846  if test "x$path" != "x$new_path"; then
28847    BOOT_JDK="$new_path"
28848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28850  fi
28851
28852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28853
28854  path="$BOOT_JDK"
28855  has_colon=`$ECHO $path | $GREP ^.:`
28856  new_path="$path"
28857  if test "x$has_colon" = x; then
28858    # Not in mixed or Windows style, start by that.
28859    new_path=`cmd //c echo $path`
28860  fi
28861
28862
28863  input_path="$new_path"
28864  # Check if we need to convert this using DOS-style short mode. If the path
28865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28866  # take no chances and rewrite it.
28867  # Note: m4 eats our [], so we need to use [ and ] instead.
28868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28869  if test "x$has_forbidden_chars" != x; then
28870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28872  fi
28873
28874
28875  windows_path="$new_path"
28876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28877    unix_path=`$CYGPATH -u "$windows_path"`
28878    new_path="$unix_path"
28879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28881    new_path="$unix_path"
28882  fi
28883
28884  if test "x$path" != "x$new_path"; then
28885    BOOT_JDK="$new_path"
28886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28888  fi
28889
28890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28892
28893    else
28894      # We're on a unix platform. Hooray! :)
28895      path="$BOOT_JDK"
28896      has_space=`$ECHO "$path" | $GREP " "`
28897      if test "x$has_space" != x; then
28898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28901      fi
28902
28903      # Use eval to expand a potential ~
28904      eval path="$path"
28905      if test ! -f "$path" && test ! -d "$path"; then
28906        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28907      fi
28908
28909      if test -d "$path"; then
28910        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28911      else
28912        dir="`$DIRNAME "$path"`"
28913        base="`$BASENAME "$path"`"
28914        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28915      fi
28916    fi
28917  fi
28918
28919            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28920$as_echo_n "checking for Boot JDK... " >&6; }
28921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28922$as_echo "$BOOT_JDK" >&6; }
28923            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28924$as_echo_n "checking Boot JDK version... " >&6; }
28925            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28927$as_echo "$BOOT_JDK_VERSION" >&6; }
28928          fi # end check jdk version
28929        fi # end check javac
28930      fi # end check java
28931    fi # end check boot jdk found
28932  fi
28933
28934    done
28935  fi
28936
28937
28938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28940      # Do we have a bin/java?
28941      if test ! -x "$BOOT_JDK/bin/java"; then
28942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28944        BOOT_JDK_FOUND=no
28945      else
28946        # Do we have a bin/javac?
28947        if test ! -x "$BOOT_JDK/bin/javac"; then
28948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28952          BOOT_JDK_FOUND=no
28953        else
28954          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28955          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28956
28957          # Extra M4 quote needed to protect [] in grep expression.
28958          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28959          if test "x$FOUND_CORRECT_VERSION" = x; then
28960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28962            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28963$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28964            BOOT_JDK_FOUND=no
28965          else
28966            # We're done! :-)
28967            BOOT_JDK_FOUND=yes
28968
28969  # Only process if variable expands to non-empty
28970
28971  if test "x$BOOT_JDK" != x; then
28972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28973
28974  # Input might be given as Windows format, start by converting to
28975  # unix format.
28976  path="$BOOT_JDK"
28977  new_path=`$CYGPATH -u "$path"`
28978
28979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28982  # "foo.exe" is OK but "foo" is an error.
28983  #
28984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28985  # It is also a way to make sure we got the proper file name for the real test later on.
28986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28987  if test "x$test_shortpath" = x; then
28988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28991  fi
28992
28993  # Call helper function which possibly converts this using DOS-style short mode.
28994  # If so, the updated path is stored in $new_path.
28995
28996  input_path="$new_path"
28997  # Check if we need to convert this using DOS-style short mode. If the path
28998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28999  # take no chances and rewrite it.
29000  # Note: m4 eats our [], so we need to use [ and ] instead.
29001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29002  if test "x$has_forbidden_chars" != x; then
29003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29007      # Going to short mode and back again did indeed matter. Since short mode is
29008      # case insensitive, let's make it lowercase to improve readability.
29009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29010      # Now convert it back to Unix-style (cygpath)
29011      input_path=`$CYGPATH -u "$shortmode_path"`
29012      new_path="$input_path"
29013    fi
29014  fi
29015
29016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29017  if test "x$test_cygdrive_prefix" = x; then
29018    # As a simple fix, exclude /usr/bin since it's not a real path.
29019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29021      # a path prefixed by /cygdrive for fixpath to work.
29022      new_path="$CYGWIN_ROOT_PATH$input_path"
29023    fi
29024  fi
29025
29026
29027  if test "x$path" != "x$new_path"; then
29028    BOOT_JDK="$new_path"
29029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29031  fi
29032
29033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29034
29035  path="$BOOT_JDK"
29036  has_colon=`$ECHO $path | $GREP ^.:`
29037  new_path="$path"
29038  if test "x$has_colon" = x; then
29039    # Not in mixed or Windows style, start by that.
29040    new_path=`cmd //c echo $path`
29041  fi
29042
29043
29044  input_path="$new_path"
29045  # Check if we need to convert this using DOS-style short mode. If the path
29046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29047  # take no chances and rewrite it.
29048  # Note: m4 eats our [], so we need to use [ and ] instead.
29049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29050  if test "x$has_forbidden_chars" != x; then
29051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29053  fi
29054
29055
29056  windows_path="$new_path"
29057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29058    unix_path=`$CYGPATH -u "$windows_path"`
29059    new_path="$unix_path"
29060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29062    new_path="$unix_path"
29063  fi
29064
29065  if test "x$path" != "x$new_path"; then
29066    BOOT_JDK="$new_path"
29067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29069  fi
29070
29071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29073
29074    else
29075      # We're on a unix platform. Hooray! :)
29076      path="$BOOT_JDK"
29077      has_space=`$ECHO "$path" | $GREP " "`
29078      if test "x$has_space" != x; then
29079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29080$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29082      fi
29083
29084      # Use eval to expand a potential ~
29085      eval path="$path"
29086      if test ! -f "$path" && test ! -d "$path"; then
29087        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29088      fi
29089
29090      if test -d "$path"; then
29091        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29092      else
29093        dir="`$DIRNAME "$path"`"
29094        base="`$BASENAME "$path"`"
29095        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29096      fi
29097    fi
29098  fi
29099
29100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29101$as_echo_n "checking for Boot JDK... " >&6; }
29102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29103$as_echo "$BOOT_JDK" >&6; }
29104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29105$as_echo_n "checking Boot JDK version... " >&6; }
29106            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29108$as_echo "$BOOT_JDK_VERSION" >&6; }
29109          fi # end check jdk version
29110        fi # end check javac
29111      fi # end check java
29112    fi # end check boot jdk found
29113  fi
29114
29115  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29116
29117  if test "x$BOOT_JDK_FOUND" = xno; then
29118    # Now execute the test
29119
29120  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29121  BOOT_JDK_SUFFIX="/Contents/Home"
29122  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29123  if test "x$ALL_JDKS_FOUND" != x; then
29124    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29125
29126  if test "x$BOOT_JDK_FOUND" = xno; then
29127    # Now execute the test
29128
29129        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29130        if test -d "$BOOT_JDK"; then
29131          BOOT_JDK_FOUND=maybe
29132          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29133$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29134        fi
29135
29136
29137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29139      # Do we have a bin/java?
29140      if test ! -x "$BOOT_JDK/bin/java"; then
29141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29143        BOOT_JDK_FOUND=no
29144      else
29145        # Do we have a bin/javac?
29146        if test ! -x "$BOOT_JDK/bin/javac"; then
29147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29151          BOOT_JDK_FOUND=no
29152        else
29153          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29154          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29155
29156          # Extra M4 quote needed to protect [] in grep expression.
29157          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29158          if test "x$FOUND_CORRECT_VERSION" = x; then
29159            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29161            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29162$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29163            BOOT_JDK_FOUND=no
29164          else
29165            # We're done! :-)
29166            BOOT_JDK_FOUND=yes
29167
29168  # Only process if variable expands to non-empty
29169
29170  if test "x$BOOT_JDK" != x; then
29171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29172
29173  # Input might be given as Windows format, start by converting to
29174  # unix format.
29175  path="$BOOT_JDK"
29176  new_path=`$CYGPATH -u "$path"`
29177
29178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29181  # "foo.exe" is OK but "foo" is an error.
29182  #
29183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29184  # It is also a way to make sure we got the proper file name for the real test later on.
29185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29186  if test "x$test_shortpath" = x; then
29187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29190  fi
29191
29192  # Call helper function which possibly converts this using DOS-style short mode.
29193  # If so, the updated path is stored in $new_path.
29194
29195  input_path="$new_path"
29196  # Check if we need to convert this using DOS-style short mode. If the path
29197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29198  # take no chances and rewrite it.
29199  # Note: m4 eats our [], so we need to use [ and ] instead.
29200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29201  if test "x$has_forbidden_chars" != x; then
29202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29206      # Going to short mode and back again did indeed matter. Since short mode is
29207      # case insensitive, let's make it lowercase to improve readability.
29208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29209      # Now convert it back to Unix-style (cygpath)
29210      input_path=`$CYGPATH -u "$shortmode_path"`
29211      new_path="$input_path"
29212    fi
29213  fi
29214
29215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29216  if test "x$test_cygdrive_prefix" = x; then
29217    # As a simple fix, exclude /usr/bin since it's not a real path.
29218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29220      # a path prefixed by /cygdrive for fixpath to work.
29221      new_path="$CYGWIN_ROOT_PATH$input_path"
29222    fi
29223  fi
29224
29225
29226  if test "x$path" != "x$new_path"; then
29227    BOOT_JDK="$new_path"
29228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29230  fi
29231
29232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29233
29234  path="$BOOT_JDK"
29235  has_colon=`$ECHO $path | $GREP ^.:`
29236  new_path="$path"
29237  if test "x$has_colon" = x; then
29238    # Not in mixed or Windows style, start by that.
29239    new_path=`cmd //c echo $path`
29240  fi
29241
29242
29243  input_path="$new_path"
29244  # Check if we need to convert this using DOS-style short mode. If the path
29245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29246  # take no chances and rewrite it.
29247  # Note: m4 eats our [], so we need to use [ and ] instead.
29248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29249  if test "x$has_forbidden_chars" != x; then
29250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29252  fi
29253
29254
29255  windows_path="$new_path"
29256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29257    unix_path=`$CYGPATH -u "$windows_path"`
29258    new_path="$unix_path"
29259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29261    new_path="$unix_path"
29262  fi
29263
29264  if test "x$path" != "x$new_path"; then
29265    BOOT_JDK="$new_path"
29266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29268  fi
29269
29270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29272
29273    else
29274      # We're on a unix platform. Hooray! :)
29275      path="$BOOT_JDK"
29276      has_space=`$ECHO "$path" | $GREP " "`
29277      if test "x$has_space" != x; then
29278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29281      fi
29282
29283      # Use eval to expand a potential ~
29284      eval path="$path"
29285      if test ! -f "$path" && test ! -d "$path"; then
29286        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29287      fi
29288
29289      if test -d "$path"; then
29290        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29291      else
29292        dir="`$DIRNAME "$path"`"
29293        base="`$BASENAME "$path"`"
29294        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29295      fi
29296    fi
29297  fi
29298
29299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29300$as_echo_n "checking for Boot JDK... " >&6; }
29301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29302$as_echo "$BOOT_JDK" >&6; }
29303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29304$as_echo_n "checking Boot JDK version... " >&6; }
29305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29307$as_echo "$BOOT_JDK_VERSION" >&6; }
29308          fi # end check jdk version
29309        fi # end check javac
29310      fi # end check java
29311    fi # end check boot jdk found
29312  fi
29313
29314    done
29315  fi
29316
29317
29318    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29319    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29320      # Do we have a bin/java?
29321      if test ! -x "$BOOT_JDK/bin/java"; then
29322        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29324        BOOT_JDK_FOUND=no
29325      else
29326        # Do we have a bin/javac?
29327        if test ! -x "$BOOT_JDK/bin/javac"; then
29328          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29330          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29331$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29332          BOOT_JDK_FOUND=no
29333        else
29334          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29335          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29336
29337          # Extra M4 quote needed to protect [] in grep expression.
29338          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29339          if test "x$FOUND_CORRECT_VERSION" = x; then
29340            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29342            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29343$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29344            BOOT_JDK_FOUND=no
29345          else
29346            # We're done! :-)
29347            BOOT_JDK_FOUND=yes
29348
29349  # Only process if variable expands to non-empty
29350
29351  if test "x$BOOT_JDK" != x; then
29352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29353
29354  # Input might be given as Windows format, start by converting to
29355  # unix format.
29356  path="$BOOT_JDK"
29357  new_path=`$CYGPATH -u "$path"`
29358
29359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29362  # "foo.exe" is OK but "foo" is an error.
29363  #
29364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29365  # It is also a way to make sure we got the proper file name for the real test later on.
29366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29367  if test "x$test_shortpath" = x; then
29368    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29370    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29371  fi
29372
29373  # Call helper function which possibly converts this using DOS-style short mode.
29374  # If so, the updated path is stored in $new_path.
29375
29376  input_path="$new_path"
29377  # Check if we need to convert this using DOS-style short mode. If the path
29378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29379  # take no chances and rewrite it.
29380  # Note: m4 eats our [], so we need to use [ and ] instead.
29381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29382  if test "x$has_forbidden_chars" != x; then
29383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29387      # Going to short mode and back again did indeed matter. Since short mode is
29388      # case insensitive, let's make it lowercase to improve readability.
29389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29390      # Now convert it back to Unix-style (cygpath)
29391      input_path=`$CYGPATH -u "$shortmode_path"`
29392      new_path="$input_path"
29393    fi
29394  fi
29395
29396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29397  if test "x$test_cygdrive_prefix" = x; then
29398    # As a simple fix, exclude /usr/bin since it's not a real path.
29399    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29401      # a path prefixed by /cygdrive for fixpath to work.
29402      new_path="$CYGWIN_ROOT_PATH$input_path"
29403    fi
29404  fi
29405
29406
29407  if test "x$path" != "x$new_path"; then
29408    BOOT_JDK="$new_path"
29409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29411  fi
29412
29413    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29414
29415  path="$BOOT_JDK"
29416  has_colon=`$ECHO $path | $GREP ^.:`
29417  new_path="$path"
29418  if test "x$has_colon" = x; then
29419    # Not in mixed or Windows style, start by that.
29420    new_path=`cmd //c echo $path`
29421  fi
29422
29423
29424  input_path="$new_path"
29425  # Check if we need to convert this using DOS-style short mode. If the path
29426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29427  # take no chances and rewrite it.
29428  # Note: m4 eats our [], so we need to use [ and ] instead.
29429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29430  if test "x$has_forbidden_chars" != x; then
29431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29433  fi
29434
29435
29436  windows_path="$new_path"
29437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29438    unix_path=`$CYGPATH -u "$windows_path"`
29439    new_path="$unix_path"
29440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29442    new_path="$unix_path"
29443  fi
29444
29445  if test "x$path" != "x$new_path"; then
29446    BOOT_JDK="$new_path"
29447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29449  fi
29450
29451  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29452  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29453
29454    else
29455      # We're on a unix platform. Hooray! :)
29456      path="$BOOT_JDK"
29457      has_space=`$ECHO "$path" | $GREP " "`
29458      if test "x$has_space" != x; then
29459        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29461        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29462      fi
29463
29464      # Use eval to expand a potential ~
29465      eval path="$path"
29466      if test ! -f "$path" && test ! -d "$path"; then
29467        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29468      fi
29469
29470      if test -d "$path"; then
29471        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29472      else
29473        dir="`$DIRNAME "$path"`"
29474        base="`$BASENAME "$path"`"
29475        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29476      fi
29477    fi
29478  fi
29479
29480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29481$as_echo_n "checking for Boot JDK... " >&6; }
29482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29483$as_echo "$BOOT_JDK" >&6; }
29484            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29485$as_echo_n "checking Boot JDK version... " >&6; }
29486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29488$as_echo "$BOOT_JDK_VERSION" >&6; }
29489          fi # end check jdk version
29490        fi # end check javac
29491      fi # end check java
29492    fi # end check boot jdk found
29493  fi
29494
29495
29496  if test "x$BOOT_JDK_FOUND" = xno; then
29497    # Now execute the test
29498
29499  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29500  BOOT_JDK_SUFFIX="/Contents/Home"
29501  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29502  if test "x$ALL_JDKS_FOUND" != x; then
29503    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29504
29505  if test "x$BOOT_JDK_FOUND" = xno; then
29506    # Now execute the test
29507
29508        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29509        if test -d "$BOOT_JDK"; then
29510          BOOT_JDK_FOUND=maybe
29511          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29512$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29513        fi
29514
29515
29516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29518      # Do we have a bin/java?
29519      if test ! -x "$BOOT_JDK/bin/java"; then
29520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29522        BOOT_JDK_FOUND=no
29523      else
29524        # Do we have a bin/javac?
29525        if test ! -x "$BOOT_JDK/bin/javac"; then
29526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29530          BOOT_JDK_FOUND=no
29531        else
29532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29534
29535          # Extra M4 quote needed to protect [] in grep expression.
29536          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29537          if test "x$FOUND_CORRECT_VERSION" = x; then
29538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29542            BOOT_JDK_FOUND=no
29543          else
29544            # We're done! :-)
29545            BOOT_JDK_FOUND=yes
29546
29547  # Only process if variable expands to non-empty
29548
29549  if test "x$BOOT_JDK" != x; then
29550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29551
29552  # Input might be given as Windows format, start by converting to
29553  # unix format.
29554  path="$BOOT_JDK"
29555  new_path=`$CYGPATH -u "$path"`
29556
29557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29560  # "foo.exe" is OK but "foo" is an error.
29561  #
29562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29563  # It is also a way to make sure we got the proper file name for the real test later on.
29564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29565  if test "x$test_shortpath" = x; then
29566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29569  fi
29570
29571  # Call helper function which possibly converts this using DOS-style short mode.
29572  # If so, the updated path is stored in $new_path.
29573
29574  input_path="$new_path"
29575  # Check if we need to convert this using DOS-style short mode. If the path
29576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29577  # take no chances and rewrite it.
29578  # Note: m4 eats our [], so we need to use [ and ] instead.
29579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29580  if test "x$has_forbidden_chars" != x; then
29581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29585      # Going to short mode and back again did indeed matter. Since short mode is
29586      # case insensitive, let's make it lowercase to improve readability.
29587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29588      # Now convert it back to Unix-style (cygpath)
29589      input_path=`$CYGPATH -u "$shortmode_path"`
29590      new_path="$input_path"
29591    fi
29592  fi
29593
29594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29595  if test "x$test_cygdrive_prefix" = x; then
29596    # As a simple fix, exclude /usr/bin since it's not a real path.
29597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29599      # a path prefixed by /cygdrive for fixpath to work.
29600      new_path="$CYGWIN_ROOT_PATH$input_path"
29601    fi
29602  fi
29603
29604
29605  if test "x$path" != "x$new_path"; then
29606    BOOT_JDK="$new_path"
29607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29609  fi
29610
29611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29612
29613  path="$BOOT_JDK"
29614  has_colon=`$ECHO $path | $GREP ^.:`
29615  new_path="$path"
29616  if test "x$has_colon" = x; then
29617    # Not in mixed or Windows style, start by that.
29618    new_path=`cmd //c echo $path`
29619  fi
29620
29621
29622  input_path="$new_path"
29623  # Check if we need to convert this using DOS-style short mode. If the path
29624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29625  # take no chances and rewrite it.
29626  # Note: m4 eats our [], so we need to use [ and ] instead.
29627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29628  if test "x$has_forbidden_chars" != x; then
29629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29631  fi
29632
29633
29634  windows_path="$new_path"
29635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29636    unix_path=`$CYGPATH -u "$windows_path"`
29637    new_path="$unix_path"
29638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29640    new_path="$unix_path"
29641  fi
29642
29643  if test "x$path" != "x$new_path"; then
29644    BOOT_JDK="$new_path"
29645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29647  fi
29648
29649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29651
29652    else
29653      # We're on a unix platform. Hooray! :)
29654      path="$BOOT_JDK"
29655      has_space=`$ECHO "$path" | $GREP " "`
29656      if test "x$has_space" != x; then
29657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29660      fi
29661
29662      # Use eval to expand a potential ~
29663      eval path="$path"
29664      if test ! -f "$path" && test ! -d "$path"; then
29665        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29666      fi
29667
29668      if test -d "$path"; then
29669        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29670      else
29671        dir="`$DIRNAME "$path"`"
29672        base="`$BASENAME "$path"`"
29673        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29674      fi
29675    fi
29676  fi
29677
29678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29679$as_echo_n "checking for Boot JDK... " >&6; }
29680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29681$as_echo "$BOOT_JDK" >&6; }
29682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29683$as_echo_n "checking Boot JDK version... " >&6; }
29684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29686$as_echo "$BOOT_JDK_VERSION" >&6; }
29687          fi # end check jdk version
29688        fi # end check javac
29689      fi # end check java
29690    fi # end check boot jdk found
29691  fi
29692
29693    done
29694  fi
29695
29696
29697    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29698    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29699      # Do we have a bin/java?
29700      if test ! -x "$BOOT_JDK/bin/java"; then
29701        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29703        BOOT_JDK_FOUND=no
29704      else
29705        # Do we have a bin/javac?
29706        if test ! -x "$BOOT_JDK/bin/javac"; then
29707          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29709          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29710$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29711          BOOT_JDK_FOUND=no
29712        else
29713          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29714          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29715
29716          # Extra M4 quote needed to protect [] in grep expression.
29717          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29718          if test "x$FOUND_CORRECT_VERSION" = x; then
29719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29721            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29722$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29723            BOOT_JDK_FOUND=no
29724          else
29725            # We're done! :-)
29726            BOOT_JDK_FOUND=yes
29727
29728  # Only process if variable expands to non-empty
29729
29730  if test "x$BOOT_JDK" != x; then
29731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29732
29733  # Input might be given as Windows format, start by converting to
29734  # unix format.
29735  path="$BOOT_JDK"
29736  new_path=`$CYGPATH -u "$path"`
29737
29738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29741  # "foo.exe" is OK but "foo" is an error.
29742  #
29743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29744  # It is also a way to make sure we got the proper file name for the real test later on.
29745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29746  if test "x$test_shortpath" = x; then
29747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29750  fi
29751
29752  # Call helper function which possibly converts this using DOS-style short mode.
29753  # If so, the updated path is stored in $new_path.
29754
29755  input_path="$new_path"
29756  # Check if we need to convert this using DOS-style short mode. If the path
29757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29758  # take no chances and rewrite it.
29759  # Note: m4 eats our [], so we need to use [ and ] instead.
29760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29761  if test "x$has_forbidden_chars" != x; then
29762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29766      # Going to short mode and back again did indeed matter. Since short mode is
29767      # case insensitive, let's make it lowercase to improve readability.
29768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29769      # Now convert it back to Unix-style (cygpath)
29770      input_path=`$CYGPATH -u "$shortmode_path"`
29771      new_path="$input_path"
29772    fi
29773  fi
29774
29775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29776  if test "x$test_cygdrive_prefix" = x; then
29777    # As a simple fix, exclude /usr/bin since it's not a real path.
29778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29780      # a path prefixed by /cygdrive for fixpath to work.
29781      new_path="$CYGWIN_ROOT_PATH$input_path"
29782    fi
29783  fi
29784
29785
29786  if test "x$path" != "x$new_path"; then
29787    BOOT_JDK="$new_path"
29788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29790  fi
29791
29792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29793
29794  path="$BOOT_JDK"
29795  has_colon=`$ECHO $path | $GREP ^.:`
29796  new_path="$path"
29797  if test "x$has_colon" = x; then
29798    # Not in mixed or Windows style, start by that.
29799    new_path=`cmd //c echo $path`
29800  fi
29801
29802
29803  input_path="$new_path"
29804  # Check if we need to convert this using DOS-style short mode. If the path
29805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29806  # take no chances and rewrite it.
29807  # Note: m4 eats our [], so we need to use [ and ] instead.
29808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29809  if test "x$has_forbidden_chars" != x; then
29810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29812  fi
29813
29814
29815  windows_path="$new_path"
29816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29817    unix_path=`$CYGPATH -u "$windows_path"`
29818    new_path="$unix_path"
29819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29821    new_path="$unix_path"
29822  fi
29823
29824  if test "x$path" != "x$new_path"; then
29825    BOOT_JDK="$new_path"
29826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29828  fi
29829
29830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29832
29833    else
29834      # We're on a unix platform. Hooray! :)
29835      path="$BOOT_JDK"
29836      has_space=`$ECHO "$path" | $GREP " "`
29837      if test "x$has_space" != x; then
29838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29841      fi
29842
29843      # Use eval to expand a potential ~
29844      eval path="$path"
29845      if test ! -f "$path" && test ! -d "$path"; then
29846        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29847      fi
29848
29849      if test -d "$path"; then
29850        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29851      else
29852        dir="`$DIRNAME "$path"`"
29853        base="`$BASENAME "$path"`"
29854        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29855      fi
29856    fi
29857  fi
29858
29859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29860$as_echo_n "checking for Boot JDK... " >&6; }
29861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29862$as_echo "$BOOT_JDK" >&6; }
29863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29864$as_echo_n "checking Boot JDK version... " >&6; }
29865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29867$as_echo "$BOOT_JDK_VERSION" >&6; }
29868          fi # end check jdk version
29869        fi # end check javac
29870      fi # end check java
29871    fi # end check boot jdk found
29872  fi
29873
29874  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29875
29876  if test "x$BOOT_JDK_FOUND" = xno; then
29877    # Now execute the test
29878
29879  BOOT_JDK_PREFIX="/usr/lib/jvm"
29880  BOOT_JDK_SUFFIX=""
29881  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29882  if test "x$ALL_JDKS_FOUND" != x; then
29883    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29884
29885  if test "x$BOOT_JDK_FOUND" = xno; then
29886    # Now execute the test
29887
29888        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29889        if test -d "$BOOT_JDK"; then
29890          BOOT_JDK_FOUND=maybe
29891          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29892$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29893        fi
29894
29895
29896    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29897    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29898      # Do we have a bin/java?
29899      if test ! -x "$BOOT_JDK/bin/java"; then
29900        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29902        BOOT_JDK_FOUND=no
29903      else
29904        # Do we have a bin/javac?
29905        if test ! -x "$BOOT_JDK/bin/javac"; then
29906          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29908          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29909$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29910          BOOT_JDK_FOUND=no
29911        else
29912          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29913          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29914
29915          # Extra M4 quote needed to protect [] in grep expression.
29916          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29917          if test "x$FOUND_CORRECT_VERSION" = x; then
29918            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29920            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29921$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29922            BOOT_JDK_FOUND=no
29923          else
29924            # We're done! :-)
29925            BOOT_JDK_FOUND=yes
29926
29927  # Only process if variable expands to non-empty
29928
29929  if test "x$BOOT_JDK" != x; then
29930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29931
29932  # Input might be given as Windows format, start by converting to
29933  # unix format.
29934  path="$BOOT_JDK"
29935  new_path=`$CYGPATH -u "$path"`
29936
29937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29940  # "foo.exe" is OK but "foo" is an error.
29941  #
29942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29943  # It is also a way to make sure we got the proper file name for the real test later on.
29944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29945  if test "x$test_shortpath" = x; then
29946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29948    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29949  fi
29950
29951  # Call helper function which possibly converts this using DOS-style short mode.
29952  # If so, the updated path is stored in $new_path.
29953
29954  input_path="$new_path"
29955  # Check if we need to convert this using DOS-style short mode. If the path
29956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29957  # take no chances and rewrite it.
29958  # Note: m4 eats our [], so we need to use [ and ] instead.
29959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29960  if test "x$has_forbidden_chars" != x; then
29961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29965      # Going to short mode and back again did indeed matter. Since short mode is
29966      # case insensitive, let's make it lowercase to improve readability.
29967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29968      # Now convert it back to Unix-style (cygpath)
29969      input_path=`$CYGPATH -u "$shortmode_path"`
29970      new_path="$input_path"
29971    fi
29972  fi
29973
29974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29975  if test "x$test_cygdrive_prefix" = x; then
29976    # As a simple fix, exclude /usr/bin since it's not a real path.
29977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29979      # a path prefixed by /cygdrive for fixpath to work.
29980      new_path="$CYGWIN_ROOT_PATH$input_path"
29981    fi
29982  fi
29983
29984
29985  if test "x$path" != "x$new_path"; then
29986    BOOT_JDK="$new_path"
29987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29989  fi
29990
29991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29992
29993  path="$BOOT_JDK"
29994  has_colon=`$ECHO $path | $GREP ^.:`
29995  new_path="$path"
29996  if test "x$has_colon" = x; then
29997    # Not in mixed or Windows style, start by that.
29998    new_path=`cmd //c echo $path`
29999  fi
30000
30001
30002  input_path="$new_path"
30003  # Check if we need to convert this using DOS-style short mode. If the path
30004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30005  # take no chances and rewrite it.
30006  # Note: m4 eats our [], so we need to use [ and ] instead.
30007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30008  if test "x$has_forbidden_chars" != x; then
30009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30011  fi
30012
30013
30014  windows_path="$new_path"
30015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30016    unix_path=`$CYGPATH -u "$windows_path"`
30017    new_path="$unix_path"
30018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30020    new_path="$unix_path"
30021  fi
30022
30023  if test "x$path" != "x$new_path"; then
30024    BOOT_JDK="$new_path"
30025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30027  fi
30028
30029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30031
30032    else
30033      # We're on a unix platform. Hooray! :)
30034      path="$BOOT_JDK"
30035      has_space=`$ECHO "$path" | $GREP " "`
30036      if test "x$has_space" != x; then
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30040      fi
30041
30042      # Use eval to expand a potential ~
30043      eval path="$path"
30044      if test ! -f "$path" && test ! -d "$path"; then
30045        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30046      fi
30047
30048      if test -d "$path"; then
30049        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30050      else
30051        dir="`$DIRNAME "$path"`"
30052        base="`$BASENAME "$path"`"
30053        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30054      fi
30055    fi
30056  fi
30057
30058            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30059$as_echo_n "checking for Boot JDK... " >&6; }
30060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30061$as_echo "$BOOT_JDK" >&6; }
30062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30063$as_echo_n "checking Boot JDK version... " >&6; }
30064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30066$as_echo "$BOOT_JDK_VERSION" >&6; }
30067          fi # end check jdk version
30068        fi # end check javac
30069      fi # end check java
30070    fi # end check boot jdk found
30071  fi
30072
30073    done
30074  fi
30075
30076
30077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30079      # Do we have a bin/java?
30080      if test ! -x "$BOOT_JDK/bin/java"; then
30081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30083        BOOT_JDK_FOUND=no
30084      else
30085        # Do we have a bin/javac?
30086        if test ! -x "$BOOT_JDK/bin/javac"; then
30087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30091          BOOT_JDK_FOUND=no
30092        else
30093          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30094          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30095
30096          # Extra M4 quote needed to protect [] in grep expression.
30097          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30098          if test "x$FOUND_CORRECT_VERSION" = x; then
30099            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30101            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30102$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30103            BOOT_JDK_FOUND=no
30104          else
30105            # We're done! :-)
30106            BOOT_JDK_FOUND=yes
30107
30108  # Only process if variable expands to non-empty
30109
30110  if test "x$BOOT_JDK" != x; then
30111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30112
30113  # Input might be given as Windows format, start by converting to
30114  # unix format.
30115  path="$BOOT_JDK"
30116  new_path=`$CYGPATH -u "$path"`
30117
30118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30121  # "foo.exe" is OK but "foo" is an error.
30122  #
30123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30124  # It is also a way to make sure we got the proper file name for the real test later on.
30125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30126  if test "x$test_shortpath" = x; then
30127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30129    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30130  fi
30131
30132  # Call helper function which possibly converts this using DOS-style short mode.
30133  # If so, the updated path is stored in $new_path.
30134
30135  input_path="$new_path"
30136  # Check if we need to convert this using DOS-style short mode. If the path
30137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30138  # take no chances and rewrite it.
30139  # Note: m4 eats our [], so we need to use [ and ] instead.
30140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30141  if test "x$has_forbidden_chars" != x; then
30142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30146      # Going to short mode and back again did indeed matter. Since short mode is
30147      # case insensitive, let's make it lowercase to improve readability.
30148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30149      # Now convert it back to Unix-style (cygpath)
30150      input_path=`$CYGPATH -u "$shortmode_path"`
30151      new_path="$input_path"
30152    fi
30153  fi
30154
30155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30156  if test "x$test_cygdrive_prefix" = x; then
30157    # As a simple fix, exclude /usr/bin since it's not a real path.
30158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30160      # a path prefixed by /cygdrive for fixpath to work.
30161      new_path="$CYGWIN_ROOT_PATH$input_path"
30162    fi
30163  fi
30164
30165
30166  if test "x$path" != "x$new_path"; then
30167    BOOT_JDK="$new_path"
30168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30170  fi
30171
30172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30173
30174  path="$BOOT_JDK"
30175  has_colon=`$ECHO $path | $GREP ^.:`
30176  new_path="$path"
30177  if test "x$has_colon" = x; then
30178    # Not in mixed or Windows style, start by that.
30179    new_path=`cmd //c echo $path`
30180  fi
30181
30182
30183  input_path="$new_path"
30184  # Check if we need to convert this using DOS-style short mode. If the path
30185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30186  # take no chances and rewrite it.
30187  # Note: m4 eats our [], so we need to use [ and ] instead.
30188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30189  if test "x$has_forbidden_chars" != x; then
30190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30192  fi
30193
30194
30195  windows_path="$new_path"
30196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30197    unix_path=`$CYGPATH -u "$windows_path"`
30198    new_path="$unix_path"
30199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30201    new_path="$unix_path"
30202  fi
30203
30204  if test "x$path" != "x$new_path"; then
30205    BOOT_JDK="$new_path"
30206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30208  fi
30209
30210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30212
30213    else
30214      # We're on a unix platform. Hooray! :)
30215      path="$BOOT_JDK"
30216      has_space=`$ECHO "$path" | $GREP " "`
30217      if test "x$has_space" != x; then
30218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30221      fi
30222
30223      # Use eval to expand a potential ~
30224      eval path="$path"
30225      if test ! -f "$path" && test ! -d "$path"; then
30226        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30227      fi
30228
30229      if test -d "$path"; then
30230        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30231      else
30232        dir="`$DIRNAME "$path"`"
30233        base="`$BASENAME "$path"`"
30234        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30235      fi
30236    fi
30237  fi
30238
30239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30240$as_echo_n "checking for Boot JDK... " >&6; }
30241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30242$as_echo "$BOOT_JDK" >&6; }
30243            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30244$as_echo_n "checking Boot JDK version... " >&6; }
30245            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30247$as_echo "$BOOT_JDK_VERSION" >&6; }
30248          fi # end check jdk version
30249        fi # end check javac
30250      fi # end check java
30251    fi # end check boot jdk found
30252  fi
30253
30254  fi
30255
30256
30257    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30258    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30259      # Do we have a bin/java?
30260      if test ! -x "$BOOT_JDK/bin/java"; then
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30263        BOOT_JDK_FOUND=no
30264      else
30265        # Do we have a bin/javac?
30266        if test ! -x "$BOOT_JDK/bin/javac"; then
30267          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30269          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30270$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30271          BOOT_JDK_FOUND=no
30272        else
30273          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30274          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30275
30276          # Extra M4 quote needed to protect [] in grep expression.
30277          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30278          if test "x$FOUND_CORRECT_VERSION" = x; then
30279            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30281            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30282$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30283            BOOT_JDK_FOUND=no
30284          else
30285            # We're done! :-)
30286            BOOT_JDK_FOUND=yes
30287
30288  # Only process if variable expands to non-empty
30289
30290  if test "x$BOOT_JDK" != x; then
30291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30292
30293  # Input might be given as Windows format, start by converting to
30294  # unix format.
30295  path="$BOOT_JDK"
30296  new_path=`$CYGPATH -u "$path"`
30297
30298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30301  # "foo.exe" is OK but "foo" is an error.
30302  #
30303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30304  # It is also a way to make sure we got the proper file name for the real test later on.
30305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30306  if test "x$test_shortpath" = x; then
30307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30309    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30310  fi
30311
30312  # Call helper function which possibly converts this using DOS-style short mode.
30313  # If so, the updated path is stored in $new_path.
30314
30315  input_path="$new_path"
30316  # Check if we need to convert this using DOS-style short mode. If the path
30317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30318  # take no chances and rewrite it.
30319  # Note: m4 eats our [], so we need to use [ and ] instead.
30320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30321  if test "x$has_forbidden_chars" != x; then
30322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30326      # Going to short mode and back again did indeed matter. Since short mode is
30327      # case insensitive, let's make it lowercase to improve readability.
30328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30329      # Now convert it back to Unix-style (cygpath)
30330      input_path=`$CYGPATH -u "$shortmode_path"`
30331      new_path="$input_path"
30332    fi
30333  fi
30334
30335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30336  if test "x$test_cygdrive_prefix" = x; then
30337    # As a simple fix, exclude /usr/bin since it's not a real path.
30338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30340      # a path prefixed by /cygdrive for fixpath to work.
30341      new_path="$CYGWIN_ROOT_PATH$input_path"
30342    fi
30343  fi
30344
30345
30346  if test "x$path" != "x$new_path"; then
30347    BOOT_JDK="$new_path"
30348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30350  fi
30351
30352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30353
30354  path="$BOOT_JDK"
30355  has_colon=`$ECHO $path | $GREP ^.:`
30356  new_path="$path"
30357  if test "x$has_colon" = x; then
30358    # Not in mixed or Windows style, start by that.
30359    new_path=`cmd //c echo $path`
30360  fi
30361
30362
30363  input_path="$new_path"
30364  # Check if we need to convert this using DOS-style short mode. If the path
30365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30366  # take no chances and rewrite it.
30367  # Note: m4 eats our [], so we need to use [ and ] instead.
30368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30369  if test "x$has_forbidden_chars" != x; then
30370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30372  fi
30373
30374
30375  windows_path="$new_path"
30376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30377    unix_path=`$CYGPATH -u "$windows_path"`
30378    new_path="$unix_path"
30379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30381    new_path="$unix_path"
30382  fi
30383
30384  if test "x$path" != "x$new_path"; then
30385    BOOT_JDK="$new_path"
30386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30388  fi
30389
30390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30392
30393    else
30394      # We're on a unix platform. Hooray! :)
30395      path="$BOOT_JDK"
30396      has_space=`$ECHO "$path" | $GREP " "`
30397      if test "x$has_space" != x; then
30398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30401      fi
30402
30403      # Use eval to expand a potential ~
30404      eval path="$path"
30405      if test ! -f "$path" && test ! -d "$path"; then
30406        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30407      fi
30408
30409      if test -d "$path"; then
30410        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30411      else
30412        dir="`$DIRNAME "$path"`"
30413        base="`$BASENAME "$path"`"
30414        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30415      fi
30416    fi
30417  fi
30418
30419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30420$as_echo_n "checking for Boot JDK... " >&6; }
30421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30422$as_echo "$BOOT_JDK" >&6; }
30423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30424$as_echo_n "checking Boot JDK version... " >&6; }
30425            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30427$as_echo "$BOOT_JDK_VERSION" >&6; }
30428          fi # end check jdk version
30429        fi # end check javac
30430      fi # end check java
30431    fi # end check boot jdk found
30432  fi
30433
30434
30435  # If we haven't found anything yet, we've truly lost. Give up.
30436  if test "x$BOOT_JDK_FOUND" = xno; then
30437
30438  # Print a helpful message on how to acquire the necessary build dependency.
30439  # openjdk is the help tag: freetype, cups, alsa etc
30440  MISSING_DEPENDENCY=openjdk
30441
30442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30443    cygwin_help $MISSING_DEPENDENCY
30444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30445    msys_help $MISSING_DEPENDENCY
30446  else
30447    PKGHANDLER_COMMAND=
30448
30449    case $PKGHANDLER in
30450      apt-get)
30451        apt_help     $MISSING_DEPENDENCY ;;
30452      yum)
30453        yum_help     $MISSING_DEPENDENCY ;;
30454      brew)
30455        brew_help    $MISSING_DEPENDENCY ;;
30456      port)
30457        port_help    $MISSING_DEPENDENCY ;;
30458      pkgutil)
30459        pkgutil_help $MISSING_DEPENDENCY ;;
30460      pkgadd)
30461        pkgadd_help  $MISSING_DEPENDENCY ;;
30462    esac
30463
30464    if test "x$PKGHANDLER_COMMAND" != x; then
30465      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30466    fi
30467  fi
30468
30469    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30470$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30471    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30472$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30473    as_fn_error $? "Cannot continue" "$LINENO" 5
30474  fi
30475
30476
30477
30478  # Setup tools from the Boot JDK.
30479
30480  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30481
30482  # Publish this variable in the help.
30483
30484
30485  if [ -z "${JAVA+x}" ]; then
30486    # The variable is not set by user, try to locate tool using the code snippet
30487
30488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30489$as_echo_n "checking for java in Boot JDK... " >&6; }
30490      JAVA=$BOOT_JDK/bin/java
30491      if test ! -x $JAVA; then
30492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30493$as_echo "not found" >&6; }
30494        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30495$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30496        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30497      fi
30498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30499$as_echo "ok" >&6; }
30500
30501
30502  else
30503    # The variable is set, but is it from the command line or the environment?
30504
30505    # Try to remove the string !JAVA! from our list.
30506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30508      # If it failed, the variable was not from the command line. Ignore it,
30509      # but warn the user (except for BASH, which is always set by the calling BASH).
30510      if test "xJAVA" != xBASH; then
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30512$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30513      fi
30514      # Try to locate tool using the code snippet
30515
30516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30517$as_echo_n "checking for java in Boot JDK... " >&6; }
30518      JAVA=$BOOT_JDK/bin/java
30519      if test ! -x $JAVA; then
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30521$as_echo "not found" >&6; }
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30523$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30524        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30525      fi
30526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30527$as_echo "ok" >&6; }
30528
30529
30530    else
30531      # If it succeeded, then it was overridden by the user. We will use it
30532      # for the tool.
30533
30534      # First remove it from the list of overridden variables, so we can test
30535      # for unknown variables in the end.
30536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30537
30538      # Check if we try to supply an empty value
30539      if test "x$JAVA" = x; then
30540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30541$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30543$as_echo_n "checking for JAVA... " >&6; }
30544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30545$as_echo "disabled" >&6; }
30546      else
30547        # Check if the provided tool contains a complete path.
30548        tool_specified="$JAVA"
30549        tool_basename="${tool_specified##*/}"
30550        if test "x$tool_basename" = "x$tool_specified"; then
30551          # A command without a complete path is provided, search $PATH.
30552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30553$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30554          # Extract the first word of "$tool_basename", so it can be a program name with args.
30555set dummy $tool_basename; ac_word=$2
30556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30557$as_echo_n "checking for $ac_word... " >&6; }
30558if ${ac_cv_path_JAVA+:} false; then :
30559  $as_echo_n "(cached) " >&6
30560else
30561  case $JAVA in
30562  [\\/]* | ?:[\\/]*)
30563  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30564  ;;
30565  *)
30566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30567for as_dir in $PATH
30568do
30569  IFS=$as_save_IFS
30570  test -z "$as_dir" && as_dir=.
30571    for ac_exec_ext in '' $ac_executable_extensions; do
30572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30573    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30575    break 2
30576  fi
30577done
30578  done
30579IFS=$as_save_IFS
30580
30581  ;;
30582esac
30583fi
30584JAVA=$ac_cv_path_JAVA
30585if test -n "$JAVA"; then
30586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30587$as_echo "$JAVA" >&6; }
30588else
30589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30590$as_echo "no" >&6; }
30591fi
30592
30593
30594          if test "x$JAVA" = x; then
30595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30596          fi
30597        else
30598          # Otherwise we believe it is a complete path. Use it as it is.
30599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30600$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30602$as_echo_n "checking for JAVA... " >&6; }
30603          if test ! -x "$tool_specified"; then
30604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30605$as_echo "not found" >&6; }
30606            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30607          fi
30608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30609$as_echo "$tool_specified" >&6; }
30610        fi
30611      fi
30612    fi
30613
30614  fi
30615
30616
30617
30618  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30619
30620  # Publish this variable in the help.
30621
30622
30623  if [ -z "${JAVAC+x}" ]; then
30624    # The variable is not set by user, try to locate tool using the code snippet
30625
30626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30627$as_echo_n "checking for javac in Boot JDK... " >&6; }
30628      JAVAC=$BOOT_JDK/bin/javac
30629      if test ! -x $JAVAC; then
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30631$as_echo "not found" >&6; }
30632        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30633$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30634        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30635      fi
30636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30637$as_echo "ok" >&6; }
30638
30639
30640  else
30641    # The variable is set, but is it from the command line or the environment?
30642
30643    # Try to remove the string !JAVAC! from our list.
30644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30646      # If it failed, the variable was not from the command line. Ignore it,
30647      # but warn the user (except for BASH, which is always set by the calling BASH).
30648      if test "xJAVAC" != xBASH; then
30649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30650$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30651      fi
30652      # Try to locate tool using the code snippet
30653
30654      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30655$as_echo_n "checking for javac in Boot JDK... " >&6; }
30656      JAVAC=$BOOT_JDK/bin/javac
30657      if test ! -x $JAVAC; then
30658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30659$as_echo "not found" >&6; }
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30661$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30662        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30663      fi
30664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30665$as_echo "ok" >&6; }
30666
30667
30668    else
30669      # If it succeeded, then it was overridden by the user. We will use it
30670      # for the tool.
30671
30672      # First remove it from the list of overridden variables, so we can test
30673      # for unknown variables in the end.
30674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30675
30676      # Check if we try to supply an empty value
30677      if test "x$JAVAC" = x; then
30678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30679$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30681$as_echo_n "checking for JAVAC... " >&6; }
30682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30683$as_echo "disabled" >&6; }
30684      else
30685        # Check if the provided tool contains a complete path.
30686        tool_specified="$JAVAC"
30687        tool_basename="${tool_specified##*/}"
30688        if test "x$tool_basename" = "x$tool_specified"; then
30689          # A command without a complete path is provided, search $PATH.
30690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30691$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30692          # Extract the first word of "$tool_basename", so it can be a program name with args.
30693set dummy $tool_basename; ac_word=$2
30694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30695$as_echo_n "checking for $ac_word... " >&6; }
30696if ${ac_cv_path_JAVAC+:} false; then :
30697  $as_echo_n "(cached) " >&6
30698else
30699  case $JAVAC in
30700  [\\/]* | ?:[\\/]*)
30701  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30702  ;;
30703  *)
30704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30705for as_dir in $PATH
30706do
30707  IFS=$as_save_IFS
30708  test -z "$as_dir" && as_dir=.
30709    for ac_exec_ext in '' $ac_executable_extensions; do
30710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30711    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30713    break 2
30714  fi
30715done
30716  done
30717IFS=$as_save_IFS
30718
30719  ;;
30720esac
30721fi
30722JAVAC=$ac_cv_path_JAVAC
30723if test -n "$JAVAC"; then
30724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30725$as_echo "$JAVAC" >&6; }
30726else
30727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30728$as_echo "no" >&6; }
30729fi
30730
30731
30732          if test "x$JAVAC" = x; then
30733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30734          fi
30735        else
30736          # Otherwise we believe it is a complete path. Use it as it is.
30737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30738$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30740$as_echo_n "checking for JAVAC... " >&6; }
30741          if test ! -x "$tool_specified"; then
30742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30743$as_echo "not found" >&6; }
30744            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30745          fi
30746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30747$as_echo "$tool_specified" >&6; }
30748        fi
30749      fi
30750    fi
30751
30752  fi
30753
30754
30755
30756  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30757
30758  # Publish this variable in the help.
30759
30760
30761  if [ -z "${JAVAH+x}" ]; then
30762    # The variable is not set by user, try to locate tool using the code snippet
30763
30764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30765$as_echo_n "checking for javah in Boot JDK... " >&6; }
30766      JAVAH=$BOOT_JDK/bin/javah
30767      if test ! -x $JAVAH; then
30768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30769$as_echo "not found" >&6; }
30770        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30771$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30772        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30773      fi
30774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30775$as_echo "ok" >&6; }
30776
30777
30778  else
30779    # The variable is set, but is it from the command line or the environment?
30780
30781    # Try to remove the string !JAVAH! from our list.
30782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30784      # If it failed, the variable was not from the command line. Ignore it,
30785      # but warn the user (except for BASH, which is always set by the calling BASH).
30786      if test "xJAVAH" != xBASH; then
30787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30788$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30789      fi
30790      # Try to locate tool using the code snippet
30791
30792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30793$as_echo_n "checking for javah in Boot JDK... " >&6; }
30794      JAVAH=$BOOT_JDK/bin/javah
30795      if test ! -x $JAVAH; then
30796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30797$as_echo "not found" >&6; }
30798        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30799$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30800        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30801      fi
30802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30803$as_echo "ok" >&6; }
30804
30805
30806    else
30807      # If it succeeded, then it was overridden by the user. We will use it
30808      # for the tool.
30809
30810      # First remove it from the list of overridden variables, so we can test
30811      # for unknown variables in the end.
30812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30813
30814      # Check if we try to supply an empty value
30815      if test "x$JAVAH" = x; then
30816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30817$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30819$as_echo_n "checking for JAVAH... " >&6; }
30820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30821$as_echo "disabled" >&6; }
30822      else
30823        # Check if the provided tool contains a complete path.
30824        tool_specified="$JAVAH"
30825        tool_basename="${tool_specified##*/}"
30826        if test "x$tool_basename" = "x$tool_specified"; then
30827          # A command without a complete path is provided, search $PATH.
30828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30829$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30830          # Extract the first word of "$tool_basename", so it can be a program name with args.
30831set dummy $tool_basename; ac_word=$2
30832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30833$as_echo_n "checking for $ac_word... " >&6; }
30834if ${ac_cv_path_JAVAH+:} false; then :
30835  $as_echo_n "(cached) " >&6
30836else
30837  case $JAVAH in
30838  [\\/]* | ?:[\\/]*)
30839  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30840  ;;
30841  *)
30842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30843for as_dir in $PATH
30844do
30845  IFS=$as_save_IFS
30846  test -z "$as_dir" && as_dir=.
30847    for ac_exec_ext in '' $ac_executable_extensions; do
30848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30849    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30851    break 2
30852  fi
30853done
30854  done
30855IFS=$as_save_IFS
30856
30857  ;;
30858esac
30859fi
30860JAVAH=$ac_cv_path_JAVAH
30861if test -n "$JAVAH"; then
30862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30863$as_echo "$JAVAH" >&6; }
30864else
30865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30866$as_echo "no" >&6; }
30867fi
30868
30869
30870          if test "x$JAVAH" = x; then
30871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30872          fi
30873        else
30874          # Otherwise we believe it is a complete path. Use it as it is.
30875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30876$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30878$as_echo_n "checking for JAVAH... " >&6; }
30879          if test ! -x "$tool_specified"; then
30880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30881$as_echo "not found" >&6; }
30882            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30883          fi
30884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30885$as_echo "$tool_specified" >&6; }
30886        fi
30887      fi
30888    fi
30889
30890  fi
30891
30892
30893
30894  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30895
30896  # Publish this variable in the help.
30897
30898
30899  if [ -z "${JAR+x}" ]; then
30900    # The variable is not set by user, try to locate tool using the code snippet
30901
30902      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30903$as_echo_n "checking for jar in Boot JDK... " >&6; }
30904      JAR=$BOOT_JDK/bin/jar
30905      if test ! -x $JAR; then
30906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30907$as_echo "not found" >&6; }
30908        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30909$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30910        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30911      fi
30912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30913$as_echo "ok" >&6; }
30914
30915
30916  else
30917    # The variable is set, but is it from the command line or the environment?
30918
30919    # Try to remove the string !JAR! from our list.
30920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30922      # If it failed, the variable was not from the command line. Ignore it,
30923      # but warn the user (except for BASH, which is always set by the calling BASH).
30924      if test "xJAR" != xBASH; then
30925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30926$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30927      fi
30928      # Try to locate tool using the code snippet
30929
30930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30931$as_echo_n "checking for jar in Boot JDK... " >&6; }
30932      JAR=$BOOT_JDK/bin/jar
30933      if test ! -x $JAR; then
30934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30935$as_echo "not found" >&6; }
30936        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30937$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30938        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30939      fi
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30941$as_echo "ok" >&6; }
30942
30943
30944    else
30945      # If it succeeded, then it was overridden by the user. We will use it
30946      # for the tool.
30947
30948      # First remove it from the list of overridden variables, so we can test
30949      # for unknown variables in the end.
30950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30951
30952      # Check if we try to supply an empty value
30953      if test "x$JAR" = x; then
30954        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30955$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30957$as_echo_n "checking for JAR... " >&6; }
30958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30959$as_echo "disabled" >&6; }
30960      else
30961        # Check if the provided tool contains a complete path.
30962        tool_specified="$JAR"
30963        tool_basename="${tool_specified##*/}"
30964        if test "x$tool_basename" = "x$tool_specified"; then
30965          # A command without a complete path is provided, search $PATH.
30966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30967$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30968          # Extract the first word of "$tool_basename", so it can be a program name with args.
30969set dummy $tool_basename; ac_word=$2
30970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30971$as_echo_n "checking for $ac_word... " >&6; }
30972if ${ac_cv_path_JAR+:} false; then :
30973  $as_echo_n "(cached) " >&6
30974else
30975  case $JAR in
30976  [\\/]* | ?:[\\/]*)
30977  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30978  ;;
30979  *)
30980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30981for as_dir in $PATH
30982do
30983  IFS=$as_save_IFS
30984  test -z "$as_dir" && as_dir=.
30985    for ac_exec_ext in '' $ac_executable_extensions; do
30986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30987    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30989    break 2
30990  fi
30991done
30992  done
30993IFS=$as_save_IFS
30994
30995  ;;
30996esac
30997fi
30998JAR=$ac_cv_path_JAR
30999if test -n "$JAR"; then
31000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31001$as_echo "$JAR" >&6; }
31002else
31003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31004$as_echo "no" >&6; }
31005fi
31006
31007
31008          if test "x$JAR" = x; then
31009            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31010          fi
31011        else
31012          # Otherwise we believe it is a complete path. Use it as it is.
31013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31014$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31016$as_echo_n "checking for JAR... " >&6; }
31017          if test ! -x "$tool_specified"; then
31018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31019$as_echo "not found" >&6; }
31020            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31021          fi
31022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31023$as_echo "$tool_specified" >&6; }
31024        fi
31025      fi
31026    fi
31027
31028  fi
31029
31030
31031
31032  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31033
31034  # Publish this variable in the help.
31035
31036
31037  if [ -z "${JARSIGNER+x}" ]; then
31038    # The variable is not set by user, try to locate tool using the code snippet
31039
31040      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31041$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31042      JARSIGNER=$BOOT_JDK/bin/jarsigner
31043      if test ! -x $JARSIGNER; then
31044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31045$as_echo "not found" >&6; }
31046        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31047$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31048        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31049      fi
31050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31051$as_echo "ok" >&6; }
31052
31053
31054  else
31055    # The variable is set, but is it from the command line or the environment?
31056
31057    # Try to remove the string !JARSIGNER! from our list.
31058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31060      # If it failed, the variable was not from the command line. Ignore it,
31061      # but warn the user (except for BASH, which is always set by the calling BASH).
31062      if test "xJARSIGNER" != xBASH; then
31063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31064$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31065      fi
31066      # Try to locate tool using the code snippet
31067
31068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31069$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31070      JARSIGNER=$BOOT_JDK/bin/jarsigner
31071      if test ! -x $JARSIGNER; then
31072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31073$as_echo "not found" >&6; }
31074        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31075$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31076        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31077      fi
31078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31079$as_echo "ok" >&6; }
31080
31081
31082    else
31083      # If it succeeded, then it was overridden by the user. We will use it
31084      # for the tool.
31085
31086      # First remove it from the list of overridden variables, so we can test
31087      # for unknown variables in the end.
31088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31089
31090      # Check if we try to supply an empty value
31091      if test "x$JARSIGNER" = x; then
31092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31093$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31095$as_echo_n "checking for JARSIGNER... " >&6; }
31096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31097$as_echo "disabled" >&6; }
31098      else
31099        # Check if the provided tool contains a complete path.
31100        tool_specified="$JARSIGNER"
31101        tool_basename="${tool_specified##*/}"
31102        if test "x$tool_basename" = "x$tool_specified"; then
31103          # A command without a complete path is provided, search $PATH.
31104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31105$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31106          # Extract the first word of "$tool_basename", so it can be a program name with args.
31107set dummy $tool_basename; ac_word=$2
31108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31109$as_echo_n "checking for $ac_word... " >&6; }
31110if ${ac_cv_path_JARSIGNER+:} false; then :
31111  $as_echo_n "(cached) " >&6
31112else
31113  case $JARSIGNER in
31114  [\\/]* | ?:[\\/]*)
31115  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31116  ;;
31117  *)
31118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31119for as_dir in $PATH
31120do
31121  IFS=$as_save_IFS
31122  test -z "$as_dir" && as_dir=.
31123    for ac_exec_ext in '' $ac_executable_extensions; do
31124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31125    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31127    break 2
31128  fi
31129done
31130  done
31131IFS=$as_save_IFS
31132
31133  ;;
31134esac
31135fi
31136JARSIGNER=$ac_cv_path_JARSIGNER
31137if test -n "$JARSIGNER"; then
31138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31139$as_echo "$JARSIGNER" >&6; }
31140else
31141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31142$as_echo "no" >&6; }
31143fi
31144
31145
31146          if test "x$JARSIGNER" = x; then
31147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31148          fi
31149        else
31150          # Otherwise we believe it is a complete path. Use it as it is.
31151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31152$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31154$as_echo_n "checking for JARSIGNER... " >&6; }
31155          if test ! -x "$tool_specified"; then
31156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31157$as_echo "not found" >&6; }
31158            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31159          fi
31160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31161$as_echo "$tool_specified" >&6; }
31162        fi
31163      fi
31164    fi
31165
31166  fi
31167
31168
31169
31170  # Finally, set some other options...
31171
31172  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31173  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31174
31175
31176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31177$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31178  if "$JAVA" --list-modules > /dev/null 2>&1; then
31179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31180$as_echo "yes" >&6; }
31181    BOOT_JDK_MODULAR="true"
31182  else
31183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31184$as_echo "no" >&6; }
31185    BOOT_JDK_MODULAR="false"
31186  fi
31187
31188
31189
31190
31191  # Check if the boot jdk is 32 or 64 bit
31192  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31193    BOOT_JDK_BITS="64"
31194  else
31195    BOOT_JDK_BITS="32"
31196  fi
31197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31198$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31200$as_echo "$BOOT_JDK_BITS" >&6; }
31201
31202
31203
31204# Check whether --with-build-jdk was given.
31205if test "${with_build_jdk+set}" = set; then :
31206  withval=$with_build_jdk;
31207fi
31208
31209
31210  CREATE_BUILDJDK=false
31211  EXTERNAL_BUILDJDK=false
31212  BUILD_JDK_FOUND="no"
31213  if test "x$with_build_jdk" != "x"; then
31214
31215  if test "x$BUILD_JDK_FOUND" = xno; then
31216    # Execute the test
31217
31218       if test "x$with_build_jdk" != x; then
31219         BUILD_JDK=$with_build_jdk
31220         BUILD_JDK_FOUND=maybe
31221         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31222$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31223       fi
31224
31225    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31226    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31227      # Do we have a bin/java?
31228      if test ! -x "$BUILD_JDK/bin/java"; then
31229        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31230$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31231        BUILD_JDK_FOUND=no
31232      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31233        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31234$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31235        BUILD_JDK_FOUND=no
31236      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31237        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31238$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31239        BUILD_JDK_FOUND=no
31240      elif test ! -x "$BUILD_JDK/bin/javac"; then
31241        # Do we have a bin/javac?
31242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31243$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31244        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31245$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31246        BUILD_JDK_FOUND=no
31247      else
31248        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31249        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31250
31251        # Extra M4 quote needed to protect [] in grep expression.
31252        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31253        if test "x$FOUND_CORRECT_VERSION" = x; then
31254          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31255$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31256          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31257$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31258          BUILD_JDK_FOUND=no
31259        else
31260          # We're done!
31261          BUILD_JDK_FOUND=yes
31262
31263  # Only process if variable expands to non-empty
31264
31265  if test "x$BUILD_JDK" != x; then
31266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31267
31268  # Input might be given as Windows format, start by converting to
31269  # unix format.
31270  path="$BUILD_JDK"
31271  new_path=`$CYGPATH -u "$path"`
31272
31273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31276  # "foo.exe" is OK but "foo" is an error.
31277  #
31278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31279  # It is also a way to make sure we got the proper file name for the real test later on.
31280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31281  if test "x$test_shortpath" = x; then
31282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31283$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31284    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31285  fi
31286
31287  # Call helper function which possibly converts this using DOS-style short mode.
31288  # If so, the updated path is stored in $new_path.
31289
31290  input_path="$new_path"
31291  # Check if we need to convert this using DOS-style short mode. If the path
31292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31293  # take no chances and rewrite it.
31294  # Note: m4 eats our [], so we need to use [ and ] instead.
31295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31296  if test "x$has_forbidden_chars" != x; then
31297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31301      # Going to short mode and back again did indeed matter. Since short mode is
31302      # case insensitive, let's make it lowercase to improve readability.
31303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31304      # Now convert it back to Unix-style (cygpath)
31305      input_path=`$CYGPATH -u "$shortmode_path"`
31306      new_path="$input_path"
31307    fi
31308  fi
31309
31310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31311  if test "x$test_cygdrive_prefix" = x; then
31312    # As a simple fix, exclude /usr/bin since it's not a real path.
31313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31315      # a path prefixed by /cygdrive for fixpath to work.
31316      new_path="$CYGWIN_ROOT_PATH$input_path"
31317    fi
31318  fi
31319
31320
31321  if test "x$path" != "x$new_path"; then
31322    BUILD_JDK="$new_path"
31323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31324$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31325  fi
31326
31327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31328
31329  path="$BUILD_JDK"
31330  has_colon=`$ECHO $path | $GREP ^.:`
31331  new_path="$path"
31332  if test "x$has_colon" = x; then
31333    # Not in mixed or Windows style, start by that.
31334    new_path=`cmd //c echo $path`
31335  fi
31336
31337
31338  input_path="$new_path"
31339  # Check if we need to convert this using DOS-style short mode. If the path
31340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31341  # take no chances and rewrite it.
31342  # Note: m4 eats our [], so we need to use [ and ] instead.
31343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31344  if test "x$has_forbidden_chars" != x; then
31345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31347  fi
31348
31349
31350  windows_path="$new_path"
31351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31352    unix_path=`$CYGPATH -u "$windows_path"`
31353    new_path="$unix_path"
31354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31356    new_path="$unix_path"
31357  fi
31358
31359  if test "x$path" != "x$new_path"; then
31360    BUILD_JDK="$new_path"
31361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31362$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31363  fi
31364
31365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31367
31368    else
31369      # We're on a unix platform. Hooray! :)
31370      path="$BUILD_JDK"
31371      has_space=`$ECHO "$path" | $GREP " "`
31372      if test "x$has_space" != x; then
31373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31374$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31375        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31376      fi
31377
31378      # Use eval to expand a potential ~
31379      eval path="$path"
31380      if test ! -f "$path" && test ! -d "$path"; then
31381        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31382      fi
31383
31384      if test -d "$path"; then
31385        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31386      else
31387        dir="`$DIRNAME "$path"`"
31388        base="`$BASENAME "$path"`"
31389        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31390      fi
31391    fi
31392  fi
31393
31394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31395$as_echo_n "checking for Build JDK... " >&6; }
31396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31397$as_echo "$BUILD_JDK" >&6; }
31398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31399$as_echo_n "checking Build JDK version... " >&6; }
31400          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31402$as_echo "$BUILD_JDK_VERSION" >&6; }
31403        fi # end check jdk version
31404      fi # end check java
31405    fi # end check build jdk found
31406  fi
31407
31408    EXTERNAL_BUILDJDK=true
31409  else
31410    if test "x$COMPILE_TYPE" = "xcross"; then
31411      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31412      BUILD_JDK_FOUND=yes
31413      CREATE_BUILDJDK=true
31414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31415$as_echo_n "checking for Build JDK... " >&6; }
31416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31417$as_echo "yes, will build it for the host platform" >&6; }
31418    else
31419      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31420      BUILD_JDK_FOUND=yes
31421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31422$as_echo_n "checking for Build JDK... " >&6; }
31423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31424$as_echo "yes, will use output dir" >&6; }
31425    fi
31426  fi
31427
31428  JMOD="$BUILD_JDK/bin/jmod"
31429  JLINK="$BUILD_JDK/bin/jlink"
31430
31431
31432
31433  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31435$as_echo_n "checking for Build JDK... " >&6; }
31436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31437$as_echo "no" >&6; }
31438    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31439  fi
31440
31441
31442
31443
31444
31445
31446###############################################################################
31447#
31448# Configure the sources to use. We can add or override individual directories.
31449#
31450###############################################################################
31451
31452
31453  # Where are the sources.
31454  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31455  CORBA_TOPDIR="$SRC_ROOT/corba"
31456  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31457  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31458  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31459  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31460  JDK_TOPDIR="$SRC_ROOT/jdk"
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470  # This feature is no longer supported.
31471
31472
31473
31474# Check whether --with-add-source-root was given.
31475if test "${with_add_source_root+set}" = set; then :
31476  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
31477$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31478fi
31479
31480
31481
31482
31483# Check whether --with-override-source-root was given.
31484if test "${with_override_source_root+set}" = set; then :
31485  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
31486$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31487fi
31488
31489
31490
31491
31492# Check whether --with-adds-and-overrides was given.
31493if test "${with_adds_and_overrides+set}" = set; then :
31494  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
31495$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31496fi
31497
31498
31499
31500
31501# Check whether --with-override-langtools was given.
31502if test "${with_override_langtools+set}" = set; then :
31503  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31504$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31505fi
31506
31507
31508
31509
31510# Check whether --with-override-corba was given.
31511if test "${with_override_corba+set}" = set; then :
31512  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31513$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31514fi
31515
31516
31517
31518
31519# Check whether --with-override-jaxp was given.
31520if test "${with_override_jaxp+set}" = set; then :
31521  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31522$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31523fi
31524
31525
31526
31527
31528# Check whether --with-override-jaxws was given.
31529if test "${with_override_jaxws+set}" = set; then :
31530  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31531$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31532fi
31533
31534
31535
31536
31537# Check whether --with-override-hotspot was given.
31538if test "${with_override_hotspot+set}" = set; then :
31539  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31540$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31541fi
31542
31543
31544
31545
31546# Check whether --with-override-nashorn was given.
31547if test "${with_override_nashorn+set}" = set; then :
31548  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31549$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31550fi
31551
31552
31553
31554
31555# Check whether --with-override-jdk was given.
31556if test "${with_override_jdk+set}" = set; then :
31557  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31558$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31559fi
31560
31561
31562
31563
31564  BUILD_OUTPUT="$OUTPUT_ROOT"
31565
31566  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31567
31568
31569
31570# Check whether --with-import_hotspot was given.
31571if test "${with_import_hotspot+set}" = set; then :
31572  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31573$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31574fi
31575
31576
31577
31578
31579
31580
31581# Check whether --with-import-modules was given.
31582if test "${with_import_modules+set}" = set; then :
31583  withval=$with_import_modules;
31584fi
31585
31586
31587  if test "x$with_import_modules" != x \
31588      && test "x$with_import_modules" != "xno"; then
31589    if test -d "$with_import_modules"; then
31590      IMPORT_MODULES_TOPDIR="$with_import_modules"
31591
31592  # Only process if variable expands to non-empty
31593
31594  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31596
31597  # Input might be given as Windows format, start by converting to
31598  # unix format.
31599  path="$IMPORT_MODULES_TOPDIR"
31600  new_path=`$CYGPATH -u "$path"`
31601
31602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31605  # "foo.exe" is OK but "foo" is an error.
31606  #
31607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31608  # It is also a way to make sure we got the proper file name for the real test later on.
31609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31610  if test "x$test_shortpath" = x; then
31611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31612$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31613    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31614  fi
31615
31616  # Call helper function which possibly converts this using DOS-style short mode.
31617  # If so, the updated path is stored in $new_path.
31618
31619  input_path="$new_path"
31620  # Check if we need to convert this using DOS-style short mode. If the path
31621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31622  # take no chances and rewrite it.
31623  # Note: m4 eats our [], so we need to use [ and ] instead.
31624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31625  if test "x$has_forbidden_chars" != x; then
31626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31630      # Going to short mode and back again did indeed matter. Since short mode is
31631      # case insensitive, let's make it lowercase to improve readability.
31632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31633      # Now convert it back to Unix-style (cygpath)
31634      input_path=`$CYGPATH -u "$shortmode_path"`
31635      new_path="$input_path"
31636    fi
31637  fi
31638
31639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31640  if test "x$test_cygdrive_prefix" = x; then
31641    # As a simple fix, exclude /usr/bin since it's not a real path.
31642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31644      # a path prefixed by /cygdrive for fixpath to work.
31645      new_path="$CYGWIN_ROOT_PATH$input_path"
31646    fi
31647  fi
31648
31649
31650  if test "x$path" != "x$new_path"; then
31651    IMPORT_MODULES_TOPDIR="$new_path"
31652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31653$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31654  fi
31655
31656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31657
31658  path="$IMPORT_MODULES_TOPDIR"
31659  has_colon=`$ECHO $path | $GREP ^.:`
31660  new_path="$path"
31661  if test "x$has_colon" = x; then
31662    # Not in mixed or Windows style, start by that.
31663    new_path=`cmd //c echo $path`
31664  fi
31665
31666
31667  input_path="$new_path"
31668  # Check if we need to convert this using DOS-style short mode. If the path
31669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31670  # take no chances and rewrite it.
31671  # Note: m4 eats our [], so we need to use [ and ] instead.
31672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31673  if test "x$has_forbidden_chars" != x; then
31674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31676  fi
31677
31678
31679  windows_path="$new_path"
31680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31681    unix_path=`$CYGPATH -u "$windows_path"`
31682    new_path="$unix_path"
31683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31685    new_path="$unix_path"
31686  fi
31687
31688  if test "x$path" != "x$new_path"; then
31689    IMPORT_MODULES_TOPDIR="$new_path"
31690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31691$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31692  fi
31693
31694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31696
31697    else
31698      # We're on a unix platform. Hooray! :)
31699      path="$IMPORT_MODULES_TOPDIR"
31700      has_space=`$ECHO "$path" | $GREP " "`
31701      if test "x$has_space" != x; then
31702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31703$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31705      fi
31706
31707      # Use eval to expand a potential ~
31708      eval path="$path"
31709      if test ! -f "$path" && test ! -d "$path"; then
31710        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31711      fi
31712
31713      if test -d "$path"; then
31714        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31715      else
31716        dir="`$DIRNAME "$path"`"
31717        base="`$BASENAME "$path"`"
31718        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31719      fi
31720    fi
31721  fi
31722
31723    elif test -e "$with_import_modules"; then
31724      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31725      $RM -rf "$IMPORT_MODULES_TOPDIR"
31726      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31727      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31728        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31729      fi
31730    else
31731      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31732    fi
31733  fi
31734
31735  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31736    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31737  fi
31738  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31739    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31740  fi
31741  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31742    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31743  fi
31744  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31745    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31746  fi
31747  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31748    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31749  fi
31750  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31751    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31752  fi
31753  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31754    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31755  fi
31756  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31757    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31758  fi
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770###############################################################################
31771#
31772# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31773# native code.
31774#
31775###############################################################################
31776
31777# See if we are doing a complete static build or not
31778
31779  # Check whether --enable-static-build was given.
31780if test "${enable_static_build+set}" = set; then :
31781  enableval=$enable_static_build;
31782fi
31783
31784  STATIC_BUILD=false
31785  if test "x$enable_static_build" = "xyes"; then
31786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31787$as_echo_n "checking if static build is enabled... " >&6; }
31788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31789$as_echo "yes" >&6; }
31790    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31791      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31792    fi
31793    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31794    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31795    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31796    STATIC_BUILD=true
31797  elif test "x$enable_static_build" = "xno"; then
31798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31799$as_echo_n "checking if static build is enabled... " >&6; }
31800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31801$as_echo "no" >&6; }
31802  elif test "x$enable_static_build" != "x"; then
31803    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31804  fi
31805
31806
31807
31808
31809# First determine the toolchain type (compiler family)
31810
31811
31812# Check whether --with-toolchain-type was given.
31813if test "${with_toolchain_type+set}" = set; then :
31814  withval=$with_toolchain_type;
31815fi
31816
31817
31818  # Use indirect variable referencing
31819  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31820  VALID_TOOLCHAINS=${!toolchain_var_name}
31821
31822  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31823    if test -n "$XCODEBUILD"; then
31824      # On Mac OS X, default toolchain to clang after Xcode 5
31825      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31826      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31827      if test $? -ne 0; then
31828        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31829      fi
31830      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31831          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31832          $CUT -f 1 -d .`
31833      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31834$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31835      if test $XCODE_MAJOR_VERSION -ge 5; then
31836          DEFAULT_TOOLCHAIN="clang"
31837      else
31838          DEFAULT_TOOLCHAIN="gcc"
31839      fi
31840    else
31841      # If Xcode is not installed, but the command line tools are
31842      # then we can't run xcodebuild. On these systems we should
31843      # default to clang
31844      DEFAULT_TOOLCHAIN="clang"
31845    fi
31846  else
31847    # First toolchain type in the list is the default
31848    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31849  fi
31850
31851  if test "x$with_toolchain_type" = xlist; then
31852    # List all toolchains
31853    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31854$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31855    for toolchain in $VALID_TOOLCHAINS; do
31856      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31857      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31858      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31859    done
31860
31861    exit 0
31862  elif test "x$with_toolchain_type" != x; then
31863    # User override; check that it is valid
31864    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31865      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31866$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31867      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31868$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31869      as_fn_error $? "Cannot continue." "$LINENO" 5
31870    fi
31871    TOOLCHAIN_TYPE=$with_toolchain_type
31872  else
31873    # No flag given, use default
31874    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31875  fi
31876
31877
31878  TOOLCHAIN_CC_BINARY_clang="clang"
31879  TOOLCHAIN_CC_BINARY_gcc="gcc"
31880  TOOLCHAIN_CC_BINARY_microsoft="cl"
31881  TOOLCHAIN_CC_BINARY_solstudio="cc"
31882  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31883
31884  TOOLCHAIN_CXX_BINARY_clang="clang++"
31885  TOOLCHAIN_CXX_BINARY_gcc="g++"
31886  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31887  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31888  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31889
31890  # Use indirect variable referencing
31891  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31892  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31893  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31894  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31895  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31896  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31897  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31898  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31899
31900
31901  # Define filename patterns
31902  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31903    LIBRARY_PREFIX=
31904    SHARED_LIBRARY_SUFFIX='.dll'
31905    STATIC_LIBRARY_SUFFIX='.lib'
31906    SHARED_LIBRARY='$1.dll'
31907    STATIC_LIBRARY='$1.lib'
31908    OBJ_SUFFIX='.obj'
31909    EXE_SUFFIX='.exe'
31910  else
31911    LIBRARY_PREFIX=lib
31912    SHARED_LIBRARY_SUFFIX='.so'
31913    STATIC_LIBRARY_SUFFIX='.a'
31914    SHARED_LIBRARY='lib$1.so'
31915    STATIC_LIBRARY='lib$1.a'
31916    OBJ_SUFFIX='.o'
31917    EXE_SUFFIX=''
31918    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31919      # For full static builds, we're overloading the SHARED_LIBRARY
31920      # variables in order to limit the amount of changes required.
31921      # It would be better to remove SHARED and just use LIBRARY and
31922      # LIBRARY_SUFFIX for libraries that can be built either
31923      # shared or static and use STATIC_* for libraries that are
31924      # always built statically.
31925      if test "x$STATIC_BUILD" = xtrue; then
31926        SHARED_LIBRARY='lib$1.a'
31927        SHARED_LIBRARY_SUFFIX='.a'
31928      else
31929        SHARED_LIBRARY='lib$1.dylib'
31930        SHARED_LIBRARY_SUFFIX='.dylib'
31931      fi
31932    fi
31933  fi
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31945    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31946$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31947  else
31948    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31949$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31950  fi
31951
31952
31953# User supplied flags should be used when configure detects compilers
31954
31955  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31956    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31957$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31958  fi
31959
31960  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31961    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31962$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31963  fi
31964
31965  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31966    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31967$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31968  fi
31969
31970
31971# Check whether --with-extra-cflags was given.
31972if test "${with_extra_cflags+set}" = set; then :
31973  withval=$with_extra_cflags;
31974fi
31975
31976
31977
31978# Check whether --with-extra-cxxflags was given.
31979if test "${with_extra_cxxflags+set}" = set; then :
31980  withval=$with_extra_cxxflags;
31981fi
31982
31983
31984
31985# Check whether --with-extra-ldflags was given.
31986if test "${with_extra_ldflags+set}" = set; then :
31987  withval=$with_extra_ldflags;
31988fi
31989
31990
31991  EXTRA_CFLAGS="$with_extra_cflags"
31992  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31993  EXTRA_LDFLAGS="$with_extra_ldflags"
31994
31995
31996
31997
31998
31999  # The global CFLAGS and LDLAGS variables are used by configure tests and
32000  # should include the extra parameters
32001  CFLAGS="$EXTRA_CFLAGS"
32002  CXXFLAGS="$EXTRA_CXXFLAGS"
32003  LDFLAGS="$EXTRA_LDFLAGS"
32004  CPPFLAGS=""
32005
32006# The sysroot cflags are needed for configure to be able to run the compilers
32007
32008  if test "x$SYSROOT" != "x"; then
32009    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32010      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32011        # Solaris Studio does not have a concept of sysroot. Instead we must
32012        # make sure the default include and lib dirs are appended to each
32013        # compile and link command line. Must also add -I-xbuiltin to enable
32014        # inlining of system functions and intrinsics.
32015        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32016        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32017            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32018      fi
32019    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32020      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32021      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32022    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32023      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32024      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32025    fi
32026    # The global CFLAGS and LDFLAGS variables need these for configure to function
32027    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32028    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32029    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32030    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32031  fi
32032
32033  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32034    # We also need -iframework<path>/System/Library/Frameworks
32035    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32036    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32037    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32038    # set this here so it doesn't have to be peppered throughout the forest
32039    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32040    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32041  fi
32042
32043
32044
32045
32046
32047# Then detect the actual binaries needed
32048
32049  # FIXME: Is this needed?
32050  ac_ext=cpp
32051ac_cpp='$CXXCPP $CPPFLAGS'
32052ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32053ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32054ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32055
32056
32057  # Store the CFLAGS etc passed to the configure script.
32058  ORG_CFLAGS="$CFLAGS"
32059  ORG_CXXFLAGS="$CXXFLAGS"
32060
32061  # autoconf magic only relies on PATH, so update it if tools dir is specified
32062  OLD_PATH="$PATH"
32063
32064  # On Windows, we need to detect the visual studio installation first.
32065  # This will change the PATH, but we need to keep that new PATH even
32066  # after toolchain detection is done, since the compiler (on x86) uses
32067  # it for DLL resolution in runtime.
32068  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32069      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32070
32071  # Store path to cygwin link.exe to help excluding it when searching for
32072  # VS linker. This must be done before changing the PATH when looking for VS.
32073  # Extract the first word of "link", so it can be a program name with args.
32074set dummy link; ac_word=$2
32075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32076$as_echo_n "checking for $ac_word... " >&6; }
32077if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32078  $as_echo_n "(cached) " >&6
32079else
32080  case $CYGWIN_LINK in
32081  [\\/]* | ?:[\\/]*)
32082  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32083  ;;
32084  *)
32085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32086for as_dir in $PATH
32087do
32088  IFS=$as_save_IFS
32089  test -z "$as_dir" && as_dir=.
32090    for ac_exec_ext in '' $ac_executable_extensions; do
32091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32092    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32094    break 2
32095  fi
32096done
32097  done
32098IFS=$as_save_IFS
32099
32100  ;;
32101esac
32102fi
32103CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32104if test -n "$CYGWIN_LINK"; then
32105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32106$as_echo "$CYGWIN_LINK" >&6; }
32107else
32108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32109$as_echo "no" >&6; }
32110fi
32111
32112
32113  if test "x$CYGWIN_LINK" != x; then
32114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32115$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32116    "$CYGWIN_LINK" --version > /dev/null
32117    if test $? -eq 0 ; then
32118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32119$as_echo "yes" >&6; }
32120    else
32121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32122$as_echo "no" >&6; }
32123      # This might be the VS linker. Don't exclude it later on.
32124      CYGWIN_LINK=""
32125    fi
32126  fi
32127
32128  # First-hand choice is to locate and run the vsvars bat file.
32129
32130
32131# Check whether --with-toolchain-version was given.
32132if test "${with_toolchain_version+set}" = set; then :
32133  withval=$with_toolchain_version;
32134fi
32135
32136
32137  if test "x$with_toolchain_version" = xlist; then
32138    # List all toolchains
32139    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32140$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32141    for version in $VALID_VS_VERSIONS; do
32142      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32143      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32144    done
32145
32146    exit 0
32147  elif test "x$DEVKIT_VS_VERSION" != x; then
32148    VS_VERSION=$DEVKIT_VS_VERSION
32149    TOOLCHAIN_VERSION=$VS_VERSION
32150    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32151    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32152    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32153    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32154    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32155    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32156
32157    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32158    # can still be exported as INCLUDE for compiler invocations without
32159    # SYSROOT_CFLAGS
32160    OLDIFS="$IFS"
32161    IFS=";"
32162    for i in $DEVKIT_VS_INCLUDE; do
32163      ipath=$i
32164
32165  unix_path="$ipath"
32166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32167    windows_path=`$CYGPATH -m "$unix_path"`
32168    ipath="$windows_path"
32169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32170    windows_path=`cmd //c echo $unix_path`
32171    ipath="$windows_path"
32172  fi
32173
32174      VS_INCLUDE="$VS_INCLUDE;$ipath"
32175    done
32176    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32177    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32178    for i in $DEVKIT_VS_LIB; do
32179      libpath=$i
32180
32181  unix_path="$libpath"
32182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32183    windows_path=`$CYGPATH -m "$unix_path"`
32184    libpath="$windows_path"
32185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32186    windows_path=`cmd //c echo $unix_path`
32187    libpath="$windows_path"
32188  fi
32189
32190      VS_LIB="$VS_LIB;$libpath"
32191    done
32192    IFS="$OLDIFS"
32193
32194    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32195$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32196
32197  elif test "x$with_toolchain_version" != x; then
32198    # User override; check that it is valid
32199    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32200      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32201$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32202      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32203$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32204      as_fn_error $? "Cannot continue." "$LINENO" 5
32205    fi
32206    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32207  else
32208    # No flag given, use default
32209    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32210  fi
32211
32212  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32213
32214  VS_VERSION="$VS_VERSION"
32215  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32216  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32217  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32218  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32219
32220  # When using --with-tools-dir, assume it points to the correct and default
32221  # version of Visual Studio or that --with-toolchain-version was also set.
32222  if test "x$with_tools_dir" != x; then
32223
32224  if test "x$VS_ENV_CMD" = x; then
32225    VS_VERSION="${VS_VERSION}"
32226    VS_BASE="$with_tools_dir/../.."
32227    METHOD="--with-tools-dir"
32228
32229    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32230      VCVARSFILE="vc/bin/vcvars32.bat"
32231    else
32232      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32233    fi
32234
32235
32236  windows_path="$VS_BASE"
32237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32238    unix_path=`$CYGPATH -u "$windows_path"`
32239    VS_BASE="$unix_path"
32240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32242    VS_BASE="$unix_path"
32243  fi
32244
32245    if test -d "$VS_BASE"; then
32246      if test -f "$VS_BASE/$VCVARSFILE"; then
32247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32248$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32249        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32250        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32251        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32252        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32253      else
32254        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32255$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32256        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32257$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32258      fi
32259    fi
32260  fi
32261
32262
32263  if test "x$VS_ENV_CMD" = x; then
32264    VS_VERSION="${VS_VERSION}"
32265    VS_BASE="$with_tools_dir/../../.."
32266    METHOD="--with-tools-dir"
32267
32268    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32269      VCVARSFILE="vc/bin/vcvars32.bat"
32270    else
32271      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32272    fi
32273
32274
32275  windows_path="$VS_BASE"
32276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32277    unix_path=`$CYGPATH -u "$windows_path"`
32278    VS_BASE="$unix_path"
32279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32281    VS_BASE="$unix_path"
32282  fi
32283
32284    if test -d "$VS_BASE"; then
32285      if test -f "$VS_BASE/$VCVARSFILE"; then
32286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32287$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32288        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32289        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32290        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32291        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32292      else
32293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32294$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32295        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32296$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32297      fi
32298    fi
32299  fi
32300
32301    if test "x$VS_ENV_CMD" = x; then
32302      # Having specified an argument which is incorrect will produce an instant failure;
32303      # we should not go on looking
32304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32305$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32306      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32307$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32308      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32309$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32310      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32311    fi
32312  fi
32313
32314  VS_ENV_CMD=""
32315  VS_ENV_ARGS=""
32316
32317  if test "x$VS_COMNTOOLS" != x; then
32318
32319  if test "x$VS_ENV_CMD" = x; then
32320    VS_VERSION="${VS_VERSION}"
32321    VS_BASE="$VS_COMNTOOLS/../.."
32322    METHOD="$VS_COMNTOOLS_VAR variable"
32323
32324    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32325      VCVARSFILE="vc/bin/vcvars32.bat"
32326    else
32327      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32328    fi
32329
32330
32331  windows_path="$VS_BASE"
32332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32333    unix_path=`$CYGPATH -u "$windows_path"`
32334    VS_BASE="$unix_path"
32335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32337    VS_BASE="$unix_path"
32338  fi
32339
32340    if test -d "$VS_BASE"; then
32341      if test -f "$VS_BASE/$VCVARSFILE"; then
32342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32343$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32344        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32345        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32346        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32347        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32348      else
32349        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32350$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32351        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32352$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32353      fi
32354    fi
32355  fi
32356
32357  fi
32358  if test "x$PROGRAMFILES" != x; then
32359
32360  if test "x$VS_ENV_CMD" = x; then
32361    VS_VERSION="${VS_VERSION}"
32362    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32363    METHOD="well-known name"
32364
32365    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32366      VCVARSFILE="vc/bin/vcvars32.bat"
32367    else
32368      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32369    fi
32370
32371
32372  windows_path="$VS_BASE"
32373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32374    unix_path=`$CYGPATH -u "$windows_path"`
32375    VS_BASE="$unix_path"
32376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32378    VS_BASE="$unix_path"
32379  fi
32380
32381    if test -d "$VS_BASE"; then
32382      if test -f "$VS_BASE/$VCVARSFILE"; then
32383        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32384$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32385        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32386        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32387        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32388        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32389      else
32390        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32391$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32392        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32393$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32394      fi
32395    fi
32396  fi
32397
32398  fi
32399  # Work around the insanely named ProgramFiles(x86) env variable
32400  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32401  if test "x$PROGRAMFILES_X86" != x; then
32402
32403  if test "x$VS_ENV_CMD" = x; then
32404    VS_VERSION="${VS_VERSION}"
32405    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32406    METHOD="well-known name"
32407
32408    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32409      VCVARSFILE="vc/bin/vcvars32.bat"
32410    else
32411      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32412    fi
32413
32414
32415  windows_path="$VS_BASE"
32416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32417    unix_path=`$CYGPATH -u "$windows_path"`
32418    VS_BASE="$unix_path"
32419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32421    VS_BASE="$unix_path"
32422  fi
32423
32424    if test -d "$VS_BASE"; then
32425      if test -f "$VS_BASE/$VCVARSFILE"; then
32426        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32427$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32428        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32429        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32430        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32431        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32432      else
32433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32434$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32435        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32436$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32437      fi
32438    fi
32439  fi
32440
32441  fi
32442
32443  if test "x$VS_ENV_CMD" = x; then
32444    VS_VERSION="${VS_VERSION}"
32445    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32446    METHOD="well-known name"
32447
32448    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32449      VCVARSFILE="vc/bin/vcvars32.bat"
32450    else
32451      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32452    fi
32453
32454
32455  windows_path="$VS_BASE"
32456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32457    unix_path=`$CYGPATH -u "$windows_path"`
32458    VS_BASE="$unix_path"
32459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32461    VS_BASE="$unix_path"
32462  fi
32463
32464    if test -d "$VS_BASE"; then
32465      if test -f "$VS_BASE/$VCVARSFILE"; then
32466        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32467$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32468        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32469        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32470        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32471        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32472      else
32473        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32474$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32475        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32476$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32477      fi
32478    fi
32479  fi
32480
32481
32482  if test "x$VS_ENV_CMD" = x; then
32483    VS_VERSION="${VS_VERSION}"
32484    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32485    METHOD="well-known name"
32486
32487    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32488      VCVARSFILE="vc/bin/vcvars32.bat"
32489    else
32490      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32491    fi
32492
32493
32494  windows_path="$VS_BASE"
32495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32496    unix_path=`$CYGPATH -u "$windows_path"`
32497    VS_BASE="$unix_path"
32498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32500    VS_BASE="$unix_path"
32501  fi
32502
32503    if test -d "$VS_BASE"; then
32504      if test -f "$VS_BASE/$VCVARSFILE"; then
32505        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32506$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32507        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32508        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32509        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32510        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32511      else
32512        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32513$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32514        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32515$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32516      fi
32517    fi
32518  fi
32519
32520
32521  if test "x$SDK_INSTALL_DIR" != x; then
32522    if test "x$ProgramW6432" != x; then
32523
32524  if test "x$VS_ENV_CMD" = x; then
32525    VS_VERSION="${VS_VERSION}"
32526    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32527    METHOD="well-known name"
32528
32529  windows_path="$WIN_SDK_BASE"
32530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32531    unix_path=`$CYGPATH -u "$windows_path"`
32532    WIN_SDK_BASE="$unix_path"
32533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32535    WIN_SDK_BASE="$unix_path"
32536  fi
32537
32538    if test -d "$WIN_SDK_BASE"; then
32539      # There have been cases of partial or broken SDK installations. A missing
32540      # lib dir is not going to work.
32541      if test ! -d "$WIN_SDK_BASE/lib"; then
32542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32543$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32545$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32546      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32547        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32548$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32549        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32550        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32551          VS_ENV_ARGS="/x86"
32552        else
32553          VS_ENV_ARGS="/x64"
32554        fi
32555        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32556        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32557        # TODO: improve detection for other versions of SDK
32558        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32559      else
32560        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32561$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32562        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32563$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32564      fi
32565    fi
32566  fi
32567
32568    fi
32569    if test "x$PROGRAMW6432" != x; then
32570
32571  if test "x$VS_ENV_CMD" = x; then
32572    VS_VERSION="${VS_VERSION}"
32573    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32574    METHOD="well-known name"
32575
32576  windows_path="$WIN_SDK_BASE"
32577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32578    unix_path=`$CYGPATH -u "$windows_path"`
32579    WIN_SDK_BASE="$unix_path"
32580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32582    WIN_SDK_BASE="$unix_path"
32583  fi
32584
32585    if test -d "$WIN_SDK_BASE"; then
32586      # There have been cases of partial or broken SDK installations. A missing
32587      # lib dir is not going to work.
32588      if test ! -d "$WIN_SDK_BASE/lib"; then
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32590$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32592$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32593      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32594        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32595$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32596        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32597        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32598          VS_ENV_ARGS="/x86"
32599        else
32600          VS_ENV_ARGS="/x64"
32601        fi
32602        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32603        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32604        # TODO: improve detection for other versions of SDK
32605        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32606      else
32607        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32608$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32609        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32610$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32611      fi
32612    fi
32613  fi
32614
32615    fi
32616    if test "x$PROGRAMFILES" != x; then
32617
32618  if test "x$VS_ENV_CMD" = x; then
32619    VS_VERSION="${VS_VERSION}"
32620    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32621    METHOD="well-known name"
32622
32623  windows_path="$WIN_SDK_BASE"
32624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32625    unix_path=`$CYGPATH -u "$windows_path"`
32626    WIN_SDK_BASE="$unix_path"
32627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32629    WIN_SDK_BASE="$unix_path"
32630  fi
32631
32632    if test -d "$WIN_SDK_BASE"; then
32633      # There have been cases of partial or broken SDK installations. A missing
32634      # lib dir is not going to work.
32635      if test ! -d "$WIN_SDK_BASE/lib"; then
32636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32637$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32639$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32640      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32641        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32642$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32643        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32644        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32645          VS_ENV_ARGS="/x86"
32646        else
32647          VS_ENV_ARGS="/x64"
32648        fi
32649        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32650        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32651        # TODO: improve detection for other versions of SDK
32652        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32653      else
32654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32655$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32656        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32657$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32658      fi
32659    fi
32660  fi
32661
32662    fi
32663
32664  if test "x$VS_ENV_CMD" = x; then
32665    VS_VERSION="${VS_VERSION}"
32666    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32667    METHOD="well-known name"
32668
32669  windows_path="$WIN_SDK_BASE"
32670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32671    unix_path=`$CYGPATH -u "$windows_path"`
32672    WIN_SDK_BASE="$unix_path"
32673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32675    WIN_SDK_BASE="$unix_path"
32676  fi
32677
32678    if test -d "$WIN_SDK_BASE"; then
32679      # There have been cases of partial or broken SDK installations. A missing
32680      # lib dir is not going to work.
32681      if test ! -d "$WIN_SDK_BASE/lib"; then
32682        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32683$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32684        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32685$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32686      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32687        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32688$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32689        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32690        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32691          VS_ENV_ARGS="/x86"
32692        else
32693          VS_ENV_ARGS="/x64"
32694        fi
32695        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32696        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32697        # TODO: improve detection for other versions of SDK
32698        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32699      else
32700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32701$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32703$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32704      fi
32705    fi
32706  fi
32707
32708
32709  if test "x$VS_ENV_CMD" = x; then
32710    VS_VERSION="${VS_VERSION}"
32711    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32712    METHOD="well-known name"
32713
32714  windows_path="$WIN_SDK_BASE"
32715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32716    unix_path=`$CYGPATH -u "$windows_path"`
32717    WIN_SDK_BASE="$unix_path"
32718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32720    WIN_SDK_BASE="$unix_path"
32721  fi
32722
32723    if test -d "$WIN_SDK_BASE"; then
32724      # There have been cases of partial or broken SDK installations. A missing
32725      # lib dir is not going to work.
32726      if test ! -d "$WIN_SDK_BASE/lib"; then
32727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32728$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32730$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32731      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32733$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32734        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32735        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32736          VS_ENV_ARGS="/x86"
32737        else
32738          VS_ENV_ARGS="/x64"
32739        fi
32740        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32741        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32742        # TODO: improve detection for other versions of SDK
32743        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32744      else
32745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32746$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32747        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32748$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32749      fi
32750    fi
32751  fi
32752
32753  fi
32754
32755    if test "x$VS_ENV_CMD" != x; then
32756      TOOLCHAIN_VERSION=$VS_VERSION
32757      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32758      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32759      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32760      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32761      # The rest of the variables are already evaled while probing
32762      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32763$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32764      break
32765    fi
32766  done
32767
32768
32769  # If we have a devkit, skip all of the below.
32770  if test "x$DEVKIT_VS_VERSION" = x; then
32771    if test "x$VS_ENV_CMD" != x; then
32772      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32773
32774  # Only process if variable expands to non-empty
32775
32776  if test "x$VS_ENV_CMD" != x; then
32777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32778
32779  # First separate the path from the arguments. This will split at the first
32780  # space.
32781  complete="$VS_ENV_CMD"
32782  path="${complete%% *}"
32783  tmp="$complete EOL"
32784  arguments="${tmp#* }"
32785
32786  # Input might be given as Windows format, start by converting to
32787  # unix format.
32788  new_path=`$CYGPATH -u "$path"`
32789
32790  # Now try to locate executable using which
32791  new_path=`$WHICH "$new_path" 2> /dev/null`
32792  # bat and cmd files are not always considered executable in cygwin causing which
32793  # to not find them
32794  if test "x$new_path" = x \
32795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32797    new_path=`$CYGPATH -u "$path"`
32798  fi
32799  if test "x$new_path" = x; then
32800    # Oops. Which didn't find the executable.
32801    # The splitting of arguments from the executable at a space might have been incorrect,
32802    # since paths with space are more likely in Windows. Give it another try with the whole
32803    # argument.
32804    path="$complete"
32805    arguments="EOL"
32806    new_path=`$CYGPATH -u "$path"`
32807    new_path=`$WHICH "$new_path" 2> /dev/null`
32808    # bat and cmd files are not always considered executable in cygwin causing which
32809    # to not find them
32810    if test "x$new_path" = x \
32811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32813      new_path=`$CYGPATH -u "$path"`
32814    fi
32815    if test "x$new_path" = x; then
32816      # It's still not found. Now this is an unrecoverable error.
32817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32818$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32819      has_space=`$ECHO "$complete" | $GREP " "`
32820      if test "x$has_space" != x; then
32821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32823      fi
32824      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32825    fi
32826  fi
32827
32828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32831  # "foo.exe" is OK but "foo" is an error.
32832  #
32833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32834  # It is also a way to make sure we got the proper file name for the real test later on.
32835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32836  if test "x$test_shortpath" = x; then
32837    # Short path failed, file does not exist as specified.
32838    # Try adding .exe or .cmd
32839    if test -f "${new_path}.exe"; then
32840      input_to_shortpath="${new_path}.exe"
32841    elif test -f "${new_path}.cmd"; then
32842      input_to_shortpath="${new_path}.cmd"
32843    else
32844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32845$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32848      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32849    fi
32850  else
32851    input_to_shortpath="$new_path"
32852  fi
32853
32854  # Call helper function which possibly converts this using DOS-style short mode.
32855  # If so, the updated path is stored in $new_path.
32856  new_path="$input_to_shortpath"
32857
32858  input_path="$input_to_shortpath"
32859  # Check if we need to convert this using DOS-style short mode. If the path
32860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32861  # take no chances and rewrite it.
32862  # Note: m4 eats our [], so we need to use [ and ] instead.
32863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32864  if test "x$has_forbidden_chars" != x; then
32865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32869      # Going to short mode and back again did indeed matter. Since short mode is
32870      # case insensitive, let's make it lowercase to improve readability.
32871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32872      # Now convert it back to Unix-style (cygpath)
32873      input_path=`$CYGPATH -u "$shortmode_path"`
32874      new_path="$input_path"
32875    fi
32876  fi
32877
32878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32879  if test "x$test_cygdrive_prefix" = x; then
32880    # As a simple fix, exclude /usr/bin since it's not a real path.
32881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32883      # a path prefixed by /cygdrive for fixpath to work.
32884      new_path="$CYGWIN_ROOT_PATH$input_path"
32885    fi
32886  fi
32887
32888  # remove trailing .exe if any
32889  new_path="${new_path/%.exe/}"
32890
32891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32892
32893  # First separate the path from the arguments. This will split at the first
32894  # space.
32895  complete="$VS_ENV_CMD"
32896  path="${complete%% *}"
32897  tmp="$complete EOL"
32898  arguments="${tmp#* }"
32899
32900  # Input might be given as Windows format, start by converting to
32901  # unix format.
32902  new_path="$path"
32903
32904  windows_path="$new_path"
32905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32906    unix_path=`$CYGPATH -u "$windows_path"`
32907    new_path="$unix_path"
32908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32910    new_path="$unix_path"
32911  fi
32912
32913
32914  # Now try to locate executable using which
32915  new_path=`$WHICH "$new_path" 2> /dev/null`
32916
32917  if test "x$new_path" = x; then
32918    # Oops. Which didn't find the executable.
32919    # The splitting of arguments from the executable at a space might have been incorrect,
32920    # since paths with space are more likely in Windows. Give it another try with the whole
32921    # argument.
32922    path="$complete"
32923    arguments="EOL"
32924    new_path="$path"
32925
32926  windows_path="$new_path"
32927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32928    unix_path=`$CYGPATH -u "$windows_path"`
32929    new_path="$unix_path"
32930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32932    new_path="$unix_path"
32933  fi
32934
32935
32936    new_path=`$WHICH "$new_path" 2> /dev/null`
32937    # bat and cmd files are not always considered executable in MSYS causing which
32938    # to not find them
32939    if test "x$new_path" = x \
32940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32942      new_path="$path"
32943
32944  windows_path="$new_path"
32945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32946    unix_path=`$CYGPATH -u "$windows_path"`
32947    new_path="$unix_path"
32948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32950    new_path="$unix_path"
32951  fi
32952
32953    fi
32954
32955    if test "x$new_path" = x; then
32956      # It's still not found. Now this is an unrecoverable error.
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32958$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32959      has_space=`$ECHO "$complete" | $GREP " "`
32960      if test "x$has_space" != x; then
32961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32963      fi
32964      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32965    fi
32966  fi
32967
32968  # Now new_path has a complete unix path to the binary
32969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32970    # Keep paths in /bin as-is, but remove trailing .exe if any
32971    new_path="${new_path/%.exe/}"
32972    # Do not save /bin paths to all_fixpath_prefixes!
32973  else
32974    # Not in mixed or Windows style, start by that.
32975    new_path=`cmd //c echo $new_path`
32976
32977  input_path="$new_path"
32978  # Check if we need to convert this using DOS-style short mode. If the path
32979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32980  # take no chances and rewrite it.
32981  # Note: m4 eats our [], so we need to use [ and ] instead.
32982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32983  if test "x$has_forbidden_chars" != x; then
32984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32986  fi
32987
32988    # Output is in $new_path
32989
32990  windows_path="$new_path"
32991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32992    unix_path=`$CYGPATH -u "$windows_path"`
32993    new_path="$unix_path"
32994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32996    new_path="$unix_path"
32997  fi
32998
32999    # remove trailing .exe if any
33000    new_path="${new_path/%.exe/}"
33001
33002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33004  fi
33005
33006    else
33007      # We're on a unix platform. Hooray! :)
33008      # First separate the path from the arguments. This will split at the first
33009      # space.
33010      complete="$VS_ENV_CMD"
33011      path="${complete%% *}"
33012      tmp="$complete EOL"
33013      arguments="${tmp#* }"
33014
33015      # Cannot rely on the command "which" here since it doesn't always work.
33016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33017      if test -z "$is_absolute_path"; then
33018        # Path to executable is not absolute. Find it.
33019        IFS_save="$IFS"
33020        IFS=:
33021        for p in $PATH; do
33022          if test -f "$p/$path" && test -x "$p/$path"; then
33023            new_path="$p/$path"
33024            break
33025          fi
33026        done
33027        IFS="$IFS_save"
33028      else
33029        # This is an absolute path, we can use it without further modifications.
33030        new_path="$path"
33031      fi
33032
33033      if test "x$new_path" = x; then
33034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33035$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33036        has_space=`$ECHO "$complete" | $GREP " "`
33037        if test "x$has_space" != x; then
33038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33040        fi
33041        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33042      fi
33043    fi
33044
33045    # Now join together the path and the arguments once again
33046    if test "x$arguments" != xEOL; then
33047      new_complete="$new_path ${arguments% *}"
33048    else
33049      new_complete="$new_path"
33050    fi
33051
33052    if test "x$complete" != "x$new_complete"; then
33053      VS_ENV_CMD="$new_complete"
33054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33055$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33056    fi
33057  fi
33058
33059
33060      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33061      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33062$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33063
33064      # We need to create a couple of temporary files.
33065      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33066      $MKDIR -p $VS_ENV_TMP_DIR
33067
33068      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33069      # Instead create a shell script which will set the relevant variables when run.
33070      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33071
33072  unix_path="$WINPATH_VS_ENV_CMD"
33073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33074    windows_path=`$CYGPATH -m "$unix_path"`
33075    WINPATH_VS_ENV_CMD="$windows_path"
33076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33077    windows_path=`cmd //c echo $unix_path`
33078    WINPATH_VS_ENV_CMD="$windows_path"
33079  fi
33080
33081      WINPATH_BASH="$BASH"
33082
33083  unix_path="$WINPATH_BASH"
33084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33085    windows_path=`$CYGPATH -m "$unix_path"`
33086    WINPATH_BASH="$windows_path"
33087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33088    windows_path=`cmd //c echo $unix_path`
33089    WINPATH_BASH="$windows_path"
33090  fi
33091
33092
33093      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33094      # script (executable by bash) that will setup the important variables.
33095      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33096      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33097      # This will end up something like:
33098      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33099      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33100      # These will end up something like:
33101      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33102      # The trailing space for everyone except PATH is no typo, but is needed due
33103      # to trailing \ in the Windows paths. These will be stripped later.
33104      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33105          >> $EXTRACT_VC_ENV_BAT_FILE
33106      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33107          >> $EXTRACT_VC_ENV_BAT_FILE
33108      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33109          >> $EXTRACT_VC_ENV_BAT_FILE
33110      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33111          >> $EXTRACT_VC_ENV_BAT_FILE
33112      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33113          >> $EXTRACT_VC_ENV_BAT_FILE
33114      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33115          >> $EXTRACT_VC_ENV_BAT_FILE
33116
33117      # Now execute the newly created bat file.
33118      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33119      # Change directory so we don't need to mess with Windows paths in redirects.
33120      cd $VS_ENV_TMP_DIR
33121      cmd /c extract-vs-env.bat | $CAT
33122      cd $CURDIR
33123
33124      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33125        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33126$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33127        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33128$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33129        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33130$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33131        as_fn_error $? "Cannot continue" "$LINENO" 5
33132      fi
33133
33134      # Now set all paths and other env variables. This will allow the rest of
33135      # the configure script to find and run the compiler in the proper way.
33136      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33137$as_echo "$as_me: Setting extracted environment variables" >&6;}
33138      . $VS_ENV_TMP_DIR/set-vs-env.sh
33139      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33140      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33141    else
33142      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33143      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33144$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33145    fi
33146  fi
33147
33148  # At this point, we should have correct variables in the environment, or we can't continue.
33149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33150$as_echo_n "checking for Visual Studio variables... " >&6; }
33151
33152  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33153      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33154    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33156$as_echo "present but broken" >&6; }
33157      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33158    else
33159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33160$as_echo "ok" >&6; }
33161      # Remove any trailing "\" ";" and " " from the variables.
33162      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33163      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33164      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33165      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33166      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33167      # Remove any paths containing # (typically F#) as that messes up make. This
33168      # is needed if visual studio was installed with F# support.
33169      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33170
33171
33172
33173
33174
33175      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33176      OLDIFS="$IFS"
33177      IFS=";"
33178      for i in $VS_INCLUDE; do
33179        ipath=$i
33180        # Only process non-empty elements
33181        if test "x$ipath" != x; then
33182          IFS="$OLDIFS"
33183          # Check that directory exists before calling fixup_path
33184          testpath=$ipath
33185
33186  windows_path="$testpath"
33187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33188    unix_path=`$CYGPATH -u "$windows_path"`
33189    testpath="$unix_path"
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33192    testpath="$unix_path"
33193  fi
33194
33195          if test -d "$testpath"; then
33196
33197  # Only process if variable expands to non-empty
33198
33199  if test "x$ipath" != x; then
33200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33201
33202  # Input might be given as Windows format, start by converting to
33203  # unix format.
33204  path="$ipath"
33205  new_path=`$CYGPATH -u "$path"`
33206
33207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33210  # "foo.exe" is OK but "foo" is an error.
33211  #
33212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33213  # It is also a way to make sure we got the proper file name for the real test later on.
33214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33215  if test "x$test_shortpath" = x; then
33216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33217$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33218    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33219  fi
33220
33221  # Call helper function which possibly converts this using DOS-style short mode.
33222  # If so, the updated path is stored in $new_path.
33223
33224  input_path="$new_path"
33225  # Check if we need to convert this using DOS-style short mode. If the path
33226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33227  # take no chances and rewrite it.
33228  # Note: m4 eats our [], so we need to use [ and ] instead.
33229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33230  if test "x$has_forbidden_chars" != x; then
33231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33235      # Going to short mode and back again did indeed matter. Since short mode is
33236      # case insensitive, let's make it lowercase to improve readability.
33237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33238      # Now convert it back to Unix-style (cygpath)
33239      input_path=`$CYGPATH -u "$shortmode_path"`
33240      new_path="$input_path"
33241    fi
33242  fi
33243
33244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33245  if test "x$test_cygdrive_prefix" = x; then
33246    # As a simple fix, exclude /usr/bin since it's not a real path.
33247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33249      # a path prefixed by /cygdrive for fixpath to work.
33250      new_path="$CYGWIN_ROOT_PATH$input_path"
33251    fi
33252  fi
33253
33254
33255  if test "x$path" != "x$new_path"; then
33256    ipath="$new_path"
33257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33258$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33259  fi
33260
33261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33262
33263  path="$ipath"
33264  has_colon=`$ECHO $path | $GREP ^.:`
33265  new_path="$path"
33266  if test "x$has_colon" = x; then
33267    # Not in mixed or Windows style, start by that.
33268    new_path=`cmd //c echo $path`
33269  fi
33270
33271
33272  input_path="$new_path"
33273  # Check if we need to convert this using DOS-style short mode. If the path
33274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33275  # take no chances and rewrite it.
33276  # Note: m4 eats our [], so we need to use [ and ] instead.
33277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33278  if test "x$has_forbidden_chars" != x; then
33279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33281  fi
33282
33283
33284  windows_path="$new_path"
33285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33286    unix_path=`$CYGPATH -u "$windows_path"`
33287    new_path="$unix_path"
33288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33290    new_path="$unix_path"
33291  fi
33292
33293  if test "x$path" != "x$new_path"; then
33294    ipath="$new_path"
33295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33296$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33297  fi
33298
33299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33301
33302    else
33303      # We're on a unix platform. Hooray! :)
33304      path="$ipath"
33305      has_space=`$ECHO "$path" | $GREP " "`
33306      if test "x$has_space" != x; then
33307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33308$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33310      fi
33311
33312      # Use eval to expand a potential ~
33313      eval path="$path"
33314      if test ! -f "$path" && test ! -d "$path"; then
33315        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33316      fi
33317
33318      if test -d "$path"; then
33319        ipath="`cd "$path"; $THEPWDCMD -L`"
33320      else
33321        dir="`$DIRNAME "$path"`"
33322        base="`$BASENAME "$path"`"
33323        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33324      fi
33325    fi
33326  fi
33327
33328            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33329          fi
33330          IFS=";"
33331        fi
33332      done
33333      # Convert VS_LIB into SYSROOT_LDFLAGS
33334      for i in $VS_LIB; do
33335        libpath=$i
33336        # Only process non-empty elements
33337        if test "x$libpath" != x; then
33338          IFS="$OLDIFS"
33339          # Check that directory exists before calling fixup_path
33340          testpath=$libpath
33341
33342  windows_path="$testpath"
33343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33344    unix_path=`$CYGPATH -u "$windows_path"`
33345    testpath="$unix_path"
33346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33348    testpath="$unix_path"
33349  fi
33350
33351          if test -d "$testpath"; then
33352
33353  # Only process if variable expands to non-empty
33354
33355  if test "x$libpath" != x; then
33356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357
33358  # Input might be given as Windows format, start by converting to
33359  # unix format.
33360  path="$libpath"
33361  new_path=`$CYGPATH -u "$path"`
33362
33363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33366  # "foo.exe" is OK but "foo" is an error.
33367  #
33368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33369  # It is also a way to make sure we got the proper file name for the real test later on.
33370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33371  if test "x$test_shortpath" = x; then
33372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33373$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33374    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33375  fi
33376
33377  # Call helper function which possibly converts this using DOS-style short mode.
33378  # If so, the updated path is stored in $new_path.
33379
33380  input_path="$new_path"
33381  # Check if we need to convert this using DOS-style short mode. If the path
33382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33383  # take no chances and rewrite it.
33384  # Note: m4 eats our [], so we need to use [ and ] instead.
33385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33386  if test "x$has_forbidden_chars" != x; then
33387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33391      # Going to short mode and back again did indeed matter. Since short mode is
33392      # case insensitive, let's make it lowercase to improve readability.
33393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33394      # Now convert it back to Unix-style (cygpath)
33395      input_path=`$CYGPATH -u "$shortmode_path"`
33396      new_path="$input_path"
33397    fi
33398  fi
33399
33400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33401  if test "x$test_cygdrive_prefix" = x; then
33402    # As a simple fix, exclude /usr/bin since it's not a real path.
33403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33405      # a path prefixed by /cygdrive for fixpath to work.
33406      new_path="$CYGWIN_ROOT_PATH$input_path"
33407    fi
33408  fi
33409
33410
33411  if test "x$path" != "x$new_path"; then
33412    libpath="$new_path"
33413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33414$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33415  fi
33416
33417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418
33419  path="$libpath"
33420  has_colon=`$ECHO $path | $GREP ^.:`
33421  new_path="$path"
33422  if test "x$has_colon" = x; then
33423    # Not in mixed or Windows style, start by that.
33424    new_path=`cmd //c echo $path`
33425  fi
33426
33427
33428  input_path="$new_path"
33429  # Check if we need to convert this using DOS-style short mode. If the path
33430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33431  # take no chances and rewrite it.
33432  # Note: m4 eats our [], so we need to use [ and ] instead.
33433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33434  if test "x$has_forbidden_chars" != x; then
33435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33437  fi
33438
33439
33440  windows_path="$new_path"
33441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33442    unix_path=`$CYGPATH -u "$windows_path"`
33443    new_path="$unix_path"
33444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33446    new_path="$unix_path"
33447  fi
33448
33449  if test "x$path" != "x$new_path"; then
33450    libpath="$new_path"
33451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33452$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33453  fi
33454
33455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33457
33458    else
33459      # We're on a unix platform. Hooray! :)
33460      path="$libpath"
33461      has_space=`$ECHO "$path" | $GREP " "`
33462      if test "x$has_space" != x; then
33463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33464$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33465        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33466      fi
33467
33468      # Use eval to expand a potential ~
33469      eval path="$path"
33470      if test ! -f "$path" && test ! -d "$path"; then
33471        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33472      fi
33473
33474      if test -d "$path"; then
33475        libpath="`cd "$path"; $THEPWDCMD -L`"
33476      else
33477        dir="`$DIRNAME "$path"`"
33478        base="`$BASENAME "$path"`"
33479        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33480      fi
33481    fi
33482  fi
33483
33484            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33485          fi
33486          IFS=";"
33487        fi
33488      done
33489      IFS="$OLDIFS"
33490    fi
33491  else
33492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33493$as_echo "not found" >&6; }
33494
33495    if test "x$VS_ENV_CMD" = x; then
33496      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33497$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33498      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33499$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33500    else
33501      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33502$as_echo "$as_me: Running the extraction script failed." >&6;}
33503    fi
33504    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33505$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33506    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33507$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33508    as_fn_error $? "Cannot continue" "$LINENO" 5
33509  fi
33510
33511    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33512    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33513    PATH="$VS_PATH"
33514    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33515    export INCLUDE="$VS_INCLUDE"
33516    export LIB="$VS_LIB"
33517  else
33518    if test "x$XCODE_VERSION_OUTPUT" != x; then
33519      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33520      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33521      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33522    else
33523      # Currently we do not define this for other toolchains. This might change as the need arise.
33524      TOOLCHAIN_VERSION=
33525    fi
33526  fi
33527
33528
33529  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33530  # override all other locations.
33531  if test "x$TOOLCHAIN_PATH" != x; then
33532    PATH=$TOOLCHAIN_PATH:$PATH
33533  fi
33534
33535
33536  #
33537  # Setup the compilers (CC and CXX)
33538  #
33539
33540  COMPILER_NAME=C
33541  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33542
33543  if test "x$CC" != x; then
33544    # User has supplied compiler name already, always let that override.
33545    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33546$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33547    if test "x`basename $CC`" = "x$CC"; then
33548      # A command without a complete path is provided, search $PATH.
33549
33550      for ac_prog in $CC
33551do
33552  # Extract the first word of "$ac_prog", so it can be a program name with args.
33553set dummy $ac_prog; ac_word=$2
33554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33555$as_echo_n "checking for $ac_word... " >&6; }
33556if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33557  $as_echo_n "(cached) " >&6
33558else
33559  case $POTENTIAL_CC in
33560  [\\/]* | ?:[\\/]*)
33561  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33562  ;;
33563  *)
33564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33565for as_dir in $PATH
33566do
33567  IFS=$as_save_IFS
33568  test -z "$as_dir" && as_dir=.
33569    for ac_exec_ext in '' $ac_executable_extensions; do
33570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33571    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33573    break 2
33574  fi
33575done
33576  done
33577IFS=$as_save_IFS
33578
33579  ;;
33580esac
33581fi
33582POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33583if test -n "$POTENTIAL_CC"; then
33584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33585$as_echo "$POTENTIAL_CC" >&6; }
33586else
33587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33588$as_echo "no" >&6; }
33589fi
33590
33591
33592  test -n "$POTENTIAL_CC" && break
33593done
33594
33595      if test "x$POTENTIAL_CC" != x; then
33596        CC=$POTENTIAL_CC
33597      else
33598        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33599      fi
33600    else
33601      # Otherwise it might already be a complete path
33602      if test ! -x "$CC"; then
33603        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33604      fi
33605    fi
33606  else
33607    # No user supplied value. Locate compiler ourselves.
33608
33609    # If we are cross compiling, assume cross compilation tools follows the
33610    # cross compilation standard where they are prefixed with the autoconf
33611    # standard name for the target. For example the binary
33612    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33613    # If we are not cross compiling, then the default compiler name will be
33614    # used.
33615
33616    CC=
33617    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33618    # before checking the rest of the PATH.
33619    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33620    # step, this should not be necessary.
33621    if test -n "$TOOLCHAIN_PATH"; then
33622      PATH_save="$PATH"
33623      PATH="$TOOLCHAIN_PATH"
33624      if test -n "$ac_tool_prefix"; then
33625  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33626set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33628$as_echo_n "checking for $ac_word... " >&6; }
33629if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33630  $as_echo_n "(cached) " >&6
33631else
33632  case $TOOLCHAIN_PATH_CC in
33633  [\\/]* | ?:[\\/]*)
33634  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33635  ;;
33636  *)
33637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33638for as_dir in $PATH
33639do
33640  IFS=$as_save_IFS
33641  test -z "$as_dir" && as_dir=.
33642    for ac_exec_ext in '' $ac_executable_extensions; do
33643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33644    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33646    break 2
33647  fi
33648done
33649  done
33650IFS=$as_save_IFS
33651
33652  ;;
33653esac
33654fi
33655TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33656if test -n "$TOOLCHAIN_PATH_CC"; then
33657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33658$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33659else
33660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33661$as_echo "no" >&6; }
33662fi
33663
33664
33665fi
33666if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33667  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33668  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33669set dummy $SEARCH_LIST; ac_word=$2
33670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33671$as_echo_n "checking for $ac_word... " >&6; }
33672if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33673  $as_echo_n "(cached) " >&6
33674else
33675  case $ac_pt_TOOLCHAIN_PATH_CC in
33676  [\\/]* | ?:[\\/]*)
33677  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33678  ;;
33679  *)
33680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33681for as_dir in $PATH
33682do
33683  IFS=$as_save_IFS
33684  test -z "$as_dir" && as_dir=.
33685    for ac_exec_ext in '' $ac_executable_extensions; do
33686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33687    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33689    break 2
33690  fi
33691done
33692  done
33693IFS=$as_save_IFS
33694
33695  ;;
33696esac
33697fi
33698ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33699if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33701$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33702else
33703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33704$as_echo "no" >&6; }
33705fi
33706
33707  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33708    TOOLCHAIN_PATH_CC=""
33709  else
33710    case $cross_compiling:$ac_tool_warned in
33711yes:)
33712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33714ac_tool_warned=yes ;;
33715esac
33716    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33717  fi
33718else
33719  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33720fi
33721
33722      CC=$TOOLCHAIN_PATH_CC
33723      PATH="$PATH_save"
33724    fi
33725
33726    # AC_PATH_TOOL can't be run multiple times with the same variable,
33727    # so create a new name for this run.
33728    if test "x$CC" = x; then
33729      if test -n "$ac_tool_prefix"; then
33730  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33731set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33733$as_echo_n "checking for $ac_word... " >&6; }
33734if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33735  $as_echo_n "(cached) " >&6
33736else
33737  case $POTENTIAL_CC in
33738  [\\/]* | ?:[\\/]*)
33739  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33740  ;;
33741  *)
33742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33743for as_dir in $PATH
33744do
33745  IFS=$as_save_IFS
33746  test -z "$as_dir" && as_dir=.
33747    for ac_exec_ext in '' $ac_executable_extensions; do
33748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33749    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33751    break 2
33752  fi
33753done
33754  done
33755IFS=$as_save_IFS
33756
33757  ;;
33758esac
33759fi
33760POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33761if test -n "$POTENTIAL_CC"; then
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33763$as_echo "$POTENTIAL_CC" >&6; }
33764else
33765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33766$as_echo "no" >&6; }
33767fi
33768
33769
33770fi
33771if test -z "$ac_cv_path_POTENTIAL_CC"; then
33772  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33773  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33774set dummy $SEARCH_LIST; ac_word=$2
33775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33776$as_echo_n "checking for $ac_word... " >&6; }
33777if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33778  $as_echo_n "(cached) " >&6
33779else
33780  case $ac_pt_POTENTIAL_CC in
33781  [\\/]* | ?:[\\/]*)
33782  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33783  ;;
33784  *)
33785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33786for as_dir in $PATH
33787do
33788  IFS=$as_save_IFS
33789  test -z "$as_dir" && as_dir=.
33790    for ac_exec_ext in '' $ac_executable_extensions; do
33791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33792    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33794    break 2
33795  fi
33796done
33797  done
33798IFS=$as_save_IFS
33799
33800  ;;
33801esac
33802fi
33803ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33804if test -n "$ac_pt_POTENTIAL_CC"; then
33805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33806$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33807else
33808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33809$as_echo "no" >&6; }
33810fi
33811
33812  if test "x$ac_pt_POTENTIAL_CC" = x; then
33813    POTENTIAL_CC=""
33814  else
33815    case $cross_compiling:$ac_tool_warned in
33816yes:)
33817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33819ac_tool_warned=yes ;;
33820esac
33821    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33822  fi
33823else
33824  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33825fi
33826
33827      CC=$POTENTIAL_CC
33828    fi
33829
33830    if test "x$CC" = x; then
33831
33832  # Print a helpful message on how to acquire the necessary build dependency.
33833  # devkit is the help tag: freetype, cups, alsa etc
33834  MISSING_DEPENDENCY=devkit
33835
33836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33837    cygwin_help $MISSING_DEPENDENCY
33838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33839    msys_help $MISSING_DEPENDENCY
33840  else
33841    PKGHANDLER_COMMAND=
33842
33843    case $PKGHANDLER in
33844      apt-get)
33845        apt_help     $MISSING_DEPENDENCY ;;
33846      yum)
33847        yum_help     $MISSING_DEPENDENCY ;;
33848      brew)
33849        brew_help    $MISSING_DEPENDENCY ;;
33850      port)
33851        port_help    $MISSING_DEPENDENCY ;;
33852      pkgutil)
33853        pkgutil_help $MISSING_DEPENDENCY ;;
33854      pkgadd)
33855        pkgadd_help  $MISSING_DEPENDENCY ;;
33856    esac
33857
33858    if test "x$PKGHANDLER_COMMAND" != x; then
33859      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33860    fi
33861  fi
33862
33863      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33864    fi
33865  fi
33866
33867  # Now we have a compiler binary in CC. Make sure it's okay.
33868
33869  # Only process if variable expands to non-empty
33870
33871  if test "x$CC" != x; then
33872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33873
33874  # First separate the path from the arguments. This will split at the first
33875  # space.
33876  complete="$CC"
33877  path="${complete%% *}"
33878  tmp="$complete EOL"
33879  arguments="${tmp#* }"
33880
33881  # Input might be given as Windows format, start by converting to
33882  # unix format.
33883  new_path=`$CYGPATH -u "$path"`
33884
33885  # Now try to locate executable using which
33886  new_path=`$WHICH "$new_path" 2> /dev/null`
33887  # bat and cmd files are not always considered executable in cygwin causing which
33888  # to not find them
33889  if test "x$new_path" = x \
33890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33892    new_path=`$CYGPATH -u "$path"`
33893  fi
33894  if test "x$new_path" = x; then
33895    # Oops. Which didn't find the executable.
33896    # The splitting of arguments from the executable at a space might have been incorrect,
33897    # since paths with space are more likely in Windows. Give it another try with the whole
33898    # argument.
33899    path="$complete"
33900    arguments="EOL"
33901    new_path=`$CYGPATH -u "$path"`
33902    new_path=`$WHICH "$new_path" 2> /dev/null`
33903    # bat and cmd files are not always considered executable in cygwin causing which
33904    # to not find them
33905    if test "x$new_path" = x \
33906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33908      new_path=`$CYGPATH -u "$path"`
33909    fi
33910    if test "x$new_path" = x; then
33911      # It's still not found. Now this is an unrecoverable error.
33912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33913$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33914      has_space=`$ECHO "$complete" | $GREP " "`
33915      if test "x$has_space" != x; then
33916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33918      fi
33919      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33920    fi
33921  fi
33922
33923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33926  # "foo.exe" is OK but "foo" is an error.
33927  #
33928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33929  # It is also a way to make sure we got the proper file name for the real test later on.
33930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33931  if test "x$test_shortpath" = x; then
33932    # Short path failed, file does not exist as specified.
33933    # Try adding .exe or .cmd
33934    if test -f "${new_path}.exe"; then
33935      input_to_shortpath="${new_path}.exe"
33936    elif test -f "${new_path}.cmd"; then
33937      input_to_shortpath="${new_path}.cmd"
33938    else
33939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33940$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33943      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33944    fi
33945  else
33946    input_to_shortpath="$new_path"
33947  fi
33948
33949  # Call helper function which possibly converts this using DOS-style short mode.
33950  # If so, the updated path is stored in $new_path.
33951  new_path="$input_to_shortpath"
33952
33953  input_path="$input_to_shortpath"
33954  # Check if we need to convert this using DOS-style short mode. If the path
33955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33956  # take no chances and rewrite it.
33957  # Note: m4 eats our [], so we need to use [ and ] instead.
33958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33959  if test "x$has_forbidden_chars" != x; then
33960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33964      # Going to short mode and back again did indeed matter. Since short mode is
33965      # case insensitive, let's make it lowercase to improve readability.
33966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33967      # Now convert it back to Unix-style (cygpath)
33968      input_path=`$CYGPATH -u "$shortmode_path"`
33969      new_path="$input_path"
33970    fi
33971  fi
33972
33973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33974  if test "x$test_cygdrive_prefix" = x; then
33975    # As a simple fix, exclude /usr/bin since it's not a real path.
33976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33978      # a path prefixed by /cygdrive for fixpath to work.
33979      new_path="$CYGWIN_ROOT_PATH$input_path"
33980    fi
33981  fi
33982
33983  # remove trailing .exe if any
33984  new_path="${new_path/%.exe/}"
33985
33986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33987
33988  # First separate the path from the arguments. This will split at the first
33989  # space.
33990  complete="$CC"
33991  path="${complete%% *}"
33992  tmp="$complete EOL"
33993  arguments="${tmp#* }"
33994
33995  # Input might be given as Windows format, start by converting to
33996  # unix format.
33997  new_path="$path"
33998
33999  windows_path="$new_path"
34000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34001    unix_path=`$CYGPATH -u "$windows_path"`
34002    new_path="$unix_path"
34003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34005    new_path="$unix_path"
34006  fi
34007
34008
34009  # Now try to locate executable using which
34010  new_path=`$WHICH "$new_path" 2> /dev/null`
34011
34012  if test "x$new_path" = x; then
34013    # Oops. Which didn't find the executable.
34014    # The splitting of arguments from the executable at a space might have been incorrect,
34015    # since paths with space are more likely in Windows. Give it another try with the whole
34016    # argument.
34017    path="$complete"
34018    arguments="EOL"
34019    new_path="$path"
34020
34021  windows_path="$new_path"
34022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34023    unix_path=`$CYGPATH -u "$windows_path"`
34024    new_path="$unix_path"
34025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34027    new_path="$unix_path"
34028  fi
34029
34030
34031    new_path=`$WHICH "$new_path" 2> /dev/null`
34032    # bat and cmd files are not always considered executable in MSYS causing which
34033    # to not find them
34034    if test "x$new_path" = x \
34035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34037      new_path="$path"
34038
34039  windows_path="$new_path"
34040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34041    unix_path=`$CYGPATH -u "$windows_path"`
34042    new_path="$unix_path"
34043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34045    new_path="$unix_path"
34046  fi
34047
34048    fi
34049
34050    if test "x$new_path" = x; then
34051      # It's still not found. Now this is an unrecoverable error.
34052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34053$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34054      has_space=`$ECHO "$complete" | $GREP " "`
34055      if test "x$has_space" != x; then
34056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34058      fi
34059      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34060    fi
34061  fi
34062
34063  # Now new_path has a complete unix path to the binary
34064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34065    # Keep paths in /bin as-is, but remove trailing .exe if any
34066    new_path="${new_path/%.exe/}"
34067    # Do not save /bin paths to all_fixpath_prefixes!
34068  else
34069    # Not in mixed or Windows style, start by that.
34070    new_path=`cmd //c echo $new_path`
34071
34072  input_path="$new_path"
34073  # Check if we need to convert this using DOS-style short mode. If the path
34074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34075  # take no chances and rewrite it.
34076  # Note: m4 eats our [], so we need to use [ and ] instead.
34077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34078  if test "x$has_forbidden_chars" != x; then
34079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34081  fi
34082
34083    # Output is in $new_path
34084
34085  windows_path="$new_path"
34086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34087    unix_path=`$CYGPATH -u "$windows_path"`
34088    new_path="$unix_path"
34089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34091    new_path="$unix_path"
34092  fi
34093
34094    # remove trailing .exe if any
34095    new_path="${new_path/%.exe/}"
34096
34097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34099  fi
34100
34101    else
34102      # We're on a unix platform. Hooray! :)
34103      # First separate the path from the arguments. This will split at the first
34104      # space.
34105      complete="$CC"
34106      path="${complete%% *}"
34107      tmp="$complete EOL"
34108      arguments="${tmp#* }"
34109
34110      # Cannot rely on the command "which" here since it doesn't always work.
34111      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34112      if test -z "$is_absolute_path"; then
34113        # Path to executable is not absolute. Find it.
34114        IFS_save="$IFS"
34115        IFS=:
34116        for p in $PATH; do
34117          if test -f "$p/$path" && test -x "$p/$path"; then
34118            new_path="$p/$path"
34119            break
34120          fi
34121        done
34122        IFS="$IFS_save"
34123      else
34124        # This is an absolute path, we can use it without further modifications.
34125        new_path="$path"
34126      fi
34127
34128      if test "x$new_path" = x; then
34129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34130$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34131        has_space=`$ECHO "$complete" | $GREP " "`
34132        if test "x$has_space" != x; then
34133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34135        fi
34136        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34137      fi
34138    fi
34139
34140    # Now join together the path and the arguments once again
34141    if test "x$arguments" != xEOL; then
34142      new_complete="$new_path ${arguments% *}"
34143    else
34144      new_complete="$new_path"
34145    fi
34146
34147    if test "x$complete" != "x$new_complete"; then
34148      CC="$new_complete"
34149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34150$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34151    fi
34152  fi
34153
34154  TEST_COMPILER="$CC"
34155
34156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34157$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34158  SYMLINK_ORIGINAL="$TEST_COMPILER"
34159
34160  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34161    # Follow a chain of symbolic links. Use readlink
34162    # where it exists, else fall back to horribly
34163    # complicated shell code.
34164    if test "x$READLINK_TESTED" != yes; then
34165      # On MacOSX there is a readlink tool with a different
34166      # purpose than the GNU readlink tool. Check the found readlink.
34167      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34168      if test "x$ISGNU" = x; then
34169        # A readlink that we do not know how to use.
34170        # Are there other non-GNU readlinks out there?
34171        READLINK_TESTED=yes
34172        READLINK=
34173      fi
34174    fi
34175
34176    if test "x$READLINK" != x; then
34177      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34178    else
34179      # Save the current directory for restoring afterwards
34180      STARTDIR=$PWD
34181      COUNTER=0
34182      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34183      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34184      cd $sym_link_dir
34185      # Use -P flag to resolve symlinks in directories.
34186      cd `$THEPWDCMD -P`
34187      sym_link_dir=`$THEPWDCMD -P`
34188      # Resolve file symlinks
34189      while test $COUNTER -lt 20; do
34190        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34191        if test "x$ISLINK" == x; then
34192          # This is not a symbolic link! We are done!
34193          break
34194        fi
34195        # Again resolve directory symlinks since the target of the just found
34196        # link could be in a different directory
34197        cd `$DIRNAME $ISLINK`
34198        sym_link_dir=`$THEPWDCMD -P`
34199        sym_link_file=`$BASENAME $ISLINK`
34200        let COUNTER=COUNTER+1
34201      done
34202      cd $STARTDIR
34203      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34204    fi
34205  fi
34206
34207  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34209$as_echo "no symlink" >&6; }
34210  else
34211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34212$as_echo "$SYMLINK_ORIGINAL" >&6; }
34213
34214    # We can't handle ccache by gcc wrappers, since we need to know if we're
34215    # using ccache. Instead ccache usage must be controlled by a configure option.
34216    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34217    if test "x$COMPILER_BASENAME" = "xccache"; then
34218      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34219$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34220      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34221    fi
34222  fi
34223
34224
34225  COMPILER=$CC
34226  COMPILER_NAME=$COMPILER_NAME
34227
34228  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34229    # cc -V output typically looks like
34230    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34231    # or
34232    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34233    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34234    # Check that this is likely to be the Solaris Studio cc.
34235    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34236    if test $? -ne 0; then
34237      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34238      { $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
34239$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34240      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34241$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34242      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34243$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34244      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34245    fi
34246    # Remove usage instructions (if present), and
34247    # collapse compiler output into a single line
34248    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34249        $SED -e 's/ *[Uu]sage:.*//'`
34250    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34251        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34252  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34253    # xlc -qversion output typically looks like
34254    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34255    #     Version: 11.01.0000.0015
34256    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34257    # Check that this is likely to be the IBM XL C compiler.
34258    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34259    if test $? -ne 0; then
34260      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34261      { $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
34262$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34263      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34264$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34265      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34266$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34267      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34268    fi
34269    # Collapse compiler output into a single line
34270    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34271    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34272        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34273  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34274    # There is no specific version flag, but all output starts with a version string.
34275    # First line typically looks something like:
34276    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34277    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34278    # Check that this is likely to be Microsoft CL.EXE.
34279    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34280    if test $? -ne 0; then
34281      { $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
34282$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34283      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34284$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34285      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34286    fi
34287    # Collapse compiler output into a single line
34288    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34289    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34290        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34291  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34292    # gcc --version output typically looks like
34293    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34294    #     Copyright (C) 2013 Free Software Foundation, Inc.
34295    #     This is free software; see the source for copying conditions.  There is NO
34296    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34297    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34298    # Check that this is likely to be GCC.
34299    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34300    if test $? -ne 0; then
34301      { $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
34302$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34303      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34304$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34305      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34306    fi
34307    # Remove Copyright and legalese from version string, and
34308    # collapse into a single line
34309    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34310        $SED -e 's/ *Copyright .*//'`
34311    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34312        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34313  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34314    # clang --version output typically looks like
34315    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34316    #    clang version 3.3 (tags/RELEASE_33/final)
34317    # or
34318    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34319    #    Target: x86_64-pc-linux-gnu
34320    #    Thread model: posix
34321    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34322    # Check that this is likely to be clang
34323    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34324    if test $? -ne 0; then
34325      { $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
34326$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34327      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34328$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34329      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34330    fi
34331    # Collapse compiler output into a single line
34332    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34333    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34334        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34335  else
34336      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34337  fi
34338  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34339  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34340  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34341  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34342
34343  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34344$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34345
34346
34347  # Now that we have resolved CC ourself, let autoconf have its go at it
34348  ac_ext=c
34349ac_cpp='$CPP $CPPFLAGS'
34350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34352ac_compiler_gnu=$ac_cv_c_compiler_gnu
34353if test -n "$ac_tool_prefix"; then
34354  for ac_prog in $CC
34355  do
34356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34359$as_echo_n "checking for $ac_word... " >&6; }
34360if ${ac_cv_prog_CC+:} false; then :
34361  $as_echo_n "(cached) " >&6
34362else
34363  if test -n "$CC"; then
34364  ac_cv_prog_CC="$CC" # Let the user override the test.
34365else
34366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34367for as_dir in $PATH
34368do
34369  IFS=$as_save_IFS
34370  test -z "$as_dir" && as_dir=.
34371    for ac_exec_ext in '' $ac_executable_extensions; do
34372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34373    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34375    break 2
34376  fi
34377done
34378  done
34379IFS=$as_save_IFS
34380
34381fi
34382fi
34383CC=$ac_cv_prog_CC
34384if test -n "$CC"; then
34385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34386$as_echo "$CC" >&6; }
34387else
34388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34389$as_echo "no" >&6; }
34390fi
34391
34392
34393    test -n "$CC" && break
34394  done
34395fi
34396if test -z "$CC"; then
34397  ac_ct_CC=$CC
34398  for ac_prog in $CC
34399do
34400  # Extract the first word of "$ac_prog", so it can be a program name with args.
34401set dummy $ac_prog; ac_word=$2
34402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34403$as_echo_n "checking for $ac_word... " >&6; }
34404if ${ac_cv_prog_ac_ct_CC+:} false; then :
34405  $as_echo_n "(cached) " >&6
34406else
34407  if test -n "$ac_ct_CC"; then
34408  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34409else
34410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34411for as_dir in $PATH
34412do
34413  IFS=$as_save_IFS
34414  test -z "$as_dir" && as_dir=.
34415    for ac_exec_ext in '' $ac_executable_extensions; do
34416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34417    ac_cv_prog_ac_ct_CC="$ac_prog"
34418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34419    break 2
34420  fi
34421done
34422  done
34423IFS=$as_save_IFS
34424
34425fi
34426fi
34427ac_ct_CC=$ac_cv_prog_ac_ct_CC
34428if test -n "$ac_ct_CC"; then
34429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34430$as_echo "$ac_ct_CC" >&6; }
34431else
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34433$as_echo "no" >&6; }
34434fi
34435
34436
34437  test -n "$ac_ct_CC" && break
34438done
34439
34440  if test "x$ac_ct_CC" = x; then
34441    CC=""
34442  else
34443    case $cross_compiling:$ac_tool_warned in
34444yes:)
34445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34447ac_tool_warned=yes ;;
34448esac
34449    CC=$ac_ct_CC
34450  fi
34451fi
34452
34453
34454test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34456as_fn_error $? "no acceptable C compiler found in \$PATH
34457See \`config.log' for more details" "$LINENO" 5; }
34458
34459# Provide some information about the compiler.
34460$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34461set X $ac_compile
34462ac_compiler=$2
34463for ac_option in --version -v -V -qversion; do
34464  { { ac_try="$ac_compiler $ac_option >&5"
34465case "(($ac_try" in
34466  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34467  *) ac_try_echo=$ac_try;;
34468esac
34469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34470$as_echo "$ac_try_echo"; } >&5
34471  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34472  ac_status=$?
34473  if test -s conftest.err; then
34474    sed '10a\
34475... rest of stderr output deleted ...
34476         10q' conftest.err >conftest.er1
34477    cat conftest.er1 >&5
34478  fi
34479  rm -f conftest.er1 conftest.err
34480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34481  test $ac_status = 0; }
34482done
34483
34484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34485/* end confdefs.h.  */
34486
34487int
34488main ()
34489{
34490
34491  ;
34492  return 0;
34493}
34494_ACEOF
34495ac_clean_files_save=$ac_clean_files
34496ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34497# Try to create an executable without -o first, disregard a.out.
34498# It will help us diagnose broken compilers, and finding out an intuition
34499# of exeext.
34500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34501$as_echo_n "checking whether the C compiler works... " >&6; }
34502ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34503
34504# The possible output files:
34505ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34506
34507ac_rmfiles=
34508for ac_file in $ac_files
34509do
34510  case $ac_file in
34511    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34512    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34513  esac
34514done
34515rm -f $ac_rmfiles
34516
34517if { { ac_try="$ac_link_default"
34518case "(($ac_try" in
34519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34520  *) ac_try_echo=$ac_try;;
34521esac
34522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34523$as_echo "$ac_try_echo"; } >&5
34524  (eval "$ac_link_default") 2>&5
34525  ac_status=$?
34526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34527  test $ac_status = 0; }; then :
34528  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34529# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34530# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34531# so that the user can short-circuit this test for compilers unknown to
34532# Autoconf.
34533for ac_file in $ac_files ''
34534do
34535  test -f "$ac_file" || continue
34536  case $ac_file in
34537    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34538	;;
34539    [ab].out )
34540	# We found the default executable, but exeext='' is most
34541	# certainly right.
34542	break;;
34543    *.* )
34544	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34545	then :; else
34546	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34547	fi
34548	# We set ac_cv_exeext here because the later test for it is not
34549	# safe: cross compilers may not add the suffix if given an `-o'
34550	# argument, so we may need to know it at that point already.
34551	# Even if this section looks crufty: it has the advantage of
34552	# actually working.
34553	break;;
34554    * )
34555	break;;
34556  esac
34557done
34558test "$ac_cv_exeext" = no && ac_cv_exeext=
34559
34560else
34561  ac_file=''
34562fi
34563if test -z "$ac_file"; then :
34564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34565$as_echo "no" >&6; }
34566$as_echo "$as_me: failed program was:" >&5
34567sed 's/^/| /' conftest.$ac_ext >&5
34568
34569{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34571as_fn_error 77 "C compiler cannot create executables
34572See \`config.log' for more details" "$LINENO" 5; }
34573else
34574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34575$as_echo "yes" >&6; }
34576fi
34577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34578$as_echo_n "checking for C compiler default output file name... " >&6; }
34579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34580$as_echo "$ac_file" >&6; }
34581ac_exeext=$ac_cv_exeext
34582
34583rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34584ac_clean_files=$ac_clean_files_save
34585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34586$as_echo_n "checking for suffix of executables... " >&6; }
34587if { { ac_try="$ac_link"
34588case "(($ac_try" in
34589  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34590  *) ac_try_echo=$ac_try;;
34591esac
34592eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34593$as_echo "$ac_try_echo"; } >&5
34594  (eval "$ac_link") 2>&5
34595  ac_status=$?
34596  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34597  test $ac_status = 0; }; then :
34598  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34599# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34600# work properly (i.e., refer to `conftest.exe'), while it won't with
34601# `rm'.
34602for ac_file in conftest.exe conftest conftest.*; do
34603  test -f "$ac_file" || continue
34604  case $ac_file in
34605    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34606    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34607	  break;;
34608    * ) break;;
34609  esac
34610done
34611else
34612  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34614as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34615See \`config.log' for more details" "$LINENO" 5; }
34616fi
34617rm -f conftest conftest$ac_cv_exeext
34618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34619$as_echo "$ac_cv_exeext" >&6; }
34620
34621rm -f conftest.$ac_ext
34622EXEEXT=$ac_cv_exeext
34623ac_exeext=$EXEEXT
34624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34625/* end confdefs.h.  */
34626#include <stdio.h>
34627int
34628main ()
34629{
34630FILE *f = fopen ("conftest.out", "w");
34631 return ferror (f) || fclose (f) != 0;
34632
34633  ;
34634  return 0;
34635}
34636_ACEOF
34637ac_clean_files="$ac_clean_files conftest.out"
34638# Check that the compiler produces executables we can run.  If not, either
34639# the compiler is broken, or we cross compile.
34640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34641$as_echo_n "checking whether we are cross compiling... " >&6; }
34642if test "$cross_compiling" != yes; then
34643  { { ac_try="$ac_link"
34644case "(($ac_try" in
34645  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34646  *) ac_try_echo=$ac_try;;
34647esac
34648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34649$as_echo "$ac_try_echo"; } >&5
34650  (eval "$ac_link") 2>&5
34651  ac_status=$?
34652  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34653  test $ac_status = 0; }
34654  if { ac_try='./conftest$ac_cv_exeext'
34655  { { case "(($ac_try" in
34656  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34657  *) ac_try_echo=$ac_try;;
34658esac
34659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34660$as_echo "$ac_try_echo"; } >&5
34661  (eval "$ac_try") 2>&5
34662  ac_status=$?
34663  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34664  test $ac_status = 0; }; }; then
34665    cross_compiling=no
34666  else
34667    if test "$cross_compiling" = maybe; then
34668	cross_compiling=yes
34669    else
34670	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34672as_fn_error $? "cannot run C compiled programs.
34673If you meant to cross compile, use \`--host'.
34674See \`config.log' for more details" "$LINENO" 5; }
34675    fi
34676  fi
34677fi
34678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34679$as_echo "$cross_compiling" >&6; }
34680
34681rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34682ac_clean_files=$ac_clean_files_save
34683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34684$as_echo_n "checking for suffix of object files... " >&6; }
34685if ${ac_cv_objext+:} false; then :
34686  $as_echo_n "(cached) " >&6
34687else
34688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34689/* end confdefs.h.  */
34690
34691int
34692main ()
34693{
34694
34695  ;
34696  return 0;
34697}
34698_ACEOF
34699rm -f conftest.o conftest.obj
34700if { { ac_try="$ac_compile"
34701case "(($ac_try" in
34702  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34703  *) ac_try_echo=$ac_try;;
34704esac
34705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34706$as_echo "$ac_try_echo"; } >&5
34707  (eval "$ac_compile") 2>&5
34708  ac_status=$?
34709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34710  test $ac_status = 0; }; then :
34711  for ac_file in conftest.o conftest.obj conftest.*; do
34712  test -f "$ac_file" || continue;
34713  case $ac_file in
34714    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34715    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34716       break;;
34717  esac
34718done
34719else
34720  $as_echo "$as_me: failed program was:" >&5
34721sed 's/^/| /' conftest.$ac_ext >&5
34722
34723{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34725as_fn_error $? "cannot compute suffix of object files: cannot compile
34726See \`config.log' for more details" "$LINENO" 5; }
34727fi
34728rm -f conftest.$ac_cv_objext conftest.$ac_ext
34729fi
34730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34731$as_echo "$ac_cv_objext" >&6; }
34732OBJEXT=$ac_cv_objext
34733ac_objext=$OBJEXT
34734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34735$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34736if ${ac_cv_c_compiler_gnu+:} false; then :
34737  $as_echo_n "(cached) " >&6
34738else
34739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34740/* end confdefs.h.  */
34741
34742int
34743main ()
34744{
34745#ifndef __GNUC__
34746       choke me
34747#endif
34748
34749  ;
34750  return 0;
34751}
34752_ACEOF
34753if ac_fn_c_try_compile "$LINENO"; then :
34754  ac_compiler_gnu=yes
34755else
34756  ac_compiler_gnu=no
34757fi
34758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34759ac_cv_c_compiler_gnu=$ac_compiler_gnu
34760
34761fi
34762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34763$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34764if test $ac_compiler_gnu = yes; then
34765  GCC=yes
34766else
34767  GCC=
34768fi
34769ac_test_CFLAGS=${CFLAGS+set}
34770ac_save_CFLAGS=$CFLAGS
34771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34772$as_echo_n "checking whether $CC accepts -g... " >&6; }
34773if ${ac_cv_prog_cc_g+:} false; then :
34774  $as_echo_n "(cached) " >&6
34775else
34776  ac_save_c_werror_flag=$ac_c_werror_flag
34777   ac_c_werror_flag=yes
34778   ac_cv_prog_cc_g=no
34779   CFLAGS="-g"
34780   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34781/* end confdefs.h.  */
34782
34783int
34784main ()
34785{
34786
34787  ;
34788  return 0;
34789}
34790_ACEOF
34791if ac_fn_c_try_compile "$LINENO"; then :
34792  ac_cv_prog_cc_g=yes
34793else
34794  CFLAGS=""
34795      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34796/* end confdefs.h.  */
34797
34798int
34799main ()
34800{
34801
34802  ;
34803  return 0;
34804}
34805_ACEOF
34806if ac_fn_c_try_compile "$LINENO"; then :
34807
34808else
34809  ac_c_werror_flag=$ac_save_c_werror_flag
34810	 CFLAGS="-g"
34811	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34812/* end confdefs.h.  */
34813
34814int
34815main ()
34816{
34817
34818  ;
34819  return 0;
34820}
34821_ACEOF
34822if ac_fn_c_try_compile "$LINENO"; then :
34823  ac_cv_prog_cc_g=yes
34824fi
34825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34826fi
34827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34828fi
34829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34830   ac_c_werror_flag=$ac_save_c_werror_flag
34831fi
34832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34833$as_echo "$ac_cv_prog_cc_g" >&6; }
34834if test "$ac_test_CFLAGS" = set; then
34835  CFLAGS=$ac_save_CFLAGS
34836elif test $ac_cv_prog_cc_g = yes; then
34837  if test "$GCC" = yes; then
34838    CFLAGS="-g -O2"
34839  else
34840    CFLAGS="-g"
34841  fi
34842else
34843  if test "$GCC" = yes; then
34844    CFLAGS="-O2"
34845  else
34846    CFLAGS=
34847  fi
34848fi
34849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34850$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34851if ${ac_cv_prog_cc_c89+:} false; then :
34852  $as_echo_n "(cached) " >&6
34853else
34854  ac_cv_prog_cc_c89=no
34855ac_save_CC=$CC
34856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34857/* end confdefs.h.  */
34858#include <stdarg.h>
34859#include <stdio.h>
34860struct stat;
34861/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34862struct buf { int x; };
34863FILE * (*rcsopen) (struct buf *, struct stat *, int);
34864static char *e (p, i)
34865     char **p;
34866     int i;
34867{
34868  return p[i];
34869}
34870static char *f (char * (*g) (char **, int), char **p, ...)
34871{
34872  char *s;
34873  va_list v;
34874  va_start (v,p);
34875  s = g (p, va_arg (v,int));
34876  va_end (v);
34877  return s;
34878}
34879
34880/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34881   function prototypes and stuff, but not '\xHH' hex character constants.
34882   These don't provoke an error unfortunately, instead are silently treated
34883   as 'x'.  The following induces an error, until -std is added to get
34884   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34885   array size at least.  It's necessary to write '\x00'==0 to get something
34886   that's true only with -std.  */
34887int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34888
34889/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34890   inside strings and character constants.  */
34891#define FOO(x) 'x'
34892int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34893
34894int test (int i, double x);
34895struct s1 {int (*f) (int a);};
34896struct s2 {int (*f) (double a);};
34897int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34898int argc;
34899char **argv;
34900int
34901main ()
34902{
34903return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34904  ;
34905  return 0;
34906}
34907_ACEOF
34908for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34909	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34910do
34911  CC="$ac_save_CC $ac_arg"
34912  if ac_fn_c_try_compile "$LINENO"; then :
34913  ac_cv_prog_cc_c89=$ac_arg
34914fi
34915rm -f core conftest.err conftest.$ac_objext
34916  test "x$ac_cv_prog_cc_c89" != "xno" && break
34917done
34918rm -f conftest.$ac_ext
34919CC=$ac_save_CC
34920
34921fi
34922# AC_CACHE_VAL
34923case "x$ac_cv_prog_cc_c89" in
34924  x)
34925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34926$as_echo "none needed" >&6; } ;;
34927  xno)
34928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34929$as_echo "unsupported" >&6; } ;;
34930  *)
34931    CC="$CC $ac_cv_prog_cc_c89"
34932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34933$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34934esac
34935if test "x$ac_cv_prog_cc_c89" != xno; then :
34936
34937fi
34938
34939ac_ext=cpp
34940ac_cpp='$CXXCPP $CPPFLAGS'
34941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34944
34945
34946
34947  COMPILER_NAME=C++
34948  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34949
34950  if test "x$CXX" != x; then
34951    # User has supplied compiler name already, always let that override.
34952    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34953$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34954    if test "x`basename $CXX`" = "x$CXX"; then
34955      # A command without a complete path is provided, search $PATH.
34956
34957      for ac_prog in $CXX
34958do
34959  # Extract the first word of "$ac_prog", so it can be a program name with args.
34960set dummy $ac_prog; ac_word=$2
34961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34962$as_echo_n "checking for $ac_word... " >&6; }
34963if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34964  $as_echo_n "(cached) " >&6
34965else
34966  case $POTENTIAL_CXX in
34967  [\\/]* | ?:[\\/]*)
34968  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34969  ;;
34970  *)
34971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34972for as_dir in $PATH
34973do
34974  IFS=$as_save_IFS
34975  test -z "$as_dir" && as_dir=.
34976    for ac_exec_ext in '' $ac_executable_extensions; do
34977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34978    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34980    break 2
34981  fi
34982done
34983  done
34984IFS=$as_save_IFS
34985
34986  ;;
34987esac
34988fi
34989POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34990if test -n "$POTENTIAL_CXX"; then
34991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34992$as_echo "$POTENTIAL_CXX" >&6; }
34993else
34994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34995$as_echo "no" >&6; }
34996fi
34997
34998
34999  test -n "$POTENTIAL_CXX" && break
35000done
35001
35002      if test "x$POTENTIAL_CXX" != x; then
35003        CXX=$POTENTIAL_CXX
35004      else
35005        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35006      fi
35007    else
35008      # Otherwise it might already be a complete path
35009      if test ! -x "$CXX"; then
35010        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35011      fi
35012    fi
35013  else
35014    # No user supplied value. Locate compiler ourselves.
35015
35016    # If we are cross compiling, assume cross compilation tools follows the
35017    # cross compilation standard where they are prefixed with the autoconf
35018    # standard name for the target. For example the binary
35019    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35020    # If we are not cross compiling, then the default compiler name will be
35021    # used.
35022
35023    CXX=
35024    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35025    # before checking the rest of the PATH.
35026    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35027    # step, this should not be necessary.
35028    if test -n "$TOOLCHAIN_PATH"; then
35029      PATH_save="$PATH"
35030      PATH="$TOOLCHAIN_PATH"
35031      if test -n "$ac_tool_prefix"; then
35032  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35033set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35035$as_echo_n "checking for $ac_word... " >&6; }
35036if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35037  $as_echo_n "(cached) " >&6
35038else
35039  case $TOOLCHAIN_PATH_CXX in
35040  [\\/]* | ?:[\\/]*)
35041  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35042  ;;
35043  *)
35044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35045for as_dir in $PATH
35046do
35047  IFS=$as_save_IFS
35048  test -z "$as_dir" && as_dir=.
35049    for ac_exec_ext in '' $ac_executable_extensions; do
35050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35051    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35053    break 2
35054  fi
35055done
35056  done
35057IFS=$as_save_IFS
35058
35059  ;;
35060esac
35061fi
35062TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35063if test -n "$TOOLCHAIN_PATH_CXX"; then
35064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35065$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35066else
35067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35068$as_echo "no" >&6; }
35069fi
35070
35071
35072fi
35073if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35074  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35075  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35076set dummy $SEARCH_LIST; ac_word=$2
35077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35078$as_echo_n "checking for $ac_word... " >&6; }
35079if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35080  $as_echo_n "(cached) " >&6
35081else
35082  case $ac_pt_TOOLCHAIN_PATH_CXX in
35083  [\\/]* | ?:[\\/]*)
35084  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35085  ;;
35086  *)
35087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35088for as_dir in $PATH
35089do
35090  IFS=$as_save_IFS
35091  test -z "$as_dir" && as_dir=.
35092    for ac_exec_ext in '' $ac_executable_extensions; do
35093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35094    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35096    break 2
35097  fi
35098done
35099  done
35100IFS=$as_save_IFS
35101
35102  ;;
35103esac
35104fi
35105ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35106if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35108$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35109else
35110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35111$as_echo "no" >&6; }
35112fi
35113
35114  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35115    TOOLCHAIN_PATH_CXX=""
35116  else
35117    case $cross_compiling:$ac_tool_warned in
35118yes:)
35119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35121ac_tool_warned=yes ;;
35122esac
35123    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35124  fi
35125else
35126  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35127fi
35128
35129      CXX=$TOOLCHAIN_PATH_CXX
35130      PATH="$PATH_save"
35131    fi
35132
35133    # AC_PATH_TOOL can't be run multiple times with the same variable,
35134    # so create a new name for this run.
35135    if test "x$CXX" = x; then
35136      if test -n "$ac_tool_prefix"; then
35137  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35138set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35140$as_echo_n "checking for $ac_word... " >&6; }
35141if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35142  $as_echo_n "(cached) " >&6
35143else
35144  case $POTENTIAL_CXX in
35145  [\\/]* | ?:[\\/]*)
35146  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35147  ;;
35148  *)
35149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35150for as_dir in $PATH
35151do
35152  IFS=$as_save_IFS
35153  test -z "$as_dir" && as_dir=.
35154    for ac_exec_ext in '' $ac_executable_extensions; do
35155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35156    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35158    break 2
35159  fi
35160done
35161  done
35162IFS=$as_save_IFS
35163
35164  ;;
35165esac
35166fi
35167POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35168if test -n "$POTENTIAL_CXX"; then
35169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35170$as_echo "$POTENTIAL_CXX" >&6; }
35171else
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35173$as_echo "no" >&6; }
35174fi
35175
35176
35177fi
35178if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35179  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35180  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35181set dummy $SEARCH_LIST; ac_word=$2
35182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35183$as_echo_n "checking for $ac_word... " >&6; }
35184if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35185  $as_echo_n "(cached) " >&6
35186else
35187  case $ac_pt_POTENTIAL_CXX in
35188  [\\/]* | ?:[\\/]*)
35189  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35190  ;;
35191  *)
35192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35193for as_dir in $PATH
35194do
35195  IFS=$as_save_IFS
35196  test -z "$as_dir" && as_dir=.
35197    for ac_exec_ext in '' $ac_executable_extensions; do
35198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35199    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35201    break 2
35202  fi
35203done
35204  done
35205IFS=$as_save_IFS
35206
35207  ;;
35208esac
35209fi
35210ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35211if test -n "$ac_pt_POTENTIAL_CXX"; then
35212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35213$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35214else
35215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35216$as_echo "no" >&6; }
35217fi
35218
35219  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35220    POTENTIAL_CXX=""
35221  else
35222    case $cross_compiling:$ac_tool_warned in
35223yes:)
35224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35226ac_tool_warned=yes ;;
35227esac
35228    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35229  fi
35230else
35231  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35232fi
35233
35234      CXX=$POTENTIAL_CXX
35235    fi
35236
35237    if test "x$CXX" = x; then
35238
35239  # Print a helpful message on how to acquire the necessary build dependency.
35240  # devkit is the help tag: freetype, cups, alsa etc
35241  MISSING_DEPENDENCY=devkit
35242
35243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35244    cygwin_help $MISSING_DEPENDENCY
35245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35246    msys_help $MISSING_DEPENDENCY
35247  else
35248    PKGHANDLER_COMMAND=
35249
35250    case $PKGHANDLER in
35251      apt-get)
35252        apt_help     $MISSING_DEPENDENCY ;;
35253      yum)
35254        yum_help     $MISSING_DEPENDENCY ;;
35255      brew)
35256        brew_help    $MISSING_DEPENDENCY ;;
35257      port)
35258        port_help    $MISSING_DEPENDENCY ;;
35259      pkgutil)
35260        pkgutil_help $MISSING_DEPENDENCY ;;
35261      pkgadd)
35262        pkgadd_help  $MISSING_DEPENDENCY ;;
35263    esac
35264
35265    if test "x$PKGHANDLER_COMMAND" != x; then
35266      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35267    fi
35268  fi
35269
35270      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35271    fi
35272  fi
35273
35274  # Now we have a compiler binary in CXX. Make sure it's okay.
35275
35276  # Only process if variable expands to non-empty
35277
35278  if test "x$CXX" != x; then
35279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35280
35281  # First separate the path from the arguments. This will split at the first
35282  # space.
35283  complete="$CXX"
35284  path="${complete%% *}"
35285  tmp="$complete EOL"
35286  arguments="${tmp#* }"
35287
35288  # Input might be given as Windows format, start by converting to
35289  # unix format.
35290  new_path=`$CYGPATH -u "$path"`
35291
35292  # Now try to locate executable using which
35293  new_path=`$WHICH "$new_path" 2> /dev/null`
35294  # bat and cmd files are not always considered executable in cygwin causing which
35295  # to not find them
35296  if test "x$new_path" = x \
35297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35299    new_path=`$CYGPATH -u "$path"`
35300  fi
35301  if test "x$new_path" = x; then
35302    # Oops. Which didn't find the executable.
35303    # The splitting of arguments from the executable at a space might have been incorrect,
35304    # since paths with space are more likely in Windows. Give it another try with the whole
35305    # argument.
35306    path="$complete"
35307    arguments="EOL"
35308    new_path=`$CYGPATH -u "$path"`
35309    new_path=`$WHICH "$new_path" 2> /dev/null`
35310    # bat and cmd files are not always considered executable in cygwin causing which
35311    # to not find them
35312    if test "x$new_path" = x \
35313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35315      new_path=`$CYGPATH -u "$path"`
35316    fi
35317    if test "x$new_path" = x; then
35318      # It's still not found. Now this is an unrecoverable error.
35319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35320$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35321      has_space=`$ECHO "$complete" | $GREP " "`
35322      if test "x$has_space" != x; then
35323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35325      fi
35326      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35327    fi
35328  fi
35329
35330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35333  # "foo.exe" is OK but "foo" is an error.
35334  #
35335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35336  # It is also a way to make sure we got the proper file name for the real test later on.
35337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35338  if test "x$test_shortpath" = x; then
35339    # Short path failed, file does not exist as specified.
35340    # Try adding .exe or .cmd
35341    if test -f "${new_path}.exe"; then
35342      input_to_shortpath="${new_path}.exe"
35343    elif test -f "${new_path}.cmd"; then
35344      input_to_shortpath="${new_path}.cmd"
35345    else
35346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35347$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35350      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35351    fi
35352  else
35353    input_to_shortpath="$new_path"
35354  fi
35355
35356  # Call helper function which possibly converts this using DOS-style short mode.
35357  # If so, the updated path is stored in $new_path.
35358  new_path="$input_to_shortpath"
35359
35360  input_path="$input_to_shortpath"
35361  # Check if we need to convert this using DOS-style short mode. If the path
35362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35363  # take no chances and rewrite it.
35364  # Note: m4 eats our [], so we need to use [ and ] instead.
35365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35366  if test "x$has_forbidden_chars" != x; then
35367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35371      # Going to short mode and back again did indeed matter. Since short mode is
35372      # case insensitive, let's make it lowercase to improve readability.
35373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35374      # Now convert it back to Unix-style (cygpath)
35375      input_path=`$CYGPATH -u "$shortmode_path"`
35376      new_path="$input_path"
35377    fi
35378  fi
35379
35380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35381  if test "x$test_cygdrive_prefix" = x; then
35382    # As a simple fix, exclude /usr/bin since it's not a real path.
35383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35385      # a path prefixed by /cygdrive for fixpath to work.
35386      new_path="$CYGWIN_ROOT_PATH$input_path"
35387    fi
35388  fi
35389
35390  # remove trailing .exe if any
35391  new_path="${new_path/%.exe/}"
35392
35393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35394
35395  # First separate the path from the arguments. This will split at the first
35396  # space.
35397  complete="$CXX"
35398  path="${complete%% *}"
35399  tmp="$complete EOL"
35400  arguments="${tmp#* }"
35401
35402  # Input might be given as Windows format, start by converting to
35403  # unix format.
35404  new_path="$path"
35405
35406  windows_path="$new_path"
35407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35408    unix_path=`$CYGPATH -u "$windows_path"`
35409    new_path="$unix_path"
35410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35412    new_path="$unix_path"
35413  fi
35414
35415
35416  # Now try to locate executable using which
35417  new_path=`$WHICH "$new_path" 2> /dev/null`
35418
35419  if test "x$new_path" = x; then
35420    # Oops. Which didn't find the executable.
35421    # The splitting of arguments from the executable at a space might have been incorrect,
35422    # since paths with space are more likely in Windows. Give it another try with the whole
35423    # argument.
35424    path="$complete"
35425    arguments="EOL"
35426    new_path="$path"
35427
35428  windows_path="$new_path"
35429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35430    unix_path=`$CYGPATH -u "$windows_path"`
35431    new_path="$unix_path"
35432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35434    new_path="$unix_path"
35435  fi
35436
35437
35438    new_path=`$WHICH "$new_path" 2> /dev/null`
35439    # bat and cmd files are not always considered executable in MSYS 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="$path"
35445
35446  windows_path="$new_path"
35447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35448    unix_path=`$CYGPATH -u "$windows_path"`
35449    new_path="$unix_path"
35450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35452    new_path="$unix_path"
35453  fi
35454
35455    fi
35456
35457    if test "x$new_path" = x; then
35458      # It's still not found. Now this is an unrecoverable error.
35459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35460$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35461      has_space=`$ECHO "$complete" | $GREP " "`
35462      if test "x$has_space" != x; then
35463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35465      fi
35466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35467    fi
35468  fi
35469
35470  # Now new_path has a complete unix path to the binary
35471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35472    # Keep paths in /bin as-is, but remove trailing .exe if any
35473    new_path="${new_path/%.exe/}"
35474    # Do not save /bin paths to all_fixpath_prefixes!
35475  else
35476    # Not in mixed or Windows style, start by that.
35477    new_path=`cmd //c echo $new_path`
35478
35479  input_path="$new_path"
35480  # Check if we need to convert this using DOS-style short mode. If the path
35481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35482  # take no chances and rewrite it.
35483  # Note: m4 eats our [], so we need to use [ and ] instead.
35484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35485  if test "x$has_forbidden_chars" != x; then
35486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35488  fi
35489
35490    # Output is in $new_path
35491
35492  windows_path="$new_path"
35493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35494    unix_path=`$CYGPATH -u "$windows_path"`
35495    new_path="$unix_path"
35496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35498    new_path="$unix_path"
35499  fi
35500
35501    # remove trailing .exe if any
35502    new_path="${new_path/%.exe/}"
35503
35504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35506  fi
35507
35508    else
35509      # We're on a unix platform. Hooray! :)
35510      # First separate the path from the arguments. This will split at the first
35511      # space.
35512      complete="$CXX"
35513      path="${complete%% *}"
35514      tmp="$complete EOL"
35515      arguments="${tmp#* }"
35516
35517      # Cannot rely on the command "which" here since it doesn't always work.
35518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35519      if test -z "$is_absolute_path"; then
35520        # Path to executable is not absolute. Find it.
35521        IFS_save="$IFS"
35522        IFS=:
35523        for p in $PATH; do
35524          if test -f "$p/$path" && test -x "$p/$path"; then
35525            new_path="$p/$path"
35526            break
35527          fi
35528        done
35529        IFS="$IFS_save"
35530      else
35531        # This is an absolute path, we can use it without further modifications.
35532        new_path="$path"
35533      fi
35534
35535      if test "x$new_path" = x; then
35536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35537$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35538        has_space=`$ECHO "$complete" | $GREP " "`
35539        if test "x$has_space" != x; then
35540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35542        fi
35543        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35544      fi
35545    fi
35546
35547    # Now join together the path and the arguments once again
35548    if test "x$arguments" != xEOL; then
35549      new_complete="$new_path ${arguments% *}"
35550    else
35551      new_complete="$new_path"
35552    fi
35553
35554    if test "x$complete" != "x$new_complete"; then
35555      CXX="$new_complete"
35556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35557$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35558    fi
35559  fi
35560
35561  TEST_COMPILER="$CXX"
35562
35563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35564$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35565  SYMLINK_ORIGINAL="$TEST_COMPILER"
35566
35567  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35568    # Follow a chain of symbolic links. Use readlink
35569    # where it exists, else fall back to horribly
35570    # complicated shell code.
35571    if test "x$READLINK_TESTED" != yes; then
35572      # On MacOSX there is a readlink tool with a different
35573      # purpose than the GNU readlink tool. Check the found readlink.
35574      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35575      if test "x$ISGNU" = x; then
35576        # A readlink that we do not know how to use.
35577        # Are there other non-GNU readlinks out there?
35578        READLINK_TESTED=yes
35579        READLINK=
35580      fi
35581    fi
35582
35583    if test "x$READLINK" != x; then
35584      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35585    else
35586      # Save the current directory for restoring afterwards
35587      STARTDIR=$PWD
35588      COUNTER=0
35589      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35590      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35591      cd $sym_link_dir
35592      # Use -P flag to resolve symlinks in directories.
35593      cd `$THEPWDCMD -P`
35594      sym_link_dir=`$THEPWDCMD -P`
35595      # Resolve file symlinks
35596      while test $COUNTER -lt 20; do
35597        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35598        if test "x$ISLINK" == x; then
35599          # This is not a symbolic link! We are done!
35600          break
35601        fi
35602        # Again resolve directory symlinks since the target of the just found
35603        # link could be in a different directory
35604        cd `$DIRNAME $ISLINK`
35605        sym_link_dir=`$THEPWDCMD -P`
35606        sym_link_file=`$BASENAME $ISLINK`
35607        let COUNTER=COUNTER+1
35608      done
35609      cd $STARTDIR
35610      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35611    fi
35612  fi
35613
35614  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35616$as_echo "no symlink" >&6; }
35617  else
35618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35619$as_echo "$SYMLINK_ORIGINAL" >&6; }
35620
35621    # We can't handle ccache by gcc wrappers, since we need to know if we're
35622    # using ccache. Instead ccache usage must be controlled by a configure option.
35623    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35624    if test "x$COMPILER_BASENAME" = "xccache"; then
35625      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35626$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35627      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35628    fi
35629  fi
35630
35631
35632  COMPILER=$CXX
35633  COMPILER_NAME=$COMPILER_NAME
35634
35635  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35636    # cc -V output typically looks like
35637    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35638    # or
35639    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35640    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35641    # Check that this is likely to be the Solaris Studio cc.
35642    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35643    if test $? -ne 0; then
35644      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35645      { $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
35646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35648$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35649      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35650$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35651      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35652    fi
35653    # Remove usage instructions (if present), and
35654    # collapse compiler output into a single line
35655    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35656        $SED -e 's/ *[Uu]sage:.*//'`
35657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35658        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35659  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35660    # xlc -qversion output typically looks like
35661    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35662    #     Version: 11.01.0000.0015
35663    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35664    # Check that this is likely to be the IBM XL C compiler.
35665    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35666    if test $? -ne 0; then
35667      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35668      { $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
35669$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35670      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35671$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35672      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35673$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35674      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35675    fi
35676    # Collapse compiler output into a single line
35677    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35678    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35679        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35680  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35681    # There is no specific version flag, but all output starts with a version string.
35682    # First line typically looks something like:
35683    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35684    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35685    # Check that this is likely to be Microsoft CL.EXE.
35686    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35687    if test $? -ne 0; then
35688      { $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
35689$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35690      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35691$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35692      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35693    fi
35694    # Collapse compiler output into a single line
35695    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35696    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35697        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35698  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35699    # gcc --version output typically looks like
35700    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35701    #     Copyright (C) 2013 Free Software Foundation, Inc.
35702    #     This is free software; see the source for copying conditions.  There is NO
35703    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35704    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35705    # Check that this is likely to be GCC.
35706    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35707    if test $? -ne 0; then
35708      { $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
35709$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35710      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35711$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35712      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35713    fi
35714    # Remove Copyright and legalese from version string, and
35715    # collapse into a single line
35716    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35717        $SED -e 's/ *Copyright .*//'`
35718    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35719        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35720  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35721    # clang --version output typically looks like
35722    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35723    #    clang version 3.3 (tags/RELEASE_33/final)
35724    # or
35725    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35726    #    Target: x86_64-pc-linux-gnu
35727    #    Thread model: posix
35728    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35729    # Check that this is likely to be clang
35730    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35731    if test $? -ne 0; then
35732      { $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
35733$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35734      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35735$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35736      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35737    fi
35738    # Collapse compiler output into a single line
35739    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35740    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35741        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35742  else
35743      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35744  fi
35745  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35746  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35747  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35748  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35749
35750  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35751$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35752
35753
35754  # Now that we have resolved CXX ourself, let autoconf have its go at it
35755  ac_ext=cpp
35756ac_cpp='$CXXCPP $CPPFLAGS'
35757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35760if test -z "$CXX"; then
35761  if test -n "$CCC"; then
35762    CXX=$CCC
35763  else
35764    if test -n "$ac_tool_prefix"; then
35765  for ac_prog in $CXX
35766  do
35767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35770$as_echo_n "checking for $ac_word... " >&6; }
35771if ${ac_cv_prog_CXX+:} false; then :
35772  $as_echo_n "(cached) " >&6
35773else
35774  if test -n "$CXX"; then
35775  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35776else
35777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35778for as_dir in $PATH
35779do
35780  IFS=$as_save_IFS
35781  test -z "$as_dir" && as_dir=.
35782    for ac_exec_ext in '' $ac_executable_extensions; do
35783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35784    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35786    break 2
35787  fi
35788done
35789  done
35790IFS=$as_save_IFS
35791
35792fi
35793fi
35794CXX=$ac_cv_prog_CXX
35795if test -n "$CXX"; then
35796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35797$as_echo "$CXX" >&6; }
35798else
35799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35800$as_echo "no" >&6; }
35801fi
35802
35803
35804    test -n "$CXX" && break
35805  done
35806fi
35807if test -z "$CXX"; then
35808  ac_ct_CXX=$CXX
35809  for ac_prog in $CXX
35810do
35811  # Extract the first word of "$ac_prog", so it can be a program name with args.
35812set dummy $ac_prog; ac_word=$2
35813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35814$as_echo_n "checking for $ac_word... " >&6; }
35815if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35816  $as_echo_n "(cached) " >&6
35817else
35818  if test -n "$ac_ct_CXX"; then
35819  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35820else
35821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35822for as_dir in $PATH
35823do
35824  IFS=$as_save_IFS
35825  test -z "$as_dir" && as_dir=.
35826    for ac_exec_ext in '' $ac_executable_extensions; do
35827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35828    ac_cv_prog_ac_ct_CXX="$ac_prog"
35829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35830    break 2
35831  fi
35832done
35833  done
35834IFS=$as_save_IFS
35835
35836fi
35837fi
35838ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35839if test -n "$ac_ct_CXX"; then
35840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35841$as_echo "$ac_ct_CXX" >&6; }
35842else
35843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35844$as_echo "no" >&6; }
35845fi
35846
35847
35848  test -n "$ac_ct_CXX" && break
35849done
35850
35851  if test "x$ac_ct_CXX" = x; then
35852    CXX="g++"
35853  else
35854    case $cross_compiling:$ac_tool_warned in
35855yes:)
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35858ac_tool_warned=yes ;;
35859esac
35860    CXX=$ac_ct_CXX
35861  fi
35862fi
35863
35864  fi
35865fi
35866# Provide some information about the compiler.
35867$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35868set X $ac_compile
35869ac_compiler=$2
35870for ac_option in --version -v -V -qversion; do
35871  { { ac_try="$ac_compiler $ac_option >&5"
35872case "(($ac_try" in
35873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35874  *) ac_try_echo=$ac_try;;
35875esac
35876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35877$as_echo "$ac_try_echo"; } >&5
35878  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35879  ac_status=$?
35880  if test -s conftest.err; then
35881    sed '10a\
35882... rest of stderr output deleted ...
35883         10q' conftest.err >conftest.er1
35884    cat conftest.er1 >&5
35885  fi
35886  rm -f conftest.er1 conftest.err
35887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35888  test $ac_status = 0; }
35889done
35890
35891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35892$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35893if ${ac_cv_cxx_compiler_gnu+:} false; then :
35894  $as_echo_n "(cached) " >&6
35895else
35896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35897/* end confdefs.h.  */
35898
35899int
35900main ()
35901{
35902#ifndef __GNUC__
35903       choke me
35904#endif
35905
35906  ;
35907  return 0;
35908}
35909_ACEOF
35910if ac_fn_cxx_try_compile "$LINENO"; then :
35911  ac_compiler_gnu=yes
35912else
35913  ac_compiler_gnu=no
35914fi
35915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35916ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35917
35918fi
35919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35920$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35921if test $ac_compiler_gnu = yes; then
35922  GXX=yes
35923else
35924  GXX=
35925fi
35926ac_test_CXXFLAGS=${CXXFLAGS+set}
35927ac_save_CXXFLAGS=$CXXFLAGS
35928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35929$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35930if ${ac_cv_prog_cxx_g+:} false; then :
35931  $as_echo_n "(cached) " >&6
35932else
35933  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35934   ac_cxx_werror_flag=yes
35935   ac_cv_prog_cxx_g=no
35936   CXXFLAGS="-g"
35937   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35938/* end confdefs.h.  */
35939
35940int
35941main ()
35942{
35943
35944  ;
35945  return 0;
35946}
35947_ACEOF
35948if ac_fn_cxx_try_compile "$LINENO"; then :
35949  ac_cv_prog_cxx_g=yes
35950else
35951  CXXFLAGS=""
35952      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35953/* end confdefs.h.  */
35954
35955int
35956main ()
35957{
35958
35959  ;
35960  return 0;
35961}
35962_ACEOF
35963if ac_fn_cxx_try_compile "$LINENO"; then :
35964
35965else
35966  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35967	 CXXFLAGS="-g"
35968	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35969/* end confdefs.h.  */
35970
35971int
35972main ()
35973{
35974
35975  ;
35976  return 0;
35977}
35978_ACEOF
35979if ac_fn_cxx_try_compile "$LINENO"; then :
35980  ac_cv_prog_cxx_g=yes
35981fi
35982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35983fi
35984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35985fi
35986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35987   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35988fi
35989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35990$as_echo "$ac_cv_prog_cxx_g" >&6; }
35991if test "$ac_test_CXXFLAGS" = set; then
35992  CXXFLAGS=$ac_save_CXXFLAGS
35993elif test $ac_cv_prog_cxx_g = yes; then
35994  if test "$GXX" = yes; then
35995    CXXFLAGS="-g -O2"
35996  else
35997    CXXFLAGS="-g"
35998  fi
35999else
36000  if test "$GXX" = yes; then
36001    CXXFLAGS="-O2"
36002  else
36003    CXXFLAGS=
36004  fi
36005fi
36006ac_ext=cpp
36007ac_cpp='$CXXCPP $CPPFLAGS'
36008ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36009ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36010ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36011
36012
36013  # This is the compiler version number on the form X.Y[.Z]
36014
36015
36016
36017
36018  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36019    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36020$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36021    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36022$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36023  fi
36024
36025  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36026  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36027    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36028$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36029  fi
36030
36031  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36032    { $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
36033$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36034  fi
36035
36036  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36037
36038
36039  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089    # Execute function body
36090
36091  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36092  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36093
36094  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36095    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36096  fi
36097
36098  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36099    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36100  fi
36101
36102  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36103  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36104
36105  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36106    :
36107
36108  else
36109    :
36110
36111          { $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
36112$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36113
36114
36115  fi
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130  fi
36131
36132  #
36133  # Setup the preprocessor (CPP and CXXCPP)
36134  #
36135  ac_ext=c
36136ac_cpp='$CPP $CPPFLAGS'
36137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36139ac_compiler_gnu=$ac_cv_c_compiler_gnu
36140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36141$as_echo_n "checking how to run the C preprocessor... " >&6; }
36142# On Suns, sometimes $CPP names a directory.
36143if test -n "$CPP" && test -d "$CPP"; then
36144  CPP=
36145fi
36146if test -z "$CPP"; then
36147  if ${ac_cv_prog_CPP+:} false; then :
36148  $as_echo_n "(cached) " >&6
36149else
36150      # Double quotes because CPP needs to be expanded
36151    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36152    do
36153      ac_preproc_ok=false
36154for ac_c_preproc_warn_flag in '' yes
36155do
36156  # Use a header file that comes with gcc, so configuring glibc
36157  # with a fresh cross-compiler works.
36158  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36159  # <limits.h> exists even on freestanding compilers.
36160  # On the NeXT, cc -E runs the code through the compiler's parser,
36161  # not just through cpp. "Syntax error" is here to catch this case.
36162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36163/* end confdefs.h.  */
36164#ifdef __STDC__
36165# include <limits.h>
36166#else
36167# include <assert.h>
36168#endif
36169		     Syntax error
36170_ACEOF
36171if ac_fn_c_try_cpp "$LINENO"; then :
36172
36173else
36174  # Broken: fails on valid input.
36175continue
36176fi
36177rm -f conftest.err conftest.i conftest.$ac_ext
36178
36179  # OK, works on sane cases.  Now check whether nonexistent headers
36180  # can be detected and how.
36181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36182/* end confdefs.h.  */
36183#include <ac_nonexistent.h>
36184_ACEOF
36185if ac_fn_c_try_cpp "$LINENO"; then :
36186  # Broken: success on invalid input.
36187continue
36188else
36189  # Passes both tests.
36190ac_preproc_ok=:
36191break
36192fi
36193rm -f conftest.err conftest.i conftest.$ac_ext
36194
36195done
36196# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36197rm -f conftest.i conftest.err conftest.$ac_ext
36198if $ac_preproc_ok; then :
36199  break
36200fi
36201
36202    done
36203    ac_cv_prog_CPP=$CPP
36204
36205fi
36206  CPP=$ac_cv_prog_CPP
36207else
36208  ac_cv_prog_CPP=$CPP
36209fi
36210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36211$as_echo "$CPP" >&6; }
36212ac_preproc_ok=false
36213for ac_c_preproc_warn_flag in '' yes
36214do
36215  # Use a header file that comes with gcc, so configuring glibc
36216  # with a fresh cross-compiler works.
36217  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36218  # <limits.h> exists even on freestanding compilers.
36219  # On the NeXT, cc -E runs the code through the compiler's parser,
36220  # not just through cpp. "Syntax error" is here to catch this case.
36221  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36222/* end confdefs.h.  */
36223#ifdef __STDC__
36224# include <limits.h>
36225#else
36226# include <assert.h>
36227#endif
36228		     Syntax error
36229_ACEOF
36230if ac_fn_c_try_cpp "$LINENO"; then :
36231
36232else
36233  # Broken: fails on valid input.
36234continue
36235fi
36236rm -f conftest.err conftest.i conftest.$ac_ext
36237
36238  # OK, works on sane cases.  Now check whether nonexistent headers
36239  # can be detected and how.
36240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36241/* end confdefs.h.  */
36242#include <ac_nonexistent.h>
36243_ACEOF
36244if ac_fn_c_try_cpp "$LINENO"; then :
36245  # Broken: success on invalid input.
36246continue
36247else
36248  # Passes both tests.
36249ac_preproc_ok=:
36250break
36251fi
36252rm -f conftest.err conftest.i conftest.$ac_ext
36253
36254done
36255# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36256rm -f conftest.i conftest.err conftest.$ac_ext
36257if $ac_preproc_ok; then :
36258
36259else
36260  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36262as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36263See \`config.log' for more details" "$LINENO" 5; }
36264fi
36265
36266ac_ext=cpp
36267ac_cpp='$CXXCPP $CPPFLAGS'
36268ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36269ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36270ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36271
36272
36273  # Only process if variable expands to non-empty
36274
36275  if test "x$CPP" != x; then
36276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36277
36278  # First separate the path from the arguments. This will split at the first
36279  # space.
36280  complete="$CPP"
36281  path="${complete%% *}"
36282  tmp="$complete EOL"
36283  arguments="${tmp#* }"
36284
36285  # Input might be given as Windows format, start by converting to
36286  # unix format.
36287  new_path=`$CYGPATH -u "$path"`
36288
36289  # Now try to locate executable using which
36290  new_path=`$WHICH "$new_path" 2> /dev/null`
36291  # bat and cmd files are not always considered executable in cygwin causing which
36292  # to not find them
36293  if test "x$new_path" = x \
36294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36296    new_path=`$CYGPATH -u "$path"`
36297  fi
36298  if test "x$new_path" = x; then
36299    # Oops. Which didn't find the executable.
36300    # The splitting of arguments from the executable at a space might have been incorrect,
36301    # since paths with space are more likely in Windows. Give it another try with the whole
36302    # argument.
36303    path="$complete"
36304    arguments="EOL"
36305    new_path=`$CYGPATH -u "$path"`
36306    new_path=`$WHICH "$new_path" 2> /dev/null`
36307    # bat and cmd files are not always considered executable in cygwin causing which
36308    # to not find them
36309    if test "x$new_path" = x \
36310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36312      new_path=`$CYGPATH -u "$path"`
36313    fi
36314    if test "x$new_path" = x; then
36315      # It's still not found. Now this is an unrecoverable error.
36316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36317$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36318      has_space=`$ECHO "$complete" | $GREP " "`
36319      if test "x$has_space" != x; then
36320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36322      fi
36323      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36324    fi
36325  fi
36326
36327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36330  # "foo.exe" is OK but "foo" is an error.
36331  #
36332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36333  # It is also a way to make sure we got the proper file name for the real test later on.
36334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36335  if test "x$test_shortpath" = x; then
36336    # Short path failed, file does not exist as specified.
36337    # Try adding .exe or .cmd
36338    if test -f "${new_path}.exe"; then
36339      input_to_shortpath="${new_path}.exe"
36340    elif test -f "${new_path}.cmd"; then
36341      input_to_shortpath="${new_path}.cmd"
36342    else
36343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36344$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36347      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36348    fi
36349  else
36350    input_to_shortpath="$new_path"
36351  fi
36352
36353  # Call helper function which possibly converts this using DOS-style short mode.
36354  # If so, the updated path is stored in $new_path.
36355  new_path="$input_to_shortpath"
36356
36357  input_path="$input_to_shortpath"
36358  # Check if we need to convert this using DOS-style short mode. If the path
36359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36360  # take no chances and rewrite it.
36361  # Note: m4 eats our [], so we need to use [ and ] instead.
36362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36363  if test "x$has_forbidden_chars" != x; then
36364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36368      # Going to short mode and back again did indeed matter. Since short mode is
36369      # case insensitive, let's make it lowercase to improve readability.
36370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36371      # Now convert it back to Unix-style (cygpath)
36372      input_path=`$CYGPATH -u "$shortmode_path"`
36373      new_path="$input_path"
36374    fi
36375  fi
36376
36377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36378  if test "x$test_cygdrive_prefix" = x; then
36379    # As a simple fix, exclude /usr/bin since it's not a real path.
36380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36382      # a path prefixed by /cygdrive for fixpath to work.
36383      new_path="$CYGWIN_ROOT_PATH$input_path"
36384    fi
36385  fi
36386
36387  # remove trailing .exe if any
36388  new_path="${new_path/%.exe/}"
36389
36390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36391
36392  # First separate the path from the arguments. This will split at the first
36393  # space.
36394  complete="$CPP"
36395  path="${complete%% *}"
36396  tmp="$complete EOL"
36397  arguments="${tmp#* }"
36398
36399  # Input might be given as Windows format, start by converting to
36400  # unix format.
36401  new_path="$path"
36402
36403  windows_path="$new_path"
36404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36405    unix_path=`$CYGPATH -u "$windows_path"`
36406    new_path="$unix_path"
36407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36409    new_path="$unix_path"
36410  fi
36411
36412
36413  # Now try to locate executable using which
36414  new_path=`$WHICH "$new_path" 2> /dev/null`
36415
36416  if test "x$new_path" = x; then
36417    # Oops. Which didn't find the executable.
36418    # The splitting of arguments from the executable at a space might have been incorrect,
36419    # since paths with space are more likely in Windows. Give it another try with the whole
36420    # argument.
36421    path="$complete"
36422    arguments="EOL"
36423    new_path="$path"
36424
36425  windows_path="$new_path"
36426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36427    unix_path=`$CYGPATH -u "$windows_path"`
36428    new_path="$unix_path"
36429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36431    new_path="$unix_path"
36432  fi
36433
36434
36435    new_path=`$WHICH "$new_path" 2> /dev/null`
36436    # bat and cmd files are not always considered executable in MSYS causing which
36437    # to not find them
36438    if test "x$new_path" = x \
36439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36441      new_path="$path"
36442
36443  windows_path="$new_path"
36444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36445    unix_path=`$CYGPATH -u "$windows_path"`
36446    new_path="$unix_path"
36447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36449    new_path="$unix_path"
36450  fi
36451
36452    fi
36453
36454    if test "x$new_path" = x; then
36455      # It's still not found. Now this is an unrecoverable error.
36456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36457$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36458      has_space=`$ECHO "$complete" | $GREP " "`
36459      if test "x$has_space" != x; then
36460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36462      fi
36463      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36464    fi
36465  fi
36466
36467  # Now new_path has a complete unix path to the binary
36468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36469    # Keep paths in /bin as-is, but remove trailing .exe if any
36470    new_path="${new_path/%.exe/}"
36471    # Do not save /bin paths to all_fixpath_prefixes!
36472  else
36473    # Not in mixed or Windows style, start by that.
36474    new_path=`cmd //c echo $new_path`
36475
36476  input_path="$new_path"
36477  # Check if we need to convert this using DOS-style short mode. If the path
36478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36479  # take no chances and rewrite it.
36480  # Note: m4 eats our [], so we need to use [ and ] instead.
36481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36482  if test "x$has_forbidden_chars" != x; then
36483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36485  fi
36486
36487    # Output is in $new_path
36488
36489  windows_path="$new_path"
36490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36491    unix_path=`$CYGPATH -u "$windows_path"`
36492    new_path="$unix_path"
36493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36495    new_path="$unix_path"
36496  fi
36497
36498    # remove trailing .exe if any
36499    new_path="${new_path/%.exe/}"
36500
36501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36503  fi
36504
36505    else
36506      # We're on a unix platform. Hooray! :)
36507      # First separate the path from the arguments. This will split at the first
36508      # space.
36509      complete="$CPP"
36510      path="${complete%% *}"
36511      tmp="$complete EOL"
36512      arguments="${tmp#* }"
36513
36514      # Cannot rely on the command "which" here since it doesn't always work.
36515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36516      if test -z "$is_absolute_path"; then
36517        # Path to executable is not absolute. Find it.
36518        IFS_save="$IFS"
36519        IFS=:
36520        for p in $PATH; do
36521          if test -f "$p/$path" && test -x "$p/$path"; then
36522            new_path="$p/$path"
36523            break
36524          fi
36525        done
36526        IFS="$IFS_save"
36527      else
36528        # This is an absolute path, we can use it without further modifications.
36529        new_path="$path"
36530      fi
36531
36532      if test "x$new_path" = x; then
36533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36534$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36535        has_space=`$ECHO "$complete" | $GREP " "`
36536        if test "x$has_space" != x; then
36537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36539        fi
36540        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36541      fi
36542    fi
36543
36544    # Now join together the path and the arguments once again
36545    if test "x$arguments" != xEOL; then
36546      new_complete="$new_path ${arguments% *}"
36547    else
36548      new_complete="$new_path"
36549    fi
36550
36551    if test "x$complete" != "x$new_complete"; then
36552      CPP="$new_complete"
36553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36554$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36555    fi
36556  fi
36557
36558  ac_ext=cpp
36559ac_cpp='$CXXCPP $CPPFLAGS'
36560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36564$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36565if test -z "$CXXCPP"; then
36566  if ${ac_cv_prog_CXXCPP+:} false; then :
36567  $as_echo_n "(cached) " >&6
36568else
36569      # Double quotes because CXXCPP needs to be expanded
36570    for CXXCPP in "$CXX -E" "/lib/cpp"
36571    do
36572      ac_preproc_ok=false
36573for ac_cxx_preproc_warn_flag in '' yes
36574do
36575  # Use a header file that comes with gcc, so configuring glibc
36576  # with a fresh cross-compiler works.
36577  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36578  # <limits.h> exists even on freestanding compilers.
36579  # On the NeXT, cc -E runs the code through the compiler's parser,
36580  # not just through cpp. "Syntax error" is here to catch this case.
36581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36582/* end confdefs.h.  */
36583#ifdef __STDC__
36584# include <limits.h>
36585#else
36586# include <assert.h>
36587#endif
36588		     Syntax error
36589_ACEOF
36590if ac_fn_cxx_try_cpp "$LINENO"; then :
36591
36592else
36593  # Broken: fails on valid input.
36594continue
36595fi
36596rm -f conftest.err conftest.i conftest.$ac_ext
36597
36598  # OK, works on sane cases.  Now check whether nonexistent headers
36599  # can be detected and how.
36600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36601/* end confdefs.h.  */
36602#include <ac_nonexistent.h>
36603_ACEOF
36604if ac_fn_cxx_try_cpp "$LINENO"; then :
36605  # Broken: success on invalid input.
36606continue
36607else
36608  # Passes both tests.
36609ac_preproc_ok=:
36610break
36611fi
36612rm -f conftest.err conftest.i conftest.$ac_ext
36613
36614done
36615# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36616rm -f conftest.i conftest.err conftest.$ac_ext
36617if $ac_preproc_ok; then :
36618  break
36619fi
36620
36621    done
36622    ac_cv_prog_CXXCPP=$CXXCPP
36623
36624fi
36625  CXXCPP=$ac_cv_prog_CXXCPP
36626else
36627  ac_cv_prog_CXXCPP=$CXXCPP
36628fi
36629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36630$as_echo "$CXXCPP" >&6; }
36631ac_preproc_ok=false
36632for ac_cxx_preproc_warn_flag in '' yes
36633do
36634  # Use a header file that comes with gcc, so configuring glibc
36635  # with a fresh cross-compiler works.
36636  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36637  # <limits.h> exists even on freestanding compilers.
36638  # On the NeXT, cc -E runs the code through the compiler's parser,
36639  # not just through cpp. "Syntax error" is here to catch this case.
36640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36641/* end confdefs.h.  */
36642#ifdef __STDC__
36643# include <limits.h>
36644#else
36645# include <assert.h>
36646#endif
36647		     Syntax error
36648_ACEOF
36649if ac_fn_cxx_try_cpp "$LINENO"; then :
36650
36651else
36652  # Broken: fails on valid input.
36653continue
36654fi
36655rm -f conftest.err conftest.i conftest.$ac_ext
36656
36657  # OK, works on sane cases.  Now check whether nonexistent headers
36658  # can be detected and how.
36659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36660/* end confdefs.h.  */
36661#include <ac_nonexistent.h>
36662_ACEOF
36663if ac_fn_cxx_try_cpp "$LINENO"; then :
36664  # Broken: success on invalid input.
36665continue
36666else
36667  # Passes both tests.
36668ac_preproc_ok=:
36669break
36670fi
36671rm -f conftest.err conftest.i conftest.$ac_ext
36672
36673done
36674# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36675rm -f conftest.i conftest.err conftest.$ac_ext
36676if $ac_preproc_ok; then :
36677
36678else
36679  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36681as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36682See \`config.log' for more details" "$LINENO" 5; }
36683fi
36684
36685ac_ext=cpp
36686ac_cpp='$CXXCPP $CPPFLAGS'
36687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36690
36691
36692  # Only process if variable expands to non-empty
36693
36694  if test "x$CXXCPP" != x; then
36695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36696
36697  # First separate the path from the arguments. This will split at the first
36698  # space.
36699  complete="$CXXCPP"
36700  path="${complete%% *}"
36701  tmp="$complete EOL"
36702  arguments="${tmp#* }"
36703
36704  # Input might be given as Windows format, start by converting to
36705  # unix format.
36706  new_path=`$CYGPATH -u "$path"`
36707
36708  # Now try to locate executable using which
36709  new_path=`$WHICH "$new_path" 2> /dev/null`
36710  # bat and cmd files are not always considered executable in cygwin causing which
36711  # to not find them
36712  if test "x$new_path" = x \
36713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36715    new_path=`$CYGPATH -u "$path"`
36716  fi
36717  if test "x$new_path" = x; then
36718    # Oops. Which didn't find the executable.
36719    # The splitting of arguments from the executable at a space might have been incorrect,
36720    # since paths with space are more likely in Windows. Give it another try with the whole
36721    # argument.
36722    path="$complete"
36723    arguments="EOL"
36724    new_path=`$CYGPATH -u "$path"`
36725    new_path=`$WHICH "$new_path" 2> /dev/null`
36726    # bat and cmd files are not always considered executable in cygwin causing which
36727    # to not find them
36728    if test "x$new_path" = x \
36729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36731      new_path=`$CYGPATH -u "$path"`
36732    fi
36733    if test "x$new_path" = x; then
36734      # It's still not found. Now this is an unrecoverable error.
36735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36736$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36737      has_space=`$ECHO "$complete" | $GREP " "`
36738      if test "x$has_space" != x; then
36739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36741      fi
36742      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36743    fi
36744  fi
36745
36746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36749  # "foo.exe" is OK but "foo" is an error.
36750  #
36751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36752  # It is also a way to make sure we got the proper file name for the real test later on.
36753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36754  if test "x$test_shortpath" = x; then
36755    # Short path failed, file does not exist as specified.
36756    # Try adding .exe or .cmd
36757    if test -f "${new_path}.exe"; then
36758      input_to_shortpath="${new_path}.exe"
36759    elif test -f "${new_path}.cmd"; then
36760      input_to_shortpath="${new_path}.cmd"
36761    else
36762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36763$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36766      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36767    fi
36768  else
36769    input_to_shortpath="$new_path"
36770  fi
36771
36772  # Call helper function which possibly converts this using DOS-style short mode.
36773  # If so, the updated path is stored in $new_path.
36774  new_path="$input_to_shortpath"
36775
36776  input_path="$input_to_shortpath"
36777  # Check if we need to convert this using DOS-style short mode. If the path
36778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36779  # take no chances and rewrite it.
36780  # Note: m4 eats our [], so we need to use [ and ] instead.
36781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36782  if test "x$has_forbidden_chars" != x; then
36783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36787      # Going to short mode and back again did indeed matter. Since short mode is
36788      # case insensitive, let's make it lowercase to improve readability.
36789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36790      # Now convert it back to Unix-style (cygpath)
36791      input_path=`$CYGPATH -u "$shortmode_path"`
36792      new_path="$input_path"
36793    fi
36794  fi
36795
36796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36797  if test "x$test_cygdrive_prefix" = x; then
36798    # As a simple fix, exclude /usr/bin since it's not a real path.
36799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36801      # a path prefixed by /cygdrive for fixpath to work.
36802      new_path="$CYGWIN_ROOT_PATH$input_path"
36803    fi
36804  fi
36805
36806  # remove trailing .exe if any
36807  new_path="${new_path/%.exe/}"
36808
36809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36810
36811  # First separate the path from the arguments. This will split at the first
36812  # space.
36813  complete="$CXXCPP"
36814  path="${complete%% *}"
36815  tmp="$complete EOL"
36816  arguments="${tmp#* }"
36817
36818  # Input might be given as Windows format, start by converting to
36819  # unix format.
36820  new_path="$path"
36821
36822  windows_path="$new_path"
36823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36824    unix_path=`$CYGPATH -u "$windows_path"`
36825    new_path="$unix_path"
36826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36828    new_path="$unix_path"
36829  fi
36830
36831
36832  # Now try to locate executable using which
36833  new_path=`$WHICH "$new_path" 2> /dev/null`
36834
36835  if test "x$new_path" = x; then
36836    # Oops. Which didn't find the executable.
36837    # The splitting of arguments from the executable at a space might have been incorrect,
36838    # since paths with space are more likely in Windows. Give it another try with the whole
36839    # argument.
36840    path="$complete"
36841    arguments="EOL"
36842    new_path="$path"
36843
36844  windows_path="$new_path"
36845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36846    unix_path=`$CYGPATH -u "$windows_path"`
36847    new_path="$unix_path"
36848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36850    new_path="$unix_path"
36851  fi
36852
36853
36854    new_path=`$WHICH "$new_path" 2> /dev/null`
36855    # bat and cmd files are not always considered executable in MSYS causing which
36856    # to not find them
36857    if test "x$new_path" = x \
36858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36860      new_path="$path"
36861
36862  windows_path="$new_path"
36863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36864    unix_path=`$CYGPATH -u "$windows_path"`
36865    new_path="$unix_path"
36866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36868    new_path="$unix_path"
36869  fi
36870
36871    fi
36872
36873    if test "x$new_path" = x; then
36874      # It's still not found. Now this is an unrecoverable error.
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36876$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36877      has_space=`$ECHO "$complete" | $GREP " "`
36878      if test "x$has_space" != x; then
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36881      fi
36882      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36883    fi
36884  fi
36885
36886  # Now new_path has a complete unix path to the binary
36887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36888    # Keep paths in /bin as-is, but remove trailing .exe if any
36889    new_path="${new_path/%.exe/}"
36890    # Do not save /bin paths to all_fixpath_prefixes!
36891  else
36892    # Not in mixed or Windows style, start by that.
36893    new_path=`cmd //c echo $new_path`
36894
36895  input_path="$new_path"
36896  # Check if we need to convert this using DOS-style short mode. If the path
36897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36898  # take no chances and rewrite it.
36899  # Note: m4 eats our [], so we need to use [ and ] instead.
36900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36901  if test "x$has_forbidden_chars" != x; then
36902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36904  fi
36905
36906    # Output is in $new_path
36907
36908  windows_path="$new_path"
36909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36910    unix_path=`$CYGPATH -u "$windows_path"`
36911    new_path="$unix_path"
36912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36914    new_path="$unix_path"
36915  fi
36916
36917    # remove trailing .exe if any
36918    new_path="${new_path/%.exe/}"
36919
36920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36922  fi
36923
36924    else
36925      # We're on a unix platform. Hooray! :)
36926      # First separate the path from the arguments. This will split at the first
36927      # space.
36928      complete="$CXXCPP"
36929      path="${complete%% *}"
36930      tmp="$complete EOL"
36931      arguments="${tmp#* }"
36932
36933      # Cannot rely on the command "which" here since it doesn't always work.
36934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36935      if test -z "$is_absolute_path"; then
36936        # Path to executable is not absolute. Find it.
36937        IFS_save="$IFS"
36938        IFS=:
36939        for p in $PATH; do
36940          if test -f "$p/$path" && test -x "$p/$path"; then
36941            new_path="$p/$path"
36942            break
36943          fi
36944        done
36945        IFS="$IFS_save"
36946      else
36947        # This is an absolute path, we can use it without further modifications.
36948        new_path="$path"
36949      fi
36950
36951      if test "x$new_path" = x; then
36952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36953$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36954        has_space=`$ECHO "$complete" | $GREP " "`
36955        if test "x$has_space" != x; then
36956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36958        fi
36959        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36960      fi
36961    fi
36962
36963    # Now join together the path and the arguments once again
36964    if test "x$arguments" != xEOL; then
36965      new_complete="$new_path ${arguments% *}"
36966    else
36967      new_complete="$new_path"
36968    fi
36969
36970    if test "x$complete" != "x$new_complete"; then
36971      CXXCPP="$new_complete"
36972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36973$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36974    fi
36975  fi
36976
36977
36978  #
36979  # Setup the linker (LD)
36980  #
36981  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36982    # In the Microsoft toolchain we have a separate LD command "link".
36983    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36984    # a cygwin program for something completely different.
36985    # Extract the first word of "link", so it can be a program name with args.
36986set dummy link; ac_word=$2
36987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36988$as_echo_n "checking for $ac_word... " >&6; }
36989if ${ac_cv_prog_LD+:} false; then :
36990  $as_echo_n "(cached) " >&6
36991else
36992  if test -n "$LD"; then
36993  ac_cv_prog_LD="$LD" # Let the user override the test.
36994else
36995  ac_prog_rejected=no
36996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36997for as_dir in $PATH
36998do
36999  IFS=$as_save_IFS
37000  test -z "$as_dir" && as_dir=.
37001    for ac_exec_ext in '' $ac_executable_extensions; do
37002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37003    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37004       ac_prog_rejected=yes
37005       continue
37006     fi
37007    ac_cv_prog_LD="link"
37008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37009    break 2
37010  fi
37011done
37012  done
37013IFS=$as_save_IFS
37014
37015if test $ac_prog_rejected = yes; then
37016  # We found a bogon in the path, so make sure we never use it.
37017  set dummy $ac_cv_prog_LD
37018  shift
37019  if test $# != 0; then
37020    # We chose a different compiler from the bogus one.
37021    # However, it has the same basename, so the bogon will be chosen
37022    # first if we set LD to just the basename; use the full file name.
37023    shift
37024    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37025  fi
37026fi
37027fi
37028fi
37029LD=$ac_cv_prog_LD
37030if test -n "$LD"; then
37031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37032$as_echo "$LD" >&6; }
37033else
37034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37035$as_echo "no" >&6; }
37036fi
37037
37038
37039
37040  # Only process if variable expands to non-empty
37041
37042  if test "x$LD" != x; then
37043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37044
37045  # First separate the path from the arguments. This will split at the first
37046  # space.
37047  complete="$LD"
37048  path="${complete%% *}"
37049  tmp="$complete EOL"
37050  arguments="${tmp#* }"
37051
37052  # Input might be given as Windows format, start by converting to
37053  # unix format.
37054  new_path=`$CYGPATH -u "$path"`
37055
37056  # Now try to locate executable using which
37057  new_path=`$WHICH "$new_path" 2> /dev/null`
37058  # bat and cmd files are not always considered executable in cygwin causing which
37059  # to not find them
37060  if test "x$new_path" = x \
37061      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37062      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37063    new_path=`$CYGPATH -u "$path"`
37064  fi
37065  if test "x$new_path" = x; then
37066    # Oops. Which didn't find the executable.
37067    # The splitting of arguments from the executable at a space might have been incorrect,
37068    # since paths with space are more likely in Windows. Give it another try with the whole
37069    # argument.
37070    path="$complete"
37071    arguments="EOL"
37072    new_path=`$CYGPATH -u "$path"`
37073    new_path=`$WHICH "$new_path" 2> /dev/null`
37074    # bat and cmd files are not always considered executable in cygwin causing which
37075    # to not find them
37076    if test "x$new_path" = x \
37077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37079      new_path=`$CYGPATH -u "$path"`
37080    fi
37081    if test "x$new_path" = x; then
37082      # It's still not found. Now this is an unrecoverable error.
37083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37084$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37085      has_space=`$ECHO "$complete" | $GREP " "`
37086      if test "x$has_space" != x; then
37087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37089      fi
37090      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37091    fi
37092  fi
37093
37094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37097  # "foo.exe" is OK but "foo" is an error.
37098  #
37099  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37100  # It is also a way to make sure we got the proper file name for the real test later on.
37101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37102  if test "x$test_shortpath" = x; then
37103    # Short path failed, file does not exist as specified.
37104    # Try adding .exe or .cmd
37105    if test -f "${new_path}.exe"; then
37106      input_to_shortpath="${new_path}.exe"
37107    elif test -f "${new_path}.cmd"; then
37108      input_to_shortpath="${new_path}.cmd"
37109    else
37110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37111$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37114      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37115    fi
37116  else
37117    input_to_shortpath="$new_path"
37118  fi
37119
37120  # Call helper function which possibly converts this using DOS-style short mode.
37121  # If so, the updated path is stored in $new_path.
37122  new_path="$input_to_shortpath"
37123
37124  input_path="$input_to_shortpath"
37125  # Check if we need to convert this using DOS-style short mode. If the path
37126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37127  # take no chances and rewrite it.
37128  # Note: m4 eats our [], so we need to use [ and ] instead.
37129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37130  if test "x$has_forbidden_chars" != x; then
37131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37135      # Going to short mode and back again did indeed matter. Since short mode is
37136      # case insensitive, let's make it lowercase to improve readability.
37137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37138      # Now convert it back to Unix-style (cygpath)
37139      input_path=`$CYGPATH -u "$shortmode_path"`
37140      new_path="$input_path"
37141    fi
37142  fi
37143
37144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37145  if test "x$test_cygdrive_prefix" = x; then
37146    # As a simple fix, exclude /usr/bin since it's not a real path.
37147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37149      # a path prefixed by /cygdrive for fixpath to work.
37150      new_path="$CYGWIN_ROOT_PATH$input_path"
37151    fi
37152  fi
37153
37154  # remove trailing .exe if any
37155  new_path="${new_path/%.exe/}"
37156
37157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37158
37159  # First separate the path from the arguments. This will split at the first
37160  # space.
37161  complete="$LD"
37162  path="${complete%% *}"
37163  tmp="$complete EOL"
37164  arguments="${tmp#* }"
37165
37166  # Input might be given as Windows format, start by converting to
37167  # unix format.
37168  new_path="$path"
37169
37170  windows_path="$new_path"
37171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37172    unix_path=`$CYGPATH -u "$windows_path"`
37173    new_path="$unix_path"
37174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37176    new_path="$unix_path"
37177  fi
37178
37179
37180  # Now try to locate executable using which
37181  new_path=`$WHICH "$new_path" 2> /dev/null`
37182
37183  if test "x$new_path" = x; then
37184    # Oops. Which didn't find the executable.
37185    # The splitting of arguments from the executable at a space might have been incorrect,
37186    # since paths with space are more likely in Windows. Give it another try with the whole
37187    # argument.
37188    path="$complete"
37189    arguments="EOL"
37190    new_path="$path"
37191
37192  windows_path="$new_path"
37193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37194    unix_path=`$CYGPATH -u "$windows_path"`
37195    new_path="$unix_path"
37196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37198    new_path="$unix_path"
37199  fi
37200
37201
37202    new_path=`$WHICH "$new_path" 2> /dev/null`
37203    # bat and cmd files are not always considered executable in MSYS causing which
37204    # to not find them
37205    if test "x$new_path" = x \
37206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37208      new_path="$path"
37209
37210  windows_path="$new_path"
37211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37212    unix_path=`$CYGPATH -u "$windows_path"`
37213    new_path="$unix_path"
37214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37216    new_path="$unix_path"
37217  fi
37218
37219    fi
37220
37221    if test "x$new_path" = x; then
37222      # It's still not found. Now this is an unrecoverable error.
37223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37224$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37225      has_space=`$ECHO "$complete" | $GREP " "`
37226      if test "x$has_space" != x; then
37227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37229      fi
37230      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37231    fi
37232  fi
37233
37234  # Now new_path has a complete unix path to the binary
37235  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37236    # Keep paths in /bin as-is, but remove trailing .exe if any
37237    new_path="${new_path/%.exe/}"
37238    # Do not save /bin paths to all_fixpath_prefixes!
37239  else
37240    # Not in mixed or Windows style, start by that.
37241    new_path=`cmd //c echo $new_path`
37242
37243  input_path="$new_path"
37244  # Check if we need to convert this using DOS-style short mode. If the path
37245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37246  # take no chances and rewrite it.
37247  # Note: m4 eats our [], so we need to use [ and ] instead.
37248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37249  if test "x$has_forbidden_chars" != x; then
37250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37252  fi
37253
37254    # Output is in $new_path
37255
37256  windows_path="$new_path"
37257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37258    unix_path=`$CYGPATH -u "$windows_path"`
37259    new_path="$unix_path"
37260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37262    new_path="$unix_path"
37263  fi
37264
37265    # remove trailing .exe if any
37266    new_path="${new_path/%.exe/}"
37267
37268    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37269    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37270  fi
37271
37272    else
37273      # We're on a unix platform. Hooray! :)
37274      # First separate the path from the arguments. This will split at the first
37275      # space.
37276      complete="$LD"
37277      path="${complete%% *}"
37278      tmp="$complete EOL"
37279      arguments="${tmp#* }"
37280
37281      # Cannot rely on the command "which" here since it doesn't always work.
37282      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37283      if test -z "$is_absolute_path"; then
37284        # Path to executable is not absolute. Find it.
37285        IFS_save="$IFS"
37286        IFS=:
37287        for p in $PATH; do
37288          if test -f "$p/$path" && test -x "$p/$path"; then
37289            new_path="$p/$path"
37290            break
37291          fi
37292        done
37293        IFS="$IFS_save"
37294      else
37295        # This is an absolute path, we can use it without further modifications.
37296        new_path="$path"
37297      fi
37298
37299      if test "x$new_path" = x; then
37300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37301$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37302        has_space=`$ECHO "$complete" | $GREP " "`
37303        if test "x$has_space" != x; then
37304          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37306        fi
37307        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37308      fi
37309    fi
37310
37311    # Now join together the path and the arguments once again
37312    if test "x$arguments" != xEOL; then
37313      new_complete="$new_path ${arguments% *}"
37314    else
37315      new_complete="$new_path"
37316    fi
37317
37318    if test "x$complete" != "x$new_complete"; then
37319      LD="$new_complete"
37320      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37321$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37322    fi
37323  fi
37324
37325    # Verify that we indeed succeeded with this trick.
37326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37327$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37328    "$LD" --version > /dev/null
37329    if test $? -eq 0 ; then
37330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37331$as_echo "no" >&6; }
37332      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37333    else
37334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37335$as_echo "yes" >&6; }
37336    fi
37337    LDCXX="$LD"
37338  else
37339    # All other toolchains use the compiler to link.
37340    LD="$CC"
37341    LDCXX="$CXX"
37342  fi
37343
37344  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37345
37346
37347  #
37348  # Setup the assembler (AS)
37349  #
37350  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37351
37352
37353  # Publish this variable in the help.
37354
37355
37356  if [ -z "${AS+x}" ]; then
37357    # The variable is not set by user, try to locate tool using the code snippet
37358    for ac_prog in as
37359do
37360  # Extract the first word of "$ac_prog", so it can be a program name with args.
37361set dummy $ac_prog; ac_word=$2
37362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37363$as_echo_n "checking for $ac_word... " >&6; }
37364if ${ac_cv_path_AS+:} false; then :
37365  $as_echo_n "(cached) " >&6
37366else
37367  case $AS in
37368  [\\/]* | ?:[\\/]*)
37369  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37370  ;;
37371  *)
37372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37373for as_dir in $PATH
37374do
37375  IFS=$as_save_IFS
37376  test -z "$as_dir" && as_dir=.
37377    for ac_exec_ext in '' $ac_executable_extensions; do
37378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37379    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37381    break 2
37382  fi
37383done
37384  done
37385IFS=$as_save_IFS
37386
37387  ;;
37388esac
37389fi
37390AS=$ac_cv_path_AS
37391if test -n "$AS"; then
37392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37393$as_echo "$AS" >&6; }
37394else
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37396$as_echo "no" >&6; }
37397fi
37398
37399
37400  test -n "$AS" && break
37401done
37402
37403  else
37404    # The variable is set, but is it from the command line or the environment?
37405
37406    # Try to remove the string !AS! from our list.
37407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37409      # If it failed, the variable was not from the command line. Ignore it,
37410      # but warn the user (except for BASH, which is always set by the calling BASH).
37411      if test "xAS" != xBASH; then
37412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37413$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37414      fi
37415      # Try to locate tool using the code snippet
37416      for ac_prog in as
37417do
37418  # Extract the first word of "$ac_prog", so it can be a program name with args.
37419set dummy $ac_prog; ac_word=$2
37420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37421$as_echo_n "checking for $ac_word... " >&6; }
37422if ${ac_cv_path_AS+:} false; then :
37423  $as_echo_n "(cached) " >&6
37424else
37425  case $AS in
37426  [\\/]* | ?:[\\/]*)
37427  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37428  ;;
37429  *)
37430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37431for as_dir in $PATH
37432do
37433  IFS=$as_save_IFS
37434  test -z "$as_dir" && as_dir=.
37435    for ac_exec_ext in '' $ac_executable_extensions; do
37436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37437    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37439    break 2
37440  fi
37441done
37442  done
37443IFS=$as_save_IFS
37444
37445  ;;
37446esac
37447fi
37448AS=$ac_cv_path_AS
37449if test -n "$AS"; then
37450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37451$as_echo "$AS" >&6; }
37452else
37453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37454$as_echo "no" >&6; }
37455fi
37456
37457
37458  test -n "$AS" && break
37459done
37460
37461    else
37462      # If it succeeded, then it was overridden by the user. We will use it
37463      # for the tool.
37464
37465      # First remove it from the list of overridden variables, so we can test
37466      # for unknown variables in the end.
37467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37468
37469      # Check if we try to supply an empty value
37470      if test "x$AS" = x; then
37471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37472$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37474$as_echo_n "checking for AS... " >&6; }
37475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37476$as_echo "disabled" >&6; }
37477      else
37478        # Check if the provided tool contains a complete path.
37479        tool_specified="$AS"
37480        tool_basename="${tool_specified##*/}"
37481        if test "x$tool_basename" = "x$tool_specified"; then
37482          # A command without a complete path is provided, search $PATH.
37483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37484$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37485          # Extract the first word of "$tool_basename", so it can be a program name with args.
37486set dummy $tool_basename; ac_word=$2
37487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37488$as_echo_n "checking for $ac_word... " >&6; }
37489if ${ac_cv_path_AS+:} false; then :
37490  $as_echo_n "(cached) " >&6
37491else
37492  case $AS in
37493  [\\/]* | ?:[\\/]*)
37494  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37495  ;;
37496  *)
37497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37498for as_dir in $PATH
37499do
37500  IFS=$as_save_IFS
37501  test -z "$as_dir" && as_dir=.
37502    for ac_exec_ext in '' $ac_executable_extensions; do
37503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37504    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37506    break 2
37507  fi
37508done
37509  done
37510IFS=$as_save_IFS
37511
37512  ;;
37513esac
37514fi
37515AS=$ac_cv_path_AS
37516if test -n "$AS"; then
37517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37518$as_echo "$AS" >&6; }
37519else
37520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37521$as_echo "no" >&6; }
37522fi
37523
37524
37525          if test "x$AS" = x; then
37526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37527          fi
37528        else
37529          # Otherwise we believe it is a complete path. Use it as it is.
37530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37531$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37533$as_echo_n "checking for AS... " >&6; }
37534          if test ! -x "$tool_specified"; then
37535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37536$as_echo "not found" >&6; }
37537            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37538          fi
37539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37540$as_echo "$tool_specified" >&6; }
37541        fi
37542      fi
37543    fi
37544
37545  fi
37546
37547
37548
37549  # Only process if variable expands to non-empty
37550
37551  if test "x$AS" != x; then
37552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37553
37554  # First separate the path from the arguments. This will split at the first
37555  # space.
37556  complete="$AS"
37557  path="${complete%% *}"
37558  tmp="$complete EOL"
37559  arguments="${tmp#* }"
37560
37561  # Input might be given as Windows format, start by converting to
37562  # unix format.
37563  new_path=`$CYGPATH -u "$path"`
37564
37565  # Now try to locate executable using which
37566  new_path=`$WHICH "$new_path" 2> /dev/null`
37567  # bat and cmd files are not always considered executable in cygwin causing which
37568  # to not find them
37569  if test "x$new_path" = x \
37570      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37571      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37572    new_path=`$CYGPATH -u "$path"`
37573  fi
37574  if test "x$new_path" = x; then
37575    # Oops. Which didn't find the executable.
37576    # The splitting of arguments from the executable at a space might have been incorrect,
37577    # since paths with space are more likely in Windows. Give it another try with the whole
37578    # argument.
37579    path="$complete"
37580    arguments="EOL"
37581    new_path=`$CYGPATH -u "$path"`
37582    new_path=`$WHICH "$new_path" 2> /dev/null`
37583    # bat and cmd files are not always considered executable in cygwin causing which
37584    # to not find them
37585    if test "x$new_path" = x \
37586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37588      new_path=`$CYGPATH -u "$path"`
37589    fi
37590    if test "x$new_path" = x; then
37591      # It's still not found. Now this is an unrecoverable error.
37592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37593$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37594      has_space=`$ECHO "$complete" | $GREP " "`
37595      if test "x$has_space" != x; then
37596        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37597$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37598      fi
37599      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37600    fi
37601  fi
37602
37603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37606  # "foo.exe" is OK but "foo" is an error.
37607  #
37608  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37609  # It is also a way to make sure we got the proper file name for the real test later on.
37610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37611  if test "x$test_shortpath" = x; then
37612    # Short path failed, file does not exist as specified.
37613    # Try adding .exe or .cmd
37614    if test -f "${new_path}.exe"; then
37615      input_to_shortpath="${new_path}.exe"
37616    elif test -f "${new_path}.cmd"; then
37617      input_to_shortpath="${new_path}.cmd"
37618    else
37619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37620$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37621      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37622$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37623      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37624    fi
37625  else
37626    input_to_shortpath="$new_path"
37627  fi
37628
37629  # Call helper function which possibly converts this using DOS-style short mode.
37630  # If so, the updated path is stored in $new_path.
37631  new_path="$input_to_shortpath"
37632
37633  input_path="$input_to_shortpath"
37634  # Check if we need to convert this using DOS-style short mode. If the path
37635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37636  # take no chances and rewrite it.
37637  # Note: m4 eats our [], so we need to use [ and ] instead.
37638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37639  if test "x$has_forbidden_chars" != x; then
37640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37644      # Going to short mode and back again did indeed matter. Since short mode is
37645      # case insensitive, let's make it lowercase to improve readability.
37646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37647      # Now convert it back to Unix-style (cygpath)
37648      input_path=`$CYGPATH -u "$shortmode_path"`
37649      new_path="$input_path"
37650    fi
37651  fi
37652
37653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37654  if test "x$test_cygdrive_prefix" = x; then
37655    # As a simple fix, exclude /usr/bin since it's not a real path.
37656    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37658      # a path prefixed by /cygdrive for fixpath to work.
37659      new_path="$CYGWIN_ROOT_PATH$input_path"
37660    fi
37661  fi
37662
37663  # remove trailing .exe if any
37664  new_path="${new_path/%.exe/}"
37665
37666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37667
37668  # First separate the path from the arguments. This will split at the first
37669  # space.
37670  complete="$AS"
37671  path="${complete%% *}"
37672  tmp="$complete EOL"
37673  arguments="${tmp#* }"
37674
37675  # Input might be given as Windows format, start by converting to
37676  # unix format.
37677  new_path="$path"
37678
37679  windows_path="$new_path"
37680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37681    unix_path=`$CYGPATH -u "$windows_path"`
37682    new_path="$unix_path"
37683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37685    new_path="$unix_path"
37686  fi
37687
37688
37689  # Now try to locate executable using which
37690  new_path=`$WHICH "$new_path" 2> /dev/null`
37691
37692  if test "x$new_path" = x; then
37693    # Oops. Which didn't find the executable.
37694    # The splitting of arguments from the executable at a space might have been incorrect,
37695    # since paths with space are more likely in Windows. Give it another try with the whole
37696    # argument.
37697    path="$complete"
37698    arguments="EOL"
37699    new_path="$path"
37700
37701  windows_path="$new_path"
37702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37703    unix_path=`$CYGPATH -u "$windows_path"`
37704    new_path="$unix_path"
37705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37707    new_path="$unix_path"
37708  fi
37709
37710
37711    new_path=`$WHICH "$new_path" 2> /dev/null`
37712    # bat and cmd files are not always considered executable in MSYS causing which
37713    # to not find them
37714    if test "x$new_path" = x \
37715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37717      new_path="$path"
37718
37719  windows_path="$new_path"
37720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37721    unix_path=`$CYGPATH -u "$windows_path"`
37722    new_path="$unix_path"
37723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37725    new_path="$unix_path"
37726  fi
37727
37728    fi
37729
37730    if test "x$new_path" = x; then
37731      # It's still not found. Now this is an unrecoverable error.
37732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37733$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37734      has_space=`$ECHO "$complete" | $GREP " "`
37735      if test "x$has_space" != x; then
37736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37738      fi
37739      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37740    fi
37741  fi
37742
37743  # Now new_path has a complete unix path to the binary
37744  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37745    # Keep paths in /bin as-is, but remove trailing .exe if any
37746    new_path="${new_path/%.exe/}"
37747    # Do not save /bin paths to all_fixpath_prefixes!
37748  else
37749    # Not in mixed or Windows style, start by that.
37750    new_path=`cmd //c echo $new_path`
37751
37752  input_path="$new_path"
37753  # Check if we need to convert this using DOS-style short mode. If the path
37754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37755  # take no chances and rewrite it.
37756  # Note: m4 eats our [], so we need to use [ and ] instead.
37757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37758  if test "x$has_forbidden_chars" != x; then
37759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37761  fi
37762
37763    # Output is in $new_path
37764
37765  windows_path="$new_path"
37766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37767    unix_path=`$CYGPATH -u "$windows_path"`
37768    new_path="$unix_path"
37769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37771    new_path="$unix_path"
37772  fi
37773
37774    # remove trailing .exe if any
37775    new_path="${new_path/%.exe/}"
37776
37777    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37778    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37779  fi
37780
37781    else
37782      # We're on a unix platform. Hooray! :)
37783      # First separate the path from the arguments. This will split at the first
37784      # space.
37785      complete="$AS"
37786      path="${complete%% *}"
37787      tmp="$complete EOL"
37788      arguments="${tmp#* }"
37789
37790      # Cannot rely on the command "which" here since it doesn't always work.
37791      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37792      if test -z "$is_absolute_path"; then
37793        # Path to executable is not absolute. Find it.
37794        IFS_save="$IFS"
37795        IFS=:
37796        for p in $PATH; do
37797          if test -f "$p/$path" && test -x "$p/$path"; then
37798            new_path="$p/$path"
37799            break
37800          fi
37801        done
37802        IFS="$IFS_save"
37803      else
37804        # This is an absolute path, we can use it without further modifications.
37805        new_path="$path"
37806      fi
37807
37808      if test "x$new_path" = x; then
37809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37810$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37811        has_space=`$ECHO "$complete" | $GREP " "`
37812        if test "x$has_space" != x; then
37813          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37814$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37815        fi
37816        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37817      fi
37818    fi
37819
37820    # Now join together the path and the arguments once again
37821    if test "x$arguments" != xEOL; then
37822      new_complete="$new_path ${arguments% *}"
37823    else
37824      new_complete="$new_path"
37825    fi
37826
37827    if test "x$complete" != "x$new_complete"; then
37828      AS="$new_complete"
37829      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37830$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37831    fi
37832  fi
37833
37834    if test "x$AS" = x; then
37835      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37836    fi
37837  else
37838    # FIXME: is this correct for microsoft?
37839    AS="$CC -c"
37840  fi
37841
37842
37843  #
37844  # Setup the archiver (AR)
37845  #
37846  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37847    # The corresponding ar tool is lib.exe (used to create static libraries)
37848    # Extract the first word of "lib", so it can be a program name with args.
37849set dummy lib; ac_word=$2
37850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37851$as_echo_n "checking for $ac_word... " >&6; }
37852if ${ac_cv_prog_AR+:} false; then :
37853  $as_echo_n "(cached) " >&6
37854else
37855  if test -n "$AR"; then
37856  ac_cv_prog_AR="$AR" # Let the user override the test.
37857else
37858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37859for as_dir in $PATH
37860do
37861  IFS=$as_save_IFS
37862  test -z "$as_dir" && as_dir=.
37863    for ac_exec_ext in '' $ac_executable_extensions; do
37864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37865    ac_cv_prog_AR="lib"
37866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37867    break 2
37868  fi
37869done
37870  done
37871IFS=$as_save_IFS
37872
37873fi
37874fi
37875AR=$ac_cv_prog_AR
37876if test -n "$AR"; then
37877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37878$as_echo "$AR" >&6; }
37879else
37880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37881$as_echo "no" >&6; }
37882fi
37883
37884
37885  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37886
37887
37888  # Publish this variable in the help.
37889
37890
37891  if [ -z "${AR+x}" ]; then
37892    # The variable is not set by user, try to locate tool using the code snippet
37893    if test -n "$ac_tool_prefix"; then
37894  for ac_prog in ar gcc-ar
37895  do
37896    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37897set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37899$as_echo_n "checking for $ac_word... " >&6; }
37900if ${ac_cv_prog_AR+:} false; then :
37901  $as_echo_n "(cached) " >&6
37902else
37903  if test -n "$AR"; then
37904  ac_cv_prog_AR="$AR" # Let the user override the test.
37905else
37906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37907for as_dir in $PATH
37908do
37909  IFS=$as_save_IFS
37910  test -z "$as_dir" && as_dir=.
37911    for ac_exec_ext in '' $ac_executable_extensions; do
37912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37913    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37915    break 2
37916  fi
37917done
37918  done
37919IFS=$as_save_IFS
37920
37921fi
37922fi
37923AR=$ac_cv_prog_AR
37924if test -n "$AR"; then
37925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37926$as_echo "$AR" >&6; }
37927else
37928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37929$as_echo "no" >&6; }
37930fi
37931
37932
37933    test -n "$AR" && break
37934  done
37935fi
37936if test -z "$AR"; then
37937  ac_ct_AR=$AR
37938  for ac_prog in ar gcc-ar
37939do
37940  # Extract the first word of "$ac_prog", so it can be a program name with args.
37941set dummy $ac_prog; ac_word=$2
37942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37943$as_echo_n "checking for $ac_word... " >&6; }
37944if ${ac_cv_prog_ac_ct_AR+:} false; then :
37945  $as_echo_n "(cached) " >&6
37946else
37947  if test -n "$ac_ct_AR"; then
37948  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37949else
37950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37951for as_dir in $PATH
37952do
37953  IFS=$as_save_IFS
37954  test -z "$as_dir" && as_dir=.
37955    for ac_exec_ext in '' $ac_executable_extensions; do
37956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37957    ac_cv_prog_ac_ct_AR="$ac_prog"
37958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37959    break 2
37960  fi
37961done
37962  done
37963IFS=$as_save_IFS
37964
37965fi
37966fi
37967ac_ct_AR=$ac_cv_prog_ac_ct_AR
37968if test -n "$ac_ct_AR"; then
37969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37970$as_echo "$ac_ct_AR" >&6; }
37971else
37972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37973$as_echo "no" >&6; }
37974fi
37975
37976
37977  test -n "$ac_ct_AR" && break
37978done
37979
37980  if test "x$ac_ct_AR" = x; then
37981    AR=""
37982  else
37983    case $cross_compiling:$ac_tool_warned in
37984yes:)
37985{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37986$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37987ac_tool_warned=yes ;;
37988esac
37989    AR=$ac_ct_AR
37990  fi
37991fi
37992
37993  else
37994    # The variable is set, but is it from the command line or the environment?
37995
37996    # Try to remove the string !AR! from our list.
37997    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37998    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37999      # If it failed, the variable was not from the command line. Ignore it,
38000      # but warn the user (except for BASH, which is always set by the calling BASH).
38001      if test "xAR" != xBASH; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38003$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38004      fi
38005      # Try to locate tool using the code snippet
38006      if test -n "$ac_tool_prefix"; then
38007  for ac_prog in ar gcc-ar
38008  do
38009    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38010set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38012$as_echo_n "checking for $ac_word... " >&6; }
38013if ${ac_cv_prog_AR+:} false; then :
38014  $as_echo_n "(cached) " >&6
38015else
38016  if test -n "$AR"; then
38017  ac_cv_prog_AR="$AR" # Let the user override the test.
38018else
38019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38020for as_dir in $PATH
38021do
38022  IFS=$as_save_IFS
38023  test -z "$as_dir" && as_dir=.
38024    for ac_exec_ext in '' $ac_executable_extensions; do
38025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38026    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
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
38034fi
38035fi
38036AR=$ac_cv_prog_AR
38037if test -n "$AR"; then
38038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38039$as_echo "$AR" >&6; }
38040else
38041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38042$as_echo "no" >&6; }
38043fi
38044
38045
38046    test -n "$AR" && break
38047  done
38048fi
38049if test -z "$AR"; then
38050  ac_ct_AR=$AR
38051  for ac_prog in ar gcc-ar
38052do
38053  # Extract the first word of "$ac_prog", so it can be a program name with args.
38054set dummy $ac_prog; ac_word=$2
38055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38056$as_echo_n "checking for $ac_word... " >&6; }
38057if ${ac_cv_prog_ac_ct_AR+:} false; then :
38058  $as_echo_n "(cached) " >&6
38059else
38060  if test -n "$ac_ct_AR"; then
38061  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38062else
38063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38064for as_dir in $PATH
38065do
38066  IFS=$as_save_IFS
38067  test -z "$as_dir" && as_dir=.
38068    for ac_exec_ext in '' $ac_executable_extensions; do
38069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38070    ac_cv_prog_ac_ct_AR="$ac_prog"
38071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38072    break 2
38073  fi
38074done
38075  done
38076IFS=$as_save_IFS
38077
38078fi
38079fi
38080ac_ct_AR=$ac_cv_prog_ac_ct_AR
38081if test -n "$ac_ct_AR"; then
38082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38083$as_echo "$ac_ct_AR" >&6; }
38084else
38085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38086$as_echo "no" >&6; }
38087fi
38088
38089
38090  test -n "$ac_ct_AR" && break
38091done
38092
38093  if test "x$ac_ct_AR" = x; then
38094    AR=""
38095  else
38096    case $cross_compiling:$ac_tool_warned in
38097yes:)
38098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38100ac_tool_warned=yes ;;
38101esac
38102    AR=$ac_ct_AR
38103  fi
38104fi
38105
38106    else
38107      # If it succeeded, then it was overridden by the user. We will use it
38108      # for the tool.
38109
38110      # First remove it from the list of overridden variables, so we can test
38111      # for unknown variables in the end.
38112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38113
38114      # Check if we try to supply an empty value
38115      if test "x$AR" = x; then
38116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38117$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38119$as_echo_n "checking for AR... " >&6; }
38120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38121$as_echo "disabled" >&6; }
38122      else
38123        # Check if the provided tool contains a complete path.
38124        tool_specified="$AR"
38125        tool_basename="${tool_specified##*/}"
38126        if test "x$tool_basename" = "x$tool_specified"; then
38127          # A command without a complete path is provided, search $PATH.
38128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38129$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38130          # Extract the first word of "$tool_basename", so it can be a program name with args.
38131set dummy $tool_basename; ac_word=$2
38132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38133$as_echo_n "checking for $ac_word... " >&6; }
38134if ${ac_cv_path_AR+:} false; then :
38135  $as_echo_n "(cached) " >&6
38136else
38137  case $AR in
38138  [\\/]* | ?:[\\/]*)
38139  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38140  ;;
38141  *)
38142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38143for as_dir in $PATH
38144do
38145  IFS=$as_save_IFS
38146  test -z "$as_dir" && as_dir=.
38147    for ac_exec_ext in '' $ac_executable_extensions; do
38148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38149    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38151    break 2
38152  fi
38153done
38154  done
38155IFS=$as_save_IFS
38156
38157  ;;
38158esac
38159fi
38160AR=$ac_cv_path_AR
38161if test -n "$AR"; then
38162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38163$as_echo "$AR" >&6; }
38164else
38165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38166$as_echo "no" >&6; }
38167fi
38168
38169
38170          if test "x$AR" = x; then
38171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38172          fi
38173        else
38174          # Otherwise we believe it is a complete path. Use it as it is.
38175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38176$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38178$as_echo_n "checking for AR... " >&6; }
38179          if test ! -x "$tool_specified"; then
38180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38181$as_echo "not found" >&6; }
38182            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38183          fi
38184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38185$as_echo "$tool_specified" >&6; }
38186        fi
38187      fi
38188    fi
38189
38190  fi
38191
38192
38193  else
38194
38195
38196  # Publish this variable in the help.
38197
38198
38199  if [ -z "${AR+x}" ]; then
38200    # The variable is not set by user, try to locate tool using the code snippet
38201    if test -n "$ac_tool_prefix"; then
38202  for ac_prog in ar
38203  do
38204    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38205set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38207$as_echo_n "checking for $ac_word... " >&6; }
38208if ${ac_cv_prog_AR+:} false; then :
38209  $as_echo_n "(cached) " >&6
38210else
38211  if test -n "$AR"; then
38212  ac_cv_prog_AR="$AR" # Let the user override the test.
38213else
38214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38215for as_dir in $PATH
38216do
38217  IFS=$as_save_IFS
38218  test -z "$as_dir" && as_dir=.
38219    for ac_exec_ext in '' $ac_executable_extensions; do
38220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38221    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38223    break 2
38224  fi
38225done
38226  done
38227IFS=$as_save_IFS
38228
38229fi
38230fi
38231AR=$ac_cv_prog_AR
38232if test -n "$AR"; then
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38234$as_echo "$AR" >&6; }
38235else
38236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38237$as_echo "no" >&6; }
38238fi
38239
38240
38241    test -n "$AR" && break
38242  done
38243fi
38244if test -z "$AR"; then
38245  ac_ct_AR=$AR
38246  for ac_prog in ar
38247do
38248  # Extract the first word of "$ac_prog", so it can be a program name with args.
38249set dummy $ac_prog; ac_word=$2
38250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38251$as_echo_n "checking for $ac_word... " >&6; }
38252if ${ac_cv_prog_ac_ct_AR+:} false; then :
38253  $as_echo_n "(cached) " >&6
38254else
38255  if test -n "$ac_ct_AR"; then
38256  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38257else
38258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38259for as_dir in $PATH
38260do
38261  IFS=$as_save_IFS
38262  test -z "$as_dir" && as_dir=.
38263    for ac_exec_ext in '' $ac_executable_extensions; do
38264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38265    ac_cv_prog_ac_ct_AR="$ac_prog"
38266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38267    break 2
38268  fi
38269done
38270  done
38271IFS=$as_save_IFS
38272
38273fi
38274fi
38275ac_ct_AR=$ac_cv_prog_ac_ct_AR
38276if test -n "$ac_ct_AR"; then
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38278$as_echo "$ac_ct_AR" >&6; }
38279else
38280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38281$as_echo "no" >&6; }
38282fi
38283
38284
38285  test -n "$ac_ct_AR" && break
38286done
38287
38288  if test "x$ac_ct_AR" = x; then
38289    AR=""
38290  else
38291    case $cross_compiling:$ac_tool_warned in
38292yes:)
38293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38295ac_tool_warned=yes ;;
38296esac
38297    AR=$ac_ct_AR
38298  fi
38299fi
38300
38301  else
38302    # The variable is set, but is it from the command line or the environment?
38303
38304    # Try to remove the string !AR! from our list.
38305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38307      # If it failed, the variable was not from the command line. Ignore it,
38308      # but warn the user (except for BASH, which is always set by the calling BASH).
38309      if test "xAR" != xBASH; then
38310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38311$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38312      fi
38313      # Try to locate tool using the code snippet
38314      if test -n "$ac_tool_prefix"; then
38315  for ac_prog in ar
38316  do
38317    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38318set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320$as_echo_n "checking for $ac_word... " >&6; }
38321if ${ac_cv_prog_AR+:} false; then :
38322  $as_echo_n "(cached) " >&6
38323else
38324  if test -n "$AR"; then
38325  ac_cv_prog_AR="$AR" # Let the user override the test.
38326else
38327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38328for as_dir in $PATH
38329do
38330  IFS=$as_save_IFS
38331  test -z "$as_dir" && as_dir=.
38332    for ac_exec_ext in '' $ac_executable_extensions; do
38333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38334    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38336    break 2
38337  fi
38338done
38339  done
38340IFS=$as_save_IFS
38341
38342fi
38343fi
38344AR=$ac_cv_prog_AR
38345if test -n "$AR"; then
38346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38347$as_echo "$AR" >&6; }
38348else
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38350$as_echo "no" >&6; }
38351fi
38352
38353
38354    test -n "$AR" && break
38355  done
38356fi
38357if test -z "$AR"; then
38358  ac_ct_AR=$AR
38359  for ac_prog in ar
38360do
38361  # Extract the first word of "$ac_prog", so it can be a program name with args.
38362set dummy $ac_prog; ac_word=$2
38363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38364$as_echo_n "checking for $ac_word... " >&6; }
38365if ${ac_cv_prog_ac_ct_AR+:} false; then :
38366  $as_echo_n "(cached) " >&6
38367else
38368  if test -n "$ac_ct_AR"; then
38369  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38370else
38371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38372for as_dir in $PATH
38373do
38374  IFS=$as_save_IFS
38375  test -z "$as_dir" && as_dir=.
38376    for ac_exec_ext in '' $ac_executable_extensions; do
38377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38378    ac_cv_prog_ac_ct_AR="$ac_prog"
38379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38380    break 2
38381  fi
38382done
38383  done
38384IFS=$as_save_IFS
38385
38386fi
38387fi
38388ac_ct_AR=$ac_cv_prog_ac_ct_AR
38389if test -n "$ac_ct_AR"; then
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38391$as_echo "$ac_ct_AR" >&6; }
38392else
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38394$as_echo "no" >&6; }
38395fi
38396
38397
38398  test -n "$ac_ct_AR" && break
38399done
38400
38401  if test "x$ac_ct_AR" = x; then
38402    AR=""
38403  else
38404    case $cross_compiling:$ac_tool_warned in
38405yes:)
38406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38408ac_tool_warned=yes ;;
38409esac
38410    AR=$ac_ct_AR
38411  fi
38412fi
38413
38414    else
38415      # If it succeeded, then it was overridden by the user. We will use it
38416      # for the tool.
38417
38418      # First remove it from the list of overridden variables, so we can test
38419      # for unknown variables in the end.
38420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38421
38422      # Check if we try to supply an empty value
38423      if test "x$AR" = x; then
38424        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38425$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38427$as_echo_n "checking for AR... " >&6; }
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38429$as_echo "disabled" >&6; }
38430      else
38431        # Check if the provided tool contains a complete path.
38432        tool_specified="$AR"
38433        tool_basename="${tool_specified##*/}"
38434        if test "x$tool_basename" = "x$tool_specified"; then
38435          # A command without a complete path is provided, search $PATH.
38436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38437$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38438          # Extract the first word of "$tool_basename", so it can be a program name with args.
38439set dummy $tool_basename; ac_word=$2
38440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38441$as_echo_n "checking for $ac_word... " >&6; }
38442if ${ac_cv_path_AR+:} false; then :
38443  $as_echo_n "(cached) " >&6
38444else
38445  case $AR in
38446  [\\/]* | ?:[\\/]*)
38447  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38448  ;;
38449  *)
38450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38451for as_dir in $PATH
38452do
38453  IFS=$as_save_IFS
38454  test -z "$as_dir" && as_dir=.
38455    for ac_exec_ext in '' $ac_executable_extensions; do
38456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38457    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38459    break 2
38460  fi
38461done
38462  done
38463IFS=$as_save_IFS
38464
38465  ;;
38466esac
38467fi
38468AR=$ac_cv_path_AR
38469if test -n "$AR"; then
38470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38471$as_echo "$AR" >&6; }
38472else
38473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38474$as_echo "no" >&6; }
38475fi
38476
38477
38478          if test "x$AR" = x; then
38479            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38480          fi
38481        else
38482          # Otherwise we believe it is a complete path. Use it as it is.
38483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38484$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38485          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38486$as_echo_n "checking for AR... " >&6; }
38487          if test ! -x "$tool_specified"; then
38488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38489$as_echo "not found" >&6; }
38490            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38491          fi
38492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38493$as_echo "$tool_specified" >&6; }
38494        fi
38495      fi
38496    fi
38497
38498  fi
38499
38500
38501  fi
38502
38503  # Only process if variable expands to non-empty
38504
38505  if test "x$AR" != x; then
38506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38507
38508  # First separate the path from the arguments. This will split at the first
38509  # space.
38510  complete="$AR"
38511  path="${complete%% *}"
38512  tmp="$complete EOL"
38513  arguments="${tmp#* }"
38514
38515  # Input might be given as Windows format, start by converting to
38516  # unix format.
38517  new_path=`$CYGPATH -u "$path"`
38518
38519  # Now try to locate executable using which
38520  new_path=`$WHICH "$new_path" 2> /dev/null`
38521  # bat and cmd files are not always considered executable in cygwin causing which
38522  # to not find them
38523  if test "x$new_path" = x \
38524      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38525      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38526    new_path=`$CYGPATH -u "$path"`
38527  fi
38528  if test "x$new_path" = x; then
38529    # Oops. Which didn't find the executable.
38530    # The splitting of arguments from the executable at a space might have been incorrect,
38531    # since paths with space are more likely in Windows. Give it another try with the whole
38532    # argument.
38533    path="$complete"
38534    arguments="EOL"
38535    new_path=`$CYGPATH -u "$path"`
38536    new_path=`$WHICH "$new_path" 2> /dev/null`
38537    # bat and cmd files are not always considered executable in cygwin causing which
38538    # to not find them
38539    if test "x$new_path" = x \
38540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38542      new_path=`$CYGPATH -u "$path"`
38543    fi
38544    if test "x$new_path" = x; then
38545      # It's still not found. Now this is an unrecoverable error.
38546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38547$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38548      has_space=`$ECHO "$complete" | $GREP " "`
38549      if test "x$has_space" != x; then
38550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38552      fi
38553      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38554    fi
38555  fi
38556
38557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38560  # "foo.exe" is OK but "foo" is an error.
38561  #
38562  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38563  # It is also a way to make sure we got the proper file name for the real test later on.
38564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38565  if test "x$test_shortpath" = x; then
38566    # Short path failed, file does not exist as specified.
38567    # Try adding .exe or .cmd
38568    if test -f "${new_path}.exe"; then
38569      input_to_shortpath="${new_path}.exe"
38570    elif test -f "${new_path}.cmd"; then
38571      input_to_shortpath="${new_path}.cmd"
38572    else
38573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38574$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38577      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38578    fi
38579  else
38580    input_to_shortpath="$new_path"
38581  fi
38582
38583  # Call helper function which possibly converts this using DOS-style short mode.
38584  # If so, the updated path is stored in $new_path.
38585  new_path="$input_to_shortpath"
38586
38587  input_path="$input_to_shortpath"
38588  # Check if we need to convert this using DOS-style short mode. If the path
38589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38590  # take no chances and rewrite it.
38591  # Note: m4 eats our [], so we need to use [ and ] instead.
38592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38593  if test "x$has_forbidden_chars" != x; then
38594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38598      # Going to short mode and back again did indeed matter. Since short mode is
38599      # case insensitive, let's make it lowercase to improve readability.
38600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38601      # Now convert it back to Unix-style (cygpath)
38602      input_path=`$CYGPATH -u "$shortmode_path"`
38603      new_path="$input_path"
38604    fi
38605  fi
38606
38607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38608  if test "x$test_cygdrive_prefix" = x; then
38609    # As a simple fix, exclude /usr/bin since it's not a real path.
38610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38612      # a path prefixed by /cygdrive for fixpath to work.
38613      new_path="$CYGWIN_ROOT_PATH$input_path"
38614    fi
38615  fi
38616
38617  # remove trailing .exe if any
38618  new_path="${new_path/%.exe/}"
38619
38620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38621
38622  # First separate the path from the arguments. This will split at the first
38623  # space.
38624  complete="$AR"
38625  path="${complete%% *}"
38626  tmp="$complete EOL"
38627  arguments="${tmp#* }"
38628
38629  # Input might be given as Windows format, start by converting to
38630  # unix format.
38631  new_path="$path"
38632
38633  windows_path="$new_path"
38634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38635    unix_path=`$CYGPATH -u "$windows_path"`
38636    new_path="$unix_path"
38637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38639    new_path="$unix_path"
38640  fi
38641
38642
38643  # Now try to locate executable using which
38644  new_path=`$WHICH "$new_path" 2> /dev/null`
38645
38646  if test "x$new_path" = x; then
38647    # Oops. Which didn't find the executable.
38648    # The splitting of arguments from the executable at a space might have been incorrect,
38649    # since paths with space are more likely in Windows. Give it another try with the whole
38650    # argument.
38651    path="$complete"
38652    arguments="EOL"
38653    new_path="$path"
38654
38655  windows_path="$new_path"
38656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38657    unix_path=`$CYGPATH -u "$windows_path"`
38658    new_path="$unix_path"
38659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38661    new_path="$unix_path"
38662  fi
38663
38664
38665    new_path=`$WHICH "$new_path" 2> /dev/null`
38666    # bat and cmd files are not always considered executable in MSYS causing which
38667    # to not find them
38668    if test "x$new_path" = x \
38669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38671      new_path="$path"
38672
38673  windows_path="$new_path"
38674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38675    unix_path=`$CYGPATH -u "$windows_path"`
38676    new_path="$unix_path"
38677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38679    new_path="$unix_path"
38680  fi
38681
38682    fi
38683
38684    if test "x$new_path" = x; then
38685      # It's still not found. Now this is an unrecoverable error.
38686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38687$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38688      has_space=`$ECHO "$complete" | $GREP " "`
38689      if test "x$has_space" != x; then
38690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38692      fi
38693      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38694    fi
38695  fi
38696
38697  # Now new_path has a complete unix path to the binary
38698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38699    # Keep paths in /bin as-is, but remove trailing .exe if any
38700    new_path="${new_path/%.exe/}"
38701    # Do not save /bin paths to all_fixpath_prefixes!
38702  else
38703    # Not in mixed or Windows style, start by that.
38704    new_path=`cmd //c echo $new_path`
38705
38706  input_path="$new_path"
38707  # Check if we need to convert this using DOS-style short mode. If the path
38708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38709  # take no chances and rewrite it.
38710  # Note: m4 eats our [], so we need to use [ and ] instead.
38711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38712  if test "x$has_forbidden_chars" != x; then
38713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38715  fi
38716
38717    # Output is in $new_path
38718
38719  windows_path="$new_path"
38720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38721    unix_path=`$CYGPATH -u "$windows_path"`
38722    new_path="$unix_path"
38723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38725    new_path="$unix_path"
38726  fi
38727
38728    # remove trailing .exe if any
38729    new_path="${new_path/%.exe/}"
38730
38731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38733  fi
38734
38735    else
38736      # We're on a unix platform. Hooray! :)
38737      # First separate the path from the arguments. This will split at the first
38738      # space.
38739      complete="$AR"
38740      path="${complete%% *}"
38741      tmp="$complete EOL"
38742      arguments="${tmp#* }"
38743
38744      # Cannot rely on the command "which" here since it doesn't always work.
38745      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38746      if test -z "$is_absolute_path"; then
38747        # Path to executable is not absolute. Find it.
38748        IFS_save="$IFS"
38749        IFS=:
38750        for p in $PATH; do
38751          if test -f "$p/$path" && test -x "$p/$path"; then
38752            new_path="$p/$path"
38753            break
38754          fi
38755        done
38756        IFS="$IFS_save"
38757      else
38758        # This is an absolute path, we can use it without further modifications.
38759        new_path="$path"
38760      fi
38761
38762      if test "x$new_path" = x; then
38763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38764$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38765        has_space=`$ECHO "$complete" | $GREP " "`
38766        if test "x$has_space" != x; then
38767          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38769        fi
38770        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38771      fi
38772    fi
38773
38774    # Now join together the path and the arguments once again
38775    if test "x$arguments" != xEOL; then
38776      new_complete="$new_path ${arguments% *}"
38777    else
38778      new_complete="$new_path"
38779    fi
38780
38781    if test "x$complete" != "x$new_complete"; then
38782      AR="$new_complete"
38783      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38784$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38785    fi
38786  fi
38787
38788
38789
38790  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38791
38792
38793  # Publish this variable in the help.
38794
38795
38796  if [ -z "${LIPO+x}" ]; then
38797    # The variable is not set by user, try to locate tool using the code snippet
38798    for ac_prog in lipo
38799do
38800  # Extract the first word of "$ac_prog", so it can be a program name with args.
38801set dummy $ac_prog; ac_word=$2
38802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38803$as_echo_n "checking for $ac_word... " >&6; }
38804if ${ac_cv_path_LIPO+:} false; then :
38805  $as_echo_n "(cached) " >&6
38806else
38807  case $LIPO in
38808  [\\/]* | ?:[\\/]*)
38809  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38810  ;;
38811  *)
38812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38813for as_dir in $PATH
38814do
38815  IFS=$as_save_IFS
38816  test -z "$as_dir" && as_dir=.
38817    for ac_exec_ext in '' $ac_executable_extensions; do
38818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38819    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38821    break 2
38822  fi
38823done
38824  done
38825IFS=$as_save_IFS
38826
38827  ;;
38828esac
38829fi
38830LIPO=$ac_cv_path_LIPO
38831if test -n "$LIPO"; then
38832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38833$as_echo "$LIPO" >&6; }
38834else
38835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38836$as_echo "no" >&6; }
38837fi
38838
38839
38840  test -n "$LIPO" && break
38841done
38842
38843  else
38844    # The variable is set, but is it from the command line or the environment?
38845
38846    # Try to remove the string !LIPO! from our list.
38847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38849      # If it failed, the variable was not from the command line. Ignore it,
38850      # but warn the user (except for BASH, which is always set by the calling BASH).
38851      if test "xLIPO" != xBASH; then
38852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38853$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38854      fi
38855      # Try to locate tool using the code snippet
38856      for ac_prog in lipo
38857do
38858  # Extract the first word of "$ac_prog", so it can be a program name with args.
38859set dummy $ac_prog; ac_word=$2
38860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38861$as_echo_n "checking for $ac_word... " >&6; }
38862if ${ac_cv_path_LIPO+:} false; then :
38863  $as_echo_n "(cached) " >&6
38864else
38865  case $LIPO in
38866  [\\/]* | ?:[\\/]*)
38867  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38868  ;;
38869  *)
38870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38871for as_dir in $PATH
38872do
38873  IFS=$as_save_IFS
38874  test -z "$as_dir" && as_dir=.
38875    for ac_exec_ext in '' $ac_executable_extensions; do
38876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38877    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38879    break 2
38880  fi
38881done
38882  done
38883IFS=$as_save_IFS
38884
38885  ;;
38886esac
38887fi
38888LIPO=$ac_cv_path_LIPO
38889if test -n "$LIPO"; then
38890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38891$as_echo "$LIPO" >&6; }
38892else
38893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38894$as_echo "no" >&6; }
38895fi
38896
38897
38898  test -n "$LIPO" && break
38899done
38900
38901    else
38902      # If it succeeded, then it was overridden by the user. We will use it
38903      # for the tool.
38904
38905      # First remove it from the list of overridden variables, so we can test
38906      # for unknown variables in the end.
38907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38908
38909      # Check if we try to supply an empty value
38910      if test "x$LIPO" = x; then
38911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38912$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38914$as_echo_n "checking for LIPO... " >&6; }
38915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38916$as_echo "disabled" >&6; }
38917      else
38918        # Check if the provided tool contains a complete path.
38919        tool_specified="$LIPO"
38920        tool_basename="${tool_specified##*/}"
38921        if test "x$tool_basename" = "x$tool_specified"; then
38922          # A command without a complete path is provided, search $PATH.
38923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38924$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38925          # Extract the first word of "$tool_basename", so it can be a program name with args.
38926set dummy $tool_basename; ac_word=$2
38927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38928$as_echo_n "checking for $ac_word... " >&6; }
38929if ${ac_cv_path_LIPO+:} false; then :
38930  $as_echo_n "(cached) " >&6
38931else
38932  case $LIPO in
38933  [\\/]* | ?:[\\/]*)
38934  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38935  ;;
38936  *)
38937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38938for as_dir in $PATH
38939do
38940  IFS=$as_save_IFS
38941  test -z "$as_dir" && as_dir=.
38942    for ac_exec_ext in '' $ac_executable_extensions; do
38943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38944    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38946    break 2
38947  fi
38948done
38949  done
38950IFS=$as_save_IFS
38951
38952  ;;
38953esac
38954fi
38955LIPO=$ac_cv_path_LIPO
38956if test -n "$LIPO"; then
38957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38958$as_echo "$LIPO" >&6; }
38959else
38960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38961$as_echo "no" >&6; }
38962fi
38963
38964
38965          if test "x$LIPO" = x; then
38966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38967          fi
38968        else
38969          # Otherwise we believe it is a complete path. Use it as it is.
38970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38971$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38973$as_echo_n "checking for LIPO... " >&6; }
38974          if test ! -x "$tool_specified"; then
38975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38976$as_echo "not found" >&6; }
38977            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38978          fi
38979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38980$as_echo "$tool_specified" >&6; }
38981        fi
38982      fi
38983    fi
38984
38985  fi
38986
38987
38988
38989  # Only process if variable expands to non-empty
38990
38991  if test "x$LIPO" != x; then
38992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38993
38994  # First separate the path from the arguments. This will split at the first
38995  # space.
38996  complete="$LIPO"
38997  path="${complete%% *}"
38998  tmp="$complete EOL"
38999  arguments="${tmp#* }"
39000
39001  # Input might be given as Windows format, start by converting to
39002  # unix format.
39003  new_path=`$CYGPATH -u "$path"`
39004
39005  # Now try to locate executable using which
39006  new_path=`$WHICH "$new_path" 2> /dev/null`
39007  # bat and cmd files are not always considered executable in cygwin causing which
39008  # to not find them
39009  if test "x$new_path" = x \
39010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39012    new_path=`$CYGPATH -u "$path"`
39013  fi
39014  if test "x$new_path" = x; then
39015    # Oops. Which didn't find the executable.
39016    # The splitting of arguments from the executable at a space might have been incorrect,
39017    # since paths with space are more likely in Windows. Give it another try with the whole
39018    # argument.
39019    path="$complete"
39020    arguments="EOL"
39021    new_path=`$CYGPATH -u "$path"`
39022    new_path=`$WHICH "$new_path" 2> /dev/null`
39023    # bat and cmd files are not always considered executable in cygwin causing which
39024    # to not find them
39025    if test "x$new_path" = x \
39026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39028      new_path=`$CYGPATH -u "$path"`
39029    fi
39030    if test "x$new_path" = x; then
39031      # It's still not found. Now this is an unrecoverable error.
39032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39033$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39034      has_space=`$ECHO "$complete" | $GREP " "`
39035      if test "x$has_space" != x; then
39036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39038      fi
39039      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39040    fi
39041  fi
39042
39043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39046  # "foo.exe" is OK but "foo" is an error.
39047  #
39048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39049  # It is also a way to make sure we got the proper file name for the real test later on.
39050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39051  if test "x$test_shortpath" = x; then
39052    # Short path failed, file does not exist as specified.
39053    # Try adding .exe or .cmd
39054    if test -f "${new_path}.exe"; then
39055      input_to_shortpath="${new_path}.exe"
39056    elif test -f "${new_path}.cmd"; then
39057      input_to_shortpath="${new_path}.cmd"
39058    else
39059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39060$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39063      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39064    fi
39065  else
39066    input_to_shortpath="$new_path"
39067  fi
39068
39069  # Call helper function which possibly converts this using DOS-style short mode.
39070  # If so, the updated path is stored in $new_path.
39071  new_path="$input_to_shortpath"
39072
39073  input_path="$input_to_shortpath"
39074  # Check if we need to convert this using DOS-style short mode. If the path
39075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39076  # take no chances and rewrite it.
39077  # Note: m4 eats our [], so we need to use [ and ] instead.
39078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39079  if test "x$has_forbidden_chars" != x; then
39080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39084      # Going to short mode and back again did indeed matter. Since short mode is
39085      # case insensitive, let's make it lowercase to improve readability.
39086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39087      # Now convert it back to Unix-style (cygpath)
39088      input_path=`$CYGPATH -u "$shortmode_path"`
39089      new_path="$input_path"
39090    fi
39091  fi
39092
39093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39094  if test "x$test_cygdrive_prefix" = x; then
39095    # As a simple fix, exclude /usr/bin since it's not a real path.
39096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39098      # a path prefixed by /cygdrive for fixpath to work.
39099      new_path="$CYGWIN_ROOT_PATH$input_path"
39100    fi
39101  fi
39102
39103  # remove trailing .exe if any
39104  new_path="${new_path/%.exe/}"
39105
39106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39107
39108  # First separate the path from the arguments. This will split at the first
39109  # space.
39110  complete="$LIPO"
39111  path="${complete%% *}"
39112  tmp="$complete EOL"
39113  arguments="${tmp#* }"
39114
39115  # Input might be given as Windows format, start by converting to
39116  # unix format.
39117  new_path="$path"
39118
39119  windows_path="$new_path"
39120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39121    unix_path=`$CYGPATH -u "$windows_path"`
39122    new_path="$unix_path"
39123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39125    new_path="$unix_path"
39126  fi
39127
39128
39129  # Now try to locate executable using which
39130  new_path=`$WHICH "$new_path" 2> /dev/null`
39131
39132  if test "x$new_path" = x; then
39133    # Oops. Which didn't find the executable.
39134    # The splitting of arguments from the executable at a space might have been incorrect,
39135    # since paths with space are more likely in Windows. Give it another try with the whole
39136    # argument.
39137    path="$complete"
39138    arguments="EOL"
39139    new_path="$path"
39140
39141  windows_path="$new_path"
39142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39143    unix_path=`$CYGPATH -u "$windows_path"`
39144    new_path="$unix_path"
39145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39147    new_path="$unix_path"
39148  fi
39149
39150
39151    new_path=`$WHICH "$new_path" 2> /dev/null`
39152    # bat and cmd files are not always considered executable in MSYS causing which
39153    # to not find them
39154    if test "x$new_path" = x \
39155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39157      new_path="$path"
39158
39159  windows_path="$new_path"
39160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39161    unix_path=`$CYGPATH -u "$windows_path"`
39162    new_path="$unix_path"
39163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39165    new_path="$unix_path"
39166  fi
39167
39168    fi
39169
39170    if test "x$new_path" = x; then
39171      # It's still not found. Now this is an unrecoverable error.
39172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39173$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39174      has_space=`$ECHO "$complete" | $GREP " "`
39175      if test "x$has_space" != x; then
39176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39178      fi
39179      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39180    fi
39181  fi
39182
39183  # Now new_path has a complete unix path to the binary
39184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39185    # Keep paths in /bin as-is, but remove trailing .exe if any
39186    new_path="${new_path/%.exe/}"
39187    # Do not save /bin paths to all_fixpath_prefixes!
39188  else
39189    # Not in mixed or Windows style, start by that.
39190    new_path=`cmd //c echo $new_path`
39191
39192  input_path="$new_path"
39193  # Check if we need to convert this using DOS-style short mode. If the path
39194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39195  # take no chances and rewrite it.
39196  # Note: m4 eats our [], so we need to use [ and ] instead.
39197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39198  if test "x$has_forbidden_chars" != x; then
39199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39201  fi
39202
39203    # Output is in $new_path
39204
39205  windows_path="$new_path"
39206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39207    unix_path=`$CYGPATH -u "$windows_path"`
39208    new_path="$unix_path"
39209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39211    new_path="$unix_path"
39212  fi
39213
39214    # remove trailing .exe if any
39215    new_path="${new_path/%.exe/}"
39216
39217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39219  fi
39220
39221    else
39222      # We're on a unix platform. Hooray! :)
39223      # First separate the path from the arguments. This will split at the first
39224      # space.
39225      complete="$LIPO"
39226      path="${complete%% *}"
39227      tmp="$complete EOL"
39228      arguments="${tmp#* }"
39229
39230      # Cannot rely on the command "which" here since it doesn't always work.
39231      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39232      if test -z "$is_absolute_path"; then
39233        # Path to executable is not absolute. Find it.
39234        IFS_save="$IFS"
39235        IFS=:
39236        for p in $PATH; do
39237          if test -f "$p/$path" && test -x "$p/$path"; then
39238            new_path="$p/$path"
39239            break
39240          fi
39241        done
39242        IFS="$IFS_save"
39243      else
39244        # This is an absolute path, we can use it without further modifications.
39245        new_path="$path"
39246      fi
39247
39248      if test "x$new_path" = x; then
39249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39250$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39251        has_space=`$ECHO "$complete" | $GREP " "`
39252        if test "x$has_space" != x; then
39253          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39255        fi
39256        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39257      fi
39258    fi
39259
39260    # Now join together the path and the arguments once again
39261    if test "x$arguments" != xEOL; then
39262      new_complete="$new_path ${arguments% *}"
39263    else
39264      new_complete="$new_path"
39265    fi
39266
39267    if test "x$complete" != "x$new_complete"; then
39268      LIPO="$new_complete"
39269      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39270$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39271    fi
39272  fi
39273
39274  fi
39275
39276  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39277    # Extract the first word of "mt", so it can be a program name with args.
39278set dummy mt; ac_word=$2
39279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39280$as_echo_n "checking for $ac_word... " >&6; }
39281if ${ac_cv_prog_MT+:} false; then :
39282  $as_echo_n "(cached) " >&6
39283else
39284  if test -n "$MT"; then
39285  ac_cv_prog_MT="$MT" # Let the user override the test.
39286else
39287  ac_prog_rejected=no
39288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39289for as_dir in $PATH
39290do
39291  IFS=$as_save_IFS
39292  test -z "$as_dir" && as_dir=.
39293    for ac_exec_ext in '' $ac_executable_extensions; do
39294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39295    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39296       ac_prog_rejected=yes
39297       continue
39298     fi
39299    ac_cv_prog_MT="mt"
39300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39301    break 2
39302  fi
39303done
39304  done
39305IFS=$as_save_IFS
39306
39307if test $ac_prog_rejected = yes; then
39308  # We found a bogon in the path, so make sure we never use it.
39309  set dummy $ac_cv_prog_MT
39310  shift
39311  if test $# != 0; then
39312    # We chose a different compiler from the bogus one.
39313    # However, it has the same basename, so the bogon will be chosen
39314    # first if we set MT to just the basename; use the full file name.
39315    shift
39316    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39317  fi
39318fi
39319fi
39320fi
39321MT=$ac_cv_prog_MT
39322if test -n "$MT"; then
39323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39324$as_echo "$MT" >&6; }
39325else
39326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39327$as_echo "no" >&6; }
39328fi
39329
39330
39331
39332  # Only process if variable expands to non-empty
39333
39334  if test "x$MT" != x; then
39335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39336
39337  # First separate the path from the arguments. This will split at the first
39338  # space.
39339  complete="$MT"
39340  path="${complete%% *}"
39341  tmp="$complete EOL"
39342  arguments="${tmp#* }"
39343
39344  # Input might be given as Windows format, start by converting to
39345  # unix format.
39346  new_path=`$CYGPATH -u "$path"`
39347
39348  # Now try to locate executable using which
39349  new_path=`$WHICH "$new_path" 2> /dev/null`
39350  # bat and cmd files are not always considered executable in cygwin causing which
39351  # to not find them
39352  if test "x$new_path" = x \
39353      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39354      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39355    new_path=`$CYGPATH -u "$path"`
39356  fi
39357  if test "x$new_path" = x; then
39358    # Oops. Which didn't find the executable.
39359    # The splitting of arguments from the executable at a space might have been incorrect,
39360    # since paths with space are more likely in Windows. Give it another try with the whole
39361    # argument.
39362    path="$complete"
39363    arguments="EOL"
39364    new_path=`$CYGPATH -u "$path"`
39365    new_path=`$WHICH "$new_path" 2> /dev/null`
39366    # bat and cmd files are not always considered executable in cygwin causing which
39367    # to not find them
39368    if test "x$new_path" = x \
39369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39371      new_path=`$CYGPATH -u "$path"`
39372    fi
39373    if test "x$new_path" = x; then
39374      # It's still not found. Now this is an unrecoverable error.
39375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39376$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39377      has_space=`$ECHO "$complete" | $GREP " "`
39378      if test "x$has_space" != x; then
39379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39381      fi
39382      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39383    fi
39384  fi
39385
39386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39389  # "foo.exe" is OK but "foo" is an error.
39390  #
39391  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39392  # It is also a way to make sure we got the proper file name for the real test later on.
39393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39394  if test "x$test_shortpath" = x; then
39395    # Short path failed, file does not exist as specified.
39396    # Try adding .exe or .cmd
39397    if test -f "${new_path}.exe"; then
39398      input_to_shortpath="${new_path}.exe"
39399    elif test -f "${new_path}.cmd"; then
39400      input_to_shortpath="${new_path}.cmd"
39401    else
39402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39403$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39406      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39407    fi
39408  else
39409    input_to_shortpath="$new_path"
39410  fi
39411
39412  # Call helper function which possibly converts this using DOS-style short mode.
39413  # If so, the updated path is stored in $new_path.
39414  new_path="$input_to_shortpath"
39415
39416  input_path="$input_to_shortpath"
39417  # Check if we need to convert this using DOS-style short mode. If the path
39418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39419  # take no chances and rewrite it.
39420  # Note: m4 eats our [], so we need to use [ and ] instead.
39421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39422  if test "x$has_forbidden_chars" != x; then
39423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39427      # Going to short mode and back again did indeed matter. Since short mode is
39428      # case insensitive, let's make it lowercase to improve readability.
39429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39430      # Now convert it back to Unix-style (cygpath)
39431      input_path=`$CYGPATH -u "$shortmode_path"`
39432      new_path="$input_path"
39433    fi
39434  fi
39435
39436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39437  if test "x$test_cygdrive_prefix" = x; then
39438    # As a simple fix, exclude /usr/bin since it's not a real path.
39439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39441      # a path prefixed by /cygdrive for fixpath to work.
39442      new_path="$CYGWIN_ROOT_PATH$input_path"
39443    fi
39444  fi
39445
39446  # remove trailing .exe if any
39447  new_path="${new_path/%.exe/}"
39448
39449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39450
39451  # First separate the path from the arguments. This will split at the first
39452  # space.
39453  complete="$MT"
39454  path="${complete%% *}"
39455  tmp="$complete EOL"
39456  arguments="${tmp#* }"
39457
39458  # Input might be given as Windows format, start by converting to
39459  # unix format.
39460  new_path="$path"
39461
39462  windows_path="$new_path"
39463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39464    unix_path=`$CYGPATH -u "$windows_path"`
39465    new_path="$unix_path"
39466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39468    new_path="$unix_path"
39469  fi
39470
39471
39472  # Now try to locate executable using which
39473  new_path=`$WHICH "$new_path" 2> /dev/null`
39474
39475  if test "x$new_path" = x; then
39476    # Oops. Which didn't find the executable.
39477    # The splitting of arguments from the executable at a space might have been incorrect,
39478    # since paths with space are more likely in Windows. Give it another try with the whole
39479    # argument.
39480    path="$complete"
39481    arguments="EOL"
39482    new_path="$path"
39483
39484  windows_path="$new_path"
39485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39486    unix_path=`$CYGPATH -u "$windows_path"`
39487    new_path="$unix_path"
39488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39490    new_path="$unix_path"
39491  fi
39492
39493
39494    new_path=`$WHICH "$new_path" 2> /dev/null`
39495    # bat and cmd files are not always considered executable in MSYS causing which
39496    # to not find them
39497    if test "x$new_path" = x \
39498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39500      new_path="$path"
39501
39502  windows_path="$new_path"
39503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39504    unix_path=`$CYGPATH -u "$windows_path"`
39505    new_path="$unix_path"
39506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39508    new_path="$unix_path"
39509  fi
39510
39511    fi
39512
39513    if test "x$new_path" = x; then
39514      # It's still not found. Now this is an unrecoverable error.
39515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39516$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39517      has_space=`$ECHO "$complete" | $GREP " "`
39518      if test "x$has_space" != x; then
39519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39521      fi
39522      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39523    fi
39524  fi
39525
39526  # Now new_path has a complete unix path to the binary
39527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39528    # Keep paths in /bin as-is, but remove trailing .exe if any
39529    new_path="${new_path/%.exe/}"
39530    # Do not save /bin paths to all_fixpath_prefixes!
39531  else
39532    # Not in mixed or Windows style, start by that.
39533    new_path=`cmd //c echo $new_path`
39534
39535  input_path="$new_path"
39536  # Check if we need to convert this using DOS-style short mode. If the path
39537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39538  # take no chances and rewrite it.
39539  # Note: m4 eats our [], so we need to use [ and ] instead.
39540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39541  if test "x$has_forbidden_chars" != x; then
39542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39544  fi
39545
39546    # Output is in $new_path
39547
39548  windows_path="$new_path"
39549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39550    unix_path=`$CYGPATH -u "$windows_path"`
39551    new_path="$unix_path"
39552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39554    new_path="$unix_path"
39555  fi
39556
39557    # remove trailing .exe if any
39558    new_path="${new_path/%.exe/}"
39559
39560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39562  fi
39563
39564    else
39565      # We're on a unix platform. Hooray! :)
39566      # First separate the path from the arguments. This will split at the first
39567      # space.
39568      complete="$MT"
39569      path="${complete%% *}"
39570      tmp="$complete EOL"
39571      arguments="${tmp#* }"
39572
39573      # Cannot rely on the command "which" here since it doesn't always work.
39574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39575      if test -z "$is_absolute_path"; then
39576        # Path to executable is not absolute. Find it.
39577        IFS_save="$IFS"
39578        IFS=:
39579        for p in $PATH; do
39580          if test -f "$p/$path" && test -x "$p/$path"; then
39581            new_path="$p/$path"
39582            break
39583          fi
39584        done
39585        IFS="$IFS_save"
39586      else
39587        # This is an absolute path, we can use it without further modifications.
39588        new_path="$path"
39589      fi
39590
39591      if test "x$new_path" = x; then
39592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39593$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39594        has_space=`$ECHO "$complete" | $GREP " "`
39595        if test "x$has_space" != x; then
39596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39598        fi
39599        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39600      fi
39601    fi
39602
39603    # Now join together the path and the arguments once again
39604    if test "x$arguments" != xEOL; then
39605      new_complete="$new_path ${arguments% *}"
39606    else
39607      new_complete="$new_path"
39608    fi
39609
39610    if test "x$complete" != "x$new_complete"; then
39611      MT="$new_complete"
39612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39613$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39614    fi
39615  fi
39616
39617    # Setup the resource compiler (RC)
39618    # Extract the first word of "rc", so it can be a program name with args.
39619set dummy rc; ac_word=$2
39620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39621$as_echo_n "checking for $ac_word... " >&6; }
39622if ${ac_cv_prog_RC+:} false; then :
39623  $as_echo_n "(cached) " >&6
39624else
39625  if test -n "$RC"; then
39626  ac_cv_prog_RC="$RC" # Let the user override the test.
39627else
39628  ac_prog_rejected=no
39629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39630for as_dir in $PATH
39631do
39632  IFS=$as_save_IFS
39633  test -z "$as_dir" && as_dir=.
39634    for ac_exec_ext in '' $ac_executable_extensions; do
39635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39636    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39637       ac_prog_rejected=yes
39638       continue
39639     fi
39640    ac_cv_prog_RC="rc"
39641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39642    break 2
39643  fi
39644done
39645  done
39646IFS=$as_save_IFS
39647
39648if test $ac_prog_rejected = yes; then
39649  # We found a bogon in the path, so make sure we never use it.
39650  set dummy $ac_cv_prog_RC
39651  shift
39652  if test $# != 0; then
39653    # We chose a different compiler from the bogus one.
39654    # However, it has the same basename, so the bogon will be chosen
39655    # first if we set RC to just the basename; use the full file name.
39656    shift
39657    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39658  fi
39659fi
39660fi
39661fi
39662RC=$ac_cv_prog_RC
39663if test -n "$RC"; then
39664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39665$as_echo "$RC" >&6; }
39666else
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39668$as_echo "no" >&6; }
39669fi
39670
39671
39672
39673  # Only process if variable expands to non-empty
39674
39675  if test "x$RC" != x; then
39676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39677
39678  # First separate the path from the arguments. This will split at the first
39679  # space.
39680  complete="$RC"
39681  path="${complete%% *}"
39682  tmp="$complete EOL"
39683  arguments="${tmp#* }"
39684
39685  # Input might be given as Windows format, start by converting to
39686  # unix format.
39687  new_path=`$CYGPATH -u "$path"`
39688
39689  # Now try to locate executable using which
39690  new_path=`$WHICH "$new_path" 2> /dev/null`
39691  # bat and cmd files are not always considered executable in cygwin causing which
39692  # to not find them
39693  if test "x$new_path" = x \
39694      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39695      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39696    new_path=`$CYGPATH -u "$path"`
39697  fi
39698  if test "x$new_path" = x; then
39699    # Oops. Which didn't find the executable.
39700    # The splitting of arguments from the executable at a space might have been incorrect,
39701    # since paths with space are more likely in Windows. Give it another try with the whole
39702    # argument.
39703    path="$complete"
39704    arguments="EOL"
39705    new_path=`$CYGPATH -u "$path"`
39706    new_path=`$WHICH "$new_path" 2> /dev/null`
39707    # bat and cmd files are not always considered executable in cygwin causing which
39708    # to not find them
39709    if test "x$new_path" = x \
39710        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39711        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39712      new_path=`$CYGPATH -u "$path"`
39713    fi
39714    if test "x$new_path" = x; then
39715      # It's still not found. Now this is an unrecoverable error.
39716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39717$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39718      has_space=`$ECHO "$complete" | $GREP " "`
39719      if test "x$has_space" != x; then
39720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39722      fi
39723      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39724    fi
39725  fi
39726
39727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39730  # "foo.exe" is OK but "foo" is an error.
39731  #
39732  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39733  # It is also a way to make sure we got the proper file name for the real test later on.
39734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39735  if test "x$test_shortpath" = x; then
39736    # Short path failed, file does not exist as specified.
39737    # Try adding .exe or .cmd
39738    if test -f "${new_path}.exe"; then
39739      input_to_shortpath="${new_path}.exe"
39740    elif test -f "${new_path}.cmd"; then
39741      input_to_shortpath="${new_path}.cmd"
39742    else
39743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39744$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39745      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39746$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39747      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39748    fi
39749  else
39750    input_to_shortpath="$new_path"
39751  fi
39752
39753  # Call helper function which possibly converts this using DOS-style short mode.
39754  # If so, the updated path is stored in $new_path.
39755  new_path="$input_to_shortpath"
39756
39757  input_path="$input_to_shortpath"
39758  # Check if we need to convert this using DOS-style short mode. If the path
39759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39760  # take no chances and rewrite it.
39761  # Note: m4 eats our [], so we need to use [ and ] instead.
39762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39763  if test "x$has_forbidden_chars" != x; then
39764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39768      # Going to short mode and back again did indeed matter. Since short mode is
39769      # case insensitive, let's make it lowercase to improve readability.
39770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39771      # Now convert it back to Unix-style (cygpath)
39772      input_path=`$CYGPATH -u "$shortmode_path"`
39773      new_path="$input_path"
39774    fi
39775  fi
39776
39777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39778  if test "x$test_cygdrive_prefix" = x; then
39779    # As a simple fix, exclude /usr/bin since it's not a real path.
39780    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39782      # a path prefixed by /cygdrive for fixpath to work.
39783      new_path="$CYGWIN_ROOT_PATH$input_path"
39784    fi
39785  fi
39786
39787  # remove trailing .exe if any
39788  new_path="${new_path/%.exe/}"
39789
39790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39791
39792  # First separate the path from the arguments. This will split at the first
39793  # space.
39794  complete="$RC"
39795  path="${complete%% *}"
39796  tmp="$complete EOL"
39797  arguments="${tmp#* }"
39798
39799  # Input might be given as Windows format, start by converting to
39800  # unix format.
39801  new_path="$path"
39802
39803  windows_path="$new_path"
39804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39805    unix_path=`$CYGPATH -u "$windows_path"`
39806    new_path="$unix_path"
39807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39809    new_path="$unix_path"
39810  fi
39811
39812
39813  # Now try to locate executable using which
39814  new_path=`$WHICH "$new_path" 2> /dev/null`
39815
39816  if test "x$new_path" = x; then
39817    # Oops. Which didn't find the executable.
39818    # The splitting of arguments from the executable at a space might have been incorrect,
39819    # since paths with space are more likely in Windows. Give it another try with the whole
39820    # argument.
39821    path="$complete"
39822    arguments="EOL"
39823    new_path="$path"
39824
39825  windows_path="$new_path"
39826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39827    unix_path=`$CYGPATH -u "$windows_path"`
39828    new_path="$unix_path"
39829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39831    new_path="$unix_path"
39832  fi
39833
39834
39835    new_path=`$WHICH "$new_path" 2> /dev/null`
39836    # bat and cmd files are not always considered executable in MSYS causing which
39837    # to not find them
39838    if test "x$new_path" = x \
39839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39841      new_path="$path"
39842
39843  windows_path="$new_path"
39844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39845    unix_path=`$CYGPATH -u "$windows_path"`
39846    new_path="$unix_path"
39847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39849    new_path="$unix_path"
39850  fi
39851
39852    fi
39853
39854    if test "x$new_path" = x; then
39855      # It's still not found. Now this is an unrecoverable error.
39856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39857$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39858      has_space=`$ECHO "$complete" | $GREP " "`
39859      if test "x$has_space" != x; then
39860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39862      fi
39863      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39864    fi
39865  fi
39866
39867  # Now new_path has a complete unix path to the binary
39868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39869    # Keep paths in /bin as-is, but remove trailing .exe if any
39870    new_path="${new_path/%.exe/}"
39871    # Do not save /bin paths to all_fixpath_prefixes!
39872  else
39873    # Not in mixed or Windows style, start by that.
39874    new_path=`cmd //c echo $new_path`
39875
39876  input_path="$new_path"
39877  # Check if we need to convert this using DOS-style short mode. If the path
39878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39879  # take no chances and rewrite it.
39880  # Note: m4 eats our [], so we need to use [ and ] instead.
39881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39882  if test "x$has_forbidden_chars" != x; then
39883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39885  fi
39886
39887    # Output is in $new_path
39888
39889  windows_path="$new_path"
39890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39891    unix_path=`$CYGPATH -u "$windows_path"`
39892    new_path="$unix_path"
39893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39895    new_path="$unix_path"
39896  fi
39897
39898    # remove trailing .exe if any
39899    new_path="${new_path/%.exe/}"
39900
39901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39903  fi
39904
39905    else
39906      # We're on a unix platform. Hooray! :)
39907      # First separate the path from the arguments. This will split at the first
39908      # space.
39909      complete="$RC"
39910      path="${complete%% *}"
39911      tmp="$complete EOL"
39912      arguments="${tmp#* }"
39913
39914      # Cannot rely on the command "which" here since it doesn't always work.
39915      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39916      if test -z "$is_absolute_path"; then
39917        # Path to executable is not absolute. Find it.
39918        IFS_save="$IFS"
39919        IFS=:
39920        for p in $PATH; do
39921          if test -f "$p/$path" && test -x "$p/$path"; then
39922            new_path="$p/$path"
39923            break
39924          fi
39925        done
39926        IFS="$IFS_save"
39927      else
39928        # This is an absolute path, we can use it without further modifications.
39929        new_path="$path"
39930      fi
39931
39932      if test "x$new_path" = x; then
39933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39934$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39935        has_space=`$ECHO "$complete" | $GREP " "`
39936        if test "x$has_space" != x; then
39937          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39938$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39939        fi
39940        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39941      fi
39942    fi
39943
39944    # Now join together the path and the arguments once again
39945    if test "x$arguments" != xEOL; then
39946      new_complete="$new_path ${arguments% *}"
39947    else
39948      new_complete="$new_path"
39949    fi
39950
39951    if test "x$complete" != "x$new_complete"; then
39952      RC="$new_complete"
39953      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39954$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39955    fi
39956  fi
39957
39958    # Extract the first word of "dumpbin", so it can be a program name with args.
39959set dummy dumpbin; ac_word=$2
39960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39961$as_echo_n "checking for $ac_word... " >&6; }
39962if ${ac_cv_prog_DUMPBIN+:} false; then :
39963  $as_echo_n "(cached) " >&6
39964else
39965  if test -n "$DUMPBIN"; then
39966  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39967else
39968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39969for as_dir in $PATH
39970do
39971  IFS=$as_save_IFS
39972  test -z "$as_dir" && as_dir=.
39973    for ac_exec_ext in '' $ac_executable_extensions; do
39974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39975    ac_cv_prog_DUMPBIN="dumpbin"
39976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39977    break 2
39978  fi
39979done
39980  done
39981IFS=$as_save_IFS
39982
39983fi
39984fi
39985DUMPBIN=$ac_cv_prog_DUMPBIN
39986if test -n "$DUMPBIN"; then
39987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39988$as_echo "$DUMPBIN" >&6; }
39989else
39990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39991$as_echo "no" >&6; }
39992fi
39993
39994
39995
39996  # Only process if variable expands to non-empty
39997
39998  if test "x$DUMPBIN" != x; then
39999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40000
40001  # First separate the path from the arguments. This will split at the first
40002  # space.
40003  complete="$DUMPBIN"
40004  path="${complete%% *}"
40005  tmp="$complete EOL"
40006  arguments="${tmp#* }"
40007
40008  # Input might be given as Windows format, start by converting to
40009  # unix format.
40010  new_path=`$CYGPATH -u "$path"`
40011
40012  # Now try to locate executable using which
40013  new_path=`$WHICH "$new_path" 2> /dev/null`
40014  # bat and cmd files are not always considered executable in cygwin causing which
40015  # to not find them
40016  if test "x$new_path" = x \
40017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40019    new_path=`$CYGPATH -u "$path"`
40020  fi
40021  if test "x$new_path" = x; then
40022    # Oops. Which didn't find the executable.
40023    # The splitting of arguments from the executable at a space might have been incorrect,
40024    # since paths with space are more likely in Windows. Give it another try with the whole
40025    # argument.
40026    path="$complete"
40027    arguments="EOL"
40028    new_path=`$CYGPATH -u "$path"`
40029    new_path=`$WHICH "$new_path" 2> /dev/null`
40030    # bat and cmd files are not always considered executable in cygwin causing which
40031    # to not find them
40032    if test "x$new_path" = x \
40033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40035      new_path=`$CYGPATH -u "$path"`
40036    fi
40037    if test "x$new_path" = x; then
40038      # It's still not found. Now this is an unrecoverable error.
40039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40040$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40041      has_space=`$ECHO "$complete" | $GREP " "`
40042      if test "x$has_space" != x; then
40043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40045      fi
40046      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40047    fi
40048  fi
40049
40050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40053  # "foo.exe" is OK but "foo" is an error.
40054  #
40055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40056  # It is also a way to make sure we got the proper file name for the real test later on.
40057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40058  if test "x$test_shortpath" = x; then
40059    # Short path failed, file does not exist as specified.
40060    # Try adding .exe or .cmd
40061    if test -f "${new_path}.exe"; then
40062      input_to_shortpath="${new_path}.exe"
40063    elif test -f "${new_path}.cmd"; then
40064      input_to_shortpath="${new_path}.cmd"
40065    else
40066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40067$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40070      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40071    fi
40072  else
40073    input_to_shortpath="$new_path"
40074  fi
40075
40076  # Call helper function which possibly converts this using DOS-style short mode.
40077  # If so, the updated path is stored in $new_path.
40078  new_path="$input_to_shortpath"
40079
40080  input_path="$input_to_shortpath"
40081  # Check if we need to convert this using DOS-style short mode. If the path
40082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40083  # take no chances and rewrite it.
40084  # Note: m4 eats our [], so we need to use [ and ] instead.
40085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40086  if test "x$has_forbidden_chars" != x; then
40087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40091      # Going to short mode and back again did indeed matter. Since short mode is
40092      # case insensitive, let's make it lowercase to improve readability.
40093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40094      # Now convert it back to Unix-style (cygpath)
40095      input_path=`$CYGPATH -u "$shortmode_path"`
40096      new_path="$input_path"
40097    fi
40098  fi
40099
40100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40101  if test "x$test_cygdrive_prefix" = x; then
40102    # As a simple fix, exclude /usr/bin since it's not a real path.
40103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40105      # a path prefixed by /cygdrive for fixpath to work.
40106      new_path="$CYGWIN_ROOT_PATH$input_path"
40107    fi
40108  fi
40109
40110  # remove trailing .exe if any
40111  new_path="${new_path/%.exe/}"
40112
40113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40114
40115  # First separate the path from the arguments. This will split at the first
40116  # space.
40117  complete="$DUMPBIN"
40118  path="${complete%% *}"
40119  tmp="$complete EOL"
40120  arguments="${tmp#* }"
40121
40122  # Input might be given as Windows format, start by converting to
40123  # unix format.
40124  new_path="$path"
40125
40126  windows_path="$new_path"
40127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40128    unix_path=`$CYGPATH -u "$windows_path"`
40129    new_path="$unix_path"
40130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40132    new_path="$unix_path"
40133  fi
40134
40135
40136  # Now try to locate executable using which
40137  new_path=`$WHICH "$new_path" 2> /dev/null`
40138
40139  if test "x$new_path" = x; then
40140    # Oops. Which didn't find the executable.
40141    # The splitting of arguments from the executable at a space might have been incorrect,
40142    # since paths with space are more likely in Windows. Give it another try with the whole
40143    # argument.
40144    path="$complete"
40145    arguments="EOL"
40146    new_path="$path"
40147
40148  windows_path="$new_path"
40149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40150    unix_path=`$CYGPATH -u "$windows_path"`
40151    new_path="$unix_path"
40152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40154    new_path="$unix_path"
40155  fi
40156
40157
40158    new_path=`$WHICH "$new_path" 2> /dev/null`
40159    # bat and cmd files are not always considered executable in MSYS causing which
40160    # to not find them
40161    if test "x$new_path" = x \
40162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40164      new_path="$path"
40165
40166  windows_path="$new_path"
40167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40168    unix_path=`$CYGPATH -u "$windows_path"`
40169    new_path="$unix_path"
40170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40172    new_path="$unix_path"
40173  fi
40174
40175    fi
40176
40177    if test "x$new_path" = x; then
40178      # It's still not found. Now this is an unrecoverable error.
40179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40180$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40181      has_space=`$ECHO "$complete" | $GREP " "`
40182      if test "x$has_space" != x; then
40183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40185      fi
40186      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40187    fi
40188  fi
40189
40190  # Now new_path has a complete unix path to the binary
40191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40192    # Keep paths in /bin as-is, but remove trailing .exe if any
40193    new_path="${new_path/%.exe/}"
40194    # Do not save /bin paths to all_fixpath_prefixes!
40195  else
40196    # Not in mixed or Windows style, start by that.
40197    new_path=`cmd //c echo $new_path`
40198
40199  input_path="$new_path"
40200  # Check if we need to convert this using DOS-style short mode. If the path
40201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40202  # take no chances and rewrite it.
40203  # Note: m4 eats our [], so we need to use [ and ] instead.
40204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40205  if test "x$has_forbidden_chars" != x; then
40206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40208  fi
40209
40210    # Output is in $new_path
40211
40212  windows_path="$new_path"
40213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40214    unix_path=`$CYGPATH -u "$windows_path"`
40215    new_path="$unix_path"
40216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40218    new_path="$unix_path"
40219  fi
40220
40221    # remove trailing .exe if any
40222    new_path="${new_path/%.exe/}"
40223
40224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40226  fi
40227
40228    else
40229      # We're on a unix platform. Hooray! :)
40230      # First separate the path from the arguments. This will split at the first
40231      # space.
40232      complete="$DUMPBIN"
40233      path="${complete%% *}"
40234      tmp="$complete EOL"
40235      arguments="${tmp#* }"
40236
40237      # Cannot rely on the command "which" here since it doesn't always work.
40238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40239      if test -z "$is_absolute_path"; then
40240        # Path to executable is not absolute. Find it.
40241        IFS_save="$IFS"
40242        IFS=:
40243        for p in $PATH; do
40244          if test -f "$p/$path" && test -x "$p/$path"; then
40245            new_path="$p/$path"
40246            break
40247          fi
40248        done
40249        IFS="$IFS_save"
40250      else
40251        # This is an absolute path, we can use it without further modifications.
40252        new_path="$path"
40253      fi
40254
40255      if test "x$new_path" = x; then
40256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40257$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40258        has_space=`$ECHO "$complete" | $GREP " "`
40259        if test "x$has_space" != x; then
40260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40262        fi
40263        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40264      fi
40265    fi
40266
40267    # Now join together the path and the arguments once again
40268    if test "x$arguments" != xEOL; then
40269      new_complete="$new_path ${arguments% *}"
40270    else
40271      new_complete="$new_path"
40272    fi
40273
40274    if test "x$complete" != "x$new_complete"; then
40275      DUMPBIN="$new_complete"
40276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40277$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40278    fi
40279  fi
40280
40281    # We need to check for 'msbuild.exe' because at the place where we expect to
40282    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40283    # won't find the 'msbuild.exe' executable in that case (and the
40284    # 'ac_executable_extensions' is unusable due to performance reasons).
40285    # Notice that we intentionally don't fix up the path to MSBUILD because we
40286    # will call it in a DOS shell during freetype detection on Windows (see
40287    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40288    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40289set dummy msbuild.exe; ac_word=$2
40290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40291$as_echo_n "checking for $ac_word... " >&6; }
40292if ${ac_cv_prog_MSBUILD+:} false; then :
40293  $as_echo_n "(cached) " >&6
40294else
40295  if test -n "$MSBUILD"; then
40296  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40297else
40298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40299for as_dir in $PATH
40300do
40301  IFS=$as_save_IFS
40302  test -z "$as_dir" && as_dir=.
40303    for ac_exec_ext in '' $ac_executable_extensions; do
40304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40305    ac_cv_prog_MSBUILD="msbuild.exe"
40306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40307    break 2
40308  fi
40309done
40310  done
40311IFS=$as_save_IFS
40312
40313fi
40314fi
40315MSBUILD=$ac_cv_prog_MSBUILD
40316if test -n "$MSBUILD"; then
40317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40318$as_echo "$MSBUILD" >&6; }
40319else
40320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40321$as_echo "no" >&6; }
40322fi
40323
40324
40325  fi
40326
40327  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40328
40329
40330  # Publish this variable in the help.
40331
40332
40333  if [ -z "${STRIP+x}" ]; then
40334    # The variable is not set by user, try to locate tool using the code snippet
40335    for ac_prog in strip
40336do
40337  # Extract the first word of "$ac_prog", so it can be a program name with args.
40338set dummy $ac_prog; ac_word=$2
40339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40340$as_echo_n "checking for $ac_word... " >&6; }
40341if ${ac_cv_path_STRIP+:} false; then :
40342  $as_echo_n "(cached) " >&6
40343else
40344  case $STRIP in
40345  [\\/]* | ?:[\\/]*)
40346  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40347  ;;
40348  *)
40349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40350for as_dir in $PATH
40351do
40352  IFS=$as_save_IFS
40353  test -z "$as_dir" && as_dir=.
40354    for ac_exec_ext in '' $ac_executable_extensions; do
40355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40356    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40358    break 2
40359  fi
40360done
40361  done
40362IFS=$as_save_IFS
40363
40364  ;;
40365esac
40366fi
40367STRIP=$ac_cv_path_STRIP
40368if test -n "$STRIP"; then
40369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40370$as_echo "$STRIP" >&6; }
40371else
40372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40373$as_echo "no" >&6; }
40374fi
40375
40376
40377  test -n "$STRIP" && break
40378done
40379
40380  else
40381    # The variable is set, but is it from the command line or the environment?
40382
40383    # Try to remove the string !STRIP! from our list.
40384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40386      # If it failed, the variable was not from the command line. Ignore it,
40387      # but warn the user (except for BASH, which is always set by the calling BASH).
40388      if test "xSTRIP" != xBASH; then
40389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40390$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40391      fi
40392      # Try to locate tool using the code snippet
40393      for ac_prog in strip
40394do
40395  # Extract the first word of "$ac_prog", so it can be a program name with args.
40396set dummy $ac_prog; ac_word=$2
40397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40398$as_echo_n "checking for $ac_word... " >&6; }
40399if ${ac_cv_path_STRIP+:} false; then :
40400  $as_echo_n "(cached) " >&6
40401else
40402  case $STRIP in
40403  [\\/]* | ?:[\\/]*)
40404  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40405  ;;
40406  *)
40407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40408for as_dir in $PATH
40409do
40410  IFS=$as_save_IFS
40411  test -z "$as_dir" && as_dir=.
40412    for ac_exec_ext in '' $ac_executable_extensions; do
40413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40414    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40416    break 2
40417  fi
40418done
40419  done
40420IFS=$as_save_IFS
40421
40422  ;;
40423esac
40424fi
40425STRIP=$ac_cv_path_STRIP
40426if test -n "$STRIP"; then
40427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40428$as_echo "$STRIP" >&6; }
40429else
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40431$as_echo "no" >&6; }
40432fi
40433
40434
40435  test -n "$STRIP" && break
40436done
40437
40438    else
40439      # If it succeeded, then it was overridden by the user. We will use it
40440      # for the tool.
40441
40442      # First remove it from the list of overridden variables, so we can test
40443      # for unknown variables in the end.
40444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40445
40446      # Check if we try to supply an empty value
40447      if test "x$STRIP" = x; then
40448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40449$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40451$as_echo_n "checking for STRIP... " >&6; }
40452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40453$as_echo "disabled" >&6; }
40454      else
40455        # Check if the provided tool contains a complete path.
40456        tool_specified="$STRIP"
40457        tool_basename="${tool_specified##*/}"
40458        if test "x$tool_basename" = "x$tool_specified"; then
40459          # A command without a complete path is provided, search $PATH.
40460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40461$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40462          # Extract the first word of "$tool_basename", so it can be a program name with args.
40463set dummy $tool_basename; ac_word=$2
40464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40465$as_echo_n "checking for $ac_word... " >&6; }
40466if ${ac_cv_path_STRIP+:} false; then :
40467  $as_echo_n "(cached) " >&6
40468else
40469  case $STRIP in
40470  [\\/]* | ?:[\\/]*)
40471  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40472  ;;
40473  *)
40474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40475for as_dir in $PATH
40476do
40477  IFS=$as_save_IFS
40478  test -z "$as_dir" && as_dir=.
40479    for ac_exec_ext in '' $ac_executable_extensions; do
40480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40481    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40483    break 2
40484  fi
40485done
40486  done
40487IFS=$as_save_IFS
40488
40489  ;;
40490esac
40491fi
40492STRIP=$ac_cv_path_STRIP
40493if test -n "$STRIP"; then
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40495$as_echo "$STRIP" >&6; }
40496else
40497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40498$as_echo "no" >&6; }
40499fi
40500
40501
40502          if test "x$STRIP" = x; then
40503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40504          fi
40505        else
40506          # Otherwise we believe it is a complete path. Use it as it is.
40507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40508$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40510$as_echo_n "checking for STRIP... " >&6; }
40511          if test ! -x "$tool_specified"; then
40512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40513$as_echo "not found" >&6; }
40514            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40515          fi
40516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40517$as_echo "$tool_specified" >&6; }
40518        fi
40519      fi
40520    fi
40521
40522  fi
40523
40524
40525
40526  # Only process if variable expands to non-empty
40527
40528  if test "x$STRIP" != x; then
40529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40530
40531  # First separate the path from the arguments. This will split at the first
40532  # space.
40533  complete="$STRIP"
40534  path="${complete%% *}"
40535  tmp="$complete EOL"
40536  arguments="${tmp#* }"
40537
40538  # Input might be given as Windows format, start by converting to
40539  # unix format.
40540  new_path=`$CYGPATH -u "$path"`
40541
40542  # Now try to locate executable using which
40543  new_path=`$WHICH "$new_path" 2> /dev/null`
40544  # bat and cmd files are not always considered executable in cygwin causing which
40545  # to not find them
40546  if test "x$new_path" = x \
40547      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40548      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40549    new_path=`$CYGPATH -u "$path"`
40550  fi
40551  if test "x$new_path" = x; then
40552    # Oops. Which didn't find the executable.
40553    # The splitting of arguments from the executable at a space might have been incorrect,
40554    # since paths with space are more likely in Windows. Give it another try with the whole
40555    # argument.
40556    path="$complete"
40557    arguments="EOL"
40558    new_path=`$CYGPATH -u "$path"`
40559    new_path=`$WHICH "$new_path" 2> /dev/null`
40560    # bat and cmd files are not always considered executable in cygwin causing which
40561    # to not find them
40562    if test "x$new_path" = x \
40563        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40564        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40565      new_path=`$CYGPATH -u "$path"`
40566    fi
40567    if test "x$new_path" = x; then
40568      # It's still not found. Now this is an unrecoverable error.
40569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40570$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40571      has_space=`$ECHO "$complete" | $GREP " "`
40572      if test "x$has_space" != x; then
40573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40575      fi
40576      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40577    fi
40578  fi
40579
40580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40583  # "foo.exe" is OK but "foo" is an error.
40584  #
40585  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40586  # It is also a way to make sure we got the proper file name for the real test later on.
40587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40588  if test "x$test_shortpath" = x; then
40589    # Short path failed, file does not exist as specified.
40590    # Try adding .exe or .cmd
40591    if test -f "${new_path}.exe"; then
40592      input_to_shortpath="${new_path}.exe"
40593    elif test -f "${new_path}.cmd"; then
40594      input_to_shortpath="${new_path}.cmd"
40595    else
40596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40597$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40600      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40601    fi
40602  else
40603    input_to_shortpath="$new_path"
40604  fi
40605
40606  # Call helper function which possibly converts this using DOS-style short mode.
40607  # If so, the updated path is stored in $new_path.
40608  new_path="$input_to_shortpath"
40609
40610  input_path="$input_to_shortpath"
40611  # Check if we need to convert this using DOS-style short mode. If the path
40612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40613  # take no chances and rewrite it.
40614  # Note: m4 eats our [], so we need to use [ and ] instead.
40615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40616  if test "x$has_forbidden_chars" != x; then
40617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40621      # Going to short mode and back again did indeed matter. Since short mode is
40622      # case insensitive, let's make it lowercase to improve readability.
40623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40624      # Now convert it back to Unix-style (cygpath)
40625      input_path=`$CYGPATH -u "$shortmode_path"`
40626      new_path="$input_path"
40627    fi
40628  fi
40629
40630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40631  if test "x$test_cygdrive_prefix" = x; then
40632    # As a simple fix, exclude /usr/bin since it's not a real path.
40633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40635      # a path prefixed by /cygdrive for fixpath to work.
40636      new_path="$CYGWIN_ROOT_PATH$input_path"
40637    fi
40638  fi
40639
40640  # remove trailing .exe if any
40641  new_path="${new_path/%.exe/}"
40642
40643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40644
40645  # First separate the path from the arguments. This will split at the first
40646  # space.
40647  complete="$STRIP"
40648  path="${complete%% *}"
40649  tmp="$complete EOL"
40650  arguments="${tmp#* }"
40651
40652  # Input might be given as Windows format, start by converting to
40653  # unix format.
40654  new_path="$path"
40655
40656  windows_path="$new_path"
40657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40658    unix_path=`$CYGPATH -u "$windows_path"`
40659    new_path="$unix_path"
40660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40662    new_path="$unix_path"
40663  fi
40664
40665
40666  # Now try to locate executable using which
40667  new_path=`$WHICH "$new_path" 2> /dev/null`
40668
40669  if test "x$new_path" = x; then
40670    # Oops. Which didn't find the executable.
40671    # The splitting of arguments from the executable at a space might have been incorrect,
40672    # since paths with space are more likely in Windows. Give it another try with the whole
40673    # argument.
40674    path="$complete"
40675    arguments="EOL"
40676    new_path="$path"
40677
40678  windows_path="$new_path"
40679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40680    unix_path=`$CYGPATH -u "$windows_path"`
40681    new_path="$unix_path"
40682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40684    new_path="$unix_path"
40685  fi
40686
40687
40688    new_path=`$WHICH "$new_path" 2> /dev/null`
40689    # bat and cmd files are not always considered executable in MSYS causing which
40690    # to not find them
40691    if test "x$new_path" = x \
40692        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40693        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40694      new_path="$path"
40695
40696  windows_path="$new_path"
40697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40698    unix_path=`$CYGPATH -u "$windows_path"`
40699    new_path="$unix_path"
40700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40702    new_path="$unix_path"
40703  fi
40704
40705    fi
40706
40707    if test "x$new_path" = x; then
40708      # It's still not found. Now this is an unrecoverable error.
40709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40710$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40711      has_space=`$ECHO "$complete" | $GREP " "`
40712      if test "x$has_space" != x; then
40713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40715      fi
40716      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40717    fi
40718  fi
40719
40720  # Now new_path has a complete unix path to the binary
40721  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40722    # Keep paths in /bin as-is, but remove trailing .exe if any
40723    new_path="${new_path/%.exe/}"
40724    # Do not save /bin paths to all_fixpath_prefixes!
40725  else
40726    # Not in mixed or Windows style, start by that.
40727    new_path=`cmd //c echo $new_path`
40728
40729  input_path="$new_path"
40730  # Check if we need to convert this using DOS-style short mode. If the path
40731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40732  # take no chances and rewrite it.
40733  # Note: m4 eats our [], so we need to use [ and ] instead.
40734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40735  if test "x$has_forbidden_chars" != x; then
40736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40738  fi
40739
40740    # Output is in $new_path
40741
40742  windows_path="$new_path"
40743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40744    unix_path=`$CYGPATH -u "$windows_path"`
40745    new_path="$unix_path"
40746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40748    new_path="$unix_path"
40749  fi
40750
40751    # remove trailing .exe if any
40752    new_path="${new_path/%.exe/}"
40753
40754    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40755    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40756  fi
40757
40758    else
40759      # We're on a unix platform. Hooray! :)
40760      # First separate the path from the arguments. This will split at the first
40761      # space.
40762      complete="$STRIP"
40763      path="${complete%% *}"
40764      tmp="$complete EOL"
40765      arguments="${tmp#* }"
40766
40767      # Cannot rely on the command "which" here since it doesn't always work.
40768      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40769      if test -z "$is_absolute_path"; then
40770        # Path to executable is not absolute. Find it.
40771        IFS_save="$IFS"
40772        IFS=:
40773        for p in $PATH; do
40774          if test -f "$p/$path" && test -x "$p/$path"; then
40775            new_path="$p/$path"
40776            break
40777          fi
40778        done
40779        IFS="$IFS_save"
40780      else
40781        # This is an absolute path, we can use it without further modifications.
40782        new_path="$path"
40783      fi
40784
40785      if test "x$new_path" = x; then
40786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40787$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40788        has_space=`$ECHO "$complete" | $GREP " "`
40789        if test "x$has_space" != x; then
40790          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40792        fi
40793        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40794      fi
40795    fi
40796
40797    # Now join together the path and the arguments once again
40798    if test "x$arguments" != xEOL; then
40799      new_complete="$new_path ${arguments% *}"
40800    else
40801      new_complete="$new_path"
40802    fi
40803
40804    if test "x$complete" != "x$new_complete"; then
40805      STRIP="$new_complete"
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40807$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40808    fi
40809  fi
40810
40811
40812
40813  # Publish this variable in the help.
40814
40815
40816  if [ -z "${NM+x}" ]; then
40817    # The variable is not set by user, try to locate tool using the code snippet
40818    for ac_prog in nm
40819do
40820  # Extract the first word of "$ac_prog", so it can be a program name with args.
40821set dummy $ac_prog; ac_word=$2
40822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40823$as_echo_n "checking for $ac_word... " >&6; }
40824if ${ac_cv_path_NM+:} false; then :
40825  $as_echo_n "(cached) " >&6
40826else
40827  case $NM in
40828  [\\/]* | ?:[\\/]*)
40829  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40830  ;;
40831  *)
40832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40833for as_dir in $PATH
40834do
40835  IFS=$as_save_IFS
40836  test -z "$as_dir" && as_dir=.
40837    for ac_exec_ext in '' $ac_executable_extensions; do
40838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40839    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40841    break 2
40842  fi
40843done
40844  done
40845IFS=$as_save_IFS
40846
40847  ;;
40848esac
40849fi
40850NM=$ac_cv_path_NM
40851if test -n "$NM"; then
40852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40853$as_echo "$NM" >&6; }
40854else
40855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40856$as_echo "no" >&6; }
40857fi
40858
40859
40860  test -n "$NM" && break
40861done
40862
40863  else
40864    # The variable is set, but is it from the command line or the environment?
40865
40866    # Try to remove the string !NM! from our list.
40867    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40868    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40869      # If it failed, the variable was not from the command line. Ignore it,
40870      # but warn the user (except for BASH, which is always set by the calling BASH).
40871      if test "xNM" != xBASH; then
40872        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40873$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40874      fi
40875      # Try to locate tool using the code snippet
40876      for ac_prog in nm
40877do
40878  # Extract the first word of "$ac_prog", so it can be a program name with args.
40879set dummy $ac_prog; ac_word=$2
40880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40881$as_echo_n "checking for $ac_word... " >&6; }
40882if ${ac_cv_path_NM+:} false; then :
40883  $as_echo_n "(cached) " >&6
40884else
40885  case $NM in
40886  [\\/]* | ?:[\\/]*)
40887  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40888  ;;
40889  *)
40890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40891for as_dir in $PATH
40892do
40893  IFS=$as_save_IFS
40894  test -z "$as_dir" && as_dir=.
40895    for ac_exec_ext in '' $ac_executable_extensions; do
40896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40897    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40899    break 2
40900  fi
40901done
40902  done
40903IFS=$as_save_IFS
40904
40905  ;;
40906esac
40907fi
40908NM=$ac_cv_path_NM
40909if test -n "$NM"; then
40910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40911$as_echo "$NM" >&6; }
40912else
40913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40914$as_echo "no" >&6; }
40915fi
40916
40917
40918  test -n "$NM" && break
40919done
40920
40921    else
40922      # If it succeeded, then it was overridden by the user. We will use it
40923      # for the tool.
40924
40925      # First remove it from the list of overridden variables, so we can test
40926      # for unknown variables in the end.
40927      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40928
40929      # Check if we try to supply an empty value
40930      if test "x$NM" = x; then
40931        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40932$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40934$as_echo_n "checking for NM... " >&6; }
40935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40936$as_echo "disabled" >&6; }
40937      else
40938        # Check if the provided tool contains a complete path.
40939        tool_specified="$NM"
40940        tool_basename="${tool_specified##*/}"
40941        if test "x$tool_basename" = "x$tool_specified"; then
40942          # A command without a complete path is provided, search $PATH.
40943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40944$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40945          # Extract the first word of "$tool_basename", so it can be a program name with args.
40946set dummy $tool_basename; ac_word=$2
40947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40948$as_echo_n "checking for $ac_word... " >&6; }
40949if ${ac_cv_path_NM+:} false; then :
40950  $as_echo_n "(cached) " >&6
40951else
40952  case $NM in
40953  [\\/]* | ?:[\\/]*)
40954  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40955  ;;
40956  *)
40957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40958for as_dir in $PATH
40959do
40960  IFS=$as_save_IFS
40961  test -z "$as_dir" && as_dir=.
40962    for ac_exec_ext in '' $ac_executable_extensions; do
40963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40964    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40966    break 2
40967  fi
40968done
40969  done
40970IFS=$as_save_IFS
40971
40972  ;;
40973esac
40974fi
40975NM=$ac_cv_path_NM
40976if test -n "$NM"; then
40977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40978$as_echo "$NM" >&6; }
40979else
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40981$as_echo "no" >&6; }
40982fi
40983
40984
40985          if test "x$NM" = x; then
40986            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40987          fi
40988        else
40989          # Otherwise we believe it is a complete path. Use it as it is.
40990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40991$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40992          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40993$as_echo_n "checking for NM... " >&6; }
40994          if test ! -x "$tool_specified"; then
40995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40996$as_echo "not found" >&6; }
40997            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40998          fi
40999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41000$as_echo "$tool_specified" >&6; }
41001        fi
41002      fi
41003    fi
41004
41005  fi
41006
41007
41008
41009  # Only process if variable expands to non-empty
41010
41011  if test "x$NM" != x; then
41012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41013
41014  # First separate the path from the arguments. This will split at the first
41015  # space.
41016  complete="$NM"
41017  path="${complete%% *}"
41018  tmp="$complete EOL"
41019  arguments="${tmp#* }"
41020
41021  # Input might be given as Windows format, start by converting to
41022  # unix format.
41023  new_path=`$CYGPATH -u "$path"`
41024
41025  # Now try to locate executable using which
41026  new_path=`$WHICH "$new_path" 2> /dev/null`
41027  # bat and cmd files are not always considered executable in cygwin causing which
41028  # to not find them
41029  if test "x$new_path" = x \
41030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41032    new_path=`$CYGPATH -u "$path"`
41033  fi
41034  if test "x$new_path" = x; then
41035    # Oops. Which didn't find the executable.
41036    # The splitting of arguments from the executable at a space might have been incorrect,
41037    # since paths with space are more likely in Windows. Give it another try with the whole
41038    # argument.
41039    path="$complete"
41040    arguments="EOL"
41041    new_path=`$CYGPATH -u "$path"`
41042    new_path=`$WHICH "$new_path" 2> /dev/null`
41043    # bat and cmd files are not always considered executable in cygwin causing which
41044    # to not find them
41045    if test "x$new_path" = x \
41046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41048      new_path=`$CYGPATH -u "$path"`
41049    fi
41050    if test "x$new_path" = x; then
41051      # It's still not found. Now this is an unrecoverable error.
41052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41053$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41054      has_space=`$ECHO "$complete" | $GREP " "`
41055      if test "x$has_space" != x; then
41056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41058      fi
41059      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41060    fi
41061  fi
41062
41063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41066  # "foo.exe" is OK but "foo" is an error.
41067  #
41068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41069  # It is also a way to make sure we got the proper file name for the real test later on.
41070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41071  if test "x$test_shortpath" = x; then
41072    # Short path failed, file does not exist as specified.
41073    # Try adding .exe or .cmd
41074    if test -f "${new_path}.exe"; then
41075      input_to_shortpath="${new_path}.exe"
41076    elif test -f "${new_path}.cmd"; then
41077      input_to_shortpath="${new_path}.cmd"
41078    else
41079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41080$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41083      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41084    fi
41085  else
41086    input_to_shortpath="$new_path"
41087  fi
41088
41089  # Call helper function which possibly converts this using DOS-style short mode.
41090  # If so, the updated path is stored in $new_path.
41091  new_path="$input_to_shortpath"
41092
41093  input_path="$input_to_shortpath"
41094  # Check if we need to convert this using DOS-style short mode. If the path
41095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41096  # take no chances and rewrite it.
41097  # Note: m4 eats our [], so we need to use [ and ] instead.
41098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41099  if test "x$has_forbidden_chars" != x; then
41100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41104      # Going to short mode and back again did indeed matter. Since short mode is
41105      # case insensitive, let's make it lowercase to improve readability.
41106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41107      # Now convert it back to Unix-style (cygpath)
41108      input_path=`$CYGPATH -u "$shortmode_path"`
41109      new_path="$input_path"
41110    fi
41111  fi
41112
41113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41114  if test "x$test_cygdrive_prefix" = x; then
41115    # As a simple fix, exclude /usr/bin since it's not a real path.
41116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41118      # a path prefixed by /cygdrive for fixpath to work.
41119      new_path="$CYGWIN_ROOT_PATH$input_path"
41120    fi
41121  fi
41122
41123  # remove trailing .exe if any
41124  new_path="${new_path/%.exe/}"
41125
41126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41127
41128  # First separate the path from the arguments. This will split at the first
41129  # space.
41130  complete="$NM"
41131  path="${complete%% *}"
41132  tmp="$complete EOL"
41133  arguments="${tmp#* }"
41134
41135  # Input might be given as Windows format, start by converting to
41136  # unix format.
41137  new_path="$path"
41138
41139  windows_path="$new_path"
41140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41141    unix_path=`$CYGPATH -u "$windows_path"`
41142    new_path="$unix_path"
41143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41145    new_path="$unix_path"
41146  fi
41147
41148
41149  # Now try to locate executable using which
41150  new_path=`$WHICH "$new_path" 2> /dev/null`
41151
41152  if test "x$new_path" = x; then
41153    # Oops. Which didn't find the executable.
41154    # The splitting of arguments from the executable at a space might have been incorrect,
41155    # since paths with space are more likely in Windows. Give it another try with the whole
41156    # argument.
41157    path="$complete"
41158    arguments="EOL"
41159    new_path="$path"
41160
41161  windows_path="$new_path"
41162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41163    unix_path=`$CYGPATH -u "$windows_path"`
41164    new_path="$unix_path"
41165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41167    new_path="$unix_path"
41168  fi
41169
41170
41171    new_path=`$WHICH "$new_path" 2> /dev/null`
41172    # bat and cmd files are not always considered executable in MSYS causing which
41173    # to not find them
41174    if test "x$new_path" = x \
41175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41177      new_path="$path"
41178
41179  windows_path="$new_path"
41180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41181    unix_path=`$CYGPATH -u "$windows_path"`
41182    new_path="$unix_path"
41183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41185    new_path="$unix_path"
41186  fi
41187
41188    fi
41189
41190    if test "x$new_path" = x; then
41191      # It's still not found. Now this is an unrecoverable error.
41192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41193$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41194      has_space=`$ECHO "$complete" | $GREP " "`
41195      if test "x$has_space" != x; then
41196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41198      fi
41199      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41200    fi
41201  fi
41202
41203  # Now new_path has a complete unix path to the binary
41204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41205    # Keep paths in /bin as-is, but remove trailing .exe if any
41206    new_path="${new_path/%.exe/}"
41207    # Do not save /bin paths to all_fixpath_prefixes!
41208  else
41209    # Not in mixed or Windows style, start by that.
41210    new_path=`cmd //c echo $new_path`
41211
41212  input_path="$new_path"
41213  # Check if we need to convert this using DOS-style short mode. If the path
41214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41215  # take no chances and rewrite it.
41216  # Note: m4 eats our [], so we need to use [ and ] instead.
41217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41218  if test "x$has_forbidden_chars" != x; then
41219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41221  fi
41222
41223    # Output is in $new_path
41224
41225  windows_path="$new_path"
41226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41227    unix_path=`$CYGPATH -u "$windows_path"`
41228    new_path="$unix_path"
41229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41231    new_path="$unix_path"
41232  fi
41233
41234    # remove trailing .exe if any
41235    new_path="${new_path/%.exe/}"
41236
41237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41239  fi
41240
41241    else
41242      # We're on a unix platform. Hooray! :)
41243      # First separate the path from the arguments. This will split at the first
41244      # space.
41245      complete="$NM"
41246      path="${complete%% *}"
41247      tmp="$complete EOL"
41248      arguments="${tmp#* }"
41249
41250      # Cannot rely on the command "which" here since it doesn't always work.
41251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41252      if test -z "$is_absolute_path"; then
41253        # Path to executable is not absolute. Find it.
41254        IFS_save="$IFS"
41255        IFS=:
41256        for p in $PATH; do
41257          if test -f "$p/$path" && test -x "$p/$path"; then
41258            new_path="$p/$path"
41259            break
41260          fi
41261        done
41262        IFS="$IFS_save"
41263      else
41264        # This is an absolute path, we can use it without further modifications.
41265        new_path="$path"
41266      fi
41267
41268      if test "x$new_path" = x; then
41269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41270$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41271        has_space=`$ECHO "$complete" | $GREP " "`
41272        if test "x$has_space" != x; then
41273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41275        fi
41276        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41277      fi
41278    fi
41279
41280    # Now join together the path and the arguments once again
41281    if test "x$arguments" != xEOL; then
41282      new_complete="$new_path ${arguments% *}"
41283    else
41284      new_complete="$new_path"
41285    fi
41286
41287    if test "x$complete" != "x$new_complete"; then
41288      NM="$new_complete"
41289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41290$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41291    fi
41292  fi
41293
41294
41295
41296  # Publish this variable in the help.
41297
41298
41299  if [ -z "${GNM+x}" ]; then
41300    # The variable is not set by user, try to locate tool using the code snippet
41301    for ac_prog in gnm
41302do
41303  # Extract the first word of "$ac_prog", so it can be a program name with args.
41304set dummy $ac_prog; ac_word=$2
41305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41306$as_echo_n "checking for $ac_word... " >&6; }
41307if ${ac_cv_path_GNM+:} false; then :
41308  $as_echo_n "(cached) " >&6
41309else
41310  case $GNM in
41311  [\\/]* | ?:[\\/]*)
41312  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41313  ;;
41314  *)
41315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41316for as_dir in $PATH
41317do
41318  IFS=$as_save_IFS
41319  test -z "$as_dir" && as_dir=.
41320    for ac_exec_ext in '' $ac_executable_extensions; do
41321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41322    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41324    break 2
41325  fi
41326done
41327  done
41328IFS=$as_save_IFS
41329
41330  ;;
41331esac
41332fi
41333GNM=$ac_cv_path_GNM
41334if test -n "$GNM"; then
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41336$as_echo "$GNM" >&6; }
41337else
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41339$as_echo "no" >&6; }
41340fi
41341
41342
41343  test -n "$GNM" && break
41344done
41345
41346  else
41347    # The variable is set, but is it from the command line or the environment?
41348
41349    # Try to remove the string !GNM! from our list.
41350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41352      # If it failed, the variable was not from the command line. Ignore it,
41353      # but warn the user (except for BASH, which is always set by the calling BASH).
41354      if test "xGNM" != xBASH; then
41355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41356$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41357      fi
41358      # Try to locate tool using the code snippet
41359      for ac_prog in gnm
41360do
41361  # Extract the first word of "$ac_prog", so it can be a program name with args.
41362set dummy $ac_prog; ac_word=$2
41363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41364$as_echo_n "checking for $ac_word... " >&6; }
41365if ${ac_cv_path_GNM+:} false; then :
41366  $as_echo_n "(cached) " >&6
41367else
41368  case $GNM in
41369  [\\/]* | ?:[\\/]*)
41370  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41371  ;;
41372  *)
41373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41374for as_dir in $PATH
41375do
41376  IFS=$as_save_IFS
41377  test -z "$as_dir" && as_dir=.
41378    for ac_exec_ext in '' $ac_executable_extensions; do
41379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41380    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41382    break 2
41383  fi
41384done
41385  done
41386IFS=$as_save_IFS
41387
41388  ;;
41389esac
41390fi
41391GNM=$ac_cv_path_GNM
41392if test -n "$GNM"; then
41393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41394$as_echo "$GNM" >&6; }
41395else
41396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41397$as_echo "no" >&6; }
41398fi
41399
41400
41401  test -n "$GNM" && break
41402done
41403
41404    else
41405      # If it succeeded, then it was overridden by the user. We will use it
41406      # for the tool.
41407
41408      # First remove it from the list of overridden variables, so we can test
41409      # for unknown variables in the end.
41410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41411
41412      # Check if we try to supply an empty value
41413      if test "x$GNM" = x; then
41414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41415$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41417$as_echo_n "checking for GNM... " >&6; }
41418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41419$as_echo "disabled" >&6; }
41420      else
41421        # Check if the provided tool contains a complete path.
41422        tool_specified="$GNM"
41423        tool_basename="${tool_specified##*/}"
41424        if test "x$tool_basename" = "x$tool_specified"; then
41425          # A command without a complete path is provided, search $PATH.
41426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41427$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41428          # Extract the first word of "$tool_basename", so it can be a program name with args.
41429set dummy $tool_basename; ac_word=$2
41430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41431$as_echo_n "checking for $ac_word... " >&6; }
41432if ${ac_cv_path_GNM+:} false; then :
41433  $as_echo_n "(cached) " >&6
41434else
41435  case $GNM in
41436  [\\/]* | ?:[\\/]*)
41437  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41438  ;;
41439  *)
41440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41441for as_dir in $PATH
41442do
41443  IFS=$as_save_IFS
41444  test -z "$as_dir" && as_dir=.
41445    for ac_exec_ext in '' $ac_executable_extensions; do
41446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41447    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41449    break 2
41450  fi
41451done
41452  done
41453IFS=$as_save_IFS
41454
41455  ;;
41456esac
41457fi
41458GNM=$ac_cv_path_GNM
41459if test -n "$GNM"; then
41460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41461$as_echo "$GNM" >&6; }
41462else
41463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41464$as_echo "no" >&6; }
41465fi
41466
41467
41468          if test "x$GNM" = x; then
41469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41470          fi
41471        else
41472          # Otherwise we believe it is a complete path. Use it as it is.
41473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41474$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41476$as_echo_n "checking for GNM... " >&6; }
41477          if test ! -x "$tool_specified"; then
41478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41479$as_echo "not found" >&6; }
41480            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41481          fi
41482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41483$as_echo "$tool_specified" >&6; }
41484        fi
41485      fi
41486    fi
41487
41488  fi
41489
41490
41491
41492  # Only process if variable expands to non-empty
41493
41494  if test "x$GNM" != x; then
41495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41496
41497  # First separate the path from the arguments. This will split at the first
41498  # space.
41499  complete="$GNM"
41500  path="${complete%% *}"
41501  tmp="$complete EOL"
41502  arguments="${tmp#* }"
41503
41504  # Input might be given as Windows format, start by converting to
41505  # unix format.
41506  new_path=`$CYGPATH -u "$path"`
41507
41508  # Now try to locate executable using which
41509  new_path=`$WHICH "$new_path" 2> /dev/null`
41510  # bat and cmd files are not always considered executable in cygwin causing which
41511  # to not find them
41512  if test "x$new_path" = x \
41513      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41514      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41515    new_path=`$CYGPATH -u "$path"`
41516  fi
41517  if test "x$new_path" = x; then
41518    # Oops. Which didn't find the executable.
41519    # The splitting of arguments from the executable at a space might have been incorrect,
41520    # since paths with space are more likely in Windows. Give it another try with the whole
41521    # argument.
41522    path="$complete"
41523    arguments="EOL"
41524    new_path=`$CYGPATH -u "$path"`
41525    new_path=`$WHICH "$new_path" 2> /dev/null`
41526    # bat and cmd files are not always considered executable in cygwin causing which
41527    # to not find them
41528    if test "x$new_path" = x \
41529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41531      new_path=`$CYGPATH -u "$path"`
41532    fi
41533    if test "x$new_path" = x; then
41534      # It's still not found. Now this is an unrecoverable error.
41535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41536$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41537      has_space=`$ECHO "$complete" | $GREP " "`
41538      if test "x$has_space" != x; then
41539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41541      fi
41542      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41543    fi
41544  fi
41545
41546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41549  # "foo.exe" is OK but "foo" is an error.
41550  #
41551  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41552  # It is also a way to make sure we got the proper file name for the real test later on.
41553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41554  if test "x$test_shortpath" = x; then
41555    # Short path failed, file does not exist as specified.
41556    # Try adding .exe or .cmd
41557    if test -f "${new_path}.exe"; then
41558      input_to_shortpath="${new_path}.exe"
41559    elif test -f "${new_path}.cmd"; then
41560      input_to_shortpath="${new_path}.cmd"
41561    else
41562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41563$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41564      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41565$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41566      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41567    fi
41568  else
41569    input_to_shortpath="$new_path"
41570  fi
41571
41572  # Call helper function which possibly converts this using DOS-style short mode.
41573  # If so, the updated path is stored in $new_path.
41574  new_path="$input_to_shortpath"
41575
41576  input_path="$input_to_shortpath"
41577  # Check if we need to convert this using DOS-style short mode. If the path
41578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41579  # take no chances and rewrite it.
41580  # Note: m4 eats our [], so we need to use [ and ] instead.
41581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41582  if test "x$has_forbidden_chars" != x; then
41583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41587      # Going to short mode and back again did indeed matter. Since short mode is
41588      # case insensitive, let's make it lowercase to improve readability.
41589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41590      # Now convert it back to Unix-style (cygpath)
41591      input_path=`$CYGPATH -u "$shortmode_path"`
41592      new_path="$input_path"
41593    fi
41594  fi
41595
41596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41597  if test "x$test_cygdrive_prefix" = x; then
41598    # As a simple fix, exclude /usr/bin since it's not a real path.
41599    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41601      # a path prefixed by /cygdrive for fixpath to work.
41602      new_path="$CYGWIN_ROOT_PATH$input_path"
41603    fi
41604  fi
41605
41606  # remove trailing .exe if any
41607  new_path="${new_path/%.exe/}"
41608
41609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41610
41611  # First separate the path from the arguments. This will split at the first
41612  # space.
41613  complete="$GNM"
41614  path="${complete%% *}"
41615  tmp="$complete EOL"
41616  arguments="${tmp#* }"
41617
41618  # Input might be given as Windows format, start by converting to
41619  # unix format.
41620  new_path="$path"
41621
41622  windows_path="$new_path"
41623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41624    unix_path=`$CYGPATH -u "$windows_path"`
41625    new_path="$unix_path"
41626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41628    new_path="$unix_path"
41629  fi
41630
41631
41632  # Now try to locate executable using which
41633  new_path=`$WHICH "$new_path" 2> /dev/null`
41634
41635  if test "x$new_path" = x; then
41636    # Oops. Which didn't find the executable.
41637    # The splitting of arguments from the executable at a space might have been incorrect,
41638    # since paths with space are more likely in Windows. Give it another try with the whole
41639    # argument.
41640    path="$complete"
41641    arguments="EOL"
41642    new_path="$path"
41643
41644  windows_path="$new_path"
41645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41646    unix_path=`$CYGPATH -u "$windows_path"`
41647    new_path="$unix_path"
41648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41650    new_path="$unix_path"
41651  fi
41652
41653
41654    new_path=`$WHICH "$new_path" 2> /dev/null`
41655    # bat and cmd files are not always considered executable in MSYS causing which
41656    # to not find them
41657    if test "x$new_path" = x \
41658        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41659        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41660      new_path="$path"
41661
41662  windows_path="$new_path"
41663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41664    unix_path=`$CYGPATH -u "$windows_path"`
41665    new_path="$unix_path"
41666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41668    new_path="$unix_path"
41669  fi
41670
41671    fi
41672
41673    if test "x$new_path" = x; then
41674      # It's still not found. Now this is an unrecoverable error.
41675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41676$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41677      has_space=`$ECHO "$complete" | $GREP " "`
41678      if test "x$has_space" != x; then
41679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41681      fi
41682      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41683    fi
41684  fi
41685
41686  # Now new_path has a complete unix path to the binary
41687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41688    # Keep paths in /bin as-is, but remove trailing .exe if any
41689    new_path="${new_path/%.exe/}"
41690    # Do not save /bin paths to all_fixpath_prefixes!
41691  else
41692    # Not in mixed or Windows style, start by that.
41693    new_path=`cmd //c echo $new_path`
41694
41695  input_path="$new_path"
41696  # Check if we need to convert this using DOS-style short mode. If the path
41697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41698  # take no chances and rewrite it.
41699  # Note: m4 eats our [], so we need to use [ and ] instead.
41700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41701  if test "x$has_forbidden_chars" != x; then
41702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41704  fi
41705
41706    # Output is in $new_path
41707
41708  windows_path="$new_path"
41709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41710    unix_path=`$CYGPATH -u "$windows_path"`
41711    new_path="$unix_path"
41712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41714    new_path="$unix_path"
41715  fi
41716
41717    # remove trailing .exe if any
41718    new_path="${new_path/%.exe/}"
41719
41720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41722  fi
41723
41724    else
41725      # We're on a unix platform. Hooray! :)
41726      # First separate the path from the arguments. This will split at the first
41727      # space.
41728      complete="$GNM"
41729      path="${complete%% *}"
41730      tmp="$complete EOL"
41731      arguments="${tmp#* }"
41732
41733      # Cannot rely on the command "which" here since it doesn't always work.
41734      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41735      if test -z "$is_absolute_path"; then
41736        # Path to executable is not absolute. Find it.
41737        IFS_save="$IFS"
41738        IFS=:
41739        for p in $PATH; do
41740          if test -f "$p/$path" && test -x "$p/$path"; then
41741            new_path="$p/$path"
41742            break
41743          fi
41744        done
41745        IFS="$IFS_save"
41746      else
41747        # This is an absolute path, we can use it without further modifications.
41748        new_path="$path"
41749      fi
41750
41751      if test "x$new_path" = x; then
41752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41753$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41754        has_space=`$ECHO "$complete" | $GREP " "`
41755        if test "x$has_space" != x; then
41756          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41757$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41758        fi
41759        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41760      fi
41761    fi
41762
41763    # Now join together the path and the arguments once again
41764    if test "x$arguments" != xEOL; then
41765      new_complete="$new_path ${arguments% *}"
41766    else
41767      new_complete="$new_path"
41768    fi
41769
41770    if test "x$complete" != "x$new_complete"; then
41771      GNM="$new_complete"
41772      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41773$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41774    fi
41775  fi
41776
41777  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41778    # FIXME: we should unify this with the solaris case above.
41779
41780
41781  # Publish this variable in the help.
41782
41783
41784  if [ -z "${STRIP+x}" ]; then
41785    # The variable is not set by user, try to locate tool using the code snippet
41786    if test -n "$ac_tool_prefix"; then
41787  for ac_prog in strip
41788  do
41789    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41790set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41792$as_echo_n "checking for $ac_word... " >&6; }
41793if ${ac_cv_prog_STRIP+:} false; then :
41794  $as_echo_n "(cached) " >&6
41795else
41796  if test -n "$STRIP"; then
41797  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41798else
41799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41800for as_dir in $PATH
41801do
41802  IFS=$as_save_IFS
41803  test -z "$as_dir" && as_dir=.
41804    for ac_exec_ext in '' $ac_executable_extensions; do
41805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41806    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41808    break 2
41809  fi
41810done
41811  done
41812IFS=$as_save_IFS
41813
41814fi
41815fi
41816STRIP=$ac_cv_prog_STRIP
41817if test -n "$STRIP"; then
41818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41819$as_echo "$STRIP" >&6; }
41820else
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41822$as_echo "no" >&6; }
41823fi
41824
41825
41826    test -n "$STRIP" && break
41827  done
41828fi
41829if test -z "$STRIP"; then
41830  ac_ct_STRIP=$STRIP
41831  for ac_prog in strip
41832do
41833  # Extract the first word of "$ac_prog", so it can be a program name with args.
41834set dummy $ac_prog; ac_word=$2
41835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41836$as_echo_n "checking for $ac_word... " >&6; }
41837if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41838  $as_echo_n "(cached) " >&6
41839else
41840  if test -n "$ac_ct_STRIP"; then
41841  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41842else
41843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41844for as_dir in $PATH
41845do
41846  IFS=$as_save_IFS
41847  test -z "$as_dir" && as_dir=.
41848    for ac_exec_ext in '' $ac_executable_extensions; do
41849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41850    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41852    break 2
41853  fi
41854done
41855  done
41856IFS=$as_save_IFS
41857
41858fi
41859fi
41860ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41861if test -n "$ac_ct_STRIP"; then
41862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41863$as_echo "$ac_ct_STRIP" >&6; }
41864else
41865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41866$as_echo "no" >&6; }
41867fi
41868
41869
41870  test -n "$ac_ct_STRIP" && break
41871done
41872
41873  if test "x$ac_ct_STRIP" = x; then
41874    STRIP=""
41875  else
41876    case $cross_compiling:$ac_tool_warned in
41877yes:)
41878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41880ac_tool_warned=yes ;;
41881esac
41882    STRIP=$ac_ct_STRIP
41883  fi
41884fi
41885
41886  else
41887    # The variable is set, but is it from the command line or the environment?
41888
41889    # Try to remove the string !STRIP! from our list.
41890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41892      # If it failed, the variable was not from the command line. Ignore it,
41893      # but warn the user (except for BASH, which is always set by the calling BASH).
41894      if test "xSTRIP" != xBASH; then
41895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41896$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41897      fi
41898      # Try to locate tool using the code snippet
41899      if test -n "$ac_tool_prefix"; then
41900  for ac_prog in strip
41901  do
41902    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41905$as_echo_n "checking for $ac_word... " >&6; }
41906if ${ac_cv_prog_STRIP+:} false; then :
41907  $as_echo_n "(cached) " >&6
41908else
41909  if test -n "$STRIP"; then
41910  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41911else
41912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41913for as_dir in $PATH
41914do
41915  IFS=$as_save_IFS
41916  test -z "$as_dir" && as_dir=.
41917    for ac_exec_ext in '' $ac_executable_extensions; do
41918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41919    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41921    break 2
41922  fi
41923done
41924  done
41925IFS=$as_save_IFS
41926
41927fi
41928fi
41929STRIP=$ac_cv_prog_STRIP
41930if test -n "$STRIP"; then
41931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41932$as_echo "$STRIP" >&6; }
41933else
41934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41935$as_echo "no" >&6; }
41936fi
41937
41938
41939    test -n "$STRIP" && break
41940  done
41941fi
41942if test -z "$STRIP"; then
41943  ac_ct_STRIP=$STRIP
41944  for ac_prog in strip
41945do
41946  # Extract the first word of "$ac_prog", so it can be a program name with args.
41947set dummy $ac_prog; ac_word=$2
41948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41949$as_echo_n "checking for $ac_word... " >&6; }
41950if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41951  $as_echo_n "(cached) " >&6
41952else
41953  if test -n "$ac_ct_STRIP"; then
41954  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41955else
41956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41957for as_dir in $PATH
41958do
41959  IFS=$as_save_IFS
41960  test -z "$as_dir" && as_dir=.
41961    for ac_exec_ext in '' $ac_executable_extensions; do
41962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41963    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41965    break 2
41966  fi
41967done
41968  done
41969IFS=$as_save_IFS
41970
41971fi
41972fi
41973ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41974if test -n "$ac_ct_STRIP"; then
41975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41976$as_echo "$ac_ct_STRIP" >&6; }
41977else
41978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41979$as_echo "no" >&6; }
41980fi
41981
41982
41983  test -n "$ac_ct_STRIP" && break
41984done
41985
41986  if test "x$ac_ct_STRIP" = x; then
41987    STRIP=""
41988  else
41989    case $cross_compiling:$ac_tool_warned in
41990yes:)
41991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41993ac_tool_warned=yes ;;
41994esac
41995    STRIP=$ac_ct_STRIP
41996  fi
41997fi
41998
41999    else
42000      # If it succeeded, then it was overridden by the user. We will use it
42001      # for the tool.
42002
42003      # First remove it from the list of overridden variables, so we can test
42004      # for unknown variables in the end.
42005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42006
42007      # Check if we try to supply an empty value
42008      if test "x$STRIP" = x; then
42009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42010$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42012$as_echo_n "checking for STRIP... " >&6; }
42013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42014$as_echo "disabled" >&6; }
42015      else
42016        # Check if the provided tool contains a complete path.
42017        tool_specified="$STRIP"
42018        tool_basename="${tool_specified##*/}"
42019        if test "x$tool_basename" = "x$tool_specified"; then
42020          # A command without a complete path is provided, search $PATH.
42021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42022$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42023          # Extract the first word of "$tool_basename", so it can be a program name with args.
42024set dummy $tool_basename; ac_word=$2
42025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42026$as_echo_n "checking for $ac_word... " >&6; }
42027if ${ac_cv_path_STRIP+:} false; then :
42028  $as_echo_n "(cached) " >&6
42029else
42030  case $STRIP in
42031  [\\/]* | ?:[\\/]*)
42032  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42033  ;;
42034  *)
42035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42036for as_dir in $PATH
42037do
42038  IFS=$as_save_IFS
42039  test -z "$as_dir" && as_dir=.
42040    for ac_exec_ext in '' $ac_executable_extensions; do
42041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42042    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42044    break 2
42045  fi
42046done
42047  done
42048IFS=$as_save_IFS
42049
42050  ;;
42051esac
42052fi
42053STRIP=$ac_cv_path_STRIP
42054if test -n "$STRIP"; then
42055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42056$as_echo "$STRIP" >&6; }
42057else
42058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42059$as_echo "no" >&6; }
42060fi
42061
42062
42063          if test "x$STRIP" = x; then
42064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42065          fi
42066        else
42067          # Otherwise we believe it is a complete path. Use it as it is.
42068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42069$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42071$as_echo_n "checking for STRIP... " >&6; }
42072          if test ! -x "$tool_specified"; then
42073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42074$as_echo "not found" >&6; }
42075            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42076          fi
42077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42078$as_echo "$tool_specified" >&6; }
42079        fi
42080      fi
42081    fi
42082
42083  fi
42084
42085
42086
42087  # Only process if variable expands to non-empty
42088
42089  if test "x$STRIP" != x; then
42090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42091
42092  # First separate the path from the arguments. This will split at the first
42093  # space.
42094  complete="$STRIP"
42095  path="${complete%% *}"
42096  tmp="$complete EOL"
42097  arguments="${tmp#* }"
42098
42099  # Input might be given as Windows format, start by converting to
42100  # unix format.
42101  new_path=`$CYGPATH -u "$path"`
42102
42103  # Now try to locate executable using which
42104  new_path=`$WHICH "$new_path" 2> /dev/null`
42105  # bat and cmd files are not always considered executable in cygwin causing which
42106  # to not find them
42107  if test "x$new_path" = x \
42108      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42109      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42110    new_path=`$CYGPATH -u "$path"`
42111  fi
42112  if test "x$new_path" = x; then
42113    # Oops. Which didn't find the executable.
42114    # The splitting of arguments from the executable at a space might have been incorrect,
42115    # since paths with space are more likely in Windows. Give it another try with the whole
42116    # argument.
42117    path="$complete"
42118    arguments="EOL"
42119    new_path=`$CYGPATH -u "$path"`
42120    new_path=`$WHICH "$new_path" 2> /dev/null`
42121    # bat and cmd files are not always considered executable in cygwin causing which
42122    # to not find them
42123    if test "x$new_path" = x \
42124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42126      new_path=`$CYGPATH -u "$path"`
42127    fi
42128    if test "x$new_path" = x; then
42129      # It's still not found. Now this is an unrecoverable error.
42130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42131$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42132      has_space=`$ECHO "$complete" | $GREP " "`
42133      if test "x$has_space" != x; then
42134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42136      fi
42137      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42138    fi
42139  fi
42140
42141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42144  # "foo.exe" is OK but "foo" is an error.
42145  #
42146  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42147  # It is also a way to make sure we got the proper file name for the real test later on.
42148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42149  if test "x$test_shortpath" = x; then
42150    # Short path failed, file does not exist as specified.
42151    # Try adding .exe or .cmd
42152    if test -f "${new_path}.exe"; then
42153      input_to_shortpath="${new_path}.exe"
42154    elif test -f "${new_path}.cmd"; then
42155      input_to_shortpath="${new_path}.cmd"
42156    else
42157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42158$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42159      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42160$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42161      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42162    fi
42163  else
42164    input_to_shortpath="$new_path"
42165  fi
42166
42167  # Call helper function which possibly converts this using DOS-style short mode.
42168  # If so, the updated path is stored in $new_path.
42169  new_path="$input_to_shortpath"
42170
42171  input_path="$input_to_shortpath"
42172  # Check if we need to convert this using DOS-style short mode. If the path
42173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42174  # take no chances and rewrite it.
42175  # Note: m4 eats our [], so we need to use [ and ] instead.
42176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42177  if test "x$has_forbidden_chars" != x; then
42178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42182      # Going to short mode and back again did indeed matter. Since short mode is
42183      # case insensitive, let's make it lowercase to improve readability.
42184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42185      # Now convert it back to Unix-style (cygpath)
42186      input_path=`$CYGPATH -u "$shortmode_path"`
42187      new_path="$input_path"
42188    fi
42189  fi
42190
42191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42192  if test "x$test_cygdrive_prefix" = x; then
42193    # As a simple fix, exclude /usr/bin since it's not a real path.
42194    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42196      # a path prefixed by /cygdrive for fixpath to work.
42197      new_path="$CYGWIN_ROOT_PATH$input_path"
42198    fi
42199  fi
42200
42201  # remove trailing .exe if any
42202  new_path="${new_path/%.exe/}"
42203
42204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42205
42206  # First separate the path from the arguments. This will split at the first
42207  # space.
42208  complete="$STRIP"
42209  path="${complete%% *}"
42210  tmp="$complete EOL"
42211  arguments="${tmp#* }"
42212
42213  # Input might be given as Windows format, start by converting to
42214  # unix format.
42215  new_path="$path"
42216
42217  windows_path="$new_path"
42218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42219    unix_path=`$CYGPATH -u "$windows_path"`
42220    new_path="$unix_path"
42221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42223    new_path="$unix_path"
42224  fi
42225
42226
42227  # Now try to locate executable using which
42228  new_path=`$WHICH "$new_path" 2> /dev/null`
42229
42230  if test "x$new_path" = x; then
42231    # Oops. Which didn't find the executable.
42232    # The splitting of arguments from the executable at a space might have been incorrect,
42233    # since paths with space are more likely in Windows. Give it another try with the whole
42234    # argument.
42235    path="$complete"
42236    arguments="EOL"
42237    new_path="$path"
42238
42239  windows_path="$new_path"
42240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42241    unix_path=`$CYGPATH -u "$windows_path"`
42242    new_path="$unix_path"
42243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42245    new_path="$unix_path"
42246  fi
42247
42248
42249    new_path=`$WHICH "$new_path" 2> /dev/null`
42250    # bat and cmd files are not always considered executable in MSYS causing which
42251    # to not find them
42252    if test "x$new_path" = x \
42253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42255      new_path="$path"
42256
42257  windows_path="$new_path"
42258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42259    unix_path=`$CYGPATH -u "$windows_path"`
42260    new_path="$unix_path"
42261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42263    new_path="$unix_path"
42264  fi
42265
42266    fi
42267
42268    if test "x$new_path" = x; then
42269      # It's still not found. Now this is an unrecoverable error.
42270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42271$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42272      has_space=`$ECHO "$complete" | $GREP " "`
42273      if test "x$has_space" != x; then
42274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42276      fi
42277      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42278    fi
42279  fi
42280
42281  # Now new_path has a complete unix path to the binary
42282  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42283    # Keep paths in /bin as-is, but remove trailing .exe if any
42284    new_path="${new_path/%.exe/}"
42285    # Do not save /bin paths to all_fixpath_prefixes!
42286  else
42287    # Not in mixed or Windows style, start by that.
42288    new_path=`cmd //c echo $new_path`
42289
42290  input_path="$new_path"
42291  # Check if we need to convert this using DOS-style short mode. If the path
42292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42293  # take no chances and rewrite it.
42294  # Note: m4 eats our [], so we need to use [ and ] instead.
42295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42296  if test "x$has_forbidden_chars" != x; then
42297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42299  fi
42300
42301    # Output is in $new_path
42302
42303  windows_path="$new_path"
42304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42305    unix_path=`$CYGPATH -u "$windows_path"`
42306    new_path="$unix_path"
42307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42309    new_path="$unix_path"
42310  fi
42311
42312    # remove trailing .exe if any
42313    new_path="${new_path/%.exe/}"
42314
42315    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42316    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42317  fi
42318
42319    else
42320      # We're on a unix platform. Hooray! :)
42321      # First separate the path from the arguments. This will split at the first
42322      # space.
42323      complete="$STRIP"
42324      path="${complete%% *}"
42325      tmp="$complete EOL"
42326      arguments="${tmp#* }"
42327
42328      # Cannot rely on the command "which" here since it doesn't always work.
42329      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42330      if test -z "$is_absolute_path"; then
42331        # Path to executable is not absolute. Find it.
42332        IFS_save="$IFS"
42333        IFS=:
42334        for p in $PATH; do
42335          if test -f "$p/$path" && test -x "$p/$path"; then
42336            new_path="$p/$path"
42337            break
42338          fi
42339        done
42340        IFS="$IFS_save"
42341      else
42342        # This is an absolute path, we can use it without further modifications.
42343        new_path="$path"
42344      fi
42345
42346      if test "x$new_path" = x; then
42347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42348$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42349        has_space=`$ECHO "$complete" | $GREP " "`
42350        if test "x$has_space" != x; then
42351          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42352$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42353        fi
42354        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42355      fi
42356    fi
42357
42358    # Now join together the path and the arguments once again
42359    if test "x$arguments" != xEOL; then
42360      new_complete="$new_path ${arguments% *}"
42361    else
42362      new_complete="$new_path"
42363    fi
42364
42365    if test "x$complete" != "x$new_complete"; then
42366      STRIP="$new_complete"
42367      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42368$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42369    fi
42370  fi
42371
42372    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42373
42374
42375  # Publish this variable in the help.
42376
42377
42378  if [ -z "${NM+x}" ]; then
42379    # The variable is not set by user, try to locate tool using the code snippet
42380    if test -n "$ac_tool_prefix"; then
42381  for ac_prog in nm gcc-nm
42382  do
42383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42386$as_echo_n "checking for $ac_word... " >&6; }
42387if ${ac_cv_prog_NM+:} false; then :
42388  $as_echo_n "(cached) " >&6
42389else
42390  if test -n "$NM"; then
42391  ac_cv_prog_NM="$NM" # Let the user override the test.
42392else
42393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42394for as_dir in $PATH
42395do
42396  IFS=$as_save_IFS
42397  test -z "$as_dir" && as_dir=.
42398    for ac_exec_ext in '' $ac_executable_extensions; do
42399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42400    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42402    break 2
42403  fi
42404done
42405  done
42406IFS=$as_save_IFS
42407
42408fi
42409fi
42410NM=$ac_cv_prog_NM
42411if test -n "$NM"; then
42412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42413$as_echo "$NM" >&6; }
42414else
42415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42416$as_echo "no" >&6; }
42417fi
42418
42419
42420    test -n "$NM" && break
42421  done
42422fi
42423if test -z "$NM"; then
42424  ac_ct_NM=$NM
42425  for ac_prog in nm gcc-nm
42426do
42427  # Extract the first word of "$ac_prog", so it can be a program name with args.
42428set dummy $ac_prog; ac_word=$2
42429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42430$as_echo_n "checking for $ac_word... " >&6; }
42431if ${ac_cv_prog_ac_ct_NM+:} false; then :
42432  $as_echo_n "(cached) " >&6
42433else
42434  if test -n "$ac_ct_NM"; then
42435  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42436else
42437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42438for as_dir in $PATH
42439do
42440  IFS=$as_save_IFS
42441  test -z "$as_dir" && as_dir=.
42442    for ac_exec_ext in '' $ac_executable_extensions; do
42443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42444    ac_cv_prog_ac_ct_NM="$ac_prog"
42445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42446    break 2
42447  fi
42448done
42449  done
42450IFS=$as_save_IFS
42451
42452fi
42453fi
42454ac_ct_NM=$ac_cv_prog_ac_ct_NM
42455if test -n "$ac_ct_NM"; then
42456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42457$as_echo "$ac_ct_NM" >&6; }
42458else
42459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42460$as_echo "no" >&6; }
42461fi
42462
42463
42464  test -n "$ac_ct_NM" && break
42465done
42466
42467  if test "x$ac_ct_NM" = x; then
42468    NM=""
42469  else
42470    case $cross_compiling:$ac_tool_warned in
42471yes:)
42472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42474ac_tool_warned=yes ;;
42475esac
42476    NM=$ac_ct_NM
42477  fi
42478fi
42479
42480  else
42481    # The variable is set, but is it from the command line or the environment?
42482
42483    # Try to remove the string !NM! from our list.
42484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42486      # If it failed, the variable was not from the command line. Ignore it,
42487      # but warn the user (except for BASH, which is always set by the calling BASH).
42488      if test "xNM" != xBASH; then
42489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42490$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42491      fi
42492      # Try to locate tool using the code snippet
42493      if test -n "$ac_tool_prefix"; then
42494  for ac_prog in nm gcc-nm
42495  do
42496    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42497set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42499$as_echo_n "checking for $ac_word... " >&6; }
42500if ${ac_cv_prog_NM+:} false; then :
42501  $as_echo_n "(cached) " >&6
42502else
42503  if test -n "$NM"; then
42504  ac_cv_prog_NM="$NM" # Let the user override the test.
42505else
42506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42507for as_dir in $PATH
42508do
42509  IFS=$as_save_IFS
42510  test -z "$as_dir" && as_dir=.
42511    for ac_exec_ext in '' $ac_executable_extensions; do
42512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42513    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42515    break 2
42516  fi
42517done
42518  done
42519IFS=$as_save_IFS
42520
42521fi
42522fi
42523NM=$ac_cv_prog_NM
42524if test -n "$NM"; then
42525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42526$as_echo "$NM" >&6; }
42527else
42528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42529$as_echo "no" >&6; }
42530fi
42531
42532
42533    test -n "$NM" && break
42534  done
42535fi
42536if test -z "$NM"; then
42537  ac_ct_NM=$NM
42538  for ac_prog in nm gcc-nm
42539do
42540  # Extract the first word of "$ac_prog", so it can be a program name with args.
42541set dummy $ac_prog; ac_word=$2
42542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42543$as_echo_n "checking for $ac_word... " >&6; }
42544if ${ac_cv_prog_ac_ct_NM+:} false; then :
42545  $as_echo_n "(cached) " >&6
42546else
42547  if test -n "$ac_ct_NM"; then
42548  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42549else
42550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42551for as_dir in $PATH
42552do
42553  IFS=$as_save_IFS
42554  test -z "$as_dir" && as_dir=.
42555    for ac_exec_ext in '' $ac_executable_extensions; do
42556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42557    ac_cv_prog_ac_ct_NM="$ac_prog"
42558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42559    break 2
42560  fi
42561done
42562  done
42563IFS=$as_save_IFS
42564
42565fi
42566fi
42567ac_ct_NM=$ac_cv_prog_ac_ct_NM
42568if test -n "$ac_ct_NM"; then
42569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42570$as_echo "$ac_ct_NM" >&6; }
42571else
42572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42573$as_echo "no" >&6; }
42574fi
42575
42576
42577  test -n "$ac_ct_NM" && break
42578done
42579
42580  if test "x$ac_ct_NM" = x; then
42581    NM=""
42582  else
42583    case $cross_compiling:$ac_tool_warned in
42584yes:)
42585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42587ac_tool_warned=yes ;;
42588esac
42589    NM=$ac_ct_NM
42590  fi
42591fi
42592
42593    else
42594      # If it succeeded, then it was overridden by the user. We will use it
42595      # for the tool.
42596
42597      # First remove it from the list of overridden variables, so we can test
42598      # for unknown variables in the end.
42599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42600
42601      # Check if we try to supply an empty value
42602      if test "x$NM" = x; then
42603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42604$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42606$as_echo_n "checking for NM... " >&6; }
42607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42608$as_echo "disabled" >&6; }
42609      else
42610        # Check if the provided tool contains a complete path.
42611        tool_specified="$NM"
42612        tool_basename="${tool_specified##*/}"
42613        if test "x$tool_basename" = "x$tool_specified"; then
42614          # A command without a complete path is provided, search $PATH.
42615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42616$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42617          # Extract the first word of "$tool_basename", so it can be a program name with args.
42618set dummy $tool_basename; ac_word=$2
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42620$as_echo_n "checking for $ac_word... " >&6; }
42621if ${ac_cv_path_NM+:} false; then :
42622  $as_echo_n "(cached) " >&6
42623else
42624  case $NM in
42625  [\\/]* | ?:[\\/]*)
42626  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42627  ;;
42628  *)
42629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42630for as_dir in $PATH
42631do
42632  IFS=$as_save_IFS
42633  test -z "$as_dir" && as_dir=.
42634    for ac_exec_ext in '' $ac_executable_extensions; do
42635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42636    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42638    break 2
42639  fi
42640done
42641  done
42642IFS=$as_save_IFS
42643
42644  ;;
42645esac
42646fi
42647NM=$ac_cv_path_NM
42648if test -n "$NM"; then
42649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42650$as_echo "$NM" >&6; }
42651else
42652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42653$as_echo "no" >&6; }
42654fi
42655
42656
42657          if test "x$NM" = x; then
42658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42659          fi
42660        else
42661          # Otherwise we believe it is a complete path. Use it as it is.
42662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42663$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42665$as_echo_n "checking for NM... " >&6; }
42666          if test ! -x "$tool_specified"; then
42667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42668$as_echo "not found" >&6; }
42669            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42670          fi
42671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42672$as_echo "$tool_specified" >&6; }
42673        fi
42674      fi
42675    fi
42676
42677  fi
42678
42679
42680    else
42681
42682
42683  # Publish this variable in the help.
42684
42685
42686  if [ -z "${NM+x}" ]; then
42687    # The variable is not set by user, try to locate tool using the code snippet
42688    if test -n "$ac_tool_prefix"; then
42689  for ac_prog in nm
42690  do
42691    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42692set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42694$as_echo_n "checking for $ac_word... " >&6; }
42695if ${ac_cv_prog_NM+:} false; then :
42696  $as_echo_n "(cached) " >&6
42697else
42698  if test -n "$NM"; then
42699  ac_cv_prog_NM="$NM" # Let the user override the test.
42700else
42701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42702for as_dir in $PATH
42703do
42704  IFS=$as_save_IFS
42705  test -z "$as_dir" && as_dir=.
42706    for ac_exec_ext in '' $ac_executable_extensions; do
42707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42708    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42710    break 2
42711  fi
42712done
42713  done
42714IFS=$as_save_IFS
42715
42716fi
42717fi
42718NM=$ac_cv_prog_NM
42719if test -n "$NM"; then
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42721$as_echo "$NM" >&6; }
42722else
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42724$as_echo "no" >&6; }
42725fi
42726
42727
42728    test -n "$NM" && break
42729  done
42730fi
42731if test -z "$NM"; then
42732  ac_ct_NM=$NM
42733  for ac_prog in nm
42734do
42735  # Extract the first word of "$ac_prog", so it can be a program name with args.
42736set dummy $ac_prog; ac_word=$2
42737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42738$as_echo_n "checking for $ac_word... " >&6; }
42739if ${ac_cv_prog_ac_ct_NM+:} false; then :
42740  $as_echo_n "(cached) " >&6
42741else
42742  if test -n "$ac_ct_NM"; then
42743  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42744else
42745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42746for as_dir in $PATH
42747do
42748  IFS=$as_save_IFS
42749  test -z "$as_dir" && as_dir=.
42750    for ac_exec_ext in '' $ac_executable_extensions; do
42751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42752    ac_cv_prog_ac_ct_NM="$ac_prog"
42753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42754    break 2
42755  fi
42756done
42757  done
42758IFS=$as_save_IFS
42759
42760fi
42761fi
42762ac_ct_NM=$ac_cv_prog_ac_ct_NM
42763if test -n "$ac_ct_NM"; then
42764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42765$as_echo "$ac_ct_NM" >&6; }
42766else
42767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42768$as_echo "no" >&6; }
42769fi
42770
42771
42772  test -n "$ac_ct_NM" && break
42773done
42774
42775  if test "x$ac_ct_NM" = x; then
42776    NM=""
42777  else
42778    case $cross_compiling:$ac_tool_warned in
42779yes:)
42780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42782ac_tool_warned=yes ;;
42783esac
42784    NM=$ac_ct_NM
42785  fi
42786fi
42787
42788  else
42789    # The variable is set, but is it from the command line or the environment?
42790
42791    # Try to remove the string !NM! from our list.
42792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42794      # If it failed, the variable was not from the command line. Ignore it,
42795      # but warn the user (except for BASH, which is always set by the calling BASH).
42796      if test "xNM" != xBASH; then
42797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42798$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42799      fi
42800      # Try to locate tool using the code snippet
42801      if test -n "$ac_tool_prefix"; then
42802  for ac_prog in nm
42803  do
42804    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42807$as_echo_n "checking for $ac_word... " >&6; }
42808if ${ac_cv_prog_NM+:} false; then :
42809  $as_echo_n "(cached) " >&6
42810else
42811  if test -n "$NM"; then
42812  ac_cv_prog_NM="$NM" # Let the user override the test.
42813else
42814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42815for as_dir in $PATH
42816do
42817  IFS=$as_save_IFS
42818  test -z "$as_dir" && as_dir=.
42819    for ac_exec_ext in '' $ac_executable_extensions; do
42820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42821    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42823    break 2
42824  fi
42825done
42826  done
42827IFS=$as_save_IFS
42828
42829fi
42830fi
42831NM=$ac_cv_prog_NM
42832if test -n "$NM"; then
42833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42834$as_echo "$NM" >&6; }
42835else
42836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42837$as_echo "no" >&6; }
42838fi
42839
42840
42841    test -n "$NM" && break
42842  done
42843fi
42844if test -z "$NM"; then
42845  ac_ct_NM=$NM
42846  for ac_prog in nm
42847do
42848  # Extract the first word of "$ac_prog", so it can be a program name with args.
42849set dummy $ac_prog; ac_word=$2
42850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42851$as_echo_n "checking for $ac_word... " >&6; }
42852if ${ac_cv_prog_ac_ct_NM+:} false; then :
42853  $as_echo_n "(cached) " >&6
42854else
42855  if test -n "$ac_ct_NM"; then
42856  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42857else
42858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42859for as_dir in $PATH
42860do
42861  IFS=$as_save_IFS
42862  test -z "$as_dir" && as_dir=.
42863    for ac_exec_ext in '' $ac_executable_extensions; do
42864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42865    ac_cv_prog_ac_ct_NM="$ac_prog"
42866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42867    break 2
42868  fi
42869done
42870  done
42871IFS=$as_save_IFS
42872
42873fi
42874fi
42875ac_ct_NM=$ac_cv_prog_ac_ct_NM
42876if test -n "$ac_ct_NM"; then
42877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42878$as_echo "$ac_ct_NM" >&6; }
42879else
42880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42881$as_echo "no" >&6; }
42882fi
42883
42884
42885  test -n "$ac_ct_NM" && break
42886done
42887
42888  if test "x$ac_ct_NM" = x; then
42889    NM=""
42890  else
42891    case $cross_compiling:$ac_tool_warned in
42892yes:)
42893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42895ac_tool_warned=yes ;;
42896esac
42897    NM=$ac_ct_NM
42898  fi
42899fi
42900
42901    else
42902      # If it succeeded, then it was overridden by the user. We will use it
42903      # for the tool.
42904
42905      # First remove it from the list of overridden variables, so we can test
42906      # for unknown variables in the end.
42907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42908
42909      # Check if we try to supply an empty value
42910      if test "x$NM" = x; then
42911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42912$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42914$as_echo_n "checking for NM... " >&6; }
42915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42916$as_echo "disabled" >&6; }
42917      else
42918        # Check if the provided tool contains a complete path.
42919        tool_specified="$NM"
42920        tool_basename="${tool_specified##*/}"
42921        if test "x$tool_basename" = "x$tool_specified"; then
42922          # A command without a complete path is provided, search $PATH.
42923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42924$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42925          # Extract the first word of "$tool_basename", so it can be a program name with args.
42926set dummy $tool_basename; ac_word=$2
42927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42928$as_echo_n "checking for $ac_word... " >&6; }
42929if ${ac_cv_path_NM+:} false; then :
42930  $as_echo_n "(cached) " >&6
42931else
42932  case $NM in
42933  [\\/]* | ?:[\\/]*)
42934  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42935  ;;
42936  *)
42937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42938for as_dir in $PATH
42939do
42940  IFS=$as_save_IFS
42941  test -z "$as_dir" && as_dir=.
42942    for ac_exec_ext in '' $ac_executable_extensions; do
42943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42944    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42946    break 2
42947  fi
42948done
42949  done
42950IFS=$as_save_IFS
42951
42952  ;;
42953esac
42954fi
42955NM=$ac_cv_path_NM
42956if test -n "$NM"; then
42957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42958$as_echo "$NM" >&6; }
42959else
42960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42961$as_echo "no" >&6; }
42962fi
42963
42964
42965          if test "x$NM" = x; then
42966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42967          fi
42968        else
42969          # Otherwise we believe it is a complete path. Use it as it is.
42970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42971$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42973$as_echo_n "checking for NM... " >&6; }
42974          if test ! -x "$tool_specified"; then
42975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42976$as_echo "not found" >&6; }
42977            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42978          fi
42979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42980$as_echo "$tool_specified" >&6; }
42981        fi
42982      fi
42983    fi
42984
42985  fi
42986
42987
42988    fi
42989
42990  # Only process if variable expands to non-empty
42991
42992  if test "x$NM" != x; then
42993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42994
42995  # First separate the path from the arguments. This will split at the first
42996  # space.
42997  complete="$NM"
42998  path="${complete%% *}"
42999  tmp="$complete EOL"
43000  arguments="${tmp#* }"
43001
43002  # Input might be given as Windows format, start by converting to
43003  # unix format.
43004  new_path=`$CYGPATH -u "$path"`
43005
43006  # Now try to locate executable using which
43007  new_path=`$WHICH "$new_path" 2> /dev/null`
43008  # bat and cmd files are not always considered executable in cygwin causing which
43009  # to not find them
43010  if test "x$new_path" = x \
43011      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43012      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43013    new_path=`$CYGPATH -u "$path"`
43014  fi
43015  if test "x$new_path" = x; then
43016    # Oops. Which didn't find the executable.
43017    # The splitting of arguments from the executable at a space might have been incorrect,
43018    # since paths with space are more likely in Windows. Give it another try with the whole
43019    # argument.
43020    path="$complete"
43021    arguments="EOL"
43022    new_path=`$CYGPATH -u "$path"`
43023    new_path=`$WHICH "$new_path" 2> /dev/null`
43024    # bat and cmd files are not always considered executable in cygwin causing which
43025    # to not find them
43026    if test "x$new_path" = x \
43027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43029      new_path=`$CYGPATH -u "$path"`
43030    fi
43031    if test "x$new_path" = x; then
43032      # It's still not found. Now this is an unrecoverable error.
43033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43034$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43035      has_space=`$ECHO "$complete" | $GREP " "`
43036      if test "x$has_space" != x; then
43037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43039      fi
43040      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43041    fi
43042  fi
43043
43044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43047  # "foo.exe" is OK but "foo" is an error.
43048  #
43049  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43050  # It is also a way to make sure we got the proper file name for the real test later on.
43051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43052  if test "x$test_shortpath" = x; then
43053    # Short path failed, file does not exist as specified.
43054    # Try adding .exe or .cmd
43055    if test -f "${new_path}.exe"; then
43056      input_to_shortpath="${new_path}.exe"
43057    elif test -f "${new_path}.cmd"; then
43058      input_to_shortpath="${new_path}.cmd"
43059    else
43060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43061$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43064      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43065    fi
43066  else
43067    input_to_shortpath="$new_path"
43068  fi
43069
43070  # Call helper function which possibly converts this using DOS-style short mode.
43071  # If so, the updated path is stored in $new_path.
43072  new_path="$input_to_shortpath"
43073
43074  input_path="$input_to_shortpath"
43075  # Check if we need to convert this using DOS-style short mode. If the path
43076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43077  # take no chances and rewrite it.
43078  # Note: m4 eats our [], so we need to use [ and ] instead.
43079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43080  if test "x$has_forbidden_chars" != x; then
43081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43085      # Going to short mode and back again did indeed matter. Since short mode is
43086      # case insensitive, let's make it lowercase to improve readability.
43087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43088      # Now convert it back to Unix-style (cygpath)
43089      input_path=`$CYGPATH -u "$shortmode_path"`
43090      new_path="$input_path"
43091    fi
43092  fi
43093
43094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43095  if test "x$test_cygdrive_prefix" = x; then
43096    # As a simple fix, exclude /usr/bin since it's not a real path.
43097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43099      # a path prefixed by /cygdrive for fixpath to work.
43100      new_path="$CYGWIN_ROOT_PATH$input_path"
43101    fi
43102  fi
43103
43104  # remove trailing .exe if any
43105  new_path="${new_path/%.exe/}"
43106
43107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43108
43109  # First separate the path from the arguments. This will split at the first
43110  # space.
43111  complete="$NM"
43112  path="${complete%% *}"
43113  tmp="$complete EOL"
43114  arguments="${tmp#* }"
43115
43116  # Input might be given as Windows format, start by converting to
43117  # unix format.
43118  new_path="$path"
43119
43120  windows_path="$new_path"
43121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43122    unix_path=`$CYGPATH -u "$windows_path"`
43123    new_path="$unix_path"
43124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43126    new_path="$unix_path"
43127  fi
43128
43129
43130  # Now try to locate executable using which
43131  new_path=`$WHICH "$new_path" 2> /dev/null`
43132
43133  if test "x$new_path" = x; then
43134    # Oops. Which didn't find the executable.
43135    # The splitting of arguments from the executable at a space might have been incorrect,
43136    # since paths with space are more likely in Windows. Give it another try with the whole
43137    # argument.
43138    path="$complete"
43139    arguments="EOL"
43140    new_path="$path"
43141
43142  windows_path="$new_path"
43143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43144    unix_path=`$CYGPATH -u "$windows_path"`
43145    new_path="$unix_path"
43146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43148    new_path="$unix_path"
43149  fi
43150
43151
43152    new_path=`$WHICH "$new_path" 2> /dev/null`
43153    # bat and cmd files are not always considered executable in MSYS causing which
43154    # to not find them
43155    if test "x$new_path" = x \
43156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43158      new_path="$path"
43159
43160  windows_path="$new_path"
43161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43162    unix_path=`$CYGPATH -u "$windows_path"`
43163    new_path="$unix_path"
43164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43166    new_path="$unix_path"
43167  fi
43168
43169    fi
43170
43171    if test "x$new_path" = x; then
43172      # It's still not found. Now this is an unrecoverable error.
43173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43174$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43175      has_space=`$ECHO "$complete" | $GREP " "`
43176      if test "x$has_space" != x; then
43177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43179      fi
43180      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43181    fi
43182  fi
43183
43184  # Now new_path has a complete unix path to the binary
43185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43186    # Keep paths in /bin as-is, but remove trailing .exe if any
43187    new_path="${new_path/%.exe/}"
43188    # Do not save /bin paths to all_fixpath_prefixes!
43189  else
43190    # Not in mixed or Windows style, start by that.
43191    new_path=`cmd //c echo $new_path`
43192
43193  input_path="$new_path"
43194  # Check if we need to convert this using DOS-style short mode. If the path
43195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43196  # take no chances and rewrite it.
43197  # Note: m4 eats our [], so we need to use [ and ] instead.
43198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43199  if test "x$has_forbidden_chars" != x; then
43200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43202  fi
43203
43204    # Output is in $new_path
43205
43206  windows_path="$new_path"
43207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43208    unix_path=`$CYGPATH -u "$windows_path"`
43209    new_path="$unix_path"
43210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43212    new_path="$unix_path"
43213  fi
43214
43215    # remove trailing .exe if any
43216    new_path="${new_path/%.exe/}"
43217
43218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43220  fi
43221
43222    else
43223      # We're on a unix platform. Hooray! :)
43224      # First separate the path from the arguments. This will split at the first
43225      # space.
43226      complete="$NM"
43227      path="${complete%% *}"
43228      tmp="$complete EOL"
43229      arguments="${tmp#* }"
43230
43231      # Cannot rely on the command "which" here since it doesn't always work.
43232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43233      if test -z "$is_absolute_path"; then
43234        # Path to executable is not absolute. Find it.
43235        IFS_save="$IFS"
43236        IFS=:
43237        for p in $PATH; do
43238          if test -f "$p/$path" && test -x "$p/$path"; then
43239            new_path="$p/$path"
43240            break
43241          fi
43242        done
43243        IFS="$IFS_save"
43244      else
43245        # This is an absolute path, we can use it without further modifications.
43246        new_path="$path"
43247      fi
43248
43249      if test "x$new_path" = x; then
43250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43251$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43252        has_space=`$ECHO "$complete" | $GREP " "`
43253        if test "x$has_space" != x; then
43254          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43256        fi
43257        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43258      fi
43259    fi
43260
43261    # Now join together the path and the arguments once again
43262    if test "x$arguments" != xEOL; then
43263      new_complete="$new_path ${arguments% *}"
43264    else
43265      new_complete="$new_path"
43266    fi
43267
43268    if test "x$complete" != "x$new_complete"; then
43269      NM="$new_complete"
43270      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43271$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43272    fi
43273  fi
43274
43275    GNM="$NM"
43276
43277  fi
43278
43279  # objcopy is used for moving debug symbols to separate files when
43280  # full debug symbols are enabled.
43281  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43282
43283
43284  # Publish this variable in the help.
43285
43286
43287  if [ -z "${OBJCOPY+x}" ]; then
43288    # The variable is not set by user, try to locate tool using the code snippet
43289    if test -n "$ac_tool_prefix"; then
43290  for ac_prog in gobjcopy objcopy
43291  do
43292    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43293set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43295$as_echo_n "checking for $ac_word... " >&6; }
43296if ${ac_cv_prog_OBJCOPY+:} false; then :
43297  $as_echo_n "(cached) " >&6
43298else
43299  if test -n "$OBJCOPY"; then
43300  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43301else
43302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43303for as_dir in $PATH
43304do
43305  IFS=$as_save_IFS
43306  test -z "$as_dir" && as_dir=.
43307    for ac_exec_ext in '' $ac_executable_extensions; do
43308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43309    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43311    break 2
43312  fi
43313done
43314  done
43315IFS=$as_save_IFS
43316
43317fi
43318fi
43319OBJCOPY=$ac_cv_prog_OBJCOPY
43320if test -n "$OBJCOPY"; then
43321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43322$as_echo "$OBJCOPY" >&6; }
43323else
43324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43325$as_echo "no" >&6; }
43326fi
43327
43328
43329    test -n "$OBJCOPY" && break
43330  done
43331fi
43332if test -z "$OBJCOPY"; then
43333  ac_ct_OBJCOPY=$OBJCOPY
43334  for ac_prog in gobjcopy objcopy
43335do
43336  # Extract the first word of "$ac_prog", so it can be a program name with args.
43337set dummy $ac_prog; ac_word=$2
43338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43339$as_echo_n "checking for $ac_word... " >&6; }
43340if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43341  $as_echo_n "(cached) " >&6
43342else
43343  if test -n "$ac_ct_OBJCOPY"; then
43344  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43345else
43346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43347for as_dir in $PATH
43348do
43349  IFS=$as_save_IFS
43350  test -z "$as_dir" && as_dir=.
43351    for ac_exec_ext in '' $ac_executable_extensions; do
43352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43353    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43355    break 2
43356  fi
43357done
43358  done
43359IFS=$as_save_IFS
43360
43361fi
43362fi
43363ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43364if test -n "$ac_ct_OBJCOPY"; then
43365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43366$as_echo "$ac_ct_OBJCOPY" >&6; }
43367else
43368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43369$as_echo "no" >&6; }
43370fi
43371
43372
43373  test -n "$ac_ct_OBJCOPY" && break
43374done
43375
43376  if test "x$ac_ct_OBJCOPY" = x; then
43377    OBJCOPY=""
43378  else
43379    case $cross_compiling:$ac_tool_warned in
43380yes:)
43381{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43382$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43383ac_tool_warned=yes ;;
43384esac
43385    OBJCOPY=$ac_ct_OBJCOPY
43386  fi
43387fi
43388
43389  else
43390    # The variable is set, but is it from the command line or the environment?
43391
43392    # Try to remove the string !OBJCOPY! from our list.
43393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43395      # If it failed, the variable was not from the command line. Ignore it,
43396      # but warn the user (except for BASH, which is always set by the calling BASH).
43397      if test "xOBJCOPY" != xBASH; then
43398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43399$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43400      fi
43401      # Try to locate tool using the code snippet
43402      if test -n "$ac_tool_prefix"; then
43403  for ac_prog in gobjcopy objcopy
43404  do
43405    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43406set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43408$as_echo_n "checking for $ac_word... " >&6; }
43409if ${ac_cv_prog_OBJCOPY+:} false; then :
43410  $as_echo_n "(cached) " >&6
43411else
43412  if test -n "$OBJCOPY"; then
43413  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43414else
43415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43416for as_dir in $PATH
43417do
43418  IFS=$as_save_IFS
43419  test -z "$as_dir" && as_dir=.
43420    for ac_exec_ext in '' $ac_executable_extensions; do
43421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43422    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43424    break 2
43425  fi
43426done
43427  done
43428IFS=$as_save_IFS
43429
43430fi
43431fi
43432OBJCOPY=$ac_cv_prog_OBJCOPY
43433if test -n "$OBJCOPY"; then
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43435$as_echo "$OBJCOPY" >&6; }
43436else
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43438$as_echo "no" >&6; }
43439fi
43440
43441
43442    test -n "$OBJCOPY" && break
43443  done
43444fi
43445if test -z "$OBJCOPY"; then
43446  ac_ct_OBJCOPY=$OBJCOPY
43447  for ac_prog in gobjcopy objcopy
43448do
43449  # Extract the first word of "$ac_prog", so it can be a program name with args.
43450set dummy $ac_prog; ac_word=$2
43451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43452$as_echo_n "checking for $ac_word... " >&6; }
43453if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43454  $as_echo_n "(cached) " >&6
43455else
43456  if test -n "$ac_ct_OBJCOPY"; then
43457  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43458else
43459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43460for as_dir in $PATH
43461do
43462  IFS=$as_save_IFS
43463  test -z "$as_dir" && as_dir=.
43464    for ac_exec_ext in '' $ac_executable_extensions; do
43465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43466    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43468    break 2
43469  fi
43470done
43471  done
43472IFS=$as_save_IFS
43473
43474fi
43475fi
43476ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43477if test -n "$ac_ct_OBJCOPY"; then
43478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43479$as_echo "$ac_ct_OBJCOPY" >&6; }
43480else
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43482$as_echo "no" >&6; }
43483fi
43484
43485
43486  test -n "$ac_ct_OBJCOPY" && break
43487done
43488
43489  if test "x$ac_ct_OBJCOPY" = x; then
43490    OBJCOPY=""
43491  else
43492    case $cross_compiling:$ac_tool_warned in
43493yes:)
43494{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43495$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43496ac_tool_warned=yes ;;
43497esac
43498    OBJCOPY=$ac_ct_OBJCOPY
43499  fi
43500fi
43501
43502    else
43503      # If it succeeded, then it was overridden by the user. We will use it
43504      # for the tool.
43505
43506      # First remove it from the list of overridden variables, so we can test
43507      # for unknown variables in the end.
43508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43509
43510      # Check if we try to supply an empty value
43511      if test "x$OBJCOPY" = x; then
43512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43513$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43515$as_echo_n "checking for OBJCOPY... " >&6; }
43516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43517$as_echo "disabled" >&6; }
43518      else
43519        # Check if the provided tool contains a complete path.
43520        tool_specified="$OBJCOPY"
43521        tool_basename="${tool_specified##*/}"
43522        if test "x$tool_basename" = "x$tool_specified"; then
43523          # A command without a complete path is provided, search $PATH.
43524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43525$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43526          # Extract the first word of "$tool_basename", so it can be a program name with args.
43527set dummy $tool_basename; ac_word=$2
43528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43529$as_echo_n "checking for $ac_word... " >&6; }
43530if ${ac_cv_path_OBJCOPY+:} false; then :
43531  $as_echo_n "(cached) " >&6
43532else
43533  case $OBJCOPY in
43534  [\\/]* | ?:[\\/]*)
43535  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43536  ;;
43537  *)
43538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43539for as_dir in $PATH
43540do
43541  IFS=$as_save_IFS
43542  test -z "$as_dir" && as_dir=.
43543    for ac_exec_ext in '' $ac_executable_extensions; do
43544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43545    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43547    break 2
43548  fi
43549done
43550  done
43551IFS=$as_save_IFS
43552
43553  ;;
43554esac
43555fi
43556OBJCOPY=$ac_cv_path_OBJCOPY
43557if test -n "$OBJCOPY"; then
43558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43559$as_echo "$OBJCOPY" >&6; }
43560else
43561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43562$as_echo "no" >&6; }
43563fi
43564
43565
43566          if test "x$OBJCOPY" = x; then
43567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43568          fi
43569        else
43570          # Otherwise we believe it is a complete path. Use it as it is.
43571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43572$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43574$as_echo_n "checking for OBJCOPY... " >&6; }
43575          if test ! -x "$tool_specified"; then
43576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43577$as_echo "not found" >&6; }
43578            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43579          fi
43580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43581$as_echo "$tool_specified" >&6; }
43582        fi
43583      fi
43584    fi
43585
43586  fi
43587
43588
43589    # Only call fixup if objcopy was found.
43590    if test -n "$OBJCOPY"; then
43591
43592  # Only process if variable expands to non-empty
43593
43594  if test "x$OBJCOPY" != x; then
43595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43596
43597  # First separate the path from the arguments. This will split at the first
43598  # space.
43599  complete="$OBJCOPY"
43600  path="${complete%% *}"
43601  tmp="$complete EOL"
43602  arguments="${tmp#* }"
43603
43604  # Input might be given as Windows format, start by converting to
43605  # unix format.
43606  new_path=`$CYGPATH -u "$path"`
43607
43608  # Now try to locate executable using which
43609  new_path=`$WHICH "$new_path" 2> /dev/null`
43610  # bat and cmd files are not always considered executable in cygwin causing which
43611  # to not find them
43612  if test "x$new_path" = x \
43613      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43614      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43615    new_path=`$CYGPATH -u "$path"`
43616  fi
43617  if test "x$new_path" = x; then
43618    # Oops. Which didn't find the executable.
43619    # The splitting of arguments from the executable at a space might have been incorrect,
43620    # since paths with space are more likely in Windows. Give it another try with the whole
43621    # argument.
43622    path="$complete"
43623    arguments="EOL"
43624    new_path=`$CYGPATH -u "$path"`
43625    new_path=`$WHICH "$new_path" 2> /dev/null`
43626    # bat and cmd files are not always considered executable in cygwin causing which
43627    # to not find them
43628    if test "x$new_path" = x \
43629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43631      new_path=`$CYGPATH -u "$path"`
43632    fi
43633    if test "x$new_path" = x; then
43634      # It's still not found. Now this is an unrecoverable error.
43635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43636$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43637      has_space=`$ECHO "$complete" | $GREP " "`
43638      if test "x$has_space" != x; then
43639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43641      fi
43642      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43643    fi
43644  fi
43645
43646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43649  # "foo.exe" is OK but "foo" is an error.
43650  #
43651  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43652  # It is also a way to make sure we got the proper file name for the real test later on.
43653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43654  if test "x$test_shortpath" = x; then
43655    # Short path failed, file does not exist as specified.
43656    # Try adding .exe or .cmd
43657    if test -f "${new_path}.exe"; then
43658      input_to_shortpath="${new_path}.exe"
43659    elif test -f "${new_path}.cmd"; then
43660      input_to_shortpath="${new_path}.cmd"
43661    else
43662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43663$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43664      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43665$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43666      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43667    fi
43668  else
43669    input_to_shortpath="$new_path"
43670  fi
43671
43672  # Call helper function which possibly converts this using DOS-style short mode.
43673  # If so, the updated path is stored in $new_path.
43674  new_path="$input_to_shortpath"
43675
43676  input_path="$input_to_shortpath"
43677  # Check if we need to convert this using DOS-style short mode. If the path
43678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43679  # take no chances and rewrite it.
43680  # Note: m4 eats our [], so we need to use [ and ] instead.
43681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43682  if test "x$has_forbidden_chars" != x; then
43683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43687      # Going to short mode and back again did indeed matter. Since short mode is
43688      # case insensitive, let's make it lowercase to improve readability.
43689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43690      # Now convert it back to Unix-style (cygpath)
43691      input_path=`$CYGPATH -u "$shortmode_path"`
43692      new_path="$input_path"
43693    fi
43694  fi
43695
43696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43697  if test "x$test_cygdrive_prefix" = x; then
43698    # As a simple fix, exclude /usr/bin since it's not a real path.
43699    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43701      # a path prefixed by /cygdrive for fixpath to work.
43702      new_path="$CYGWIN_ROOT_PATH$input_path"
43703    fi
43704  fi
43705
43706  # remove trailing .exe if any
43707  new_path="${new_path/%.exe/}"
43708
43709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43710
43711  # First separate the path from the arguments. This will split at the first
43712  # space.
43713  complete="$OBJCOPY"
43714  path="${complete%% *}"
43715  tmp="$complete EOL"
43716  arguments="${tmp#* }"
43717
43718  # Input might be given as Windows format, start by converting to
43719  # unix format.
43720  new_path="$path"
43721
43722  windows_path="$new_path"
43723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43724    unix_path=`$CYGPATH -u "$windows_path"`
43725    new_path="$unix_path"
43726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43728    new_path="$unix_path"
43729  fi
43730
43731
43732  # Now try to locate executable using which
43733  new_path=`$WHICH "$new_path" 2> /dev/null`
43734
43735  if test "x$new_path" = x; then
43736    # Oops. Which didn't find the executable.
43737    # The splitting of arguments from the executable at a space might have been incorrect,
43738    # since paths with space are more likely in Windows. Give it another try with the whole
43739    # argument.
43740    path="$complete"
43741    arguments="EOL"
43742    new_path="$path"
43743
43744  windows_path="$new_path"
43745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43746    unix_path=`$CYGPATH -u "$windows_path"`
43747    new_path="$unix_path"
43748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43750    new_path="$unix_path"
43751  fi
43752
43753
43754    new_path=`$WHICH "$new_path" 2> /dev/null`
43755    # bat and cmd files are not always considered executable in MSYS causing which
43756    # to not find them
43757    if test "x$new_path" = x \
43758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43760      new_path="$path"
43761
43762  windows_path="$new_path"
43763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43764    unix_path=`$CYGPATH -u "$windows_path"`
43765    new_path="$unix_path"
43766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43768    new_path="$unix_path"
43769  fi
43770
43771    fi
43772
43773    if test "x$new_path" = x; then
43774      # It's still not found. Now this is an unrecoverable error.
43775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43776$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43777      has_space=`$ECHO "$complete" | $GREP " "`
43778      if test "x$has_space" != x; then
43779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43781      fi
43782      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43783    fi
43784  fi
43785
43786  # Now new_path has a complete unix path to the binary
43787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43788    # Keep paths in /bin as-is, but remove trailing .exe if any
43789    new_path="${new_path/%.exe/}"
43790    # Do not save /bin paths to all_fixpath_prefixes!
43791  else
43792    # Not in mixed or Windows style, start by that.
43793    new_path=`cmd //c echo $new_path`
43794
43795  input_path="$new_path"
43796  # Check if we need to convert this using DOS-style short mode. If the path
43797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43798  # take no chances and rewrite it.
43799  # Note: m4 eats our [], so we need to use [ and ] instead.
43800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43801  if test "x$has_forbidden_chars" != x; then
43802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43804  fi
43805
43806    # Output is in $new_path
43807
43808  windows_path="$new_path"
43809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43810    unix_path=`$CYGPATH -u "$windows_path"`
43811    new_path="$unix_path"
43812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43814    new_path="$unix_path"
43815  fi
43816
43817    # remove trailing .exe if any
43818    new_path="${new_path/%.exe/}"
43819
43820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43822  fi
43823
43824    else
43825      # We're on a unix platform. Hooray! :)
43826      # First separate the path from the arguments. This will split at the first
43827      # space.
43828      complete="$OBJCOPY"
43829      path="${complete%% *}"
43830      tmp="$complete EOL"
43831      arguments="${tmp#* }"
43832
43833      # Cannot rely on the command "which" here since it doesn't always work.
43834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43835      if test -z "$is_absolute_path"; then
43836        # Path to executable is not absolute. Find it.
43837        IFS_save="$IFS"
43838        IFS=:
43839        for p in $PATH; do
43840          if test -f "$p/$path" && test -x "$p/$path"; then
43841            new_path="$p/$path"
43842            break
43843          fi
43844        done
43845        IFS="$IFS_save"
43846      else
43847        # This is an absolute path, we can use it without further modifications.
43848        new_path="$path"
43849      fi
43850
43851      if test "x$new_path" = x; then
43852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43853$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43854        has_space=`$ECHO "$complete" | $GREP " "`
43855        if test "x$has_space" != x; then
43856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43858        fi
43859        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43860      fi
43861    fi
43862
43863    # Now join together the path and the arguments once again
43864    if test "x$arguments" != xEOL; then
43865      new_complete="$new_path ${arguments% *}"
43866    else
43867      new_complete="$new_path"
43868    fi
43869
43870    if test "x$complete" != "x$new_complete"; then
43871      OBJCOPY="$new_complete"
43872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43873$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43874    fi
43875  fi
43876
43877      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43878        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43879        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43880        # - version number is last blank separate word on first line
43881        # - version number formats that have been seen:
43882        #   - <major>.<minor>
43883        #   - <major>.<minor>.<micro>
43884        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43885        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43886         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43887              -e 's/.* //' \
43888              -e '/^[01]\./b bad' \
43889              -e '/^2\./{' \
43890              -e '  s/^2\.//' \
43891              -e '  /^[0-9]$/b bad' \
43892              -e '  /^[0-9]\./b bad' \
43893              -e '  /^1[0-9]$/b bad' \
43894              -e '  /^1[0-9]\./b bad' \
43895              -e '  /^20\./b bad' \
43896              -e '  /^21\.0$/b bad' \
43897              -e '  /^21\.0\./b bad' \
43898              -e '}' \
43899              -e ':good' \
43900              -e 's/.*/VALID_VERSION/p' \
43901              -e 'q' \
43902              -e ':bad' \
43903              -e 's/.*/BAD_VERSION/p' \
43904              -e 'q'`
43905        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43906          OBJCOPY=
43907          { $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
43908$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43909          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43910$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43911          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43912$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43913          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43914$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43915          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43916$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43917        fi
43918      fi
43919    fi
43920  fi
43921
43922
43923
43924  # Publish this variable in the help.
43925
43926
43927  if [ -z "${OBJDUMP+x}" ]; then
43928    # The variable is not set by user, try to locate tool using the code snippet
43929    if test -n "$ac_tool_prefix"; then
43930  for ac_prog in gobjdump objdump
43931  do
43932    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43933set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43935$as_echo_n "checking for $ac_word... " >&6; }
43936if ${ac_cv_prog_OBJDUMP+:} false; then :
43937  $as_echo_n "(cached) " >&6
43938else
43939  if test -n "$OBJDUMP"; then
43940  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43941else
43942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43943for as_dir in $PATH
43944do
43945  IFS=$as_save_IFS
43946  test -z "$as_dir" && as_dir=.
43947    for ac_exec_ext in '' $ac_executable_extensions; do
43948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43949    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43951    break 2
43952  fi
43953done
43954  done
43955IFS=$as_save_IFS
43956
43957fi
43958fi
43959OBJDUMP=$ac_cv_prog_OBJDUMP
43960if test -n "$OBJDUMP"; then
43961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43962$as_echo "$OBJDUMP" >&6; }
43963else
43964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43965$as_echo "no" >&6; }
43966fi
43967
43968
43969    test -n "$OBJDUMP" && break
43970  done
43971fi
43972if test -z "$OBJDUMP"; then
43973  ac_ct_OBJDUMP=$OBJDUMP
43974  for ac_prog in gobjdump objdump
43975do
43976  # Extract the first word of "$ac_prog", so it can be a program name with args.
43977set dummy $ac_prog; ac_word=$2
43978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43979$as_echo_n "checking for $ac_word... " >&6; }
43980if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43981  $as_echo_n "(cached) " >&6
43982else
43983  if test -n "$ac_ct_OBJDUMP"; then
43984  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43985else
43986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43987for as_dir in $PATH
43988do
43989  IFS=$as_save_IFS
43990  test -z "$as_dir" && as_dir=.
43991    for ac_exec_ext in '' $ac_executable_extensions; do
43992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43993    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43995    break 2
43996  fi
43997done
43998  done
43999IFS=$as_save_IFS
44000
44001fi
44002fi
44003ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44004if test -n "$ac_ct_OBJDUMP"; then
44005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44006$as_echo "$ac_ct_OBJDUMP" >&6; }
44007else
44008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44009$as_echo "no" >&6; }
44010fi
44011
44012
44013  test -n "$ac_ct_OBJDUMP" && break
44014done
44015
44016  if test "x$ac_ct_OBJDUMP" = x; then
44017    OBJDUMP=""
44018  else
44019    case $cross_compiling:$ac_tool_warned in
44020yes:)
44021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44023ac_tool_warned=yes ;;
44024esac
44025    OBJDUMP=$ac_ct_OBJDUMP
44026  fi
44027fi
44028
44029  else
44030    # The variable is set, but is it from the command line or the environment?
44031
44032    # Try to remove the string !OBJDUMP! from our list.
44033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44035      # If it failed, the variable was not from the command line. Ignore it,
44036      # but warn the user (except for BASH, which is always set by the calling BASH).
44037      if test "xOBJDUMP" != xBASH; then
44038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44039$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44040      fi
44041      # Try to locate tool using the code snippet
44042      if test -n "$ac_tool_prefix"; then
44043  for ac_prog in gobjdump objdump
44044  do
44045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44048$as_echo_n "checking for $ac_word... " >&6; }
44049if ${ac_cv_prog_OBJDUMP+:} false; then :
44050  $as_echo_n "(cached) " >&6
44051else
44052  if test -n "$OBJDUMP"; then
44053  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44054else
44055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44056for as_dir in $PATH
44057do
44058  IFS=$as_save_IFS
44059  test -z "$as_dir" && as_dir=.
44060    for ac_exec_ext in '' $ac_executable_extensions; do
44061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44062    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44064    break 2
44065  fi
44066done
44067  done
44068IFS=$as_save_IFS
44069
44070fi
44071fi
44072OBJDUMP=$ac_cv_prog_OBJDUMP
44073if test -n "$OBJDUMP"; then
44074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44075$as_echo "$OBJDUMP" >&6; }
44076else
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44078$as_echo "no" >&6; }
44079fi
44080
44081
44082    test -n "$OBJDUMP" && break
44083  done
44084fi
44085if test -z "$OBJDUMP"; then
44086  ac_ct_OBJDUMP=$OBJDUMP
44087  for ac_prog in gobjdump objdump
44088do
44089  # Extract the first word of "$ac_prog", so it can be a program name with args.
44090set dummy $ac_prog; ac_word=$2
44091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44092$as_echo_n "checking for $ac_word... " >&6; }
44093if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44094  $as_echo_n "(cached) " >&6
44095else
44096  if test -n "$ac_ct_OBJDUMP"; then
44097  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44098else
44099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44100for as_dir in $PATH
44101do
44102  IFS=$as_save_IFS
44103  test -z "$as_dir" && as_dir=.
44104    for ac_exec_ext in '' $ac_executable_extensions; do
44105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44106    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44108    break 2
44109  fi
44110done
44111  done
44112IFS=$as_save_IFS
44113
44114fi
44115fi
44116ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44117if test -n "$ac_ct_OBJDUMP"; then
44118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44119$as_echo "$ac_ct_OBJDUMP" >&6; }
44120else
44121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44122$as_echo "no" >&6; }
44123fi
44124
44125
44126  test -n "$ac_ct_OBJDUMP" && break
44127done
44128
44129  if test "x$ac_ct_OBJDUMP" = x; then
44130    OBJDUMP=""
44131  else
44132    case $cross_compiling:$ac_tool_warned in
44133yes:)
44134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44136ac_tool_warned=yes ;;
44137esac
44138    OBJDUMP=$ac_ct_OBJDUMP
44139  fi
44140fi
44141
44142    else
44143      # If it succeeded, then it was overridden by the user. We will use it
44144      # for the tool.
44145
44146      # First remove it from the list of overridden variables, so we can test
44147      # for unknown variables in the end.
44148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44149
44150      # Check if we try to supply an empty value
44151      if test "x$OBJDUMP" = x; then
44152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44153$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44155$as_echo_n "checking for OBJDUMP... " >&6; }
44156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44157$as_echo "disabled" >&6; }
44158      else
44159        # Check if the provided tool contains a complete path.
44160        tool_specified="$OBJDUMP"
44161        tool_basename="${tool_specified##*/}"
44162        if test "x$tool_basename" = "x$tool_specified"; then
44163          # A command without a complete path is provided, search $PATH.
44164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44165$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44166          # Extract the first word of "$tool_basename", so it can be a program name with args.
44167set dummy $tool_basename; ac_word=$2
44168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44169$as_echo_n "checking for $ac_word... " >&6; }
44170if ${ac_cv_path_OBJDUMP+:} false; then :
44171  $as_echo_n "(cached) " >&6
44172else
44173  case $OBJDUMP in
44174  [\\/]* | ?:[\\/]*)
44175  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44176  ;;
44177  *)
44178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44179for as_dir in $PATH
44180do
44181  IFS=$as_save_IFS
44182  test -z "$as_dir" && as_dir=.
44183    for ac_exec_ext in '' $ac_executable_extensions; do
44184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44185    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44187    break 2
44188  fi
44189done
44190  done
44191IFS=$as_save_IFS
44192
44193  ;;
44194esac
44195fi
44196OBJDUMP=$ac_cv_path_OBJDUMP
44197if test -n "$OBJDUMP"; then
44198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44199$as_echo "$OBJDUMP" >&6; }
44200else
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44202$as_echo "no" >&6; }
44203fi
44204
44205
44206          if test "x$OBJDUMP" = x; then
44207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44208          fi
44209        else
44210          # Otherwise we believe it is a complete path. Use it as it is.
44211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44212$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44214$as_echo_n "checking for OBJDUMP... " >&6; }
44215          if test ! -x "$tool_specified"; then
44216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44217$as_echo "not found" >&6; }
44218            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44219          fi
44220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44221$as_echo "$tool_specified" >&6; }
44222        fi
44223      fi
44224    fi
44225
44226  fi
44227
44228
44229  if test "x$OBJDUMP" != x; then
44230    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44231    # bails if argument is missing.
44232
44233  # Only process if variable expands to non-empty
44234
44235  if test "x$OBJDUMP" != x; then
44236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44237
44238  # First separate the path from the arguments. This will split at the first
44239  # space.
44240  complete="$OBJDUMP"
44241  path="${complete%% *}"
44242  tmp="$complete EOL"
44243  arguments="${tmp#* }"
44244
44245  # Input might be given as Windows format, start by converting to
44246  # unix format.
44247  new_path=`$CYGPATH -u "$path"`
44248
44249  # Now try to locate executable using which
44250  new_path=`$WHICH "$new_path" 2> /dev/null`
44251  # bat and cmd files are not always considered executable in cygwin causing which
44252  # to not find them
44253  if test "x$new_path" = x \
44254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44256    new_path=`$CYGPATH -u "$path"`
44257  fi
44258  if test "x$new_path" = x; then
44259    # Oops. Which didn't find the executable.
44260    # The splitting of arguments from the executable at a space might have been incorrect,
44261    # since paths with space are more likely in Windows. Give it another try with the whole
44262    # argument.
44263    path="$complete"
44264    arguments="EOL"
44265    new_path=`$CYGPATH -u "$path"`
44266    new_path=`$WHICH "$new_path" 2> /dev/null`
44267    # bat and cmd files are not always considered executable in cygwin causing which
44268    # to not find them
44269    if test "x$new_path" = x \
44270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44272      new_path=`$CYGPATH -u "$path"`
44273    fi
44274    if test "x$new_path" = x; then
44275      # It's still not found. Now this is an unrecoverable error.
44276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44277$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44278      has_space=`$ECHO "$complete" | $GREP " "`
44279      if test "x$has_space" != x; then
44280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44282      fi
44283      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44284    fi
44285  fi
44286
44287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44290  # "foo.exe" is OK but "foo" is an error.
44291  #
44292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44293  # It is also a way to make sure we got the proper file name for the real test later on.
44294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44295  if test "x$test_shortpath" = x; then
44296    # Short path failed, file does not exist as specified.
44297    # Try adding .exe or .cmd
44298    if test -f "${new_path}.exe"; then
44299      input_to_shortpath="${new_path}.exe"
44300    elif test -f "${new_path}.cmd"; then
44301      input_to_shortpath="${new_path}.cmd"
44302    else
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44304$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44307      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44308    fi
44309  else
44310    input_to_shortpath="$new_path"
44311  fi
44312
44313  # Call helper function which possibly converts this using DOS-style short mode.
44314  # If so, the updated path is stored in $new_path.
44315  new_path="$input_to_shortpath"
44316
44317  input_path="$input_to_shortpath"
44318  # Check if we need to convert this using DOS-style short mode. If the path
44319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44320  # take no chances and rewrite it.
44321  # Note: m4 eats our [], so we need to use [ and ] instead.
44322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44323  if test "x$has_forbidden_chars" != x; then
44324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44328      # Going to short mode and back again did indeed matter. Since short mode is
44329      # case insensitive, let's make it lowercase to improve readability.
44330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44331      # Now convert it back to Unix-style (cygpath)
44332      input_path=`$CYGPATH -u "$shortmode_path"`
44333      new_path="$input_path"
44334    fi
44335  fi
44336
44337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44338  if test "x$test_cygdrive_prefix" = x; then
44339    # As a simple fix, exclude /usr/bin since it's not a real path.
44340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44342      # a path prefixed by /cygdrive for fixpath to work.
44343      new_path="$CYGWIN_ROOT_PATH$input_path"
44344    fi
44345  fi
44346
44347  # remove trailing .exe if any
44348  new_path="${new_path/%.exe/}"
44349
44350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44351
44352  # First separate the path from the arguments. This will split at the first
44353  # space.
44354  complete="$OBJDUMP"
44355  path="${complete%% *}"
44356  tmp="$complete EOL"
44357  arguments="${tmp#* }"
44358
44359  # Input might be given as Windows format, start by converting to
44360  # unix format.
44361  new_path="$path"
44362
44363  windows_path="$new_path"
44364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44365    unix_path=`$CYGPATH -u "$windows_path"`
44366    new_path="$unix_path"
44367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44369    new_path="$unix_path"
44370  fi
44371
44372
44373  # Now try to locate executable using which
44374  new_path=`$WHICH "$new_path" 2> /dev/null`
44375
44376  if test "x$new_path" = x; then
44377    # Oops. Which didn't find the executable.
44378    # The splitting of arguments from the executable at a space might have been incorrect,
44379    # since paths with space are more likely in Windows. Give it another try with the whole
44380    # argument.
44381    path="$complete"
44382    arguments="EOL"
44383    new_path="$path"
44384
44385  windows_path="$new_path"
44386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44387    unix_path=`$CYGPATH -u "$windows_path"`
44388    new_path="$unix_path"
44389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44391    new_path="$unix_path"
44392  fi
44393
44394
44395    new_path=`$WHICH "$new_path" 2> /dev/null`
44396    # bat and cmd files are not always considered executable in MSYS causing which
44397    # to not find them
44398    if test "x$new_path" = x \
44399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44401      new_path="$path"
44402
44403  windows_path="$new_path"
44404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44405    unix_path=`$CYGPATH -u "$windows_path"`
44406    new_path="$unix_path"
44407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44409    new_path="$unix_path"
44410  fi
44411
44412    fi
44413
44414    if test "x$new_path" = x; then
44415      # It's still not found. Now this is an unrecoverable error.
44416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44417$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44418      has_space=`$ECHO "$complete" | $GREP " "`
44419      if test "x$has_space" != x; then
44420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44422      fi
44423      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44424    fi
44425  fi
44426
44427  # Now new_path has a complete unix path to the binary
44428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44429    # Keep paths in /bin as-is, but remove trailing .exe if any
44430    new_path="${new_path/%.exe/}"
44431    # Do not save /bin paths to all_fixpath_prefixes!
44432  else
44433    # Not in mixed or Windows style, start by that.
44434    new_path=`cmd //c echo $new_path`
44435
44436  input_path="$new_path"
44437  # Check if we need to convert this using DOS-style short mode. If the path
44438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44439  # take no chances and rewrite it.
44440  # Note: m4 eats our [], so we need to use [ and ] instead.
44441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44442  if test "x$has_forbidden_chars" != x; then
44443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44445  fi
44446
44447    # Output is in $new_path
44448
44449  windows_path="$new_path"
44450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44451    unix_path=`$CYGPATH -u "$windows_path"`
44452    new_path="$unix_path"
44453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44455    new_path="$unix_path"
44456  fi
44457
44458    # remove trailing .exe if any
44459    new_path="${new_path/%.exe/}"
44460
44461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44463  fi
44464
44465    else
44466      # We're on a unix platform. Hooray! :)
44467      # First separate the path from the arguments. This will split at the first
44468      # space.
44469      complete="$OBJDUMP"
44470      path="${complete%% *}"
44471      tmp="$complete EOL"
44472      arguments="${tmp#* }"
44473
44474      # Cannot rely on the command "which" here since it doesn't always work.
44475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44476      if test -z "$is_absolute_path"; then
44477        # Path to executable is not absolute. Find it.
44478        IFS_save="$IFS"
44479        IFS=:
44480        for p in $PATH; do
44481          if test -f "$p/$path" && test -x "$p/$path"; then
44482            new_path="$p/$path"
44483            break
44484          fi
44485        done
44486        IFS="$IFS_save"
44487      else
44488        # This is an absolute path, we can use it without further modifications.
44489        new_path="$path"
44490      fi
44491
44492      if test "x$new_path" = x; then
44493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44494$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44495        has_space=`$ECHO "$complete" | $GREP " "`
44496        if test "x$has_space" != x; then
44497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44499        fi
44500        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44501      fi
44502    fi
44503
44504    # Now join together the path and the arguments once again
44505    if test "x$arguments" != xEOL; then
44506      new_complete="$new_path ${arguments% *}"
44507    else
44508      new_complete="$new_path"
44509    fi
44510
44511    if test "x$complete" != "x$new_complete"; then
44512      OBJDUMP="$new_complete"
44513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44514$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44515    fi
44516  fi
44517
44518  fi
44519
44520
44521  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44522  # to remain in place. Otherwise the compiler will not work in some siutations
44523  # in later configure checks.
44524  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44525    PATH="$OLD_PATH"
44526  fi
44527
44528  # Restore the flags to the user specified values.
44529  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44530  CFLAGS="$ORG_CFLAGS"
44531  CXXFLAGS="$ORG_CXXFLAGS"
44532
44533
44534# Finally do some processing after the detection phase
44535
44536  if test "x$COMPILE_TYPE" = "xcross"; then
44537    # Now we need to find a C/C++ compiler that can build executables for the
44538    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44539    # used once. Also, we need to do this without adding a tools dir to the
44540    # path, otherwise we might pick up cross-compilers which don't use standard
44541    # naming.
44542
44543    OLDPATH="$PATH"
44544
44545
44546# Check whether --with-build-devkit was given.
44547if test "${with_build_devkit+set}" = set; then :
44548  withval=$with_build_devkit;
44549fi
44550
44551    if test "x$with_build_devkit" = "xyes"; then
44552      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44553    elif test -n "$with_build_devkit"; then
44554      if test ! -d "$with_build_devkit"; then
44555        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44556      else
44557
44558  # Only process if variable expands to non-empty
44559
44560  if test "x$with_build_devkit" != x; then
44561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44562
44563  # Input might be given as Windows format, start by converting to
44564  # unix format.
44565  path="$with_build_devkit"
44566  new_path=`$CYGPATH -u "$path"`
44567
44568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44571  # "foo.exe" is OK but "foo" is an error.
44572  #
44573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44574  # It is also a way to make sure we got the proper file name for the real test later on.
44575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44576  if test "x$test_shortpath" = x; then
44577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44578$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44579    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44580  fi
44581
44582  # Call helper function which possibly converts this using DOS-style short mode.
44583  # If so, the updated path is stored in $new_path.
44584
44585  input_path="$new_path"
44586  # Check if we need to convert this using DOS-style short mode. If the path
44587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44588  # take no chances and rewrite it.
44589  # Note: m4 eats our [], so we need to use [ and ] instead.
44590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44591  if test "x$has_forbidden_chars" != x; then
44592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44596      # Going to short mode and back again did indeed matter. Since short mode is
44597      # case insensitive, let's make it lowercase to improve readability.
44598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44599      # Now convert it back to Unix-style (cygpath)
44600      input_path=`$CYGPATH -u "$shortmode_path"`
44601      new_path="$input_path"
44602    fi
44603  fi
44604
44605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44606  if test "x$test_cygdrive_prefix" = x; then
44607    # As a simple fix, exclude /usr/bin since it's not a real path.
44608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44610      # a path prefixed by /cygdrive for fixpath to work.
44611      new_path="$CYGWIN_ROOT_PATH$input_path"
44612    fi
44613  fi
44614
44615
44616  if test "x$path" != "x$new_path"; then
44617    with_build_devkit="$new_path"
44618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44619$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44620  fi
44621
44622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44623
44624  path="$with_build_devkit"
44625  has_colon=`$ECHO $path | $GREP ^.:`
44626  new_path="$path"
44627  if test "x$has_colon" = x; then
44628    # Not in mixed or Windows style, start by that.
44629    new_path=`cmd //c echo $path`
44630  fi
44631
44632
44633  input_path="$new_path"
44634  # Check if we need to convert this using DOS-style short mode. If the path
44635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44636  # take no chances and rewrite it.
44637  # Note: m4 eats our [], so we need to use [ and ] instead.
44638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44639  if test "x$has_forbidden_chars" != x; then
44640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44642  fi
44643
44644
44645  windows_path="$new_path"
44646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44647    unix_path=`$CYGPATH -u "$windows_path"`
44648    new_path="$unix_path"
44649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44651    new_path="$unix_path"
44652  fi
44653
44654  if test "x$path" != "x$new_path"; then
44655    with_build_devkit="$new_path"
44656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44657$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44658  fi
44659
44660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44662
44663    else
44664      # We're on a unix platform. Hooray! :)
44665      path="$with_build_devkit"
44666      has_space=`$ECHO "$path" | $GREP " "`
44667      if test "x$has_space" != x; then
44668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44669$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44671      fi
44672
44673      # Use eval to expand a potential ~
44674      eval path="$path"
44675      if test ! -f "$path" && test ! -d "$path"; then
44676        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44677      fi
44678
44679      if test -d "$path"; then
44680        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44681      else
44682        dir="`$DIRNAME "$path"`"
44683        base="`$BASENAME "$path"`"
44684        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44685      fi
44686    fi
44687  fi
44688
44689        BUILD_DEVKIT_ROOT="$with_build_devkit"
44690        # Check for a meta data info file in the root of the devkit
44691        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44692          # Process devkit.info so that existing devkit variables are not
44693          # modified by this
44694          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44695              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44696              -e "s/\$host/\$build/g" \
44697              $BUILD_DEVKIT_ROOT/devkit.info \
44698              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44699          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44700          # This potentially sets the following:
44701          # A descriptive name of the devkit
44702
44703  if test "x$BUILD_DEVKIT_NAME" = x; then
44704    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44705  fi
44706
44707          # Corresponds to --with-extra-path
44708
44709  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44710    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44711  fi
44712
44713          # Corresponds to --with-toolchain-path
44714
44715  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44716    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44717  fi
44718
44719          # Corresponds to --with-sysroot
44720
44721  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44722    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44723  fi
44724
44725          # Skip the Window specific parts
44726        fi
44727
44728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44729$as_echo_n "checking for build platform devkit... " >&6; }
44730        if test "x$BUILD_DEVKIT_NAME" != x; then
44731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44732$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44733        else
44734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44735$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44736        fi
44737
44738        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44739
44740  if test "x$BUILD_SYSROOT" != "x"; then
44741    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44742      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44743        # Solaris Studio does not have a concept of sysroot. Instead we must
44744        # make sure the default include and lib dirs are appended to each
44745        # compile and link command line. Must also add -I-xbuiltin to enable
44746        # inlining of system functions and intrinsics.
44747        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44748        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44749            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44750      fi
44751    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44752      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44753      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44754    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44755      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44756      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44757    fi
44758    # The global CFLAGS and LDFLAGS variables need these for configure to function
44759    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44760    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44761    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44762    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44763  fi
44764
44765  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44766    # We also need -iframework<path>/System/Library/Frameworks
44767    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44768    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44769    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44770    # set this here so it doesn't have to be peppered throughout the forest
44771    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44772    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44773  fi
44774
44775
44776
44777
44778
44779         # Fallback default of just /bin if DEVKIT_PATH is not defined
44780        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44781          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44782        fi
44783        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44784      fi
44785    fi
44786
44787    # FIXME: we should list the discovered compilers as an exclude pattern!
44788    # If we do that, we can do this detection before POST_DETECTION, and still
44789    # find the build compilers in the tools dir, if needed.
44790
44791
44792
44793  # Publish this variable in the help.
44794
44795
44796  if [ -z "${BUILD_CC+x}" ]; then
44797    # The variable is not set by user, try to locate tool using the code snippet
44798    for ac_prog in cl cc gcc
44799do
44800  # Extract the first word of "$ac_prog", so it can be a program name with args.
44801set dummy $ac_prog; ac_word=$2
44802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44803$as_echo_n "checking for $ac_word... " >&6; }
44804if ${ac_cv_path_BUILD_CC+:} false; then :
44805  $as_echo_n "(cached) " >&6
44806else
44807  case $BUILD_CC in
44808  [\\/]* | ?:[\\/]*)
44809  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44810  ;;
44811  *)
44812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44813for as_dir in $PATH
44814do
44815  IFS=$as_save_IFS
44816  test -z "$as_dir" && as_dir=.
44817    for ac_exec_ext in '' $ac_executable_extensions; do
44818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44819    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44821    break 2
44822  fi
44823done
44824  done
44825IFS=$as_save_IFS
44826
44827  ;;
44828esac
44829fi
44830BUILD_CC=$ac_cv_path_BUILD_CC
44831if test -n "$BUILD_CC"; then
44832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44833$as_echo "$BUILD_CC" >&6; }
44834else
44835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44836$as_echo "no" >&6; }
44837fi
44838
44839
44840  test -n "$BUILD_CC" && break
44841done
44842
44843  else
44844    # The variable is set, but is it from the command line or the environment?
44845
44846    # Try to remove the string !BUILD_CC! from our list.
44847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44849      # If it failed, the variable was not from the command line. Ignore it,
44850      # but warn the user (except for BASH, which is always set by the calling BASH).
44851      if test "xBUILD_CC" != xBASH; then
44852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44853$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44854      fi
44855      # Try to locate tool using the code snippet
44856      for ac_prog in cl cc gcc
44857do
44858  # Extract the first word of "$ac_prog", so it can be a program name with args.
44859set dummy $ac_prog; ac_word=$2
44860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44861$as_echo_n "checking for $ac_word... " >&6; }
44862if ${ac_cv_path_BUILD_CC+:} false; then :
44863  $as_echo_n "(cached) " >&6
44864else
44865  case $BUILD_CC in
44866  [\\/]* | ?:[\\/]*)
44867  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44868  ;;
44869  *)
44870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44871for as_dir in $PATH
44872do
44873  IFS=$as_save_IFS
44874  test -z "$as_dir" && as_dir=.
44875    for ac_exec_ext in '' $ac_executable_extensions; do
44876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44877    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44879    break 2
44880  fi
44881done
44882  done
44883IFS=$as_save_IFS
44884
44885  ;;
44886esac
44887fi
44888BUILD_CC=$ac_cv_path_BUILD_CC
44889if test -n "$BUILD_CC"; then
44890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44891$as_echo "$BUILD_CC" >&6; }
44892else
44893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44894$as_echo "no" >&6; }
44895fi
44896
44897
44898  test -n "$BUILD_CC" && break
44899done
44900
44901    else
44902      # If it succeeded, then it was overridden by the user. We will use it
44903      # for the tool.
44904
44905      # First remove it from the list of overridden variables, so we can test
44906      # for unknown variables in the end.
44907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44908
44909      # Check if we try to supply an empty value
44910      if test "x$BUILD_CC" = x; then
44911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44912$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44914$as_echo_n "checking for BUILD_CC... " >&6; }
44915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44916$as_echo "disabled" >&6; }
44917      else
44918        # Check if the provided tool contains a complete path.
44919        tool_specified="$BUILD_CC"
44920        tool_basename="${tool_specified##*/}"
44921        if test "x$tool_basename" = "x$tool_specified"; then
44922          # A command without a complete path is provided, search $PATH.
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44924$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44925          # Extract the first word of "$tool_basename", so it can be a program name with args.
44926set dummy $tool_basename; ac_word=$2
44927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44928$as_echo_n "checking for $ac_word... " >&6; }
44929if ${ac_cv_path_BUILD_CC+:} false; then :
44930  $as_echo_n "(cached) " >&6
44931else
44932  case $BUILD_CC in
44933  [\\/]* | ?:[\\/]*)
44934  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44935  ;;
44936  *)
44937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44938for as_dir in $PATH
44939do
44940  IFS=$as_save_IFS
44941  test -z "$as_dir" && as_dir=.
44942    for ac_exec_ext in '' $ac_executable_extensions; do
44943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44944    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44946    break 2
44947  fi
44948done
44949  done
44950IFS=$as_save_IFS
44951
44952  ;;
44953esac
44954fi
44955BUILD_CC=$ac_cv_path_BUILD_CC
44956if test -n "$BUILD_CC"; then
44957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44958$as_echo "$BUILD_CC" >&6; }
44959else
44960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44961$as_echo "no" >&6; }
44962fi
44963
44964
44965          if test "x$BUILD_CC" = x; then
44966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44967          fi
44968        else
44969          # Otherwise we believe it is a complete path. Use it as it is.
44970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44971$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44973$as_echo_n "checking for BUILD_CC... " >&6; }
44974          if test ! -x "$tool_specified"; then
44975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44976$as_echo "not found" >&6; }
44977            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44978          fi
44979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44980$as_echo "$tool_specified" >&6; }
44981        fi
44982      fi
44983    fi
44984
44985  fi
44986
44987
44988
44989  if test "x$BUILD_CC" = x; then
44990    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44991  fi
44992
44993
44994
44995  # Only process if variable expands to non-empty
44996
44997  if test "x$BUILD_CC" != x; then
44998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44999
45000  # First separate the path from the arguments. This will split at the first
45001  # space.
45002  complete="$BUILD_CC"
45003  path="${complete%% *}"
45004  tmp="$complete EOL"
45005  arguments="${tmp#* }"
45006
45007  # Input might be given as Windows format, start by converting to
45008  # unix format.
45009  new_path=`$CYGPATH -u "$path"`
45010
45011  # Now try to locate executable using which
45012  new_path=`$WHICH "$new_path" 2> /dev/null`
45013  # bat and cmd files are not always considered executable in cygwin causing which
45014  # to not find them
45015  if test "x$new_path" = x \
45016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45018    new_path=`$CYGPATH -u "$path"`
45019  fi
45020  if test "x$new_path" = x; then
45021    # Oops. Which didn't find the executable.
45022    # The splitting of arguments from the executable at a space might have been incorrect,
45023    # since paths with space are more likely in Windows. Give it another try with the whole
45024    # argument.
45025    path="$complete"
45026    arguments="EOL"
45027    new_path=`$CYGPATH -u "$path"`
45028    new_path=`$WHICH "$new_path" 2> /dev/null`
45029    # bat and cmd files are not always considered executable in cygwin causing which
45030    # to not find them
45031    if test "x$new_path" = x \
45032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45034      new_path=`$CYGPATH -u "$path"`
45035    fi
45036    if test "x$new_path" = x; then
45037      # It's still not found. Now this is an unrecoverable error.
45038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45039$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45040      has_space=`$ECHO "$complete" | $GREP " "`
45041      if test "x$has_space" != x; then
45042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45044      fi
45045      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45046    fi
45047  fi
45048
45049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45052  # "foo.exe" is OK but "foo" is an error.
45053  #
45054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45055  # It is also a way to make sure we got the proper file name for the real test later on.
45056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45057  if test "x$test_shortpath" = x; then
45058    # Short path failed, file does not exist as specified.
45059    # Try adding .exe or .cmd
45060    if test -f "${new_path}.exe"; then
45061      input_to_shortpath="${new_path}.exe"
45062    elif test -f "${new_path}.cmd"; then
45063      input_to_shortpath="${new_path}.cmd"
45064    else
45065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45066$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45069      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45070    fi
45071  else
45072    input_to_shortpath="$new_path"
45073  fi
45074
45075  # Call helper function which possibly converts this using DOS-style short mode.
45076  # If so, the updated path is stored in $new_path.
45077  new_path="$input_to_shortpath"
45078
45079  input_path="$input_to_shortpath"
45080  # Check if we need to convert this using DOS-style short mode. If the path
45081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45082  # take no chances and rewrite it.
45083  # Note: m4 eats our [], so we need to use [ and ] instead.
45084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45085  if test "x$has_forbidden_chars" != x; then
45086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45090      # Going to short mode and back again did indeed matter. Since short mode is
45091      # case insensitive, let's make it lowercase to improve readability.
45092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45093      # Now convert it back to Unix-style (cygpath)
45094      input_path=`$CYGPATH -u "$shortmode_path"`
45095      new_path="$input_path"
45096    fi
45097  fi
45098
45099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45100  if test "x$test_cygdrive_prefix" = x; then
45101    # As a simple fix, exclude /usr/bin since it's not a real path.
45102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45104      # a path prefixed by /cygdrive for fixpath to work.
45105      new_path="$CYGWIN_ROOT_PATH$input_path"
45106    fi
45107  fi
45108
45109  # remove trailing .exe if any
45110  new_path="${new_path/%.exe/}"
45111
45112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45113
45114  # First separate the path from the arguments. This will split at the first
45115  # space.
45116  complete="$BUILD_CC"
45117  path="${complete%% *}"
45118  tmp="$complete EOL"
45119  arguments="${tmp#* }"
45120
45121  # Input might be given as Windows format, start by converting to
45122  # unix format.
45123  new_path="$path"
45124
45125  windows_path="$new_path"
45126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45127    unix_path=`$CYGPATH -u "$windows_path"`
45128    new_path="$unix_path"
45129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45131    new_path="$unix_path"
45132  fi
45133
45134
45135  # Now try to locate executable using which
45136  new_path=`$WHICH "$new_path" 2> /dev/null`
45137
45138  if test "x$new_path" = x; then
45139    # Oops. Which didn't find the executable.
45140    # The splitting of arguments from the executable at a space might have been incorrect,
45141    # since paths with space are more likely in Windows. Give it another try with the whole
45142    # argument.
45143    path="$complete"
45144    arguments="EOL"
45145    new_path="$path"
45146
45147  windows_path="$new_path"
45148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45149    unix_path=`$CYGPATH -u "$windows_path"`
45150    new_path="$unix_path"
45151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45153    new_path="$unix_path"
45154  fi
45155
45156
45157    new_path=`$WHICH "$new_path" 2> /dev/null`
45158    # bat and cmd files are not always considered executable in MSYS causing which
45159    # to not find them
45160    if test "x$new_path" = x \
45161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45163      new_path="$path"
45164
45165  windows_path="$new_path"
45166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45167    unix_path=`$CYGPATH -u "$windows_path"`
45168    new_path="$unix_path"
45169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45171    new_path="$unix_path"
45172  fi
45173
45174    fi
45175
45176    if test "x$new_path" = x; then
45177      # It's still not found. Now this is an unrecoverable error.
45178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45179$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45180      has_space=`$ECHO "$complete" | $GREP " "`
45181      if test "x$has_space" != x; then
45182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45184      fi
45185      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45186    fi
45187  fi
45188
45189  # Now new_path has a complete unix path to the binary
45190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45191    # Keep paths in /bin as-is, but remove trailing .exe if any
45192    new_path="${new_path/%.exe/}"
45193    # Do not save /bin paths to all_fixpath_prefixes!
45194  else
45195    # Not in mixed or Windows style, start by that.
45196    new_path=`cmd //c echo $new_path`
45197
45198  input_path="$new_path"
45199  # Check if we need to convert this using DOS-style short mode. If the path
45200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45201  # take no chances and rewrite it.
45202  # Note: m4 eats our [], so we need to use [ and ] instead.
45203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45204  if test "x$has_forbidden_chars" != x; then
45205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45207  fi
45208
45209    # Output is in $new_path
45210
45211  windows_path="$new_path"
45212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45213    unix_path=`$CYGPATH -u "$windows_path"`
45214    new_path="$unix_path"
45215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45217    new_path="$unix_path"
45218  fi
45219
45220    # remove trailing .exe if any
45221    new_path="${new_path/%.exe/}"
45222
45223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45225  fi
45226
45227    else
45228      # We're on a unix platform. Hooray! :)
45229      # First separate the path from the arguments. This will split at the first
45230      # space.
45231      complete="$BUILD_CC"
45232      path="${complete%% *}"
45233      tmp="$complete EOL"
45234      arguments="${tmp#* }"
45235
45236      # Cannot rely on the command "which" here since it doesn't always work.
45237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45238      if test -z "$is_absolute_path"; then
45239        # Path to executable is not absolute. Find it.
45240        IFS_save="$IFS"
45241        IFS=:
45242        for p in $PATH; do
45243          if test -f "$p/$path" && test -x "$p/$path"; then
45244            new_path="$p/$path"
45245            break
45246          fi
45247        done
45248        IFS="$IFS_save"
45249      else
45250        # This is an absolute path, we can use it without further modifications.
45251        new_path="$path"
45252      fi
45253
45254      if test "x$new_path" = x; then
45255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45256$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45257        has_space=`$ECHO "$complete" | $GREP " "`
45258        if test "x$has_space" != x; then
45259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45261        fi
45262        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45263      fi
45264    fi
45265
45266    # Now join together the path and the arguments once again
45267    if test "x$arguments" != xEOL; then
45268      new_complete="$new_path ${arguments% *}"
45269    else
45270      new_complete="$new_path"
45271    fi
45272
45273    if test "x$complete" != "x$new_complete"; then
45274      BUILD_CC="$new_complete"
45275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45276$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45277    fi
45278  fi
45279
45280
45281
45282
45283  # Publish this variable in the help.
45284
45285
45286  if [ -z "${BUILD_CXX+x}" ]; then
45287    # The variable is not set by user, try to locate tool using the code snippet
45288    for ac_prog in cl CC g++
45289do
45290  # Extract the first word of "$ac_prog", so it can be a program name with args.
45291set dummy $ac_prog; ac_word=$2
45292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45293$as_echo_n "checking for $ac_word... " >&6; }
45294if ${ac_cv_path_BUILD_CXX+:} false; then :
45295  $as_echo_n "(cached) " >&6
45296else
45297  case $BUILD_CXX in
45298  [\\/]* | ?:[\\/]*)
45299  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45300  ;;
45301  *)
45302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45303for as_dir in $PATH
45304do
45305  IFS=$as_save_IFS
45306  test -z "$as_dir" && as_dir=.
45307    for ac_exec_ext in '' $ac_executable_extensions; do
45308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45309    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45311    break 2
45312  fi
45313done
45314  done
45315IFS=$as_save_IFS
45316
45317  ;;
45318esac
45319fi
45320BUILD_CXX=$ac_cv_path_BUILD_CXX
45321if test -n "$BUILD_CXX"; then
45322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45323$as_echo "$BUILD_CXX" >&6; }
45324else
45325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45326$as_echo "no" >&6; }
45327fi
45328
45329
45330  test -n "$BUILD_CXX" && break
45331done
45332
45333  else
45334    # The variable is set, but is it from the command line or the environment?
45335
45336    # Try to remove the string !BUILD_CXX! from our list.
45337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45339      # If it failed, the variable was not from the command line. Ignore it,
45340      # but warn the user (except for BASH, which is always set by the calling BASH).
45341      if test "xBUILD_CXX" != xBASH; then
45342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45343$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45344      fi
45345      # Try to locate tool using the code snippet
45346      for ac_prog in cl CC g++
45347do
45348  # Extract the first word of "$ac_prog", so it can be a program name with args.
45349set dummy $ac_prog; ac_word=$2
45350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45351$as_echo_n "checking for $ac_word... " >&6; }
45352if ${ac_cv_path_BUILD_CXX+:} false; then :
45353  $as_echo_n "(cached) " >&6
45354else
45355  case $BUILD_CXX in
45356  [\\/]* | ?:[\\/]*)
45357  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45358  ;;
45359  *)
45360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45361for as_dir in $PATH
45362do
45363  IFS=$as_save_IFS
45364  test -z "$as_dir" && as_dir=.
45365    for ac_exec_ext in '' $ac_executable_extensions; do
45366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45367    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45369    break 2
45370  fi
45371done
45372  done
45373IFS=$as_save_IFS
45374
45375  ;;
45376esac
45377fi
45378BUILD_CXX=$ac_cv_path_BUILD_CXX
45379if test -n "$BUILD_CXX"; then
45380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45381$as_echo "$BUILD_CXX" >&6; }
45382else
45383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45384$as_echo "no" >&6; }
45385fi
45386
45387
45388  test -n "$BUILD_CXX" && break
45389done
45390
45391    else
45392      # If it succeeded, then it was overridden by the user. We will use it
45393      # for the tool.
45394
45395      # First remove it from the list of overridden variables, so we can test
45396      # for unknown variables in the end.
45397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45398
45399      # Check if we try to supply an empty value
45400      if test "x$BUILD_CXX" = x; then
45401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45402$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45404$as_echo_n "checking for BUILD_CXX... " >&6; }
45405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45406$as_echo "disabled" >&6; }
45407      else
45408        # Check if the provided tool contains a complete path.
45409        tool_specified="$BUILD_CXX"
45410        tool_basename="${tool_specified##*/}"
45411        if test "x$tool_basename" = "x$tool_specified"; then
45412          # A command without a complete path is provided, search $PATH.
45413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45414$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45415          # Extract the first word of "$tool_basename", so it can be a program name with args.
45416set dummy $tool_basename; ac_word=$2
45417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45418$as_echo_n "checking for $ac_word... " >&6; }
45419if ${ac_cv_path_BUILD_CXX+:} false; then :
45420  $as_echo_n "(cached) " >&6
45421else
45422  case $BUILD_CXX in
45423  [\\/]* | ?:[\\/]*)
45424  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45425  ;;
45426  *)
45427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45428for as_dir in $PATH
45429do
45430  IFS=$as_save_IFS
45431  test -z "$as_dir" && as_dir=.
45432    for ac_exec_ext in '' $ac_executable_extensions; do
45433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45434    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45436    break 2
45437  fi
45438done
45439  done
45440IFS=$as_save_IFS
45441
45442  ;;
45443esac
45444fi
45445BUILD_CXX=$ac_cv_path_BUILD_CXX
45446if test -n "$BUILD_CXX"; then
45447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45448$as_echo "$BUILD_CXX" >&6; }
45449else
45450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45451$as_echo "no" >&6; }
45452fi
45453
45454
45455          if test "x$BUILD_CXX" = x; then
45456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45457          fi
45458        else
45459          # Otherwise we believe it is a complete path. Use it as it is.
45460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45461$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45463$as_echo_n "checking for BUILD_CXX... " >&6; }
45464          if test ! -x "$tool_specified"; then
45465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45466$as_echo "not found" >&6; }
45467            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45468          fi
45469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45470$as_echo "$tool_specified" >&6; }
45471        fi
45472      fi
45473    fi
45474
45475  fi
45476
45477
45478
45479  if test "x$BUILD_CXX" = x; then
45480    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45481  fi
45482
45483
45484
45485  # Only process if variable expands to non-empty
45486
45487  if test "x$BUILD_CXX" != x; then
45488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45489
45490  # First separate the path from the arguments. This will split at the first
45491  # space.
45492  complete="$BUILD_CXX"
45493  path="${complete%% *}"
45494  tmp="$complete EOL"
45495  arguments="${tmp#* }"
45496
45497  # Input might be given as Windows format, start by converting to
45498  # unix format.
45499  new_path=`$CYGPATH -u "$path"`
45500
45501  # Now try to locate executable using which
45502  new_path=`$WHICH "$new_path" 2> /dev/null`
45503  # bat and cmd files are not always considered executable in cygwin causing which
45504  # to not find them
45505  if test "x$new_path" = x \
45506      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45507      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45508    new_path=`$CYGPATH -u "$path"`
45509  fi
45510  if test "x$new_path" = x; then
45511    # Oops. Which didn't find the executable.
45512    # The splitting of arguments from the executable at a space might have been incorrect,
45513    # since paths with space are more likely in Windows. Give it another try with the whole
45514    # argument.
45515    path="$complete"
45516    arguments="EOL"
45517    new_path=`$CYGPATH -u "$path"`
45518    new_path=`$WHICH "$new_path" 2> /dev/null`
45519    # bat and cmd files are not always considered executable in cygwin causing which
45520    # to not find them
45521    if test "x$new_path" = x \
45522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45524      new_path=`$CYGPATH -u "$path"`
45525    fi
45526    if test "x$new_path" = x; then
45527      # It's still not found. Now this is an unrecoverable error.
45528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45529$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45530      has_space=`$ECHO "$complete" | $GREP " "`
45531      if test "x$has_space" != x; then
45532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45534      fi
45535      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45536    fi
45537  fi
45538
45539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45542  # "foo.exe" is OK but "foo" is an error.
45543  #
45544  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45545  # It is also a way to make sure we got the proper file name for the real test later on.
45546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45547  if test "x$test_shortpath" = x; then
45548    # Short path failed, file does not exist as specified.
45549    # Try adding .exe or .cmd
45550    if test -f "${new_path}.exe"; then
45551      input_to_shortpath="${new_path}.exe"
45552    elif test -f "${new_path}.cmd"; then
45553      input_to_shortpath="${new_path}.cmd"
45554    else
45555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45556$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45557      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45558$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45559      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45560    fi
45561  else
45562    input_to_shortpath="$new_path"
45563  fi
45564
45565  # Call helper function which possibly converts this using DOS-style short mode.
45566  # If so, the updated path is stored in $new_path.
45567  new_path="$input_to_shortpath"
45568
45569  input_path="$input_to_shortpath"
45570  # Check if we need to convert this using DOS-style short mode. If the path
45571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45572  # take no chances and rewrite it.
45573  # Note: m4 eats our [], so we need to use [ and ] instead.
45574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45575  if test "x$has_forbidden_chars" != x; then
45576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45580      # Going to short mode and back again did indeed matter. Since short mode is
45581      # case insensitive, let's make it lowercase to improve readability.
45582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45583      # Now convert it back to Unix-style (cygpath)
45584      input_path=`$CYGPATH -u "$shortmode_path"`
45585      new_path="$input_path"
45586    fi
45587  fi
45588
45589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45590  if test "x$test_cygdrive_prefix" = x; then
45591    # As a simple fix, exclude /usr/bin since it's not a real path.
45592    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45594      # a path prefixed by /cygdrive for fixpath to work.
45595      new_path="$CYGWIN_ROOT_PATH$input_path"
45596    fi
45597  fi
45598
45599  # remove trailing .exe if any
45600  new_path="${new_path/%.exe/}"
45601
45602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45603
45604  # First separate the path from the arguments. This will split at the first
45605  # space.
45606  complete="$BUILD_CXX"
45607  path="${complete%% *}"
45608  tmp="$complete EOL"
45609  arguments="${tmp#* }"
45610
45611  # Input might be given as Windows format, start by converting to
45612  # unix format.
45613  new_path="$path"
45614
45615  windows_path="$new_path"
45616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45617    unix_path=`$CYGPATH -u "$windows_path"`
45618    new_path="$unix_path"
45619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45621    new_path="$unix_path"
45622  fi
45623
45624
45625  # Now try to locate executable using which
45626  new_path=`$WHICH "$new_path" 2> /dev/null`
45627
45628  if test "x$new_path" = x; then
45629    # Oops. Which didn't find the executable.
45630    # The splitting of arguments from the executable at a space might have been incorrect,
45631    # since paths with space are more likely in Windows. Give it another try with the whole
45632    # argument.
45633    path="$complete"
45634    arguments="EOL"
45635    new_path="$path"
45636
45637  windows_path="$new_path"
45638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45639    unix_path=`$CYGPATH -u "$windows_path"`
45640    new_path="$unix_path"
45641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45643    new_path="$unix_path"
45644  fi
45645
45646
45647    new_path=`$WHICH "$new_path" 2> /dev/null`
45648    # bat and cmd files are not always considered executable in MSYS causing which
45649    # to not find them
45650    if test "x$new_path" = x \
45651        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45652        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45653      new_path="$path"
45654
45655  windows_path="$new_path"
45656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45657    unix_path=`$CYGPATH -u "$windows_path"`
45658    new_path="$unix_path"
45659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45661    new_path="$unix_path"
45662  fi
45663
45664    fi
45665
45666    if test "x$new_path" = x; then
45667      # It's still not found. Now this is an unrecoverable error.
45668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45669$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45670      has_space=`$ECHO "$complete" | $GREP " "`
45671      if test "x$has_space" != x; then
45672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45674      fi
45675      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45676    fi
45677  fi
45678
45679  # Now new_path has a complete unix path to the binary
45680  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45681    # Keep paths in /bin as-is, but remove trailing .exe if any
45682    new_path="${new_path/%.exe/}"
45683    # Do not save /bin paths to all_fixpath_prefixes!
45684  else
45685    # Not in mixed or Windows style, start by that.
45686    new_path=`cmd //c echo $new_path`
45687
45688  input_path="$new_path"
45689  # Check if we need to convert this using DOS-style short mode. If the path
45690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45691  # take no chances and rewrite it.
45692  # Note: m4 eats our [], so we need to use [ and ] instead.
45693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45694  if test "x$has_forbidden_chars" != x; then
45695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45697  fi
45698
45699    # Output is in $new_path
45700
45701  windows_path="$new_path"
45702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45703    unix_path=`$CYGPATH -u "$windows_path"`
45704    new_path="$unix_path"
45705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45707    new_path="$unix_path"
45708  fi
45709
45710    # remove trailing .exe if any
45711    new_path="${new_path/%.exe/}"
45712
45713    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45714    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45715  fi
45716
45717    else
45718      # We're on a unix platform. Hooray! :)
45719      # First separate the path from the arguments. This will split at the first
45720      # space.
45721      complete="$BUILD_CXX"
45722      path="${complete%% *}"
45723      tmp="$complete EOL"
45724      arguments="${tmp#* }"
45725
45726      # Cannot rely on the command "which" here since it doesn't always work.
45727      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45728      if test -z "$is_absolute_path"; then
45729        # Path to executable is not absolute. Find it.
45730        IFS_save="$IFS"
45731        IFS=:
45732        for p in $PATH; do
45733          if test -f "$p/$path" && test -x "$p/$path"; then
45734            new_path="$p/$path"
45735            break
45736          fi
45737        done
45738        IFS="$IFS_save"
45739      else
45740        # This is an absolute path, we can use it without further modifications.
45741        new_path="$path"
45742      fi
45743
45744      if test "x$new_path" = x; then
45745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45746$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45747        has_space=`$ECHO "$complete" | $GREP " "`
45748        if test "x$has_space" != x; then
45749          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45750$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45751        fi
45752        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45753      fi
45754    fi
45755
45756    # Now join together the path and the arguments once again
45757    if test "x$arguments" != xEOL; then
45758      new_complete="$new_path ${arguments% *}"
45759    else
45760      new_complete="$new_path"
45761    fi
45762
45763    if test "x$complete" != "x$new_complete"; then
45764      BUILD_CXX="$new_complete"
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45766$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45767    fi
45768  fi
45769
45770
45771
45772  # Publish this variable in the help.
45773
45774
45775  if [ -z "${BUILD_NM+x}" ]; then
45776    # The variable is not set by user, try to locate tool using the code snippet
45777    for ac_prog in nm gcc-nm
45778do
45779  # Extract the first word of "$ac_prog", so it can be a program name with args.
45780set dummy $ac_prog; ac_word=$2
45781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45782$as_echo_n "checking for $ac_word... " >&6; }
45783if ${ac_cv_path_BUILD_NM+:} false; then :
45784  $as_echo_n "(cached) " >&6
45785else
45786  case $BUILD_NM in
45787  [\\/]* | ?:[\\/]*)
45788  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45789  ;;
45790  *)
45791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45792for as_dir in $PATH
45793do
45794  IFS=$as_save_IFS
45795  test -z "$as_dir" && as_dir=.
45796    for ac_exec_ext in '' $ac_executable_extensions; do
45797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45798    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45800    break 2
45801  fi
45802done
45803  done
45804IFS=$as_save_IFS
45805
45806  ;;
45807esac
45808fi
45809BUILD_NM=$ac_cv_path_BUILD_NM
45810if test -n "$BUILD_NM"; then
45811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45812$as_echo "$BUILD_NM" >&6; }
45813else
45814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45815$as_echo "no" >&6; }
45816fi
45817
45818
45819  test -n "$BUILD_NM" && break
45820done
45821
45822  else
45823    # The variable is set, but is it from the command line or the environment?
45824
45825    # Try to remove the string !BUILD_NM! from our list.
45826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45828      # If it failed, the variable was not from the command line. Ignore it,
45829      # but warn the user (except for BASH, which is always set by the calling BASH).
45830      if test "xBUILD_NM" != xBASH; then
45831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45832$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45833      fi
45834      # Try to locate tool using the code snippet
45835      for ac_prog in nm gcc-nm
45836do
45837  # Extract the first word of "$ac_prog", so it can be a program name with args.
45838set dummy $ac_prog; ac_word=$2
45839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45840$as_echo_n "checking for $ac_word... " >&6; }
45841if ${ac_cv_path_BUILD_NM+:} false; then :
45842  $as_echo_n "(cached) " >&6
45843else
45844  case $BUILD_NM in
45845  [\\/]* | ?:[\\/]*)
45846  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45847  ;;
45848  *)
45849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45850for as_dir in $PATH
45851do
45852  IFS=$as_save_IFS
45853  test -z "$as_dir" && as_dir=.
45854    for ac_exec_ext in '' $ac_executable_extensions; do
45855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45856    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45858    break 2
45859  fi
45860done
45861  done
45862IFS=$as_save_IFS
45863
45864  ;;
45865esac
45866fi
45867BUILD_NM=$ac_cv_path_BUILD_NM
45868if test -n "$BUILD_NM"; then
45869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45870$as_echo "$BUILD_NM" >&6; }
45871else
45872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45873$as_echo "no" >&6; }
45874fi
45875
45876
45877  test -n "$BUILD_NM" && break
45878done
45879
45880    else
45881      # If it succeeded, then it was overridden by the user. We will use it
45882      # for the tool.
45883
45884      # First remove it from the list of overridden variables, so we can test
45885      # for unknown variables in the end.
45886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45887
45888      # Check if we try to supply an empty value
45889      if test "x$BUILD_NM" = x; then
45890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45891$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45893$as_echo_n "checking for BUILD_NM... " >&6; }
45894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45895$as_echo "disabled" >&6; }
45896      else
45897        # Check if the provided tool contains a complete path.
45898        tool_specified="$BUILD_NM"
45899        tool_basename="${tool_specified##*/}"
45900        if test "x$tool_basename" = "x$tool_specified"; then
45901          # A command without a complete path is provided, search $PATH.
45902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45903$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45904          # Extract the first word of "$tool_basename", so it can be a program name with args.
45905set dummy $tool_basename; ac_word=$2
45906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45907$as_echo_n "checking for $ac_word... " >&6; }
45908if ${ac_cv_path_BUILD_NM+:} false; then :
45909  $as_echo_n "(cached) " >&6
45910else
45911  case $BUILD_NM in
45912  [\\/]* | ?:[\\/]*)
45913  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45914  ;;
45915  *)
45916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45917for as_dir in $PATH
45918do
45919  IFS=$as_save_IFS
45920  test -z "$as_dir" && as_dir=.
45921    for ac_exec_ext in '' $ac_executable_extensions; do
45922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45923    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45925    break 2
45926  fi
45927done
45928  done
45929IFS=$as_save_IFS
45930
45931  ;;
45932esac
45933fi
45934BUILD_NM=$ac_cv_path_BUILD_NM
45935if test -n "$BUILD_NM"; then
45936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45937$as_echo "$BUILD_NM" >&6; }
45938else
45939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45940$as_echo "no" >&6; }
45941fi
45942
45943
45944          if test "x$BUILD_NM" = x; then
45945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45946          fi
45947        else
45948          # Otherwise we believe it is a complete path. Use it as it is.
45949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45950$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45952$as_echo_n "checking for BUILD_NM... " >&6; }
45953          if test ! -x "$tool_specified"; then
45954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45955$as_echo "not found" >&6; }
45956            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45957          fi
45958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45959$as_echo "$tool_specified" >&6; }
45960        fi
45961      fi
45962    fi
45963
45964  fi
45965
45966
45967
45968  # Only process if variable expands to non-empty
45969
45970  if test "x$BUILD_NM" != x; then
45971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45972
45973  # First separate the path from the arguments. This will split at the first
45974  # space.
45975  complete="$BUILD_NM"
45976  path="${complete%% *}"
45977  tmp="$complete EOL"
45978  arguments="${tmp#* }"
45979
45980  # Input might be given as Windows format, start by converting to
45981  # unix format.
45982  new_path=`$CYGPATH -u "$path"`
45983
45984  # Now try to locate executable using which
45985  new_path=`$WHICH "$new_path" 2> /dev/null`
45986  # bat and cmd files are not always considered executable in cygwin causing which
45987  # to not find them
45988  if test "x$new_path" = x \
45989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45991    new_path=`$CYGPATH -u "$path"`
45992  fi
45993  if test "x$new_path" = x; then
45994    # Oops. Which didn't find the executable.
45995    # The splitting of arguments from the executable at a space might have been incorrect,
45996    # since paths with space are more likely in Windows. Give it another try with the whole
45997    # argument.
45998    path="$complete"
45999    arguments="EOL"
46000    new_path=`$CYGPATH -u "$path"`
46001    new_path=`$WHICH "$new_path" 2> /dev/null`
46002    # bat and cmd files are not always considered executable in cygwin causing which
46003    # to not find them
46004    if test "x$new_path" = x \
46005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46007      new_path=`$CYGPATH -u "$path"`
46008    fi
46009    if test "x$new_path" = x; then
46010      # It's still not found. Now this is an unrecoverable error.
46011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46012$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46013      has_space=`$ECHO "$complete" | $GREP " "`
46014      if test "x$has_space" != x; then
46015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46017      fi
46018      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46019    fi
46020  fi
46021
46022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46025  # "foo.exe" is OK but "foo" is an error.
46026  #
46027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46028  # It is also a way to make sure we got the proper file name for the real test later on.
46029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46030  if test "x$test_shortpath" = x; then
46031    # Short path failed, file does not exist as specified.
46032    # Try adding .exe or .cmd
46033    if test -f "${new_path}.exe"; then
46034      input_to_shortpath="${new_path}.exe"
46035    elif test -f "${new_path}.cmd"; then
46036      input_to_shortpath="${new_path}.cmd"
46037    else
46038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46039$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46042      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46043    fi
46044  else
46045    input_to_shortpath="$new_path"
46046  fi
46047
46048  # Call helper function which possibly converts this using DOS-style short mode.
46049  # If so, the updated path is stored in $new_path.
46050  new_path="$input_to_shortpath"
46051
46052  input_path="$input_to_shortpath"
46053  # Check if we need to convert this using DOS-style short mode. If the path
46054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46055  # take no chances and rewrite it.
46056  # Note: m4 eats our [], so we need to use [ and ] instead.
46057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46058  if test "x$has_forbidden_chars" != x; then
46059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46063      # Going to short mode and back again did indeed matter. Since short mode is
46064      # case insensitive, let's make it lowercase to improve readability.
46065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46066      # Now convert it back to Unix-style (cygpath)
46067      input_path=`$CYGPATH -u "$shortmode_path"`
46068      new_path="$input_path"
46069    fi
46070  fi
46071
46072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46073  if test "x$test_cygdrive_prefix" = x; then
46074    # As a simple fix, exclude /usr/bin since it's not a real path.
46075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46077      # a path prefixed by /cygdrive for fixpath to work.
46078      new_path="$CYGWIN_ROOT_PATH$input_path"
46079    fi
46080  fi
46081
46082  # remove trailing .exe if any
46083  new_path="${new_path/%.exe/}"
46084
46085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46086
46087  # First separate the path from the arguments. This will split at the first
46088  # space.
46089  complete="$BUILD_NM"
46090  path="${complete%% *}"
46091  tmp="$complete EOL"
46092  arguments="${tmp#* }"
46093
46094  # Input might be given as Windows format, start by converting to
46095  # unix format.
46096  new_path="$path"
46097
46098  windows_path="$new_path"
46099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46100    unix_path=`$CYGPATH -u "$windows_path"`
46101    new_path="$unix_path"
46102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46104    new_path="$unix_path"
46105  fi
46106
46107
46108  # Now try to locate executable using which
46109  new_path=`$WHICH "$new_path" 2> /dev/null`
46110
46111  if test "x$new_path" = x; then
46112    # Oops. Which didn't find the executable.
46113    # The splitting of arguments from the executable at a space might have been incorrect,
46114    # since paths with space are more likely in Windows. Give it another try with the whole
46115    # argument.
46116    path="$complete"
46117    arguments="EOL"
46118    new_path="$path"
46119
46120  windows_path="$new_path"
46121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46122    unix_path=`$CYGPATH -u "$windows_path"`
46123    new_path="$unix_path"
46124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46126    new_path="$unix_path"
46127  fi
46128
46129
46130    new_path=`$WHICH "$new_path" 2> /dev/null`
46131    # bat and cmd files are not always considered executable in MSYS causing which
46132    # to not find them
46133    if test "x$new_path" = x \
46134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46136      new_path="$path"
46137
46138  windows_path="$new_path"
46139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46140    unix_path=`$CYGPATH -u "$windows_path"`
46141    new_path="$unix_path"
46142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46144    new_path="$unix_path"
46145  fi
46146
46147    fi
46148
46149    if test "x$new_path" = x; then
46150      # It's still not found. Now this is an unrecoverable error.
46151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46152$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46153      has_space=`$ECHO "$complete" | $GREP " "`
46154      if test "x$has_space" != x; then
46155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46157      fi
46158      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46159    fi
46160  fi
46161
46162  # Now new_path has a complete unix path to the binary
46163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46164    # Keep paths in /bin as-is, but remove trailing .exe if any
46165    new_path="${new_path/%.exe/}"
46166    # Do not save /bin paths to all_fixpath_prefixes!
46167  else
46168    # Not in mixed or Windows style, start by that.
46169    new_path=`cmd //c echo $new_path`
46170
46171  input_path="$new_path"
46172  # Check if we need to convert this using DOS-style short mode. If the path
46173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46174  # take no chances and rewrite it.
46175  # Note: m4 eats our [], so we need to use [ and ] instead.
46176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46177  if test "x$has_forbidden_chars" != x; then
46178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46180  fi
46181
46182    # Output is in $new_path
46183
46184  windows_path="$new_path"
46185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46186    unix_path=`$CYGPATH -u "$windows_path"`
46187    new_path="$unix_path"
46188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46190    new_path="$unix_path"
46191  fi
46192
46193    # remove trailing .exe if any
46194    new_path="${new_path/%.exe/}"
46195
46196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46198  fi
46199
46200    else
46201      # We're on a unix platform. Hooray! :)
46202      # First separate the path from the arguments. This will split at the first
46203      # space.
46204      complete="$BUILD_NM"
46205      path="${complete%% *}"
46206      tmp="$complete EOL"
46207      arguments="${tmp#* }"
46208
46209      # Cannot rely on the command "which" here since it doesn't always work.
46210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46211      if test -z "$is_absolute_path"; then
46212        # Path to executable is not absolute. Find it.
46213        IFS_save="$IFS"
46214        IFS=:
46215        for p in $PATH; do
46216          if test -f "$p/$path" && test -x "$p/$path"; then
46217            new_path="$p/$path"
46218            break
46219          fi
46220        done
46221        IFS="$IFS_save"
46222      else
46223        # This is an absolute path, we can use it without further modifications.
46224        new_path="$path"
46225      fi
46226
46227      if test "x$new_path" = x; then
46228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46229$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46230        has_space=`$ECHO "$complete" | $GREP " "`
46231        if test "x$has_space" != x; then
46232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46234        fi
46235        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46236      fi
46237    fi
46238
46239    # Now join together the path and the arguments once again
46240    if test "x$arguments" != xEOL; then
46241      new_complete="$new_path ${arguments% *}"
46242    else
46243      new_complete="$new_path"
46244    fi
46245
46246    if test "x$complete" != "x$new_complete"; then
46247      BUILD_NM="$new_complete"
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46249$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46250    fi
46251  fi
46252
46253
46254
46255  # Publish this variable in the help.
46256
46257
46258  if [ -z "${BUILD_AR+x}" ]; then
46259    # The variable is not set by user, try to locate tool using the code snippet
46260    for ac_prog in ar gcc-ar
46261do
46262  # Extract the first word of "$ac_prog", so it can be a program name with args.
46263set dummy $ac_prog; ac_word=$2
46264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46265$as_echo_n "checking for $ac_word... " >&6; }
46266if ${ac_cv_path_BUILD_AR+:} false; then :
46267  $as_echo_n "(cached) " >&6
46268else
46269  case $BUILD_AR in
46270  [\\/]* | ?:[\\/]*)
46271  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46272  ;;
46273  *)
46274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46275for as_dir in $PATH
46276do
46277  IFS=$as_save_IFS
46278  test -z "$as_dir" && as_dir=.
46279    for ac_exec_ext in '' $ac_executable_extensions; do
46280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46281    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46283    break 2
46284  fi
46285done
46286  done
46287IFS=$as_save_IFS
46288
46289  ;;
46290esac
46291fi
46292BUILD_AR=$ac_cv_path_BUILD_AR
46293if test -n "$BUILD_AR"; then
46294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46295$as_echo "$BUILD_AR" >&6; }
46296else
46297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46298$as_echo "no" >&6; }
46299fi
46300
46301
46302  test -n "$BUILD_AR" && break
46303done
46304
46305  else
46306    # The variable is set, but is it from the command line or the environment?
46307
46308    # Try to remove the string !BUILD_AR! from our list.
46309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46311      # If it failed, the variable was not from the command line. Ignore it,
46312      # but warn the user (except for BASH, which is always set by the calling BASH).
46313      if test "xBUILD_AR" != xBASH; then
46314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46315$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46316      fi
46317      # Try to locate tool using the code snippet
46318      for ac_prog in ar gcc-ar
46319do
46320  # Extract the first word of "$ac_prog", so it can be a program name with args.
46321set dummy $ac_prog; ac_word=$2
46322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46323$as_echo_n "checking for $ac_word... " >&6; }
46324if ${ac_cv_path_BUILD_AR+:} false; then :
46325  $as_echo_n "(cached) " >&6
46326else
46327  case $BUILD_AR in
46328  [\\/]* | ?:[\\/]*)
46329  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46330  ;;
46331  *)
46332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46333for as_dir in $PATH
46334do
46335  IFS=$as_save_IFS
46336  test -z "$as_dir" && as_dir=.
46337    for ac_exec_ext in '' $ac_executable_extensions; do
46338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46339    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46341    break 2
46342  fi
46343done
46344  done
46345IFS=$as_save_IFS
46346
46347  ;;
46348esac
46349fi
46350BUILD_AR=$ac_cv_path_BUILD_AR
46351if test -n "$BUILD_AR"; then
46352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46353$as_echo "$BUILD_AR" >&6; }
46354else
46355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46356$as_echo "no" >&6; }
46357fi
46358
46359
46360  test -n "$BUILD_AR" && break
46361done
46362
46363    else
46364      # If it succeeded, then it was overridden by the user. We will use it
46365      # for the tool.
46366
46367      # First remove it from the list of overridden variables, so we can test
46368      # for unknown variables in the end.
46369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46370
46371      # Check if we try to supply an empty value
46372      if test "x$BUILD_AR" = x; then
46373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46374$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46376$as_echo_n "checking for BUILD_AR... " >&6; }
46377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46378$as_echo "disabled" >&6; }
46379      else
46380        # Check if the provided tool contains a complete path.
46381        tool_specified="$BUILD_AR"
46382        tool_basename="${tool_specified##*/}"
46383        if test "x$tool_basename" = "x$tool_specified"; then
46384          # A command without a complete path is provided, search $PATH.
46385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46386$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46387          # Extract the first word of "$tool_basename", so it can be a program name with args.
46388set dummy $tool_basename; ac_word=$2
46389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46390$as_echo_n "checking for $ac_word... " >&6; }
46391if ${ac_cv_path_BUILD_AR+:} false; then :
46392  $as_echo_n "(cached) " >&6
46393else
46394  case $BUILD_AR in
46395  [\\/]* | ?:[\\/]*)
46396  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46397  ;;
46398  *)
46399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46400for as_dir in $PATH
46401do
46402  IFS=$as_save_IFS
46403  test -z "$as_dir" && as_dir=.
46404    for ac_exec_ext in '' $ac_executable_extensions; do
46405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46406    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46408    break 2
46409  fi
46410done
46411  done
46412IFS=$as_save_IFS
46413
46414  ;;
46415esac
46416fi
46417BUILD_AR=$ac_cv_path_BUILD_AR
46418if test -n "$BUILD_AR"; then
46419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46420$as_echo "$BUILD_AR" >&6; }
46421else
46422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46423$as_echo "no" >&6; }
46424fi
46425
46426
46427          if test "x$BUILD_AR" = x; then
46428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46429          fi
46430        else
46431          # Otherwise we believe it is a complete path. Use it as it is.
46432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46433$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46435$as_echo_n "checking for BUILD_AR... " >&6; }
46436          if test ! -x "$tool_specified"; then
46437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46438$as_echo "not found" >&6; }
46439            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46440          fi
46441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46442$as_echo "$tool_specified" >&6; }
46443        fi
46444      fi
46445    fi
46446
46447  fi
46448
46449
46450
46451  # Only process if variable expands to non-empty
46452
46453  if test "x$BUILD_AR" != x; then
46454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455
46456  # First separate the path from the arguments. This will split at the first
46457  # space.
46458  complete="$BUILD_AR"
46459  path="${complete%% *}"
46460  tmp="$complete EOL"
46461  arguments="${tmp#* }"
46462
46463  # Input might be given as Windows format, start by converting to
46464  # unix format.
46465  new_path=`$CYGPATH -u "$path"`
46466
46467  # Now try to locate executable using which
46468  new_path=`$WHICH "$new_path" 2> /dev/null`
46469  # bat and cmd files are not always considered executable in cygwin causing which
46470  # to not find them
46471  if test "x$new_path" = x \
46472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46474    new_path=`$CYGPATH -u "$path"`
46475  fi
46476  if test "x$new_path" = x; then
46477    # Oops. Which didn't find the executable.
46478    # The splitting of arguments from the executable at a space might have been incorrect,
46479    # since paths with space are more likely in Windows. Give it another try with the whole
46480    # argument.
46481    path="$complete"
46482    arguments="EOL"
46483    new_path=`$CYGPATH -u "$path"`
46484    new_path=`$WHICH "$new_path" 2> /dev/null`
46485    # bat and cmd files are not always considered executable in cygwin causing which
46486    # to not find them
46487    if test "x$new_path" = x \
46488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46490      new_path=`$CYGPATH -u "$path"`
46491    fi
46492    if test "x$new_path" = x; then
46493      # It's still not found. Now this is an unrecoverable error.
46494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46495$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46496      has_space=`$ECHO "$complete" | $GREP " "`
46497      if test "x$has_space" != x; then
46498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46500      fi
46501      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46502    fi
46503  fi
46504
46505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46508  # "foo.exe" is OK but "foo" is an error.
46509  #
46510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46511  # It is also a way to make sure we got the proper file name for the real test later on.
46512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46513  if test "x$test_shortpath" = x; then
46514    # Short path failed, file does not exist as specified.
46515    # Try adding .exe or .cmd
46516    if test -f "${new_path}.exe"; then
46517      input_to_shortpath="${new_path}.exe"
46518    elif test -f "${new_path}.cmd"; then
46519      input_to_shortpath="${new_path}.cmd"
46520    else
46521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46522$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46525      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46526    fi
46527  else
46528    input_to_shortpath="$new_path"
46529  fi
46530
46531  # Call helper function which possibly converts this using DOS-style short mode.
46532  # If so, the updated path is stored in $new_path.
46533  new_path="$input_to_shortpath"
46534
46535  input_path="$input_to_shortpath"
46536  # Check if we need to convert this using DOS-style short mode. If the path
46537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46538  # take no chances and rewrite it.
46539  # Note: m4 eats our [], so we need to use [ and ] instead.
46540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46541  if test "x$has_forbidden_chars" != x; then
46542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46546      # Going to short mode and back again did indeed matter. Since short mode is
46547      # case insensitive, let's make it lowercase to improve readability.
46548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46549      # Now convert it back to Unix-style (cygpath)
46550      input_path=`$CYGPATH -u "$shortmode_path"`
46551      new_path="$input_path"
46552    fi
46553  fi
46554
46555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46556  if test "x$test_cygdrive_prefix" = x; then
46557    # As a simple fix, exclude /usr/bin since it's not a real path.
46558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46560      # a path prefixed by /cygdrive for fixpath to work.
46561      new_path="$CYGWIN_ROOT_PATH$input_path"
46562    fi
46563  fi
46564
46565  # remove trailing .exe if any
46566  new_path="${new_path/%.exe/}"
46567
46568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46569
46570  # First separate the path from the arguments. This will split at the first
46571  # space.
46572  complete="$BUILD_AR"
46573  path="${complete%% *}"
46574  tmp="$complete EOL"
46575  arguments="${tmp#* }"
46576
46577  # Input might be given as Windows format, start by converting to
46578  # unix format.
46579  new_path="$path"
46580
46581  windows_path="$new_path"
46582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46583    unix_path=`$CYGPATH -u "$windows_path"`
46584    new_path="$unix_path"
46585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46587    new_path="$unix_path"
46588  fi
46589
46590
46591  # Now try to locate executable using which
46592  new_path=`$WHICH "$new_path" 2> /dev/null`
46593
46594  if test "x$new_path" = x; then
46595    # Oops. Which didn't find the executable.
46596    # The splitting of arguments from the executable at a space might have been incorrect,
46597    # since paths with space are more likely in Windows. Give it another try with the whole
46598    # argument.
46599    path="$complete"
46600    arguments="EOL"
46601    new_path="$path"
46602
46603  windows_path="$new_path"
46604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46605    unix_path=`$CYGPATH -u "$windows_path"`
46606    new_path="$unix_path"
46607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46609    new_path="$unix_path"
46610  fi
46611
46612
46613    new_path=`$WHICH "$new_path" 2> /dev/null`
46614    # bat and cmd files are not always considered executable in MSYS causing which
46615    # to not find them
46616    if test "x$new_path" = x \
46617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46619      new_path="$path"
46620
46621  windows_path="$new_path"
46622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46623    unix_path=`$CYGPATH -u "$windows_path"`
46624    new_path="$unix_path"
46625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46627    new_path="$unix_path"
46628  fi
46629
46630    fi
46631
46632    if test "x$new_path" = x; then
46633      # It's still not found. Now this is an unrecoverable error.
46634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46635$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46636      has_space=`$ECHO "$complete" | $GREP " "`
46637      if test "x$has_space" != x; then
46638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46640      fi
46641      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46642    fi
46643  fi
46644
46645  # Now new_path has a complete unix path to the binary
46646  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46647    # Keep paths in /bin as-is, but remove trailing .exe if any
46648    new_path="${new_path/%.exe/}"
46649    # Do not save /bin paths to all_fixpath_prefixes!
46650  else
46651    # Not in mixed or Windows style, start by that.
46652    new_path=`cmd //c echo $new_path`
46653
46654  input_path="$new_path"
46655  # Check if we need to convert this using DOS-style short mode. If the path
46656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46657  # take no chances and rewrite it.
46658  # Note: m4 eats our [], so we need to use [ and ] instead.
46659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46660  if test "x$has_forbidden_chars" != x; then
46661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46663  fi
46664
46665    # Output is in $new_path
46666
46667  windows_path="$new_path"
46668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46669    unix_path=`$CYGPATH -u "$windows_path"`
46670    new_path="$unix_path"
46671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46673    new_path="$unix_path"
46674  fi
46675
46676    # remove trailing .exe if any
46677    new_path="${new_path/%.exe/}"
46678
46679    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46680    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46681  fi
46682
46683    else
46684      # We're on a unix platform. Hooray! :)
46685      # First separate the path from the arguments. This will split at the first
46686      # space.
46687      complete="$BUILD_AR"
46688      path="${complete%% *}"
46689      tmp="$complete EOL"
46690      arguments="${tmp#* }"
46691
46692      # Cannot rely on the command "which" here since it doesn't always work.
46693      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46694      if test -z "$is_absolute_path"; then
46695        # Path to executable is not absolute. Find it.
46696        IFS_save="$IFS"
46697        IFS=:
46698        for p in $PATH; do
46699          if test -f "$p/$path" && test -x "$p/$path"; then
46700            new_path="$p/$path"
46701            break
46702          fi
46703        done
46704        IFS="$IFS_save"
46705      else
46706        # This is an absolute path, we can use it without further modifications.
46707        new_path="$path"
46708      fi
46709
46710      if test "x$new_path" = x; then
46711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46712$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46713        has_space=`$ECHO "$complete" | $GREP " "`
46714        if test "x$has_space" != x; then
46715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46717        fi
46718        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46719      fi
46720    fi
46721
46722    # Now join together the path and the arguments once again
46723    if test "x$arguments" != xEOL; then
46724      new_complete="$new_path ${arguments% *}"
46725    else
46726      new_complete="$new_path"
46727    fi
46728
46729    if test "x$complete" != "x$new_complete"; then
46730      BUILD_AR="$new_complete"
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46732$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46733    fi
46734  fi
46735
46736
46737
46738  # Publish this variable in the help.
46739
46740
46741  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46742    # The variable is not set by user, try to locate tool using the code snippet
46743    for ac_prog in objcopy
46744do
46745  # Extract the first word of "$ac_prog", so it can be a program name with args.
46746set dummy $ac_prog; ac_word=$2
46747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46748$as_echo_n "checking for $ac_word... " >&6; }
46749if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46750  $as_echo_n "(cached) " >&6
46751else
46752  case $BUILD_OBJCOPY in
46753  [\\/]* | ?:[\\/]*)
46754  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46755  ;;
46756  *)
46757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46758for as_dir in $PATH
46759do
46760  IFS=$as_save_IFS
46761  test -z "$as_dir" && as_dir=.
46762    for ac_exec_ext in '' $ac_executable_extensions; do
46763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46764    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46766    break 2
46767  fi
46768done
46769  done
46770IFS=$as_save_IFS
46771
46772  ;;
46773esac
46774fi
46775BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46776if test -n "$BUILD_OBJCOPY"; then
46777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46778$as_echo "$BUILD_OBJCOPY" >&6; }
46779else
46780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46781$as_echo "no" >&6; }
46782fi
46783
46784
46785  test -n "$BUILD_OBJCOPY" && break
46786done
46787
46788  else
46789    # The variable is set, but is it from the command line or the environment?
46790
46791    # Try to remove the string !BUILD_OBJCOPY! from our list.
46792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46794      # If it failed, the variable was not from the command line. Ignore it,
46795      # but warn the user (except for BASH, which is always set by the calling BASH).
46796      if test "xBUILD_OBJCOPY" != xBASH; then
46797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46798$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46799      fi
46800      # Try to locate tool using the code snippet
46801      for ac_prog in objcopy
46802do
46803  # Extract the first word of "$ac_prog", so it can be a program name with args.
46804set dummy $ac_prog; ac_word=$2
46805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46806$as_echo_n "checking for $ac_word... " >&6; }
46807if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46808  $as_echo_n "(cached) " >&6
46809else
46810  case $BUILD_OBJCOPY in
46811  [\\/]* | ?:[\\/]*)
46812  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46813  ;;
46814  *)
46815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46816for as_dir in $PATH
46817do
46818  IFS=$as_save_IFS
46819  test -z "$as_dir" && as_dir=.
46820    for ac_exec_ext in '' $ac_executable_extensions; do
46821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46822    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46824    break 2
46825  fi
46826done
46827  done
46828IFS=$as_save_IFS
46829
46830  ;;
46831esac
46832fi
46833BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46834if test -n "$BUILD_OBJCOPY"; then
46835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46836$as_echo "$BUILD_OBJCOPY" >&6; }
46837else
46838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46839$as_echo "no" >&6; }
46840fi
46841
46842
46843  test -n "$BUILD_OBJCOPY" && break
46844done
46845
46846    else
46847      # If it succeeded, then it was overridden by the user. We will use it
46848      # for the tool.
46849
46850      # First remove it from the list of overridden variables, so we can test
46851      # for unknown variables in the end.
46852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46853
46854      # Check if we try to supply an empty value
46855      if test "x$BUILD_OBJCOPY" = x; then
46856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46857$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46859$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46861$as_echo "disabled" >&6; }
46862      else
46863        # Check if the provided tool contains a complete path.
46864        tool_specified="$BUILD_OBJCOPY"
46865        tool_basename="${tool_specified##*/}"
46866        if test "x$tool_basename" = "x$tool_specified"; then
46867          # A command without a complete path is provided, search $PATH.
46868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46869$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46870          # Extract the first word of "$tool_basename", so it can be a program name with args.
46871set dummy $tool_basename; ac_word=$2
46872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46873$as_echo_n "checking for $ac_word... " >&6; }
46874if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46875  $as_echo_n "(cached) " >&6
46876else
46877  case $BUILD_OBJCOPY in
46878  [\\/]* | ?:[\\/]*)
46879  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46880  ;;
46881  *)
46882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46883for as_dir in $PATH
46884do
46885  IFS=$as_save_IFS
46886  test -z "$as_dir" && as_dir=.
46887    for ac_exec_ext in '' $ac_executable_extensions; do
46888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46889    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46891    break 2
46892  fi
46893done
46894  done
46895IFS=$as_save_IFS
46896
46897  ;;
46898esac
46899fi
46900BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46901if test -n "$BUILD_OBJCOPY"; then
46902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46903$as_echo "$BUILD_OBJCOPY" >&6; }
46904else
46905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46906$as_echo "no" >&6; }
46907fi
46908
46909
46910          if test "x$BUILD_OBJCOPY" = x; then
46911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46912          fi
46913        else
46914          # Otherwise we believe it is a complete path. Use it as it is.
46915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46916$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46918$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46919          if test ! -x "$tool_specified"; then
46920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46921$as_echo "not found" >&6; }
46922            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46923          fi
46924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46925$as_echo "$tool_specified" >&6; }
46926        fi
46927      fi
46928    fi
46929
46930  fi
46931
46932
46933
46934  # Only process if variable expands to non-empty
46935
46936  if test "x$BUILD_OBJCOPY" != x; then
46937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46938
46939  # First separate the path from the arguments. This will split at the first
46940  # space.
46941  complete="$BUILD_OBJCOPY"
46942  path="${complete%% *}"
46943  tmp="$complete EOL"
46944  arguments="${tmp#* }"
46945
46946  # Input might be given as Windows format, start by converting to
46947  # unix format.
46948  new_path=`$CYGPATH -u "$path"`
46949
46950  # Now try to locate executable using which
46951  new_path=`$WHICH "$new_path" 2> /dev/null`
46952  # bat and cmd files are not always considered executable in cygwin causing which
46953  # to not find them
46954  if test "x$new_path" = x \
46955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46957    new_path=`$CYGPATH -u "$path"`
46958  fi
46959  if test "x$new_path" = x; then
46960    # Oops. Which didn't find the executable.
46961    # The splitting of arguments from the executable at a space might have been incorrect,
46962    # since paths with space are more likely in Windows. Give it another try with the whole
46963    # argument.
46964    path="$complete"
46965    arguments="EOL"
46966    new_path=`$CYGPATH -u "$path"`
46967    new_path=`$WHICH "$new_path" 2> /dev/null`
46968    # bat and cmd files are not always considered executable in cygwin causing which
46969    # to not find them
46970    if test "x$new_path" = x \
46971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46973      new_path=`$CYGPATH -u "$path"`
46974    fi
46975    if test "x$new_path" = x; then
46976      # It's still not found. Now this is an unrecoverable error.
46977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46978$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46979      has_space=`$ECHO "$complete" | $GREP " "`
46980      if test "x$has_space" != x; then
46981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46983      fi
46984      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46985    fi
46986  fi
46987
46988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46991  # "foo.exe" is OK but "foo" is an error.
46992  #
46993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46994  # It is also a way to make sure we got the proper file name for the real test later on.
46995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46996  if test "x$test_shortpath" = x; then
46997    # Short path failed, file does not exist as specified.
46998    # Try adding .exe or .cmd
46999    if test -f "${new_path}.exe"; then
47000      input_to_shortpath="${new_path}.exe"
47001    elif test -f "${new_path}.cmd"; then
47002      input_to_shortpath="${new_path}.cmd"
47003    else
47004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47005$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47008      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47009    fi
47010  else
47011    input_to_shortpath="$new_path"
47012  fi
47013
47014  # Call helper function which possibly converts this using DOS-style short mode.
47015  # If so, the updated path is stored in $new_path.
47016  new_path="$input_to_shortpath"
47017
47018  input_path="$input_to_shortpath"
47019  # Check if we need to convert this using DOS-style short mode. If the path
47020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47021  # take no chances and rewrite it.
47022  # Note: m4 eats our [], so we need to use [ and ] instead.
47023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47024  if test "x$has_forbidden_chars" != x; then
47025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47029      # Going to short mode and back again did indeed matter. Since short mode is
47030      # case insensitive, let's make it lowercase to improve readability.
47031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47032      # Now convert it back to Unix-style (cygpath)
47033      input_path=`$CYGPATH -u "$shortmode_path"`
47034      new_path="$input_path"
47035    fi
47036  fi
47037
47038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47039  if test "x$test_cygdrive_prefix" = x; then
47040    # As a simple fix, exclude /usr/bin since it's not a real path.
47041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47043      # a path prefixed by /cygdrive for fixpath to work.
47044      new_path="$CYGWIN_ROOT_PATH$input_path"
47045    fi
47046  fi
47047
47048  # remove trailing .exe if any
47049  new_path="${new_path/%.exe/}"
47050
47051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47052
47053  # First separate the path from the arguments. This will split at the first
47054  # space.
47055  complete="$BUILD_OBJCOPY"
47056  path="${complete%% *}"
47057  tmp="$complete EOL"
47058  arguments="${tmp#* }"
47059
47060  # Input might be given as Windows format, start by converting to
47061  # unix format.
47062  new_path="$path"
47063
47064  windows_path="$new_path"
47065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47066    unix_path=`$CYGPATH -u "$windows_path"`
47067    new_path="$unix_path"
47068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47070    new_path="$unix_path"
47071  fi
47072
47073
47074  # Now try to locate executable using which
47075  new_path=`$WHICH "$new_path" 2> /dev/null`
47076
47077  if test "x$new_path" = x; then
47078    # Oops. Which didn't find the executable.
47079    # The splitting of arguments from the executable at a space might have been incorrect,
47080    # since paths with space are more likely in Windows. Give it another try with the whole
47081    # argument.
47082    path="$complete"
47083    arguments="EOL"
47084    new_path="$path"
47085
47086  windows_path="$new_path"
47087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47088    unix_path=`$CYGPATH -u "$windows_path"`
47089    new_path="$unix_path"
47090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47092    new_path="$unix_path"
47093  fi
47094
47095
47096    new_path=`$WHICH "$new_path" 2> /dev/null`
47097    # bat and cmd files are not always considered executable in MSYS causing which
47098    # to not find them
47099    if test "x$new_path" = x \
47100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47102      new_path="$path"
47103
47104  windows_path="$new_path"
47105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47106    unix_path=`$CYGPATH -u "$windows_path"`
47107    new_path="$unix_path"
47108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47110    new_path="$unix_path"
47111  fi
47112
47113    fi
47114
47115    if test "x$new_path" = x; then
47116      # It's still not found. Now this is an unrecoverable error.
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47118$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47119      has_space=`$ECHO "$complete" | $GREP " "`
47120      if test "x$has_space" != x; then
47121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47123      fi
47124      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47125    fi
47126  fi
47127
47128  # Now new_path has a complete unix path to the binary
47129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47130    # Keep paths in /bin as-is, but remove trailing .exe if any
47131    new_path="${new_path/%.exe/}"
47132    # Do not save /bin paths to all_fixpath_prefixes!
47133  else
47134    # Not in mixed or Windows style, start by that.
47135    new_path=`cmd //c echo $new_path`
47136
47137  input_path="$new_path"
47138  # Check if we need to convert this using DOS-style short mode. If the path
47139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47140  # take no chances and rewrite it.
47141  # Note: m4 eats our [], so we need to use [ and ] instead.
47142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47143  if test "x$has_forbidden_chars" != x; then
47144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47146  fi
47147
47148    # Output is in $new_path
47149
47150  windows_path="$new_path"
47151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47152    unix_path=`$CYGPATH -u "$windows_path"`
47153    new_path="$unix_path"
47154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47156    new_path="$unix_path"
47157  fi
47158
47159    # remove trailing .exe if any
47160    new_path="${new_path/%.exe/}"
47161
47162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47164  fi
47165
47166    else
47167      # We're on a unix platform. Hooray! :)
47168      # First separate the path from the arguments. This will split at the first
47169      # space.
47170      complete="$BUILD_OBJCOPY"
47171      path="${complete%% *}"
47172      tmp="$complete EOL"
47173      arguments="${tmp#* }"
47174
47175      # Cannot rely on the command "which" here since it doesn't always work.
47176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47177      if test -z "$is_absolute_path"; then
47178        # Path to executable is not absolute. Find it.
47179        IFS_save="$IFS"
47180        IFS=:
47181        for p in $PATH; do
47182          if test -f "$p/$path" && test -x "$p/$path"; then
47183            new_path="$p/$path"
47184            break
47185          fi
47186        done
47187        IFS="$IFS_save"
47188      else
47189        # This is an absolute path, we can use it without further modifications.
47190        new_path="$path"
47191      fi
47192
47193      if test "x$new_path" = x; then
47194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47195$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47196        has_space=`$ECHO "$complete" | $GREP " "`
47197        if test "x$has_space" != x; then
47198          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47200        fi
47201        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47202      fi
47203    fi
47204
47205    # Now join together the path and the arguments once again
47206    if test "x$arguments" != xEOL; then
47207      new_complete="$new_path ${arguments% *}"
47208    else
47209      new_complete="$new_path"
47210    fi
47211
47212    if test "x$complete" != "x$new_complete"; then
47213      BUILD_OBJCOPY="$new_complete"
47214      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47215$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47216    fi
47217  fi
47218
47219
47220
47221  # Publish this variable in the help.
47222
47223
47224  if [ -z "${BUILD_STRIP+x}" ]; then
47225    # The variable is not set by user, try to locate tool using the code snippet
47226    for ac_prog in strip
47227do
47228  # Extract the first word of "$ac_prog", so it can be a program name with args.
47229set dummy $ac_prog; ac_word=$2
47230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47231$as_echo_n "checking for $ac_word... " >&6; }
47232if ${ac_cv_path_BUILD_STRIP+:} false; then :
47233  $as_echo_n "(cached) " >&6
47234else
47235  case $BUILD_STRIP in
47236  [\\/]* | ?:[\\/]*)
47237  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47238  ;;
47239  *)
47240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47241for as_dir in $PATH
47242do
47243  IFS=$as_save_IFS
47244  test -z "$as_dir" && as_dir=.
47245    for ac_exec_ext in '' $ac_executable_extensions; do
47246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47247    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47249    break 2
47250  fi
47251done
47252  done
47253IFS=$as_save_IFS
47254
47255  ;;
47256esac
47257fi
47258BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47259if test -n "$BUILD_STRIP"; then
47260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47261$as_echo "$BUILD_STRIP" >&6; }
47262else
47263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47264$as_echo "no" >&6; }
47265fi
47266
47267
47268  test -n "$BUILD_STRIP" && break
47269done
47270
47271  else
47272    # The variable is set, but is it from the command line or the environment?
47273
47274    # Try to remove the string !BUILD_STRIP! from our list.
47275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47277      # If it failed, the variable was not from the command line. Ignore it,
47278      # but warn the user (except for BASH, which is always set by the calling BASH).
47279      if test "xBUILD_STRIP" != xBASH; then
47280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47281$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47282      fi
47283      # Try to locate tool using the code snippet
47284      for ac_prog in strip
47285do
47286  # Extract the first word of "$ac_prog", so it can be a program name with args.
47287set dummy $ac_prog; ac_word=$2
47288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47289$as_echo_n "checking for $ac_word... " >&6; }
47290if ${ac_cv_path_BUILD_STRIP+:} false; then :
47291  $as_echo_n "(cached) " >&6
47292else
47293  case $BUILD_STRIP in
47294  [\\/]* | ?:[\\/]*)
47295  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47296  ;;
47297  *)
47298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47299for as_dir in $PATH
47300do
47301  IFS=$as_save_IFS
47302  test -z "$as_dir" && as_dir=.
47303    for ac_exec_ext in '' $ac_executable_extensions; do
47304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47305    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47307    break 2
47308  fi
47309done
47310  done
47311IFS=$as_save_IFS
47312
47313  ;;
47314esac
47315fi
47316BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47317if test -n "$BUILD_STRIP"; then
47318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47319$as_echo "$BUILD_STRIP" >&6; }
47320else
47321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47322$as_echo "no" >&6; }
47323fi
47324
47325
47326  test -n "$BUILD_STRIP" && break
47327done
47328
47329    else
47330      # If it succeeded, then it was overridden by the user. We will use it
47331      # for the tool.
47332
47333      # First remove it from the list of overridden variables, so we can test
47334      # for unknown variables in the end.
47335      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47336
47337      # Check if we try to supply an empty value
47338      if test "x$BUILD_STRIP" = x; then
47339        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47340$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47341        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47342$as_echo_n "checking for BUILD_STRIP... " >&6; }
47343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47344$as_echo "disabled" >&6; }
47345      else
47346        # Check if the provided tool contains a complete path.
47347        tool_specified="$BUILD_STRIP"
47348        tool_basename="${tool_specified##*/}"
47349        if test "x$tool_basename" = "x$tool_specified"; then
47350          # A command without a complete path is provided, search $PATH.
47351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47352$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47353          # Extract the first word of "$tool_basename", so it can be a program name with args.
47354set dummy $tool_basename; ac_word=$2
47355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47356$as_echo_n "checking for $ac_word... " >&6; }
47357if ${ac_cv_path_BUILD_STRIP+:} false; then :
47358  $as_echo_n "(cached) " >&6
47359else
47360  case $BUILD_STRIP in
47361  [\\/]* | ?:[\\/]*)
47362  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47363  ;;
47364  *)
47365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47366for as_dir in $PATH
47367do
47368  IFS=$as_save_IFS
47369  test -z "$as_dir" && as_dir=.
47370    for ac_exec_ext in '' $ac_executable_extensions; do
47371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47372    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47374    break 2
47375  fi
47376done
47377  done
47378IFS=$as_save_IFS
47379
47380  ;;
47381esac
47382fi
47383BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47384if test -n "$BUILD_STRIP"; then
47385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47386$as_echo "$BUILD_STRIP" >&6; }
47387else
47388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47389$as_echo "no" >&6; }
47390fi
47391
47392
47393          if test "x$BUILD_STRIP" = x; then
47394            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47395          fi
47396        else
47397          # Otherwise we believe it is a complete path. Use it as it is.
47398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47399$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47400          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47401$as_echo_n "checking for BUILD_STRIP... " >&6; }
47402          if test ! -x "$tool_specified"; then
47403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47404$as_echo "not found" >&6; }
47405            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47406          fi
47407          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47408$as_echo "$tool_specified" >&6; }
47409        fi
47410      fi
47411    fi
47412
47413  fi
47414
47415
47416
47417  # Only process if variable expands to non-empty
47418
47419  if test "x$BUILD_STRIP" != x; then
47420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47421
47422  # First separate the path from the arguments. This will split at the first
47423  # space.
47424  complete="$BUILD_STRIP"
47425  path="${complete%% *}"
47426  tmp="$complete EOL"
47427  arguments="${tmp#* }"
47428
47429  # Input might be given as Windows format, start by converting to
47430  # unix format.
47431  new_path=`$CYGPATH -u "$path"`
47432
47433  # Now try to locate executable using which
47434  new_path=`$WHICH "$new_path" 2> /dev/null`
47435  # bat and cmd files are not always considered executable in cygwin causing which
47436  # to not find them
47437  if test "x$new_path" = x \
47438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47440    new_path=`$CYGPATH -u "$path"`
47441  fi
47442  if test "x$new_path" = x; then
47443    # Oops. Which didn't find the executable.
47444    # The splitting of arguments from the executable at a space might have been incorrect,
47445    # since paths with space are more likely in Windows. Give it another try with the whole
47446    # argument.
47447    path="$complete"
47448    arguments="EOL"
47449    new_path=`$CYGPATH -u "$path"`
47450    new_path=`$WHICH "$new_path" 2> /dev/null`
47451    # bat and cmd files are not always considered executable in cygwin causing which
47452    # to not find them
47453    if test "x$new_path" = x \
47454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47456      new_path=`$CYGPATH -u "$path"`
47457    fi
47458    if test "x$new_path" = x; then
47459      # It's still not found. Now this is an unrecoverable error.
47460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47461$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47462      has_space=`$ECHO "$complete" | $GREP " "`
47463      if test "x$has_space" != x; then
47464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47466      fi
47467      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47468    fi
47469  fi
47470
47471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47474  # "foo.exe" is OK but "foo" is an error.
47475  #
47476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47477  # It is also a way to make sure we got the proper file name for the real test later on.
47478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47479  if test "x$test_shortpath" = x; then
47480    # Short path failed, file does not exist as specified.
47481    # Try adding .exe or .cmd
47482    if test -f "${new_path}.exe"; then
47483      input_to_shortpath="${new_path}.exe"
47484    elif test -f "${new_path}.cmd"; then
47485      input_to_shortpath="${new_path}.cmd"
47486    else
47487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47488$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47491      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47492    fi
47493  else
47494    input_to_shortpath="$new_path"
47495  fi
47496
47497  # Call helper function which possibly converts this using DOS-style short mode.
47498  # If so, the updated path is stored in $new_path.
47499  new_path="$input_to_shortpath"
47500
47501  input_path="$input_to_shortpath"
47502  # Check if we need to convert this using DOS-style short mode. If the path
47503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47504  # take no chances and rewrite it.
47505  # Note: m4 eats our [], so we need to use [ and ] instead.
47506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47507  if test "x$has_forbidden_chars" != x; then
47508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47512      # Going to short mode and back again did indeed matter. Since short mode is
47513      # case insensitive, let's make it lowercase to improve readability.
47514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47515      # Now convert it back to Unix-style (cygpath)
47516      input_path=`$CYGPATH -u "$shortmode_path"`
47517      new_path="$input_path"
47518    fi
47519  fi
47520
47521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47522  if test "x$test_cygdrive_prefix" = x; then
47523    # As a simple fix, exclude /usr/bin since it's not a real path.
47524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47526      # a path prefixed by /cygdrive for fixpath to work.
47527      new_path="$CYGWIN_ROOT_PATH$input_path"
47528    fi
47529  fi
47530
47531  # remove trailing .exe if any
47532  new_path="${new_path/%.exe/}"
47533
47534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47535
47536  # First separate the path from the arguments. This will split at the first
47537  # space.
47538  complete="$BUILD_STRIP"
47539  path="${complete%% *}"
47540  tmp="$complete EOL"
47541  arguments="${tmp#* }"
47542
47543  # Input might be given as Windows format, start by converting to
47544  # unix format.
47545  new_path="$path"
47546
47547  windows_path="$new_path"
47548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47549    unix_path=`$CYGPATH -u "$windows_path"`
47550    new_path="$unix_path"
47551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47553    new_path="$unix_path"
47554  fi
47555
47556
47557  # Now try to locate executable using which
47558  new_path=`$WHICH "$new_path" 2> /dev/null`
47559
47560  if test "x$new_path" = x; then
47561    # Oops. Which didn't find the executable.
47562    # The splitting of arguments from the executable at a space might have been incorrect,
47563    # since paths with space are more likely in Windows. Give it another try with the whole
47564    # argument.
47565    path="$complete"
47566    arguments="EOL"
47567    new_path="$path"
47568
47569  windows_path="$new_path"
47570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47571    unix_path=`$CYGPATH -u "$windows_path"`
47572    new_path="$unix_path"
47573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47575    new_path="$unix_path"
47576  fi
47577
47578
47579    new_path=`$WHICH "$new_path" 2> /dev/null`
47580    # bat and cmd files are not always considered executable in MSYS causing which
47581    # to not find them
47582    if test "x$new_path" = x \
47583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47585      new_path="$path"
47586
47587  windows_path="$new_path"
47588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47589    unix_path=`$CYGPATH -u "$windows_path"`
47590    new_path="$unix_path"
47591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47593    new_path="$unix_path"
47594  fi
47595
47596    fi
47597
47598    if test "x$new_path" = x; then
47599      # It's still not found. Now this is an unrecoverable error.
47600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47601$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47602      has_space=`$ECHO "$complete" | $GREP " "`
47603      if test "x$has_space" != x; then
47604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47606      fi
47607      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47608    fi
47609  fi
47610
47611  # Now new_path has a complete unix path to the binary
47612  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47613    # Keep paths in /bin as-is, but remove trailing .exe if any
47614    new_path="${new_path/%.exe/}"
47615    # Do not save /bin paths to all_fixpath_prefixes!
47616  else
47617    # Not in mixed or Windows style, start by that.
47618    new_path=`cmd //c echo $new_path`
47619
47620  input_path="$new_path"
47621  # Check if we need to convert this using DOS-style short mode. If the path
47622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47623  # take no chances and rewrite it.
47624  # Note: m4 eats our [], so we need to use [ and ] instead.
47625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47626  if test "x$has_forbidden_chars" != x; then
47627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47629  fi
47630
47631    # Output is in $new_path
47632
47633  windows_path="$new_path"
47634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47635    unix_path=`$CYGPATH -u "$windows_path"`
47636    new_path="$unix_path"
47637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47639    new_path="$unix_path"
47640  fi
47641
47642    # remove trailing .exe if any
47643    new_path="${new_path/%.exe/}"
47644
47645    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47646    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47647  fi
47648
47649    else
47650      # We're on a unix platform. Hooray! :)
47651      # First separate the path from the arguments. This will split at the first
47652      # space.
47653      complete="$BUILD_STRIP"
47654      path="${complete%% *}"
47655      tmp="$complete EOL"
47656      arguments="${tmp#* }"
47657
47658      # Cannot rely on the command "which" here since it doesn't always work.
47659      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47660      if test -z "$is_absolute_path"; then
47661        # Path to executable is not absolute. Find it.
47662        IFS_save="$IFS"
47663        IFS=:
47664        for p in $PATH; do
47665          if test -f "$p/$path" && test -x "$p/$path"; then
47666            new_path="$p/$path"
47667            break
47668          fi
47669        done
47670        IFS="$IFS_save"
47671      else
47672        # This is an absolute path, we can use it without further modifications.
47673        new_path="$path"
47674      fi
47675
47676      if test "x$new_path" = x; then
47677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47678$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47679        has_space=`$ECHO "$complete" | $GREP " "`
47680        if test "x$has_space" != x; then
47681          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47682$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47683        fi
47684        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47685      fi
47686    fi
47687
47688    # Now join together the path and the arguments once again
47689    if test "x$arguments" != xEOL; then
47690      new_complete="$new_path ${arguments% *}"
47691    else
47692      new_complete="$new_path"
47693    fi
47694
47695    if test "x$complete" != "x$new_complete"; then
47696      BUILD_STRIP="$new_complete"
47697      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47698$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47699    fi
47700  fi
47701
47702    # Assume the C compiler is the assembler
47703    BUILD_AS="$BUILD_CC -c"
47704    # Just like for the target compiler, use the compiler as linker
47705    BUILD_LD="$BUILD_CC"
47706    BUILD_LDCXX="$BUILD_CXX"
47707
47708    PATH="$OLDPATH"
47709
47710
47711  COMPILER=$BUILD_CC
47712  COMPILER_NAME=BuildC
47713
47714  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47715    # cc -V output typically looks like
47716    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47717    # or
47718    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47719    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47720    # Check that this is likely to be the Solaris Studio cc.
47721    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47722    if test $? -ne 0; then
47723      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47724      { $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
47725$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47726      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47727$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47728      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47729$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47730      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47731    fi
47732    # Remove usage instructions (if present), and
47733    # collapse compiler output into a single line
47734    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47735        $SED -e 's/ *[Uu]sage:.*//'`
47736    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47737        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47738  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47739    # xlc -qversion output typically looks like
47740    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47741    #     Version: 11.01.0000.0015
47742    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47743    # Check that this is likely to be the IBM XL C compiler.
47744    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47745    if test $? -ne 0; then
47746      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47747      { $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
47748$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47749      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47750$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47751      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47752$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47753      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47754    fi
47755    # Collapse compiler output into a single line
47756    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47757    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47758        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47759  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47760    # There is no specific version flag, but all output starts with a version string.
47761    # First line typically looks something like:
47762    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47763    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47764    # Check that this is likely to be Microsoft CL.EXE.
47765    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47766    if test $? -ne 0; then
47767      { $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
47768$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47769      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47770$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47771      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47772    fi
47773    # Collapse compiler output into a single line
47774    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47775    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47776        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47777  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47778    # gcc --version output typically looks like
47779    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47780    #     Copyright (C) 2013 Free Software Foundation, Inc.
47781    #     This is free software; see the source for copying conditions.  There is NO
47782    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47783    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47784    # Check that this is likely to be GCC.
47785    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47786    if test $? -ne 0; then
47787      { $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
47788$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47789      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47790$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47791      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47792    fi
47793    # Remove Copyright and legalese from version string, and
47794    # collapse into a single line
47795    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47796        $SED -e 's/ *Copyright .*//'`
47797    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47798        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47799  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47800    # clang --version output typically looks like
47801    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47802    #    clang version 3.3 (tags/RELEASE_33/final)
47803    # or
47804    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47805    #    Target: x86_64-pc-linux-gnu
47806    #    Thread model: posix
47807    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47808    # Check that this is likely to be clang
47809    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47810    if test $? -ne 0; then
47811      { $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
47812$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47813      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47814$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47815      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47816    fi
47817    # Collapse compiler output into a single line
47818    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47819    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47820        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47821  else
47822      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47823  fi
47824  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47825  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47826  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47827  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47828
47829  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47830$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47831
47832
47833  COMPILER=$BUILD_CXX
47834  COMPILER_NAME=BuildC++
47835
47836  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47837    # cc -V output typically looks like
47838    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47839    # or
47840    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47841    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47842    # Check that this is likely to be the Solaris Studio cc.
47843    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47844    if test $? -ne 0; then
47845      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47846      { $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
47847$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47848      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47849$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47850      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47851$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47852      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47853    fi
47854    # Remove usage instructions (if present), and
47855    # collapse compiler output into a single line
47856    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47857        $SED -e 's/ *[Uu]sage:.*//'`
47858    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47859        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47860  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47861    # xlc -qversion output typically looks like
47862    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47863    #     Version: 11.01.0000.0015
47864    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47865    # Check that this is likely to be the IBM XL C compiler.
47866    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47867    if test $? -ne 0; then
47868      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47869      { $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
47870$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47871      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47872$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47873      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47874$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47875      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47876    fi
47877    # Collapse compiler output into a single line
47878    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47879    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47880        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47881  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47882    # There is no specific version flag, but all output starts with a version string.
47883    # First line typically looks something like:
47884    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47885    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47886    # Check that this is likely to be Microsoft CL.EXE.
47887    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47888    if test $? -ne 0; then
47889      { $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
47890$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47891      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47892$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47893      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47894    fi
47895    # Collapse compiler output into a single line
47896    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47897    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47898        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47899  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47900    # gcc --version output typically looks like
47901    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47902    #     Copyright (C) 2013 Free Software Foundation, Inc.
47903    #     This is free software; see the source for copying conditions.  There is NO
47904    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47905    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47906    # Check that this is likely to be GCC.
47907    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47908    if test $? -ne 0; then
47909      { $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
47910$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47912$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47913      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47914    fi
47915    # Remove Copyright and legalese from version string, and
47916    # collapse into a single line
47917    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47918        $SED -e 's/ *Copyright .*//'`
47919    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47920        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47921  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47922    # clang --version output typically looks like
47923    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47924    #    clang version 3.3 (tags/RELEASE_33/final)
47925    # or
47926    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47927    #    Target: x86_64-pc-linux-gnu
47928    #    Thread model: posix
47929    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47930    # Check that this is likely to be clang
47931    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47932    if test $? -ne 0; then
47933      { $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
47934$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47935      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47936$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47937      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47938    fi
47939    # Collapse compiler output into a single line
47940    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47941    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47942        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47943  else
47944      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47945  fi
47946  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47947  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47948  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47949  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47950
47951  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47952$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47953
47954
47955  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47956    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47957$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47958    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47959$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47960  fi
47961
47962  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47963  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47964    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47965$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47966  fi
47967
47968  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47969    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47970$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47971  fi
47972
47973  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47974
47975  else
47976    # If we are not cross compiling, use the normal target compilers for
47977    # building the build platform executables.
47978    BUILD_CC="$CC"
47979    BUILD_CXX="$CXX"
47980    BUILD_LD="$LD"
47981    BUILD_LDCXX="$LDCXX"
47982    BUILD_NM="$NM"
47983    BUILD_AS="$AS"
47984    BUILD_OBJCOPY="$OBJCOPY"
47985    BUILD_STRIP="$STRIP"
47986    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47987    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47988    BUILD_AR="$AR"
47989
47990
47991  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47992    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47993$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47995$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47996  fi
47997
47998  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47999  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48001$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48002  fi
48003
48004  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48005    { $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
48006$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48007  fi
48008
48009  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48010
48011  fi
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026  # The package path is used only on macosx?
48027  # FIXME: clean this up, and/or move it elsewhere.
48028  PACKAGE_PATH=/opt/local
48029
48030
48031  # Check for extra potential brokenness.
48032  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48033    # On Windows, double-check that we got the right compiler.
48034    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48035    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48036    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48037      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48038        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
48039      fi
48040    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48041      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48042        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48043      fi
48044    fi
48045  fi
48046
48047  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48048    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48049    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48050    # This is later checked when setting flags.
48051
48052    # "-Og" suppported for GCC 4.8 and later
48053    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101    # Execute function body
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150    # Execute function body
48151
48152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48153$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48154  supports=yes
48155
48156  saved_cflags="$CFLAGS"
48157  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48158  ac_ext=c
48159ac_cpp='$CPP $CPPFLAGS'
48160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48162ac_compiler_gnu=$ac_cv_c_compiler_gnu
48163
48164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48165/* end confdefs.h.  */
48166int i;
48167_ACEOF
48168if ac_fn_c_try_compile "$LINENO"; then :
48169
48170else
48171  supports=no
48172fi
48173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48174  ac_ext=cpp
48175ac_cpp='$CXXCPP $CPPFLAGS'
48176ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48177ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48178ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48179
48180  CFLAGS="$saved_cflags"
48181
48182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48183$as_echo "$supports" >&6; }
48184  if test "x$supports" = "xyes" ; then
48185    :
48186    C_COMP_SUPPORTS="yes"
48187  else
48188    :
48189    C_COMP_SUPPORTS="no"
48190  fi
48191
48192
48193
48194
48195
48196
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250    # Execute function body
48251
48252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48253$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48254  supports=yes
48255
48256  saved_cxxflags="$CXXFLAGS"
48257  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48258  ac_ext=cpp
48259ac_cpp='$CXXCPP $CPPFLAGS'
48260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48263
48264  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48265/* end confdefs.h.  */
48266int i;
48267_ACEOF
48268if ac_fn_cxx_try_compile "$LINENO"; then :
48269
48270else
48271  supports=no
48272fi
48273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48274  ac_ext=cpp
48275ac_cpp='$CXXCPP $CPPFLAGS'
48276ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48277ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48278ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48279
48280  CXXFLAGS="$saved_cxxflags"
48281
48282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48283$as_echo "$supports" >&6; }
48284  if test "x$supports" = "xyes" ; then
48285    :
48286    CXX_COMP_SUPPORTS="yes"
48287  else
48288    :
48289    CXX_COMP_SUPPORTS="no"
48290  fi
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48305$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48306  supports=no
48307  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48308
48309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48310$as_echo "$supports" >&6; }
48311  if test "x$supports" = "xyes" ; then
48312    :
48313    HAS_CFLAG_OPTIMIZE_DEBUG=true
48314  else
48315    :
48316    HAS_CFLAG_OPTIMIZE_DEBUG=false
48317  fi
48318
48319
48320
48321
48322
48323
48324
48325    # "-z relro" supported in GNU binutils 2.17 and later
48326    LINKER_RELRO_FLAG="-Wl,-z,relro"
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374    # Execute function body
48375
48376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48377$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48378  supports=yes
48379
48380  saved_ldflags="$LDFLAGS"
48381  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48382  ac_ext=c
48383ac_cpp='$CPP $CPPFLAGS'
48384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48386ac_compiler_gnu=$ac_cv_c_compiler_gnu
48387
48388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48389/* end confdefs.h.  */
48390
48391int
48392main ()
48393{
48394
48395  ;
48396  return 0;
48397}
48398_ACEOF
48399if ac_fn_c_try_link "$LINENO"; then :
48400
48401else
48402  supports=no
48403fi
48404rm -f core conftest.err conftest.$ac_objext \
48405    conftest$ac_exeext conftest.$ac_ext
48406  ac_ext=cpp
48407ac_cpp='$CXXCPP $CPPFLAGS'
48408ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48409ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48410ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48411
48412  LDFLAGS="$saved_ldflags"
48413
48414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48415$as_echo "$supports" >&6; }
48416  if test "x$supports" = "xyes" ; then
48417    :
48418    HAS_LINKER_RELRO=true
48419  else
48420    :
48421    HAS_LINKER_RELRO=false
48422  fi
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436    # "-z now" supported in GNU binutils 2.11 and later
48437    LINKER_NOW_FLAG="-Wl,-z,now"
48438
48439
48440
48441
48442
48443
48444
48445
48446
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    # Execute function body
48486
48487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48488$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48489  supports=yes
48490
48491  saved_ldflags="$LDFLAGS"
48492  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48493  ac_ext=c
48494ac_cpp='$CPP $CPPFLAGS'
48495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48497ac_compiler_gnu=$ac_cv_c_compiler_gnu
48498
48499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48500/* end confdefs.h.  */
48501
48502int
48503main ()
48504{
48505
48506  ;
48507  return 0;
48508}
48509_ACEOF
48510if ac_fn_c_try_link "$LINENO"; then :
48511
48512else
48513  supports=no
48514fi
48515rm -f core conftest.err conftest.$ac_objext \
48516    conftest$ac_exeext conftest.$ac_ext
48517  ac_ext=cpp
48518ac_cpp='$CXXCPP $CPPFLAGS'
48519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48522
48523  LDFLAGS="$saved_ldflags"
48524
48525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48526$as_echo "$supports" >&6; }
48527  if test "x$supports" = "xyes" ; then
48528    :
48529    HAS_LINKER_NOW=true
48530  else
48531    :
48532    HAS_LINKER_NOW=false
48533  fi
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546  fi
48547
48548  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48549  # in executable.'
48550  USING_BROKEN_SUSE_LD=no
48551  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48553$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48554    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48555    $ECHO "int main() { }" > main.c
48556    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48558$as_echo "no" >&6; }
48559      USING_BROKEN_SUSE_LD=no
48560    else
48561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48562$as_echo "yes" >&6; }
48563      USING_BROKEN_SUSE_LD=yes
48564    fi
48565    $RM version-script.map main.c a.out
48566  fi
48567
48568
48569  # Setup hotspot lecagy names for toolchains
48570  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48571  if test "x$TOOLCHAIN_TYPE" = xclang; then
48572    HOTSPOT_TOOLCHAIN_TYPE=gcc
48573  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48574    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48575  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48576    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48577  fi
48578
48579
48580
48581# Setup the JTReg Regression Test Harness.
48582
48583
48584# Check whether --with-jtreg was given.
48585if test "${with_jtreg+set}" = set; then :
48586  withval=$with_jtreg;
48587else
48588  with_jtreg=no
48589fi
48590
48591
48592  if test "x$with_jtreg" = xno; then
48593    # jtreg disabled
48594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48595$as_echo_n "checking for jtreg... " >&6; }
48596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48597$as_echo "no" >&6; }
48598  else
48599    if test "x$with_jtreg" != xyes; then
48600      # with path specified.
48601      JT_HOME="$with_jtreg"
48602    fi
48603
48604    if test "x$JT_HOME" != x; then
48605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48606$as_echo_n "checking for jtreg... " >&6; }
48607
48608      # use JT_HOME enviroment var.
48609
48610  # Only process if variable expands to non-empty
48611
48612  if test "x$JT_HOME" != x; then
48613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48614
48615  # Input might be given as Windows format, start by converting to
48616  # unix format.
48617  path="$JT_HOME"
48618  new_path=`$CYGPATH -u "$path"`
48619
48620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48623  # "foo.exe" is OK but "foo" is an error.
48624  #
48625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48626  # It is also a way to make sure we got the proper file name for the real test later on.
48627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48628  if test "x$test_shortpath" = x; then
48629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48630$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48631    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48632  fi
48633
48634  # Call helper function which possibly converts this using DOS-style short mode.
48635  # If so, the updated path is stored in $new_path.
48636
48637  input_path="$new_path"
48638  # Check if we need to convert this using DOS-style short mode. If the path
48639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48640  # take no chances and rewrite it.
48641  # Note: m4 eats our [], so we need to use [ and ] instead.
48642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48643  if test "x$has_forbidden_chars" != x; then
48644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48648      # Going to short mode and back again did indeed matter. Since short mode is
48649      # case insensitive, let's make it lowercase to improve readability.
48650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48651      # Now convert it back to Unix-style (cygpath)
48652      input_path=`$CYGPATH -u "$shortmode_path"`
48653      new_path="$input_path"
48654    fi
48655  fi
48656
48657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48658  if test "x$test_cygdrive_prefix" = x; then
48659    # As a simple fix, exclude /usr/bin since it's not a real path.
48660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48662      # a path prefixed by /cygdrive for fixpath to work.
48663      new_path="$CYGWIN_ROOT_PATH$input_path"
48664    fi
48665  fi
48666
48667
48668  if test "x$path" != "x$new_path"; then
48669    JT_HOME="$new_path"
48670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48671$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48672  fi
48673
48674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48675
48676  path="$JT_HOME"
48677  has_colon=`$ECHO $path | $GREP ^.:`
48678  new_path="$path"
48679  if test "x$has_colon" = x; then
48680    # Not in mixed or Windows style, start by that.
48681    new_path=`cmd //c echo $path`
48682  fi
48683
48684
48685  input_path="$new_path"
48686  # Check if we need to convert this using DOS-style short mode. If the path
48687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48688  # take no chances and rewrite it.
48689  # Note: m4 eats our [], so we need to use [ and ] instead.
48690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48691  if test "x$has_forbidden_chars" != x; then
48692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48694  fi
48695
48696
48697  windows_path="$new_path"
48698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48699    unix_path=`$CYGPATH -u "$windows_path"`
48700    new_path="$unix_path"
48701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48703    new_path="$unix_path"
48704  fi
48705
48706  if test "x$path" != "x$new_path"; then
48707    JT_HOME="$new_path"
48708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48709$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48710  fi
48711
48712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48714
48715    else
48716      # We're on a unix platform. Hooray! :)
48717      path="$JT_HOME"
48718      has_space=`$ECHO "$path" | $GREP " "`
48719      if test "x$has_space" != x; then
48720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48721$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48723      fi
48724
48725      # Use eval to expand a potential ~
48726      eval path="$path"
48727      if test ! -f "$path" && test ! -d "$path"; then
48728        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48729      fi
48730
48731      if test -d "$path"; then
48732        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48733      else
48734        dir="`$DIRNAME "$path"`"
48735        base="`$BASENAME "$path"`"
48736        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48737      fi
48738    fi
48739  fi
48740
48741
48742      # jtreg win32 script works for everybody
48743      JTREGEXE="$JT_HOME/bin/jtreg"
48744
48745      if test ! -f "$JTREGEXE"; then
48746        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48747      fi
48748
48749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48750$as_echo "$JTREGEXE" >&6; }
48751    else
48752      # try to find jtreg on path
48753
48754
48755
48756  # Publish this variable in the help.
48757
48758
48759  if [ -z "${JTREGEXE+x}" ]; then
48760    # The variable is not set by user, try to locate tool using the code snippet
48761    for ac_prog in jtreg
48762do
48763  # Extract the first word of "$ac_prog", so it can be a program name with args.
48764set dummy $ac_prog; ac_word=$2
48765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48766$as_echo_n "checking for $ac_word... " >&6; }
48767if ${ac_cv_path_JTREGEXE+:} false; then :
48768  $as_echo_n "(cached) " >&6
48769else
48770  case $JTREGEXE in
48771  [\\/]* | ?:[\\/]*)
48772  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48773  ;;
48774  *)
48775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48776for as_dir in $PATH
48777do
48778  IFS=$as_save_IFS
48779  test -z "$as_dir" && as_dir=.
48780    for ac_exec_ext in '' $ac_executable_extensions; do
48781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48782    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48784    break 2
48785  fi
48786done
48787  done
48788IFS=$as_save_IFS
48789
48790  ;;
48791esac
48792fi
48793JTREGEXE=$ac_cv_path_JTREGEXE
48794if test -n "$JTREGEXE"; then
48795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48796$as_echo "$JTREGEXE" >&6; }
48797else
48798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48799$as_echo "no" >&6; }
48800fi
48801
48802
48803  test -n "$JTREGEXE" && break
48804done
48805
48806  else
48807    # The variable is set, but is it from the command line or the environment?
48808
48809    # Try to remove the string !JTREGEXE! from our list.
48810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48812      # If it failed, the variable was not from the command line. Ignore it,
48813      # but warn the user (except for BASH, which is always set by the calling BASH).
48814      if test "xJTREGEXE" != xBASH; then
48815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48816$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48817      fi
48818      # Try to locate tool using the code snippet
48819      for ac_prog in jtreg
48820do
48821  # Extract the first word of "$ac_prog", so it can be a program name with args.
48822set dummy $ac_prog; ac_word=$2
48823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48824$as_echo_n "checking for $ac_word... " >&6; }
48825if ${ac_cv_path_JTREGEXE+:} false; then :
48826  $as_echo_n "(cached) " >&6
48827else
48828  case $JTREGEXE in
48829  [\\/]* | ?:[\\/]*)
48830  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48831  ;;
48832  *)
48833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48834for as_dir in $PATH
48835do
48836  IFS=$as_save_IFS
48837  test -z "$as_dir" && as_dir=.
48838    for ac_exec_ext in '' $ac_executable_extensions; do
48839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48840    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48842    break 2
48843  fi
48844done
48845  done
48846IFS=$as_save_IFS
48847
48848  ;;
48849esac
48850fi
48851JTREGEXE=$ac_cv_path_JTREGEXE
48852if test -n "$JTREGEXE"; then
48853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48854$as_echo "$JTREGEXE" >&6; }
48855else
48856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48857$as_echo "no" >&6; }
48858fi
48859
48860
48861  test -n "$JTREGEXE" && break
48862done
48863
48864    else
48865      # If it succeeded, then it was overridden by the user. We will use it
48866      # for the tool.
48867
48868      # First remove it from the list of overridden variables, so we can test
48869      # for unknown variables in the end.
48870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48871
48872      # Check if we try to supply an empty value
48873      if test "x$JTREGEXE" = x; then
48874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48875$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48877$as_echo_n "checking for JTREGEXE... " >&6; }
48878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48879$as_echo "disabled" >&6; }
48880      else
48881        # Check if the provided tool contains a complete path.
48882        tool_specified="$JTREGEXE"
48883        tool_basename="${tool_specified##*/}"
48884        if test "x$tool_basename" = "x$tool_specified"; then
48885          # A command without a complete path is provided, search $PATH.
48886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48887$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48888          # Extract the first word of "$tool_basename", so it can be a program name with args.
48889set dummy $tool_basename; ac_word=$2
48890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48891$as_echo_n "checking for $ac_word... " >&6; }
48892if ${ac_cv_path_JTREGEXE+:} false; then :
48893  $as_echo_n "(cached) " >&6
48894else
48895  case $JTREGEXE in
48896  [\\/]* | ?:[\\/]*)
48897  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48898  ;;
48899  *)
48900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48901for as_dir in $PATH
48902do
48903  IFS=$as_save_IFS
48904  test -z "$as_dir" && as_dir=.
48905    for ac_exec_ext in '' $ac_executable_extensions; do
48906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48907    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48909    break 2
48910  fi
48911done
48912  done
48913IFS=$as_save_IFS
48914
48915  ;;
48916esac
48917fi
48918JTREGEXE=$ac_cv_path_JTREGEXE
48919if test -n "$JTREGEXE"; then
48920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48921$as_echo "$JTREGEXE" >&6; }
48922else
48923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48924$as_echo "no" >&6; }
48925fi
48926
48927
48928          if test "x$JTREGEXE" = x; then
48929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48930          fi
48931        else
48932          # Otherwise we believe it is a complete path. Use it as it is.
48933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48934$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48936$as_echo_n "checking for JTREGEXE... " >&6; }
48937          if test ! -x "$tool_specified"; then
48938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48939$as_echo "not found" >&6; }
48940            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48941          fi
48942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48943$as_echo "$tool_specified" >&6; }
48944        fi
48945      fi
48946    fi
48947
48948  fi
48949
48950
48951
48952  if test "x$JTREGEXE" = x; then
48953    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48954  fi
48955
48956
48957      JT_HOME="`$DIRNAME $JTREGEXE`"
48958    fi
48959  fi
48960
48961
48962
48963
48964
48965
48966  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48967  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48968  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48969  #                              commands produced by the link step (currently AIX only)
48970  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48971    COMPILER_TARGET_BITS_FLAG="-q"
48972    COMPILER_COMMAND_FILE_FLAG="-f"
48973    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48974  else
48975    COMPILER_TARGET_BITS_FLAG="-m"
48976    COMPILER_COMMAND_FILE_FLAG="@"
48977    COMPILER_BINDCMD_FILE_FLAG=""
48978
48979    # The solstudio linker does not support @-files.
48980    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48981      COMPILER_COMMAND_FILE_FLAG=
48982    fi
48983
48984    # Check if @file is supported by gcc
48985    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48987$as_echo_n "checking if @file is supported by gcc... " >&6; }
48988      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48989      $ECHO "" "--version" > command.file
48990      if $CXX @command.file 2>&5 >&5; then
48991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48992$as_echo "yes" >&6; }
48993        COMPILER_COMMAND_FILE_FLAG="@"
48994      else
48995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48996$as_echo "no" >&6; }
48997        COMPILER_COMMAND_FILE_FLAG=
48998      fi
48999      $RM command.file
49000    fi
49001  fi
49002
49003
49004
49005
49006  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49007  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49008    ARFLAGS="-r"
49009  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49010    ARFLAGS="-X64"
49011  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49012    # lib.exe is used as AR to create static libraries.
49013    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49014  else
49015    ARFLAGS=""
49016  fi
49017
49018
49019  ## Setup strip.
49020  # FIXME: should this really be per platform, or should it be per toolchain type?
49021  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49022  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49023  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49024    STRIPFLAGS="-g"
49025  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49026    STRIPFLAGS="-x"
49027  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49028    STRIPFLAGS="-S"
49029  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49030    STRIPFLAGS="-X32_64"
49031  fi
49032
49033
49034
49035  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49036    CC_OUT_OPTION=-Fo
49037    EXE_OUT_OPTION=-out:
49038    LD_OUT_OPTION=-out:
49039    AR_OUT_OPTION=-out:
49040  else
49041    # The option used to specify the target .o,.a or .so file.
49042    # When compiling, how to specify the to be created object file.
49043    CC_OUT_OPTION='-o$(SPACE)'
49044    # When linking, how to specify the to be created executable.
49045    EXE_OUT_OPTION='-o$(SPACE)'
49046    # When linking, how to specify the to be created dynamically linkable library.
49047    LD_OUT_OPTION='-o$(SPACE)'
49048    # When archiving, how to specify the to be create static archive for object files.
49049    AR_OUT_OPTION='rcs$(SPACE)'
49050  fi
49051
49052
49053
49054
49055
49056  # On Windows, we need to set RC flags.
49057  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49058    RC_FLAGS="-nologo -l0x409"
49059    JVM_RCFLAGS="-nologo"
49060    if test "x$DEBUG_LEVEL" = xrelease; then
49061      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49062      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49063    fi
49064
49065    # The version variables used to create RC_FLAGS may be overridden
49066    # in a custom configure script, or possibly the command line.
49067    # Let those variables be expanded at make time in spec.gmk.
49068    # The \$ are escaped to the shell, and the $(...) variables
49069    # are evaluated by make.
49070    RC_FLAGS="$RC_FLAGS \
49071        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49072        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49073        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49074        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49075        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49076        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49077        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49078
49079    JVM_RCFLAGS="$JVM_RCFLAGS \
49080        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49081        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49082        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49083        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49084        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49085        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49086        -D\"HS_FNAME=jvm.dll\" \
49087        -D\"HS_INTERNAL_NAME=jvm\""
49088  fi
49089
49090
49091
49092  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49093    # silence copyright notice and other headers.
49094    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49095  fi
49096
49097
49098# Now we can test some aspects on the target using configure macros.
49099
49100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49101$as_echo_n "checking for ANSI C header files... " >&6; }
49102if ${ac_cv_header_stdc+:} false; then :
49103  $as_echo_n "(cached) " >&6
49104else
49105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49106/* end confdefs.h.  */
49107#include <stdlib.h>
49108#include <stdarg.h>
49109#include <string.h>
49110#include <float.h>
49111
49112int
49113main ()
49114{
49115
49116  ;
49117  return 0;
49118}
49119_ACEOF
49120if ac_fn_cxx_try_compile "$LINENO"; then :
49121  ac_cv_header_stdc=yes
49122else
49123  ac_cv_header_stdc=no
49124fi
49125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49126
49127if test $ac_cv_header_stdc = yes; then
49128  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49130/* end confdefs.h.  */
49131#include <string.h>
49132
49133_ACEOF
49134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49135  $EGREP "memchr" >/dev/null 2>&1; then :
49136
49137else
49138  ac_cv_header_stdc=no
49139fi
49140rm -f conftest*
49141
49142fi
49143
49144if test $ac_cv_header_stdc = yes; then
49145  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49147/* end confdefs.h.  */
49148#include <stdlib.h>
49149
49150_ACEOF
49151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49152  $EGREP "free" >/dev/null 2>&1; then :
49153
49154else
49155  ac_cv_header_stdc=no
49156fi
49157rm -f conftest*
49158
49159fi
49160
49161if test $ac_cv_header_stdc = yes; then
49162  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49163  if test "$cross_compiling" = yes; then :
49164  :
49165else
49166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49167/* end confdefs.h.  */
49168#include <ctype.h>
49169#include <stdlib.h>
49170#if ((' ' & 0x0FF) == 0x020)
49171# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49172# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49173#else
49174# define ISLOWER(c) \
49175		   (('a' <= (c) && (c) <= 'i') \
49176		     || ('j' <= (c) && (c) <= 'r') \
49177		     || ('s' <= (c) && (c) <= 'z'))
49178# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49179#endif
49180
49181#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49182int
49183main ()
49184{
49185  int i;
49186  for (i = 0; i < 256; i++)
49187    if (XOR (islower (i), ISLOWER (i))
49188	|| toupper (i) != TOUPPER (i))
49189      return 2;
49190  return 0;
49191}
49192_ACEOF
49193if ac_fn_cxx_try_run "$LINENO"; then :
49194
49195else
49196  ac_cv_header_stdc=no
49197fi
49198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49199  conftest.$ac_objext conftest.beam conftest.$ac_ext
49200fi
49201
49202fi
49203fi
49204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49205$as_echo "$ac_cv_header_stdc" >&6; }
49206if test $ac_cv_header_stdc = yes; then
49207
49208$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49209
49210fi
49211
49212# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49213for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49214		  inttypes.h stdint.h unistd.h
49215do :
49216  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49217ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49218"
49219if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49220  cat >>confdefs.h <<_ACEOF
49221#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49222_ACEOF
49223
49224fi
49225
49226done
49227
49228
49229
49230  ###############################################################################
49231  #
49232  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49233  # (The JVM can use 32 or 64 bit Java pointers but that decision
49234  # is made at runtime.)
49235  #
49236
49237  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49238    # Always specify -m flag on Solaris
49239    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49240
49241  # When we add flags to the "official" CFLAGS etc, we need to
49242  # keep track of these additions in ADDED_CFLAGS etc. These
49243  # will later be checked to make sure only controlled additions
49244  # have been made to CFLAGS etc.
49245  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49246  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49247  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49248
49249  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49250  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49251  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49252
49253  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49254  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49255  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49256
49257  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49258  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49259  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49260
49261  elif test "x$COMPILE_TYPE" = xreduced; then
49262    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49263      # Specify -m if running reduced on unix platforms
49264
49265  # When we add flags to the "official" CFLAGS etc, we need to
49266  # keep track of these additions in ADDED_CFLAGS etc. These
49267  # will later be checked to make sure only controlled additions
49268  # have been made to CFLAGS etc.
49269  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49270  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49271  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49272
49273  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49274  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49275  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49276
49277  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49278  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49279  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49280
49281  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49282  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49283  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49284
49285    fi
49286  fi
49287  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49288    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49289    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49290    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49291  fi
49292
49293  # Make compilation sanity check
49294  for ac_header in stdio.h
49295do :
49296  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49297if test "x$ac_cv_header_stdio_h" = xyes; then :
49298  cat >>confdefs.h <<_ACEOF
49299#define HAVE_STDIO_H 1
49300_ACEOF
49301
49302else
49303
49304    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49305$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49306    if test "x$COMPILE_TYPE" = xreduced; then
49307
49308  # Print a helpful message on how to acquire the necessary build dependency.
49309  # reduced is the help tag: freetype, cups, alsa etc
49310  MISSING_DEPENDENCY=reduced
49311
49312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49313    cygwin_help $MISSING_DEPENDENCY
49314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49315    msys_help $MISSING_DEPENDENCY
49316  else
49317    PKGHANDLER_COMMAND=
49318
49319    case $PKGHANDLER in
49320      apt-get)
49321        apt_help     $MISSING_DEPENDENCY ;;
49322      yum)
49323        yum_help     $MISSING_DEPENDENCY ;;
49324      brew)
49325        brew_help    $MISSING_DEPENDENCY ;;
49326      port)
49327        port_help    $MISSING_DEPENDENCY ;;
49328      pkgutil)
49329        pkgutil_help $MISSING_DEPENDENCY ;;
49330      pkgadd)
49331        pkgadd_help  $MISSING_DEPENDENCY ;;
49332    esac
49333
49334    if test "x$PKGHANDLER_COMMAND" != x; then
49335      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49336    fi
49337  fi
49338
49339      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49340$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49341    elif test "x$COMPILE_TYPE" = xcross; then
49342      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49343$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49344    fi
49345    as_fn_error $? "Cannot continue." "$LINENO" 5
49346
49347fi
49348
49349done
49350
49351
49352  # The cast to long int works around a bug in the HP C Compiler
49353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49355# This bug is HP SR number 8606223364.
49356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49357$as_echo_n "checking size of int *... " >&6; }
49358if ${ac_cv_sizeof_int_p+:} false; then :
49359  $as_echo_n "(cached) " >&6
49360else
49361  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49362
49363else
49364  if test "$ac_cv_type_int_p" = yes; then
49365     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49367as_fn_error 77 "cannot compute sizeof (int *)
49368See \`config.log' for more details" "$LINENO" 5; }
49369   else
49370     ac_cv_sizeof_int_p=0
49371   fi
49372fi
49373
49374fi
49375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49376$as_echo "$ac_cv_sizeof_int_p" >&6; }
49377
49378
49379
49380cat >>confdefs.h <<_ACEOF
49381#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49382_ACEOF
49383
49384
49385
49386  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49387  if test "x$ac_cv_sizeof_int_p" = x; then
49388    # The test failed, lets stick to the assumed value.
49389    { $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
49390$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49391  else
49392    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49393
49394    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49395      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49396      # Let's try to implicitely set the compilers target architecture and retry the test
49397      { $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
49398$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;}
49399      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49400$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49401
49402  # When we add flags to the "official" CFLAGS etc, we need to
49403  # keep track of these additions in ADDED_CFLAGS etc. These
49404  # will later be checked to make sure only controlled additions
49405  # have been made to CFLAGS etc.
49406  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49407  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49408  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49409
49410  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49411  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49412  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49413
49414  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49415  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49416  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49417
49418  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49419  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49420  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49421
49422
49423      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49424      unset ac_cv_sizeof_int_p
49425      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49426      cat >>confdefs.h <<_ACEOF
49427#undef SIZEOF_INT_P
49428_ACEOF
49429
49430      # The cast to long int works around a bug in the HP C Compiler
49431# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49432# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49433# This bug is HP SR number 8606223364.
49434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49435$as_echo_n "checking size of int *... " >&6; }
49436if ${ac_cv_sizeof_int_p+:} false; then :
49437  $as_echo_n "(cached) " >&6
49438else
49439  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49440
49441else
49442  if test "$ac_cv_type_int_p" = yes; then
49443     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49445as_fn_error 77 "cannot compute sizeof (int *)
49446See \`config.log' for more details" "$LINENO" 5; }
49447   else
49448     ac_cv_sizeof_int_p=0
49449   fi
49450fi
49451
49452fi
49453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49454$as_echo "$ac_cv_sizeof_int_p" >&6; }
49455
49456
49457
49458cat >>confdefs.h <<_ACEOF
49459#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49460_ACEOF
49461
49462
49463
49464      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49465
49466      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49467        { $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
49468$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;}
49469        if test "x$COMPILE_TYPE" = xreduced; then
49470
49471  # Print a helpful message on how to acquire the necessary build dependency.
49472  # reduced is the help tag: freetype, cups, alsa etc
49473  MISSING_DEPENDENCY=reduced
49474
49475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49476    cygwin_help $MISSING_DEPENDENCY
49477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49478    msys_help $MISSING_DEPENDENCY
49479  else
49480    PKGHANDLER_COMMAND=
49481
49482    case $PKGHANDLER in
49483      apt-get)
49484        apt_help     $MISSING_DEPENDENCY ;;
49485      yum)
49486        yum_help     $MISSING_DEPENDENCY ;;
49487      brew)
49488        brew_help    $MISSING_DEPENDENCY ;;
49489      port)
49490        port_help    $MISSING_DEPENDENCY ;;
49491      pkgutil)
49492        pkgutil_help $MISSING_DEPENDENCY ;;
49493      pkgadd)
49494        pkgadd_help  $MISSING_DEPENDENCY ;;
49495    esac
49496
49497    if test "x$PKGHANDLER_COMMAND" != x; then
49498      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49499    fi
49500  fi
49501
49502          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49503$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49504        elif test "x$COMPILE_TYPE" = xcross; then
49505          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49506$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49507        fi
49508        as_fn_error $? "Cannot continue." "$LINENO" 5
49509      fi
49510    fi
49511  fi
49512
49513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49514$as_echo_n "checking for target address size... " >&6; }
49515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49516$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49517
49518
49519  ###############################################################################
49520  #
49521  # Is the target little of big endian?
49522  #
49523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49524$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49525if ${ac_cv_c_bigendian+:} false; then :
49526  $as_echo_n "(cached) " >&6
49527else
49528  ac_cv_c_bigendian=unknown
49529    # See if we're dealing with a universal compiler.
49530    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49531/* end confdefs.h.  */
49532#ifndef __APPLE_CC__
49533	       not a universal capable compiler
49534	     #endif
49535	     typedef int dummy;
49536
49537_ACEOF
49538if ac_fn_cxx_try_compile "$LINENO"; then :
49539
49540	# Check for potential -arch flags.  It is not universal unless
49541	# there are at least two -arch flags with different values.
49542	ac_arch=
49543	ac_prev=
49544	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49545	 if test -n "$ac_prev"; then
49546	   case $ac_word in
49547	     i?86 | x86_64 | ppc | ppc64)
49548	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49549		 ac_arch=$ac_word
49550	       else
49551		 ac_cv_c_bigendian=universal
49552		 break
49553	       fi
49554	       ;;
49555	   esac
49556	   ac_prev=
49557	 elif test "x$ac_word" = "x-arch"; then
49558	   ac_prev=arch
49559	 fi
49560       done
49561fi
49562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49563    if test $ac_cv_c_bigendian = unknown; then
49564      # See if sys/param.h defines the BYTE_ORDER macro.
49565      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49566/* end confdefs.h.  */
49567#include <sys/types.h>
49568	     #include <sys/param.h>
49569
49570int
49571main ()
49572{
49573#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49574		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49575		     && LITTLE_ENDIAN)
49576	      bogus endian macros
49577	     #endif
49578
49579  ;
49580  return 0;
49581}
49582_ACEOF
49583if ac_fn_cxx_try_compile "$LINENO"; then :
49584  # It does; now see whether it defined to BIG_ENDIAN or not.
49585	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49586/* end confdefs.h.  */
49587#include <sys/types.h>
49588		#include <sys/param.h>
49589
49590int
49591main ()
49592{
49593#if BYTE_ORDER != BIG_ENDIAN
49594		 not big endian
49595		#endif
49596
49597  ;
49598  return 0;
49599}
49600_ACEOF
49601if ac_fn_cxx_try_compile "$LINENO"; then :
49602  ac_cv_c_bigendian=yes
49603else
49604  ac_cv_c_bigendian=no
49605fi
49606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49607fi
49608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49609    fi
49610    if test $ac_cv_c_bigendian = unknown; then
49611      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49612      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49613/* end confdefs.h.  */
49614#include <limits.h>
49615
49616int
49617main ()
49618{
49619#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49620	      bogus endian macros
49621	     #endif
49622
49623  ;
49624  return 0;
49625}
49626_ACEOF
49627if ac_fn_cxx_try_compile "$LINENO"; then :
49628  # It does; now see whether it defined to _BIG_ENDIAN or not.
49629	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49630/* end confdefs.h.  */
49631#include <limits.h>
49632
49633int
49634main ()
49635{
49636#ifndef _BIG_ENDIAN
49637		 not big endian
49638		#endif
49639
49640  ;
49641  return 0;
49642}
49643_ACEOF
49644if ac_fn_cxx_try_compile "$LINENO"; then :
49645  ac_cv_c_bigendian=yes
49646else
49647  ac_cv_c_bigendian=no
49648fi
49649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49650fi
49651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49652    fi
49653    if test $ac_cv_c_bigendian = unknown; then
49654      # Compile a test program.
49655      if test "$cross_compiling" = yes; then :
49656  # Try to guess by grepping values from an object file.
49657	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49658/* end confdefs.h.  */
49659short int ascii_mm[] =
49660		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49661		short int ascii_ii[] =
49662		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49663		int use_ascii (int i) {
49664		  return ascii_mm[i] + ascii_ii[i];
49665		}
49666		short int ebcdic_ii[] =
49667		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49668		short int ebcdic_mm[] =
49669		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49670		int use_ebcdic (int i) {
49671		  return ebcdic_mm[i] + ebcdic_ii[i];
49672		}
49673		extern int foo;
49674
49675int
49676main ()
49677{
49678return use_ascii (foo) == use_ebcdic (foo);
49679  ;
49680  return 0;
49681}
49682_ACEOF
49683if ac_fn_cxx_try_compile "$LINENO"; then :
49684  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49685	      ac_cv_c_bigendian=yes
49686	    fi
49687	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49688	      if test "$ac_cv_c_bigendian" = unknown; then
49689		ac_cv_c_bigendian=no
49690	      else
49691		# finding both strings is unlikely to happen, but who knows?
49692		ac_cv_c_bigendian=unknown
49693	      fi
49694	    fi
49695fi
49696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49697else
49698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49699/* end confdefs.h.  */
49700$ac_includes_default
49701int
49702main ()
49703{
49704
49705	     /* Are we little or big endian?  From Harbison&Steele.  */
49706	     union
49707	     {
49708	       long int l;
49709	       char c[sizeof (long int)];
49710	     } u;
49711	     u.l = 1;
49712	     return u.c[sizeof (long int) - 1] == 1;
49713
49714  ;
49715  return 0;
49716}
49717_ACEOF
49718if ac_fn_cxx_try_run "$LINENO"; then :
49719  ac_cv_c_bigendian=no
49720else
49721  ac_cv_c_bigendian=yes
49722fi
49723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49724  conftest.$ac_objext conftest.beam conftest.$ac_ext
49725fi
49726
49727    fi
49728fi
49729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49730$as_echo "$ac_cv_c_bigendian" >&6; }
49731 case $ac_cv_c_bigendian in #(
49732   yes)
49733     ENDIAN="big";; #(
49734   no)
49735     ENDIAN="little" ;; #(
49736   universal)
49737     ENDIAN="universal_endianness"
49738     ;; #(
49739   *)
49740     ENDIAN="unknown" ;;
49741 esac
49742
49743
49744  if test "x$ENDIAN" = xuniversal_endianness; then
49745    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49746  fi
49747  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49748    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
49749  fi
49750
49751
49752# Configure flags for the tools
49753
49754  ###############################################################################
49755  #
49756  # How to compile shared libraries.
49757  #
49758
49759  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49760    PICFLAG="-fPIC"
49761    C_FLAG_REORDER=''
49762    CXX_FLAG_REORDER=''
49763
49764    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49765      # Linking is different on MacOSX
49766      if test "x$STATIC_BUILD" = xtrue; then
49767        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49768      else
49769        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49770        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49771      fi
49772      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49773      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49774      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49775      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49776    else
49777      # Default works for linux, might work on other platforms as well.
49778      SHARED_LIBRARY_FLAGS='-shared'
49779      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49780      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49781      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49782      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49783    fi
49784  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49785    C_FLAG_REORDER=''
49786    CXX_FLAG_REORDER=''
49787
49788    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49789      # Linking is different on MacOSX
49790      PICFLAG=''
49791      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49792      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49793      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49794      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49795      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49796
49797      if test "x$STATIC_BUILD" = xfalse; then
49798        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49799      fi
49800    else
49801      # Default works for linux, might work on other platforms as well.
49802      PICFLAG='-fPIC'
49803      SHARED_LIBRARY_FLAGS='-shared'
49804      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49805      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49806      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49807
49808      # arm specific settings
49809      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49810        # '-Wl,-z,origin' isn't used on arm.
49811        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49812      else
49813        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49814      fi
49815
49816    fi
49817  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49818    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49819      PICFLAG="-xcode=pic32"
49820    else
49821      PICFLAG="-KPIC"
49822    fi
49823    C_FLAG_REORDER='-xF'
49824    CXX_FLAG_REORDER='-xF'
49825    SHARED_LIBRARY_FLAGS="-G"
49826    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49827    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49828    SET_SHARED_LIBRARY_NAME='-h $1'
49829    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49830  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49831    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49832    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49833    # will have to patch this single instruction with a call to some out-of-order code which
49834    # does the load from the TOC. This is of course slow. But in that case we also would have
49835    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49836    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49837    # can be patched directly by the linker and does not require a jump to out-of-order code.
49838    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49839    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49840    # loads for accessing a global variable). But there are rumors that this may be seen as a
49841    # 'performance feature' because of improved code locality of the symbols used in a
49842    # compilation unit.
49843    PICFLAG="-qpic"
49844    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49845    C_FLAG_REORDER=''
49846    CXX_FLAG_REORDER=''
49847    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49848    SET_EXECUTABLE_ORIGIN=""
49849    SET_SHARED_LIBRARY_ORIGIN=''
49850    SET_SHARED_LIBRARY_NAME=''
49851    SET_SHARED_LIBRARY_MAPFILE=''
49852  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49853    PICFLAG=""
49854    C_FLAG_REORDER=''
49855    CXX_FLAG_REORDER=''
49856    SHARED_LIBRARY_FLAGS="-dll"
49857    SET_EXECUTABLE_ORIGIN=''
49858    SET_SHARED_LIBRARY_ORIGIN=''
49859    SET_SHARED_LIBRARY_NAME=''
49860    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49861  fi
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871  # The (cross) compiler is now configured, we can now test capabilities
49872  # of the target platform.
49873
49874
49875
49876  ###############################################################################
49877  #
49878  # Setup the opt flags for different compilers
49879  # and different operating systems.
49880  #
49881
49882  # FIXME: this was indirectly the old default, but just inherited.
49883  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49884  #   C_FLAG_DEPS="-MMD -MF"
49885  # fi
49886
49887  # Generate make dependency files
49888  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49889    C_FLAG_DEPS="-MMD -MF"
49890  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49891    C_FLAG_DEPS="-MMD -MF"
49892  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49893    C_FLAG_DEPS="-xMMD -xMF"
49894  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49895    C_FLAG_DEPS="-qmakedep=gcc -MF"
49896  fi
49897  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49898
49899
49900
49901  # Debug symbols
49902  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49903    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49904      # reduce from default "-g2" option to save space
49905      CFLAGS_DEBUG_SYMBOLS="-g1"
49906      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49907    else
49908      CFLAGS_DEBUG_SYMBOLS="-g"
49909      CXXFLAGS_DEBUG_SYMBOLS="-g"
49910    fi
49911  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49912    CFLAGS_DEBUG_SYMBOLS="-g"
49913    CXXFLAGS_DEBUG_SYMBOLS="-g"
49914  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49915    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49916    # -g0 enables debug symbols without disabling inlining.
49917    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49918  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49919    CFLAGS_DEBUG_SYMBOLS="-g"
49920    CXXFLAGS_DEBUG_SYMBOLS="-g"
49921  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49922    CFLAGS_DEBUG_SYMBOLS="-Zi"
49923    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49924  fi
49925
49926
49927
49928  # Debug symbols for JVM_CFLAGS
49929  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49930    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49931    if test "x$DEBUG_LEVEL" = xslowdebug; then
49932      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49933    else
49934      # -g0 does not disable inlining, which -g does.
49935      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49936    fi
49937  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49938    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49939  else
49940    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49941  fi
49942
49943
49944  # bounds, memory and behavior checking options
49945  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49946    case $DEBUG_LEVEL in
49947    release )
49948      # no adjustment
49949      ;;
49950    fastdebug )
49951      # no adjustment
49952      ;;
49953    slowdebug )
49954      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49955      # get's added conditionally on whether we produce debug symbols or not.
49956      # This is most likely not really correct.
49957
49958      # Add runtime stack smashing and undefined behavior checks.
49959      # Not all versions of gcc support -fstack-protector
49960      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003    # Execute function body
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052    # Execute function body
50053
50054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50055$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50056  supports=yes
50057
50058  saved_cflags="$CFLAGS"
50059  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50060  ac_ext=c
50061ac_cpp='$CPP $CPPFLAGS'
50062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50064ac_compiler_gnu=$ac_cv_c_compiler_gnu
50065
50066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50067/* end confdefs.h.  */
50068int i;
50069_ACEOF
50070if ac_fn_c_try_compile "$LINENO"; then :
50071
50072else
50073  supports=no
50074fi
50075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50076  ac_ext=cpp
50077ac_cpp='$CXXCPP $CPPFLAGS'
50078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50081
50082  CFLAGS="$saved_cflags"
50083
50084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50085$as_echo "$supports" >&6; }
50086  if test "x$supports" = "xyes" ; then
50087    :
50088    C_COMP_SUPPORTS="yes"
50089  else
50090    :
50091    C_COMP_SUPPORTS="no"
50092  fi
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152    # Execute function body
50153
50154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50155$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50156  supports=yes
50157
50158  saved_cxxflags="$CXXFLAGS"
50159  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50160  ac_ext=cpp
50161ac_cpp='$CXXCPP $CPPFLAGS'
50162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50165
50166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50167/* end confdefs.h.  */
50168int i;
50169_ACEOF
50170if ac_fn_cxx_try_compile "$LINENO"; then :
50171
50172else
50173  supports=no
50174fi
50175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50176  ac_ext=cpp
50177ac_cpp='$CXXCPP $CPPFLAGS'
50178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50181
50182  CXXFLAGS="$saved_cxxflags"
50183
50184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50185$as_echo "$supports" >&6; }
50186  if test "x$supports" = "xyes" ; then
50187    :
50188    CXX_COMP_SUPPORTS="yes"
50189  else
50190    :
50191    CXX_COMP_SUPPORTS="no"
50192  fi
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50207$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50208  supports=no
50209  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50210
50211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50212$as_echo "$supports" >&6; }
50213  if test "x$supports" = "xyes" ; then
50214    :
50215
50216  else
50217    :
50218    STACK_PROTECTOR_CFLAG=""
50219  fi
50220
50221
50222
50223
50224
50225
50226
50227      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50228      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50229      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50230        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50231      fi
50232      ;;
50233    esac
50234  fi
50235
50236  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50237    if test "x$DEBUG_LEVEL" != xrelease; then
50238      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50239        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50240      fi
50241    fi
50242  fi
50243
50244  # Optimization levels
50245  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50246    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50247
50248    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50249      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50250      C_O_FLAG_HIGHEST_JVM="-xO4"
50251      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50252      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50253      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50254      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50255      C_O_FLAG_DEBUG_JVM=""
50256      C_O_FLAG_NONE="-xregs=no%frameptr"
50257      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50258      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50259      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50260      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50261      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50262      CXX_O_FLAG_DEBUG_JVM=""
50263      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50264      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50265        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50266        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50267      fi
50268    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50269      C_O_FLAG_HIGHEST_JVM="-xO4"
50270      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50271      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50272      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50273      C_O_FLAG_DEBUG=""
50274      C_O_FLAG_DEBUG_JVM=""
50275      C_O_FLAG_NONE=""
50276      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50277      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50278      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50279      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50280      CXX_O_FLAG_DEBUG=""
50281      CXX_O_FLAG_DEBUG_JVM=""
50282      CXX_O_FLAG_NONE=""
50283    fi
50284  else
50285    # The remaining toolchains share opt flags between CC and CXX;
50286    # setup for C and duplicate afterwards.
50287    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50288      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50289        # On MacOSX we optimize for size, something
50290        # we should do for all platforms?
50291        C_O_FLAG_HIGHEST_JVM="-Os"
50292        C_O_FLAG_HIGHEST="-Os"
50293        C_O_FLAG_HI="-Os"
50294        C_O_FLAG_NORM="-Os"
50295        C_O_FLAG_SIZE="-Os"
50296      else
50297        C_O_FLAG_HIGHEST_JVM="-O3"
50298        C_O_FLAG_HIGHEST="-O3"
50299        C_O_FLAG_HI="-O3"
50300        C_O_FLAG_NORM="-O2"
50301        C_O_FLAG_SIZE="-Os"
50302      fi
50303      C_O_FLAG_DEBUG="-O0"
50304      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50305        C_O_FLAG_DEBUG_JVM=""
50306      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50307        C_O_FLAG_DEBUG_JVM="-O0"
50308      fi
50309      C_O_FLAG_NONE="-O0"
50310    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50311      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50312        # On MacOSX we optimize for size, something
50313        # we should do for all platforms?
50314        C_O_FLAG_HIGHEST_JVM="-Os"
50315        C_O_FLAG_HIGHEST="-Os"
50316        C_O_FLAG_HI="-Os"
50317        C_O_FLAG_NORM="-Os"
50318        C_O_FLAG_SIZE="-Os"
50319      else
50320        C_O_FLAG_HIGHEST_JVM="-O3"
50321        C_O_FLAG_HIGHEST="-O3"
50322        C_O_FLAG_HI="-O3"
50323        C_O_FLAG_NORM="-O2"
50324        C_O_FLAG_SIZE="-Os"
50325      fi
50326      C_O_FLAG_DEBUG="-O0"
50327      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50328        C_O_FLAG_DEBUG_JVM=""
50329      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50330        C_O_FLAG_DEBUG_JVM="-O0"
50331      fi
50332      C_O_FLAG_NONE="-O0"
50333    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50334      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50335      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50336      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50337      C_O_FLAG_NORM="-O2"
50338      C_O_FLAG_DEBUG="-qnoopt"
50339      # FIXME: Value below not verified.
50340      C_O_FLAG_DEBUG_JVM=""
50341      C_O_FLAG_NONE="-qnoopt"
50342    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50343      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50344      C_O_FLAG_HIGHEST="-O2"
50345      C_O_FLAG_HI="-O1"
50346      C_O_FLAG_NORM="-O1"
50347      C_O_FLAG_DEBUG="-Od"
50348      C_O_FLAG_DEBUG_JVM=""
50349      C_O_FLAG_NONE="-Od"
50350      C_O_FLAG_SIZE="-Os"
50351    fi
50352    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50353    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50354    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50355    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50356    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50357    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50358    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50359    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50360  fi
50361
50362  # Adjust optimization flags according to debug level.
50363  case $DEBUG_LEVEL in
50364    release )
50365      # no adjustment
50366      ;;
50367    fastdebug )
50368      # Not quite so much optimization
50369      C_O_FLAG_HI="$C_O_FLAG_NORM"
50370      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50371      ;;
50372    slowdebug )
50373      # Disable optimization
50374      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50375      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50376      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50377      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50378      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50379      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50380      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50381      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50382      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50383      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50384      ;;
50385  esac
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406# Check whether --with-abi-profile was given.
50407if test "${with_abi_profile+set}" = set; then :
50408  withval=$with_abi_profile;
50409fi
50410
50411
50412  if test "x$with_abi_profile" != x; then
50413    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50414        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50415      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50416    fi
50417
50418    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50420$as_echo_n "checking for ABI profle... " >&6; }
50421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50422$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50423
50424    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50425      ARM_FLOAT_TYPE=vfp-sflt
50426      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50427    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50428      ARM_FLOAT_TYPE=vfp-hflt
50429      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50430    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50431      ARM_FLOAT_TYPE=sflt
50432      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50433    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50434      ARM_FLOAT_TYPE=vfp-sflt
50435      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50436    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50437      ARM_FLOAT_TYPE=vfp-hflt
50438      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50439    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50440      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50441      ARM_FLOAT_TYPE=
50442      ARM_ARCH_TYPE_FLAGS=
50443    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50444      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50445      ARM_FLOAT_TYPE=
50446      ARM_ARCH_TYPE_FLAGS=
50447    else
50448      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50449    fi
50450
50451    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50452      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50453    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50454      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50455    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50456      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50457    fi
50458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50459$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50461$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50462
50463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50464$as_echo_n "checking for arch type flags... " >&6; }
50465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50466$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50467
50468    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50469    # autoconf target triplet.
50470     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50471    # Sanity check that it is a known ABI.
50472    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50473        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50474        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50475          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50476$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50477    fi
50478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50479$as_echo_n "checking for ABI property name... " >&6; }
50480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50481$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50482
50483
50484    # Pass these on to the open part of configure as if they were set using
50485    # --with-extra-c[xx]flags.
50486    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50487    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50488    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50489    # FIXME: This should not really be set using extra_cflags.
50490    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50491        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50492        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50493    fi
50494    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50495    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50496    # And pass the architecture flags to the linker as well
50497    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50498  fi
50499
50500  # When building with an abi profile, the name of that profile is appended on the
50501  # bundle platform, which is used in bundle names.
50502  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50503    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50504  fi
50505
50506
50507  # Special extras...
50508  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50509    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50510      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50511      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50512    fi
50513    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50514    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50515  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50516    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50517    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50518  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50519    CXXSTD_CXXFLAG="-std=gnu++98"
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562    # Execute function body
50563
50564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50565$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50566  supports=yes
50567
50568  saved_cxxflags="$CXXFLAGS"
50569  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50570  ac_ext=cpp
50571ac_cpp='$CXXCPP $CPPFLAGS'
50572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50575
50576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50577/* end confdefs.h.  */
50578int i;
50579_ACEOF
50580if ac_fn_cxx_try_compile "$LINENO"; then :
50581
50582else
50583  supports=no
50584fi
50585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50586  ac_ext=cpp
50587ac_cpp='$CXXCPP $CPPFLAGS'
50588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50591
50592  CXXFLAGS="$saved_cxxflags"
50593
50594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50595$as_echo "$supports" >&6; }
50596  if test "x$supports" = "xyes" ; then
50597    :
50598
50599  else
50600    :
50601    CXXSTD_CXXFLAG=""
50602  fi
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50616    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50617
50618  fi
50619  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50620    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50621    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50622  fi
50623
50624  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50625  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50626  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50627
50628  ###############################################################################
50629  #
50630  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50631  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50632  #
50633
50634  # Setup compiler/platform specific flags into
50635  #    CFLAGS_JDK    - C Compiler flags
50636  #    CXXFLAGS_JDK  - C++ Compiler flags
50637  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50638  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50639    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50640    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50641    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50642    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50643      # Force compatibility with i586 on 32 bit intel platforms.
50644      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50645      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50646    fi
50647    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50648        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50649    case $OPENJDK_TARGET_CPU_ARCH in
50650      arm )
50651        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50652        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50653        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50654        ;;
50655      ppc )
50656        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50657        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50658        ;;
50659      s390 )
50660        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50661        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50662        ;;
50663      * )
50664        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50665        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50666        ;;
50667    esac
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722    # Execute function body
50723
50724  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50725  REFERENCE_VERSION=6
50726
50727  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50728    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50729  fi
50730
50731  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50732    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50733  fi
50734
50735  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50736  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50737
50738  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50739    :
50740
50741  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50742  # runs afoul of the more aggressive versions of these optimisations.
50743  # Notably, value range propagation now assumes that the this pointer of C++
50744  # member functions is non-null.
50745  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50746        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50747        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50748$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50749  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50750  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50751
50752  else
50753    :
50754
50755  fi
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50771    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50772
50773    # Restrict the debug information created by Clang to avoid
50774    # too big object files and speed the build up a little bit
50775    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50776    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50777    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50778      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50779        # Force compatibility with i586 on 32 bit intel platforms.
50780        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50781        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50782      fi
50783      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50784      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50785          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50786      case $OPENJDK_TARGET_CPU_ARCH in
50787        ppc )
50788          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50789          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50790          ;;
50791        * )
50792          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50793          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50794          ;;
50795      esac
50796    fi
50797  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50798    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50799    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50800    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50801      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50802    fi
50803
50804    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50805    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50806  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50807    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50808    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50809    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50810  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50811    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50812        -MD -Zc:wchar_t- -W3 -wd4800 \
50813        -DWIN32_LEAN_AND_MEAN \
50814        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50815        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50816        -DWIN32 -DIAL"
50817    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50818      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50819    else
50820      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50821    fi
50822    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50823    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50824    # studio.
50825    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50826      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50827      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50828      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50829    fi
50830  fi
50831
50832  ###############################################################################
50833
50834  # Adjust flags according to debug level.
50835  case $DEBUG_LEVEL in
50836    fastdebug | slowdebug )
50837      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50838      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50839      ;;
50840    release )
50841      ;;
50842    * )
50843      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50844      ;;
50845  esac
50846
50847  # Set some common defines. These works for all compilers, but assume
50848  # -D is universally accepted.
50849
50850  # Setup endianness
50851  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50852    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50853    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50854    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50855    #   Note: -Dmacro         is the same as    #define macro 1
50856    #         -Dmacro=        is the same as    #define macro
50857    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50858      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50859    else
50860      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50861    fi
50862  else
50863    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50864    # are defined in the system?
50865    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50866      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50867    else
50868      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50869    fi
50870  fi
50871
50872  # Setup target OS define. Use OS target name but in upper case.
50873  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50874  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50875
50876  # Setup target CPU
50877  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50878      $OPENJDK_TARGET_ADD_LP64 \
50879      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50880
50881  # Setup debug/release defines
50882  if test "x$DEBUG_LEVEL" = xrelease; then
50883    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50884    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50885      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50886    fi
50887  else
50888    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50889  fi
50890
50891  # Set some additional per-OS defines.
50892  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50893    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50894    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50895        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50896  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50897    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50898    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50899        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50900  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50901    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50902    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50903    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50904    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50905        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50906        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50907        -fno-omit-frame-pointer"
50908  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50909    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50910    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50911    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50912        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50913        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50914  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50915    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50916  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50917    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50918    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50919  fi
50920
50921  # Set some additional per-CPU defines.
50922  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50923    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50924  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50925    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50926  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50927    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50928      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50929      # fixes `relocation truncated to fit' error for gcc 4.1.
50930      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50931      # Use ppc64 instructions, but schedule for power5
50932      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50933    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50934      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50935    fi
50936  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50937    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50938      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50939      # Little endian machine uses ELFv2 ABI.
50940      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50941      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50942      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50943    fi
50944  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50945    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50946      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50947    fi
50948  fi
50949
50950  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50951    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50952  fi
50953
50954  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50955    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50956      # Solaris does not have _LP64=1 in the old build.
50957      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50958      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50959    fi
50960  fi
50961
50962  # Set JVM_CFLAGS warning handling
50963  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50964    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50965        -Wunused-value -Woverloaded-virtual"
50966
50967    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022    # Execute function body
51023
51024  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51025  REFERENCE_VERSION=4.8
51026
51027  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51028    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51029  fi
51030
51031  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51032    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51033  fi
51034
51035  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51036  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51037
51038  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51039    :
51040
51041            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51042            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51043
51044
51045  else
51046    :
51047
51048  fi
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063    fi
51064    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51065      # Non-zero builds have stricter warnings
51066      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51067    else
51068      if test "x$TOOLCHAIN_TYPE" = xclang; then
51069        # Some versions of llvm do not like -Wundef
51070        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51071      fi
51072    fi
51073  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51074    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51075        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51076  fi
51077
51078  # Additional macosx handling
51079  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51080    # Setting these parameters makes it an error to link to macosx APIs that are
51081    # newer than the given OS version and makes the linked binaries compatible
51082    # even if built on a newer version of the OS.
51083    # The expected format is X.Y.Z
51084    MACOSX_VERSION_MIN=10.7.0
51085
51086
51087    # The macro takes the version with no dots, ex: 1070
51088    # Let the flags variables get resolved in make for easier override on make
51089    # command line.
51090    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51091    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51092  fi
51093
51094  # Setup some hard coded includes
51095  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51096      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51097      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51098      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51099      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51100      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51101      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51102
51103  # The shared libraries are compiled using the picflag.
51104  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51105      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51106  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51107      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51108
51109  # Executable flags
51110  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51111  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51112
51113
51114
51115
51116
51117
51118  # Setup LDFLAGS et al.
51119  #
51120
51121  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51122    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51123    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51124    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51125    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51126      LDFLAGS_SAFESH="-safeseh"
51127      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51128      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51129      # NOTE: Old build added -machine. Probably not needed.
51130      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51131    else
51132      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51133    fi
51134  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51135      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51136      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51137        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51138        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51139    fi
51140  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51141    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51142    # We have previously set HAS_GNU_HASH if this is the case
51143    if test -n "$HAS_GNU_HASH"; then
51144      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51145      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51146      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51147    fi
51148      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51149        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51150    fi
51151    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51152      # And since we now know that the linker is gnu, then add -z defs, to forbid
51153      # undefined symbols in object files.
51154      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51155      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51156      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51157      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51158      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51159      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51160        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51161      fi
51162      case $DEBUG_LEVEL in
51163        release )
51164          # tell linker to optimize libraries.
51165          # Should this be supplied to the OSS linker as well?
51166          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51167          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51168          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51169          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51170            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51171          fi
51172          ;;
51173        slowdebug )
51174          # Hotspot always let the linker optimize
51175          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51176          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51177            # do relocations at load
51178            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51179            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51180            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51181          fi
51182          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51183            # mark relocations read only
51184            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51185            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51186            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51187          fi
51188          ;;
51189        fastdebug )
51190          # Hotspot always let the linker optimize
51191          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51192          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51193            # mark relocations read only
51194            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51195            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51196            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51197          fi
51198          ;;
51199        * )
51200          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51201          ;;
51202        esac
51203    fi
51204  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51205    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51206    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51207    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51208    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51209    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51210    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51211      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51212    fi
51213  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51214    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51215    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51216    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51217  fi
51218
51219  # Customize LDFLAGS for executables
51220
51221  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51222
51223  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51224    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51225      LDFLAGS_STACK_SIZE=1048576
51226    else
51227      LDFLAGS_STACK_SIZE=327680
51228    fi
51229    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51230  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51231    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51232  fi
51233
51234  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51235
51236  # Customize LDFLAGS for libs
51237  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51238
51239  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51240  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51241    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51242        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51243    JDKLIB_LIBS=""
51244  else
51245    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51246        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51247
51248    if test "xTARGET" = "xTARGET"; then
51249      # On some platforms (mac) the linker warns about non existing -L dirs.
51250      # For any of the variants server, client or minimal, the dir matches the
51251      # variant name. The "main" variant should be used for linking. For the
51252      # rest, the dir is just server.
51253      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51254          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51255        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51256            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51257      else
51258        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51259            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51260      fi
51261    elif test "xTARGET" = "xBUILD"; then
51262      # When building a buildjdk, it's always only the server variant
51263      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51264          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51265    fi
51266
51267    JDKLIB_LIBS="-ljava -ljvm"
51268    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51269      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51270    fi
51271
51272  fi
51273
51274LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51275
51276  # Set JVM_LIBS (per os)
51277  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51278    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51279  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51280    # FIXME: This hard-coded path is not really proper.
51281    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51282      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51283    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51284      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51285    fi
51286    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51287        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51288  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51289    JVM_LIBS="$JVM_LIBS -lm"
51290  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51291    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51292  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51293    JVM_LIBS="$JVM_LIBS -lm"
51294  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51295    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51296        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51297        wsock32.lib winmm.lib version.lib psapi.lib"
51298    fi
51299
51300  # Set JVM_ASFLAGS
51301  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51302    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51303      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51304    fi
51305  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51306    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51307  fi
51308
51309  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325  # Special extras...
51326  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51327    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51328      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51329      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51330    fi
51331    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51332    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51333  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51334    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51335    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51336  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51337    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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    # Execute function body
51381
51382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51383$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51384  supports=yes
51385
51386  saved_cxxflags="$CXXFLAGS"
51387  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51388  ac_ext=cpp
51389ac_cpp='$CXXCPP $CPPFLAGS'
51390ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51391ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51392ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51393
51394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51395/* end confdefs.h.  */
51396int i;
51397_ACEOF
51398if ac_fn_cxx_try_compile "$LINENO"; then :
51399
51400else
51401  supports=no
51402fi
51403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51404  ac_ext=cpp
51405ac_cpp='$CXXCPP $CPPFLAGS'
51406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51409
51410  CXXFLAGS="$saved_cxxflags"
51411
51412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51413$as_echo "$supports" >&6; }
51414  if test "x$supports" = "xyes" ; then
51415    :
51416
51417  else
51418    :
51419    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51420  fi
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51434    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51435
51436  fi
51437  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51438    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51439    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51440  fi
51441
51442  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51443  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51444  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51445
51446  ###############################################################################
51447  #
51448  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51449  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51450  #
51451
51452  # Setup compiler/platform specific flags into
51453  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51454  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51455  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51456  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51457    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51458    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51459    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51460    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51461      # Force compatibility with i586 on 32 bit intel platforms.
51462      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51464    fi
51465    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51466        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51467    case $OPENJDK_BUILD_CPU_ARCH in
51468      arm )
51469        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51470        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51471        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51472        ;;
51473      ppc )
51474        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51475        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51476        ;;
51477      s390 )
51478        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51479        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51480        ;;
51481      * )
51482        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51483        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51484        ;;
51485    esac
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540    # Execute function body
51541
51542  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51543  REFERENCE_VERSION=6
51544
51545  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51546    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51547  fi
51548
51549  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51550    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51551  fi
51552
51553  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51554  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51555
51556  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51557    :
51558
51559  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51560  # runs afoul of the more aggressive versions of these optimisations.
51561  # Notably, value range propagation now assumes that the this pointer of C++
51562  # member functions is non-null.
51563  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51564        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51565        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51566$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51567  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51568  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51569
51570  else
51571    :
51572
51573  fi
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51589    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51590
51591    # Restrict the debug information created by Clang to avoid
51592    # too big object files and speed the build up a little bit
51593    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51594    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51595    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51596      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51597        # Force compatibility with i586 on 32 bit intel platforms.
51598        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51599        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51600      fi
51601      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51602      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51603          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51604      case $OPENJDK_BUILD_CPU_ARCH in
51605        ppc )
51606          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51607          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51608          ;;
51609        * )
51610          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51611          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51612          ;;
51613      esac
51614    fi
51615  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51616    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51617    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51618    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51619      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51620    fi
51621
51622    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51623    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51624  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51625    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51626    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51627    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51628  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51629    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51630        -MD -Zc:wchar_t- -W3 -wd4800 \
51631        -DWIN32_LEAN_AND_MEAN \
51632        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51633        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51634        -DWIN32 -DIAL"
51635    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51636      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51637    else
51638      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51639    fi
51640    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51641    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51642    # studio.
51643    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51644      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51645      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51646      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51647    fi
51648  fi
51649
51650  ###############################################################################
51651
51652  # Adjust flags according to debug level.
51653  case $DEBUG_LEVEL in
51654    fastdebug | slowdebug )
51655      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51656      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51657      ;;
51658    release )
51659      ;;
51660    * )
51661      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51662      ;;
51663  esac
51664
51665  # Set some common defines. These works for all compilers, but assume
51666  # -D is universally accepted.
51667
51668  # Setup endianness
51669  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51670    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51671    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51672    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51673    #   Note: -Dmacro         is the same as    #define macro 1
51674    #         -Dmacro=        is the same as    #define macro
51675    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51676      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51677    else
51678      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51679    fi
51680  else
51681    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51682    # are defined in the system?
51683    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51684      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51685    else
51686      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51687    fi
51688  fi
51689
51690  # Setup target OS define. Use OS target name but in upper case.
51691  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51692  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51693
51694  # Setup target CPU
51695  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51696      $OPENJDK_BUILD_ADD_LP64 \
51697      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51698
51699  # Setup debug/release defines
51700  if test "x$DEBUG_LEVEL" = xrelease; then
51701    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51702    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51703      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51704    fi
51705  else
51706    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51707  fi
51708
51709  # Set some additional per-OS defines.
51710  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51711    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51712    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51713        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51714  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51715    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51716    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51717        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51718  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51719    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51720    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51721    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51722    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51723        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51724        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51725        -fno-omit-frame-pointer"
51726  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51727    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51728    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51729    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51730        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51731        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51732  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51733    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51734  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51735    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51736    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51737  fi
51738
51739  # Set some additional per-CPU defines.
51740  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51741    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51742  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51743    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51744  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51745    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51746      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51747      # fixes `relocation truncated to fit' error for gcc 4.1.
51748      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51749      # Use ppc64 instructions, but schedule for power5
51750      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51751    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51752      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51753    fi
51754  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51755    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51756      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51757      # Little endian machine uses ELFv2 ABI.
51758      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51759      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51760      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51761    fi
51762  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51763    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51764      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51765    fi
51766  fi
51767
51768  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51769    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51770  fi
51771
51772  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51773    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51774      # Solaris does not have _LP64=1 in the old build.
51775      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51776      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51777    fi
51778  fi
51779
51780  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51781  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51782    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51783        -Wunused-value -Woverloaded-virtual"
51784
51785    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840    # Execute function body
51841
51842  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51843  REFERENCE_VERSION=4.8
51844
51845  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51846    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51847  fi
51848
51849  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51850    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51851  fi
51852
51853  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51854  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51855
51856  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51857    :
51858
51859            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51860            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51861
51862
51863  else
51864    :
51865
51866  fi
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881    fi
51882    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51883      # Non-zero builds have stricter warnings
51884      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51885    else
51886      if test "x$TOOLCHAIN_TYPE" = xclang; then
51887        # Some versions of llvm do not like -Wundef
51888        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51889      fi
51890    fi
51891  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51892    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51893        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51894  fi
51895
51896  # Additional macosx handling
51897  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51898    # Setting these parameters makes it an error to link to macosx APIs that are
51899    # newer than the given OS version and makes the linked binaries compatible
51900    # even if built on a newer version of the OS.
51901    # The expected format is X.Y.Z
51902    MACOSX_VERSION_MIN=10.7.0
51903
51904
51905    # The macro takes the version with no dots, ex: 1070
51906    # Let the flags variables get resolved in make for easier override on make
51907    # command line.
51908    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)"
51909    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51910  fi
51911
51912  # Setup some hard coded includes
51913  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51914      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51915      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51916      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51917      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51918      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51919      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51920
51921  # The shared libraries are compiled using the picflag.
51922  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51923      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51924  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51925      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51926
51927  # Executable flags
51928  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51929  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51930
51931
51932
51933
51934
51935
51936  # Setup LDFLAGS et al.
51937  #
51938
51939  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51940    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51941    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51942    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51943    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51944      LDFLAGS_SAFESH="-safeseh"
51945      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51946      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51947      # NOTE: Old build added -machine. Probably not needed.
51948      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51949    else
51950      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51951    fi
51952  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51953      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51954      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51955        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51956        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51957    fi
51958  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51959    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51960    # We have previously set HAS_GNU_HASH if this is the case
51961    if test -n "$HAS_GNU_HASH"; then
51962      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51963      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51964      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51965    fi
51966      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51967        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51968    fi
51969    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51970      # And since we now know that the linker is gnu, then add -z defs, to forbid
51971      # undefined symbols in object files.
51972      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51973      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51974      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51975      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51976      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51977      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51978        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51979      fi
51980      case $DEBUG_LEVEL in
51981        release )
51982          # tell linker to optimize libraries.
51983          # Should this be supplied to the OSS linker as well?
51984          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51985          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51986          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51987          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51988            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51989          fi
51990          ;;
51991        slowdebug )
51992          # Hotspot always let the linker optimize
51993          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51994          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51995            # do relocations at load
51996            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51997            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51998            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51999          fi
52000          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52001            # mark relocations read only
52002            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52003            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52004            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52005          fi
52006          ;;
52007        fastdebug )
52008          # Hotspot always let the linker optimize
52009          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52010          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52011            # mark relocations read only
52012            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52013            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52014            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52015          fi
52016          ;;
52017        * )
52018          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52019          ;;
52020        esac
52021    fi
52022  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52023    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52024    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52025    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52026    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52027    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52028    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52029      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52030    fi
52031  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52032    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52033    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52034    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52035  fi
52036
52037  # Customize LDFLAGS for executables
52038
52039  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52040
52041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52042    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52043      LDFLAGS_STACK_SIZE=1048576
52044    else
52045      LDFLAGS_STACK_SIZE=327680
52046    fi
52047    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52048  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52049    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52050  fi
52051
52052  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52053
52054  # Customize LDFLAGS for libs
52055  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52056
52057  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52058  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52059    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52060        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52061    OPENJDK_BUILD_JDKLIB_LIBS=""
52062  else
52063    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52064        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52065
52066    if test "xBUILD" = "xTARGET"; then
52067      # On some platforms (mac) the linker warns about non existing -L dirs.
52068      # For any of the variants server, client or minimal, the dir matches the
52069      # variant name. The "main" variant should be used for linking. For the
52070      # rest, the dir is just server.
52071      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52072          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52073        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52074            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52075      else
52076        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52077            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52078      fi
52079    elif test "xBUILD" = "xBUILD"; then
52080      # When building a buildjdk, it's always only the server variant
52081      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52082          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52083    fi
52084
52085    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52086    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52087      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52088    fi
52089
52090  fi
52091
52092OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52093
52094  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52095  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52096    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52097  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52098    # FIXME: This hard-coded path is not really proper.
52099    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52100      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52101    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52102      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52103    fi
52104    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52105        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52106  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52107    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52108  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52109    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52110  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52111    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52112  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52113    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52114        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52115        wsock32.lib winmm.lib version.lib psapi.lib"
52116    fi
52117
52118  # Set OPENJDK_BUILD_JVM_ASFLAGS
52119  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52120    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52121      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52122    fi
52123  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52124    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52125  fi
52126
52127  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143  # Tests are only ever compiled for TARGET
52144  # Flags for compiling test libraries
52145  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52146  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52147
52148  # Flags for compiling test executables
52149  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52150  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52151
52152
52153
52154
52155
52156
52157  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52158  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52159
52160
52161
52162
52163
52164
52165  # Check that the compiler supports -mX (or -qX on AIX) flags
52166  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214    # Execute function body
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263    # Execute function body
52264
52265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52266$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52267  supports=yes
52268
52269  saved_cflags="$CFLAGS"
52270  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52271  ac_ext=c
52272ac_cpp='$CPP $CPPFLAGS'
52273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52275ac_compiler_gnu=$ac_cv_c_compiler_gnu
52276
52277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52278/* end confdefs.h.  */
52279int i;
52280_ACEOF
52281if ac_fn_c_try_compile "$LINENO"; then :
52282
52283else
52284  supports=no
52285fi
52286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52287  ac_ext=cpp
52288ac_cpp='$CXXCPP $CPPFLAGS'
52289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52292
52293  CFLAGS="$saved_cflags"
52294
52295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52296$as_echo "$supports" >&6; }
52297  if test "x$supports" = "xyes" ; then
52298    :
52299    C_COMP_SUPPORTS="yes"
52300  else
52301    :
52302    C_COMP_SUPPORTS="no"
52303  fi
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363    # Execute function body
52364
52365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52366$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52367  supports=yes
52368
52369  saved_cxxflags="$CXXFLAGS"
52370  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52371  ac_ext=cpp
52372ac_cpp='$CXXCPP $CPPFLAGS'
52373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52376
52377  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52378/* end confdefs.h.  */
52379int i;
52380_ACEOF
52381if ac_fn_cxx_try_compile "$LINENO"; then :
52382
52383else
52384  supports=no
52385fi
52386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52387  ac_ext=cpp
52388ac_cpp='$CXXCPP $CPPFLAGS'
52389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52392
52393  CXXFLAGS="$saved_cxxflags"
52394
52395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52396$as_echo "$supports" >&6; }
52397  if test "x$supports" = "xyes" ; then
52398    :
52399    CXX_COMP_SUPPORTS="yes"
52400  else
52401    :
52402    CXX_COMP_SUPPORTS="no"
52403  fi
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52418$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52419  supports=no
52420  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52421
52422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52423$as_echo "$supports" >&6; }
52424  if test "x$supports" = "xyes" ; then
52425    :
52426    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52427  else
52428    :
52429    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52430  fi
52431
52432
52433
52434
52435
52436
52437
52438
52439  # Check whether --enable-warnings-as-errors was given.
52440if test "${enable_warnings_as_errors+set}" = set; then :
52441  enableval=$enable_warnings_as_errors;
52442fi
52443
52444
52445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52446$as_echo_n "checking if native warnings are errors... " >&6; }
52447  if test "x$enable_warnings_as_errors" = "xyes"; then
52448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52449$as_echo "yes (explicitly set)" >&6; }
52450    WARNINGS_AS_ERRORS=true
52451  elif test "x$enable_warnings_as_errors" = "xno"; then
52452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52453$as_echo "no" >&6; }
52454    WARNINGS_AS_ERRORS=false
52455  elif test "x$enable_warnings_as_errors" = "x"; then
52456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52457$as_echo "yes (default)" >&6; }
52458    WARNINGS_AS_ERRORS=true
52459  else
52460    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52461  fi
52462
52463
52464
52465  case "${TOOLCHAIN_TYPE}" in
52466    microsoft)
52467      DISABLE_WARNING_PREFIX="-wd"
52468      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52469      ;;
52470    solstudio)
52471      DISABLE_WARNING_PREFIX="-erroff="
52472      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52473      ;;
52474    gcc)
52475      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523    # Execute function body
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572    # Execute function body
52573
52574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52575$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52576  supports=yes
52577
52578  saved_cflags="$CFLAGS"
52579  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52580  ac_ext=c
52581ac_cpp='$CPP $CPPFLAGS'
52582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52584ac_compiler_gnu=$ac_cv_c_compiler_gnu
52585
52586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52587/* end confdefs.h.  */
52588int i;
52589_ACEOF
52590if ac_fn_c_try_compile "$LINENO"; then :
52591
52592else
52593  supports=no
52594fi
52595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52596  ac_ext=cpp
52597ac_cpp='$CXXCPP $CPPFLAGS'
52598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52601
52602  CFLAGS="$saved_cflags"
52603
52604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52605$as_echo "$supports" >&6; }
52606  if test "x$supports" = "xyes" ; then
52607    :
52608    C_COMP_SUPPORTS="yes"
52609  else
52610    :
52611    C_COMP_SUPPORTS="no"
52612  fi
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672    # Execute function body
52673
52674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52675$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52676  supports=yes
52677
52678  saved_cxxflags="$CXXFLAGS"
52679  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52680  ac_ext=cpp
52681ac_cpp='$CXXCPP $CPPFLAGS'
52682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52685
52686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52687/* end confdefs.h.  */
52688int i;
52689_ACEOF
52690if ac_fn_cxx_try_compile "$LINENO"; then :
52691
52692else
52693  supports=no
52694fi
52695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52696  ac_ext=cpp
52697ac_cpp='$CXXCPP $CPPFLAGS'
52698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52701
52702  CXXFLAGS="$saved_cxxflags"
52703
52704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52705$as_echo "$supports" >&6; }
52706  if test "x$supports" = "xyes" ; then
52707    :
52708    CXX_COMP_SUPPORTS="yes"
52709  else
52710    :
52711    CXX_COMP_SUPPORTS="no"
52712  fi
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52727$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52728  supports=no
52729  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52730
52731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52732$as_echo "$supports" >&6; }
52733  if test "x$supports" = "xyes" ; then
52734    :
52735    GCC_CAN_DISABLE_WARNINGS=true
52736  else
52737    :
52738    GCC_CAN_DISABLE_WARNINGS=false
52739
52740  fi
52741
52742
52743
52744
52745
52746
52747      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52748        DISABLE_WARNING_PREFIX="-Wno-"
52749      else
52750        DISABLE_WARNING_PREFIX=
52751      fi
52752      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52753      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52754      # CFLAGS since any target specific flags will likely not work with the
52755      # build compiler
52756      CC_OLD="$CC"
52757      CXX_OLD="$CXX"
52758      CC="$BUILD_CC"
52759      CXX="$BUILD_CXX"
52760      CFLAGS_OLD="$CFLAGS"
52761      CFLAGS=""
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809    # Execute function body
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858    # Execute function body
52859
52860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52861$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52862  supports=yes
52863
52864  saved_cflags="$CFLAGS"
52865  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52866  ac_ext=c
52867ac_cpp='$CPP $CPPFLAGS'
52868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52870ac_compiler_gnu=$ac_cv_c_compiler_gnu
52871
52872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52873/* end confdefs.h.  */
52874int i;
52875_ACEOF
52876if ac_fn_c_try_compile "$LINENO"; then :
52877
52878else
52879  supports=no
52880fi
52881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52882  ac_ext=cpp
52883ac_cpp='$CXXCPP $CPPFLAGS'
52884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52887
52888  CFLAGS="$saved_cflags"
52889
52890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52891$as_echo "$supports" >&6; }
52892  if test "x$supports" = "xyes" ; then
52893    :
52894    C_COMP_SUPPORTS="yes"
52895  else
52896    :
52897    C_COMP_SUPPORTS="no"
52898  fi
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953
52954
52955
52956
52957
52958    # Execute function body
52959
52960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52961$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52962  supports=yes
52963
52964  saved_cxxflags="$CXXFLAGS"
52965  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52966  ac_ext=cpp
52967ac_cpp='$CXXCPP $CPPFLAGS'
52968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52971
52972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52973/* end confdefs.h.  */
52974int i;
52975_ACEOF
52976if ac_fn_cxx_try_compile "$LINENO"; then :
52977
52978else
52979  supports=no
52980fi
52981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52982  ac_ext=cpp
52983ac_cpp='$CXXCPP $CPPFLAGS'
52984ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52985ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52986ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52987
52988  CXXFLAGS="$saved_cxxflags"
52989
52990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52991$as_echo "$supports" >&6; }
52992  if test "x$supports" = "xyes" ; then
52993    :
52994    CXX_COMP_SUPPORTS="yes"
52995  else
52996    :
52997    CXX_COMP_SUPPORTS="no"
52998  fi
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53013$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53014  supports=no
53015  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53016
53017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53018$as_echo "$supports" >&6; }
53019  if test "x$supports" = "xyes" ; then
53020    :
53021    BUILD_CC_CAN_DISABLE_WARNINGS=true
53022  else
53023    :
53024    BUILD_CC_CAN_DISABLE_WARNINGS=false
53025
53026  fi
53027
53028
53029
53030
53031
53032
53033      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53034        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53035      else
53036        BUILD_CC_DISABLE_WARNING_PREFIX=
53037      fi
53038      CC="$CC_OLD"
53039      CXX="$CXX_OLD"
53040      CFLAGS="$CFLAGS_OLD"
53041      ;;
53042    clang)
53043      DISABLE_WARNING_PREFIX="-Wno-"
53044      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53045      ;;
53046    xlc)
53047      DISABLE_WARNING_PREFIX="-qsuppress="
53048      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53049      ;;
53050  esac
53051
53052
53053
53054
53055
53056# Setup debug symbols (need objcopy from the toolchain for that)
53057
53058  #
53059  # NATIVE_DEBUG_SYMBOLS
53060  # This must be done after the toolchain is setup, since we're looking at objcopy.
53061  #
53062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53063$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53064
53065# Check whether --with-native-debug-symbols was given.
53066if test "${with_native_debug_symbols+set}" = set; then :
53067  withval=$with_native_debug_symbols;
53068        if test "x$OPENJDK_TARGET_OS" = xaix; then
53069          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53070            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53071          fi
53072        fi
53073
53074else
53075
53076        if test "x$OPENJDK_TARGET_OS" = xaix; then
53077          # AIX doesn't support 'zipped' so use 'internal' as default
53078          with_native_debug_symbols="internal"
53079        else
53080          if test "x$STATIC_BUILD" = xtrue; then
53081            with_native_debug_symbols="none"
53082          else
53083            with_native_debug_symbols="zipped"
53084          fi
53085        fi
53086
53087fi
53088
53089  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53091$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53092
53093  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53094
53095    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53096      if test "x$OBJCOPY" = x; then
53097        # enabling of enable-debug-symbols and can't find objcopy
53098        # this is an error
53099        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53100      fi
53101    fi
53102
53103    COMPILE_WITH_DEBUG_SYMBOLS=true
53104    COPY_DEBUG_SYMBOLS=true
53105    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53106  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53107    COMPILE_WITH_DEBUG_SYMBOLS=false
53108    COPY_DEBUG_SYMBOLS=false
53109    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53110  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53111    COMPILE_WITH_DEBUG_SYMBOLS=true
53112    COPY_DEBUG_SYMBOLS=false
53113    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53114  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53115
53116    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53117      if test "x$OBJCOPY" = x; then
53118        # enabling of enable-debug-symbols and can't find objcopy
53119        # this is an error
53120        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53121      fi
53122    fi
53123
53124    COMPILE_WITH_DEBUG_SYMBOLS=true
53125    COPY_DEBUG_SYMBOLS=true
53126    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53127  else
53128    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53129  fi
53130
53131  # --enable-debug-symbols is deprecated.
53132  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53133
53134  # Check whether --enable-debug-symbols was given.
53135if test "${enable_debug_symbols+set}" = set; then :
53136  enableval=$enable_debug_symbols;
53137fi
53138
53139  if test "x$enable_debug_symbols" != x; then
53140    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53141$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53142
53143    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53144      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53145$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53146    fi
53147
53148  fi
53149
53150
53151  # --enable-zip-debug-info is deprecated.
53152  # Please use --with-native-debug-symbols=zipped .
53153
53154  # Check whether --enable-zip-debug-info was given.
53155if test "${enable_zip_debug_info+set}" = set; then :
53156  enableval=$enable_zip_debug_info;
53157fi
53158
53159  if test "x$enable_zip_debug_info" != x; then
53160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53161$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53162
53163    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53164      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53165$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53166    fi
53167
53168  fi
53169
53170
53171
53172
53173
53174
53175
53176  # Check whether --enable-native-coverage was given.
53177if test "${enable_native_coverage+set}" = set; then :
53178  enableval=$enable_native_coverage;
53179fi
53180
53181  GCOV_ENABLED="false"
53182  if test "x$enable_native_coverage" = "xyes"; then
53183    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53184      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53185$as_echo_n "checking if native coverage is enabled... " >&6; }
53186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53187$as_echo "yes" >&6; }
53188      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53189      GCOV_LDFLAGS="-fprofile-arcs"
53190      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53191      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53192      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53193      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53194      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53195      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53196      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53197      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53198      GCOV_ENABLED="true"
53199    else
53200      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53201    fi
53202  elif test "x$enable_native_coverage" = "xno"; then
53203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53204$as_echo_n "checking if native coverage is enabled... " >&6; }
53205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53206$as_echo "no" >&6; }
53207  elif test "x$enable_native_coverage" != "x"; then
53208    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53209  fi
53210
53211
53212
53213
53214# Need toolchain to setup dtrace
53215
53216  # Test for dtrace dependencies
53217  # Check whether --enable-dtrace was given.
53218if test "${enable_dtrace+set}" = set; then :
53219  enableval=$enable_dtrace;
53220fi
53221
53222
53223  DTRACE_DEP_MISSING=false
53224
53225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53226$as_echo_n "checking for dtrace tool... " >&6; }
53227  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53229$as_echo "$DTRACE" >&6; }
53230  else
53231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53232$as_echo "not found, cannot build dtrace" >&6; }
53233    DTRACE_DEP_MISSING=true
53234  fi
53235
53236  for ac_header in sys/sdt.h
53237do :
53238  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53239if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53240  cat >>confdefs.h <<_ACEOF
53241#define HAVE_SYS_SDT_H 1
53242_ACEOF
53243 DTRACE_HEADERS_OK=yes
53244else
53245  DTRACE_HEADERS_OK=no
53246fi
53247
53248done
53249
53250  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53251    DTRACE_DEP_MISSING=true
53252  fi
53253
53254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53255$as_echo_n "checking if dtrace should be built... " >&6; }
53256  if test "x$enable_dtrace" = "xyes"; then
53257    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53259$as_echo "no, missing dependencies" >&6; }
53260
53261  # Print a helpful message on how to acquire the necessary build dependency.
53262  # dtrace is the help tag: freetype, cups, alsa etc
53263  MISSING_DEPENDENCY=dtrace
53264
53265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53266    cygwin_help $MISSING_DEPENDENCY
53267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53268    msys_help $MISSING_DEPENDENCY
53269  else
53270    PKGHANDLER_COMMAND=
53271
53272    case $PKGHANDLER in
53273      apt-get)
53274        apt_help     $MISSING_DEPENDENCY ;;
53275      yum)
53276        yum_help     $MISSING_DEPENDENCY ;;
53277      brew)
53278        brew_help    $MISSING_DEPENDENCY ;;
53279      port)
53280        port_help    $MISSING_DEPENDENCY ;;
53281      pkgutil)
53282        pkgutil_help $MISSING_DEPENDENCY ;;
53283      pkgadd)
53284        pkgadd_help  $MISSING_DEPENDENCY ;;
53285    esac
53286
53287    if test "x$PKGHANDLER_COMMAND" != x; then
53288      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53289    fi
53290  fi
53291
53292      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53293    else
53294      INCLUDE_DTRACE=true
53295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53296$as_echo "yes, forced" >&6; }
53297    fi
53298  elif test "x$enable_dtrace" = "xno"; then
53299    INCLUDE_DTRACE=false
53300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53301$as_echo "no, forced" >&6; }
53302  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53303    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53304      INCLUDE_DTRACE=false
53305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53306$as_echo "no, missing dependencies" >&6; }
53307    else
53308      INCLUDE_DTRACE=true
53309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53310$as_echo "yes, dependencies present" >&6; }
53311    fi
53312  else
53313    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53314  fi
53315
53316
53317  # Check whether --enable-aot was given.
53318if test "${enable_aot+set}" = set; then :
53319  enableval=$enable_aot;
53320fi
53321
53322
53323  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53324    ENABLE_AOT="true"
53325  elif test "x$enable_aot" = "xyes"; then
53326    ENABLE_AOT="true"
53327  elif test "x$enable_aot" = "xno"; then
53328    ENABLE_AOT="false"
53329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53330$as_echo_n "checking if aot should be enabled... " >&6; }
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53332$as_echo "no, forced" >&6; }
53333  else
53334    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53335  fi
53336
53337  if test "x$ENABLE_AOT" = "xtrue"; then
53338    # Only enable AOT on linux-X64.
53339    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53340      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53341        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53342          ENABLE_AOT="true"
53343        else
53344          ENABLE_AOT="false"
53345          if test "x$enable_aot" = "xyes"; then
53346            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53347          fi
53348        fi
53349      else
53350        ENABLE_AOT="false"
53351        if test "x$enable_aot" = "xyes"; then
53352          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53353        fi
53354      fi
53355    else
53356      ENABLE_AOT="false"
53357      if test "x$enable_aot" = "xyes"; then
53358        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53359      fi
53360    fi
53361  fi
53362
53363
53364
53365
53366  # Check whether --enable-hotspot-gtest was given.
53367if test "${enable_hotspot_gtest+set}" = set; then :
53368  enableval=$enable_hotspot_gtest;
53369fi
53370
53371
53372  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53373    GTEST_DIR_EXISTS="true"
53374  else
53375    GTEST_DIR_EXISTS="false"
53376  fi
53377
53378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53379$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53380  if test "x$enable_hotspot_gtest" = "xyes"; then
53381    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53383$as_echo "yes, forced" >&6; }
53384      BUILD_GTEST="true"
53385    else
53386      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53387    fi
53388  elif test "x$enable_hotspot_gtest" = "xno"; then
53389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53390$as_echo "no, forced" >&6; }
53391    BUILD_GTEST="false"
53392  elif test "x$enable_hotspot_gtest" = "x"; then
53393    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53395$as_echo "yes" >&6; }
53396      BUILD_GTEST="true"
53397    else
53398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53399$as_echo "no" >&6; }
53400      BUILD_GTEST="false"
53401    fi
53402  else
53403    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53404  fi
53405
53406
53407
53408
53409###############################################################################
53410#
53411# Check dependencies for external and internal libraries.
53412#
53413###############################################################################
53414
53415# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53416
53417  # When using cygwin or msys, we need a wrapper binary that renames
53418  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53419  # @files and rewrites these too! This wrapper binary is
53420  # called fixpath.
53421  FIXPATH=
53422  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53424$as_echo_n "checking if fixpath can be created... " >&6; }
53425    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53426    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53427    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53428    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53429      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53430      FIXPATH="$FIXPATH_BIN -c"
53431    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53432      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53433      # @ was chosen as separator to minimize risk of other tools messing around with it
53434      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53435          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53436      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53437      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53438    fi
53439    FIXPATH_SRC_W="$FIXPATH_SRC"
53440    FIXPATH_BIN_W="$FIXPATH_BIN"
53441
53442  unix_path="$FIXPATH_SRC_W"
53443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53444    windows_path=`$CYGPATH -m "$unix_path"`
53445    FIXPATH_SRC_W="$windows_path"
53446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53447    windows_path=`cmd //c echo $unix_path`
53448    FIXPATH_SRC_W="$windows_path"
53449  fi
53450
53451
53452  unix_path="$FIXPATH_BIN_W"
53453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53454    windows_path=`$CYGPATH -m "$unix_path"`
53455    FIXPATH_BIN_W="$windows_path"
53456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53457    windows_path=`cmd //c echo $unix_path`
53458    FIXPATH_BIN_W="$windows_path"
53459  fi
53460
53461    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53462    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53463    cd $FIXPATH_DIR
53464    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53465    cd $CURDIR
53466
53467    if test ! -x $FIXPATH_BIN; then
53468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53469$as_echo "no" >&6; }
53470      cat $FIXPATH_DIR/fixpath1.log
53471      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53472    fi
53473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53474$as_echo "yes" >&6; }
53475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53476$as_echo_n "checking if fixpath.exe works... " >&6; }
53477    cd $FIXPATH_DIR
53478    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53479        > $FIXPATH_DIR/fixpath2.log 2>&1
53480    cd $CURDIR
53481    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53483$as_echo "no" >&6; }
53484      cat $FIXPATH_DIR/fixpath2.log
53485      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53486    fi
53487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53488$as_echo "yes" >&6; }
53489
53490    FIXPATH_DETACH_FLAG="--detach"
53491  fi
53492
53493
53494
53495
53496
53497
53498  # Check if X11 is needed
53499  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53500    # No X11 support on windows or macosx
53501    NEEDS_LIB_X11=false
53502  else
53503    # All other instances need X11, even if building headless only, libawt still
53504    # needs X11 headers.
53505    NEEDS_LIB_X11=true
53506  fi
53507
53508  # Check if cups is needed
53509  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53510    # Windows have a separate print system
53511    NEEDS_LIB_CUPS=false
53512  else
53513    NEEDS_LIB_CUPS=true
53514  fi
53515
53516  # A custom hook may have set this already
53517  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53518    NEEDS_LIB_FREETYPE=true
53519  fi
53520
53521  # Check if alsa is needed
53522  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53523    NEEDS_LIB_ALSA=true
53524  else
53525    NEEDS_LIB_ALSA=false
53526  fi
53527
53528  # Check if ffi is needed
53529  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53530    NEEDS_LIB_FFI=true
53531  else
53532    NEEDS_LIB_FFI=false
53533  fi
53534
53535
53536  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53537  # dynamic build is configured on command line.
53538
53539# Check whether --with-stdc++lib was given.
53540if test "${with_stdc__lib+set}" = set; then :
53541  withval=$with_stdc__lib;
53542        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53543                && test "x$with_stdc__lib" != xdefault; then
53544          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53545        fi
53546
53547else
53548  with_stdc__lib=default
53549
53550fi
53551
53552
53553  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53554    # Test if stdc++ can be linked statically.
53555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53556$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53557    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53558    ac_ext=cpp
53559ac_cpp='$CXXCPP $CPPFLAGS'
53560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53563
53564    OLD_LIBS="$LIBS"
53565    LIBS="$STATIC_STDCXX_FLAGS"
53566    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53567/* end confdefs.h.  */
53568
53569int
53570main ()
53571{
53572return 0;
53573  ;
53574  return 0;
53575}
53576_ACEOF
53577if ac_fn_cxx_try_link "$LINENO"; then :
53578  has_static_libstdcxx=yes
53579else
53580  has_static_libstdcxx=no
53581fi
53582rm -f core conftest.err conftest.$ac_objext \
53583    conftest$ac_exeext conftest.$ac_ext
53584    LIBS="$OLD_LIBS"
53585    ac_ext=cpp
53586ac_cpp='$CXXCPP $CPPFLAGS'
53587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53590
53591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53592$as_echo "$has_static_libstdcxx" >&6; }
53593
53594    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53595      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53596    fi
53597
53598    # If dynamic was requested, it's available since it would fail above otherwise.
53599    # If dynamic wasn't requested, go with static unless it isn't available.
53600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53601$as_echo_n "checking how to link with libstdc++... " >&6; }
53602    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53603        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53605$as_echo "dynamic" >&6; }
53606    else
53607      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53608      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53609      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53610      # just use the same setting as for the TARGET toolchain.
53611      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53613$as_echo "static" >&6; }
53614    fi
53615  fi
53616
53617  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53618  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53619    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53620  fi
53621
53622
53623
53624  # Setup Windows runtime dlls
53625  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53626
53627
53628# Check whether --with-msvcr-dll was given.
53629if test "${with_msvcr_dll+set}" = set; then :
53630  withval=$with_msvcr_dll;
53631fi
53632
53633
53634  if test "x$with_msvcr_dll" != x; then
53635    # If given explicitly by user, do not probe. If not present, fail directly.
53636
53637  DLL_NAME="$MSVCR_NAME"
53638  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53639  METHOD="--with-msvcr-dll"
53640  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53641    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53642$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53643
53644    # Need to check if the found msvcr is correct architecture
53645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53646$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53647    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53648    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53649      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53650      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53651      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53652        CORRECT_MSVCR_ARCH="PE32 executable"
53653      else
53654        CORRECT_MSVCR_ARCH="PE32+ executable"
53655      fi
53656    else
53657      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53658        CORRECT_MSVCR_ARCH=386
53659      else
53660        CORRECT_MSVCR_ARCH=x86-64
53661      fi
53662    fi
53663    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53665$as_echo "ok" >&6; }
53666      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53667
53668  # Only process if variable expands to non-empty
53669
53670  if test "x$MSVC_DLL" != x; then
53671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53672
53673  # Input might be given as Windows format, start by converting to
53674  # unix format.
53675  path="$MSVC_DLL"
53676  new_path=`$CYGPATH -u "$path"`
53677
53678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53681  # "foo.exe" is OK but "foo" is an error.
53682  #
53683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53684  # It is also a way to make sure we got the proper file name for the real test later on.
53685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53686  if test "x$test_shortpath" = x; then
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53688$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53689    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53690  fi
53691
53692  # Call helper function which possibly converts this using DOS-style short mode.
53693  # If so, the updated path is stored in $new_path.
53694
53695  input_path="$new_path"
53696  # Check if we need to convert this using DOS-style short mode. If the path
53697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53698  # take no chances and rewrite it.
53699  # Note: m4 eats our [], so we need to use [ and ] instead.
53700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53701  if test "x$has_forbidden_chars" != x; then
53702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53706      # Going to short mode and back again did indeed matter. Since short mode is
53707      # case insensitive, let's make it lowercase to improve readability.
53708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53709      # Now convert it back to Unix-style (cygpath)
53710      input_path=`$CYGPATH -u "$shortmode_path"`
53711      new_path="$input_path"
53712    fi
53713  fi
53714
53715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53716  if test "x$test_cygdrive_prefix" = x; then
53717    # As a simple fix, exclude /usr/bin since it's not a real path.
53718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53720      # a path prefixed by /cygdrive for fixpath to work.
53721      new_path="$CYGWIN_ROOT_PATH$input_path"
53722    fi
53723  fi
53724
53725
53726  if test "x$path" != "x$new_path"; then
53727    MSVC_DLL="$new_path"
53728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53729$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53730  fi
53731
53732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53733
53734  path="$MSVC_DLL"
53735  has_colon=`$ECHO $path | $GREP ^.:`
53736  new_path="$path"
53737  if test "x$has_colon" = x; then
53738    # Not in mixed or Windows style, start by that.
53739    new_path=`cmd //c echo $path`
53740  fi
53741
53742
53743  input_path="$new_path"
53744  # Check if we need to convert this using DOS-style short mode. If the path
53745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53746  # take no chances and rewrite it.
53747  # Note: m4 eats our [], so we need to use [ and ] instead.
53748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53749  if test "x$has_forbidden_chars" != x; then
53750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53752  fi
53753
53754
53755  windows_path="$new_path"
53756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53757    unix_path=`$CYGPATH -u "$windows_path"`
53758    new_path="$unix_path"
53759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53761    new_path="$unix_path"
53762  fi
53763
53764  if test "x$path" != "x$new_path"; then
53765    MSVC_DLL="$new_path"
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53767$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53768  fi
53769
53770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53772
53773    else
53774      # We're on a unix platform. Hooray! :)
53775      path="$MSVC_DLL"
53776      has_space=`$ECHO "$path" | $GREP " "`
53777      if test "x$has_space" != x; then
53778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53779$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53781      fi
53782
53783      # Use eval to expand a potential ~
53784      eval path="$path"
53785      if test ! -f "$path" && test ! -d "$path"; then
53786        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53787      fi
53788
53789      if test -d "$path"; then
53790        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53791      else
53792        dir="`$DIRNAME "$path"`"
53793        base="`$BASENAME "$path"`"
53794        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53795      fi
53796    fi
53797  fi
53798
53799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53800$as_echo_n "checking for $DLL_NAME... " >&6; }
53801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53802$as_echo "$MSVC_DLL" >&6; }
53803    else
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53805$as_echo "incorrect, ignoring" >&6; }
53806      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53807$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53808    fi
53809  fi
53810
53811    if test "x$MSVC_DLL" = x; then
53812      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53813    fi
53814    MSVCR_DLL="$MSVC_DLL"
53815  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53816
53817  DLL_NAME="$MSVCR_NAME"
53818  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53819  METHOD="devkit"
53820  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53821    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53822$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53823
53824    # Need to check if the found msvcr is correct architecture
53825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53826$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53827    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53829      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53830      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53832        CORRECT_MSVCR_ARCH="PE32 executable"
53833      else
53834        CORRECT_MSVCR_ARCH="PE32+ executable"
53835      fi
53836    else
53837      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53838        CORRECT_MSVCR_ARCH=386
53839      else
53840        CORRECT_MSVCR_ARCH=x86-64
53841      fi
53842    fi
53843    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53845$as_echo "ok" >&6; }
53846      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53847
53848  # Only process if variable expands to non-empty
53849
53850  if test "x$MSVC_DLL" != x; then
53851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53852
53853  # Input might be given as Windows format, start by converting to
53854  # unix format.
53855  path="$MSVC_DLL"
53856  new_path=`$CYGPATH -u "$path"`
53857
53858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53861  # "foo.exe" is OK but "foo" is an error.
53862  #
53863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53864  # It is also a way to make sure we got the proper file name for the real test later on.
53865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53866  if test "x$test_shortpath" = x; then
53867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53869    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53870  fi
53871
53872  # Call helper function which possibly converts this using DOS-style short mode.
53873  # If so, the updated path is stored in $new_path.
53874
53875  input_path="$new_path"
53876  # Check if we need to convert this using DOS-style short mode. If the path
53877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53878  # take no chances and rewrite it.
53879  # Note: m4 eats our [], so we need to use [ and ] instead.
53880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53881  if test "x$has_forbidden_chars" != x; then
53882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53886      # Going to short mode and back again did indeed matter. Since short mode is
53887      # case insensitive, let's make it lowercase to improve readability.
53888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53889      # Now convert it back to Unix-style (cygpath)
53890      input_path=`$CYGPATH -u "$shortmode_path"`
53891      new_path="$input_path"
53892    fi
53893  fi
53894
53895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53896  if test "x$test_cygdrive_prefix" = x; then
53897    # As a simple fix, exclude /usr/bin since it's not a real path.
53898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53900      # a path prefixed by /cygdrive for fixpath to work.
53901      new_path="$CYGWIN_ROOT_PATH$input_path"
53902    fi
53903  fi
53904
53905
53906  if test "x$path" != "x$new_path"; then
53907    MSVC_DLL="$new_path"
53908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53909$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53910  fi
53911
53912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53913
53914  path="$MSVC_DLL"
53915  has_colon=`$ECHO $path | $GREP ^.:`
53916  new_path="$path"
53917  if test "x$has_colon" = x; then
53918    # Not in mixed or Windows style, start by that.
53919    new_path=`cmd //c echo $path`
53920  fi
53921
53922
53923  input_path="$new_path"
53924  # Check if we need to convert this using DOS-style short mode. If the path
53925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53926  # take no chances and rewrite it.
53927  # Note: m4 eats our [], so we need to use [ and ] instead.
53928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53929  if test "x$has_forbidden_chars" != x; then
53930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53932  fi
53933
53934
53935  windows_path="$new_path"
53936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53937    unix_path=`$CYGPATH -u "$windows_path"`
53938    new_path="$unix_path"
53939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53941    new_path="$unix_path"
53942  fi
53943
53944  if test "x$path" != "x$new_path"; then
53945    MSVC_DLL="$new_path"
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53948  fi
53949
53950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53952
53953    else
53954      # We're on a unix platform. Hooray! :)
53955      path="$MSVC_DLL"
53956      has_space=`$ECHO "$path" | $GREP " "`
53957      if test "x$has_space" != x; then
53958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53959$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53961      fi
53962
53963      # Use eval to expand a potential ~
53964      eval path="$path"
53965      if test ! -f "$path" && test ! -d "$path"; then
53966        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53967      fi
53968
53969      if test -d "$path"; then
53970        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53971      else
53972        dir="`$DIRNAME "$path"`"
53973        base="`$BASENAME "$path"`"
53974        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53975      fi
53976    fi
53977  fi
53978
53979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53980$as_echo_n "checking for $DLL_NAME... " >&6; }
53981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53982$as_echo "$MSVC_DLL" >&6; }
53983    else
53984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53985$as_echo "incorrect, ignoring" >&6; }
53986      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53987$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53988    fi
53989  fi
53990
53991    if test "x$MSVC_DLL" = x; then
53992      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53993    fi
53994    MSVCR_DLL="$MSVC_DLL"
53995  else
53996
53997  DLL_NAME="${MSVCR_NAME}"
53998  MSVC_DLL=
53999
54000  if test "x$MSVC_DLL" = x; then
54001    # Probe: Using well-known location from Visual Studio 10.0
54002    if test "x$VCINSTALLDIR" != x; then
54003      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54004
54005  windows_path="$CYGWIN_VC_INSTALL_DIR"
54006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54007    unix_path=`$CYGPATH -u "$windows_path"`
54008    CYGWIN_VC_INSTALL_DIR="$unix_path"
54009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54011    CYGWIN_VC_INSTALL_DIR="$unix_path"
54012  fi
54013
54014      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54015        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54016      else
54017        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54018      fi
54019      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54020
54021  DLL_NAME="$DLL_NAME"
54022  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54023  METHOD="well-known location in VCINSTALLDIR"
54024  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54026$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54027
54028    # Need to check if the found msvcr is correct architecture
54029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54030$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54031    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54033      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54034      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54035      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54036        CORRECT_MSVCR_ARCH="PE32 executable"
54037      else
54038        CORRECT_MSVCR_ARCH="PE32+ executable"
54039      fi
54040    else
54041      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54042        CORRECT_MSVCR_ARCH=386
54043      else
54044        CORRECT_MSVCR_ARCH=x86-64
54045      fi
54046    fi
54047    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54049$as_echo "ok" >&6; }
54050      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54051
54052  # Only process if variable expands to non-empty
54053
54054  if test "x$MSVC_DLL" != x; then
54055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54056
54057  # Input might be given as Windows format, start by converting to
54058  # unix format.
54059  path="$MSVC_DLL"
54060  new_path=`$CYGPATH -u "$path"`
54061
54062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54065  # "foo.exe" is OK but "foo" is an error.
54066  #
54067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54068  # It is also a way to make sure we got the proper file name for the real test later on.
54069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54070  if test "x$test_shortpath" = x; then
54071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54072$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54073    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54074  fi
54075
54076  # Call helper function which possibly converts this using DOS-style short mode.
54077  # If so, the updated path is stored in $new_path.
54078
54079  input_path="$new_path"
54080  # Check if we need to convert this using DOS-style short mode. If the path
54081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54082  # take no chances and rewrite it.
54083  # Note: m4 eats our [], so we need to use [ and ] instead.
54084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54085  if test "x$has_forbidden_chars" != x; then
54086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54090      # Going to short mode and back again did indeed matter. Since short mode is
54091      # case insensitive, let's make it lowercase to improve readability.
54092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54093      # Now convert it back to Unix-style (cygpath)
54094      input_path=`$CYGPATH -u "$shortmode_path"`
54095      new_path="$input_path"
54096    fi
54097  fi
54098
54099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54100  if test "x$test_cygdrive_prefix" = x; then
54101    # As a simple fix, exclude /usr/bin since it's not a real path.
54102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54104      # a path prefixed by /cygdrive for fixpath to work.
54105      new_path="$CYGWIN_ROOT_PATH$input_path"
54106    fi
54107  fi
54108
54109
54110  if test "x$path" != "x$new_path"; then
54111    MSVC_DLL="$new_path"
54112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54114  fi
54115
54116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54117
54118  path="$MSVC_DLL"
54119  has_colon=`$ECHO $path | $GREP ^.:`
54120  new_path="$path"
54121  if test "x$has_colon" = x; then
54122    # Not in mixed or Windows style, start by that.
54123    new_path=`cmd //c echo $path`
54124  fi
54125
54126
54127  input_path="$new_path"
54128  # Check if we need to convert this using DOS-style short mode. If the path
54129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54130  # take no chances and rewrite it.
54131  # Note: m4 eats our [], so we need to use [ and ] instead.
54132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54133  if test "x$has_forbidden_chars" != x; then
54134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54136  fi
54137
54138
54139  windows_path="$new_path"
54140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54141    unix_path=`$CYGPATH -u "$windows_path"`
54142    new_path="$unix_path"
54143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54145    new_path="$unix_path"
54146  fi
54147
54148  if test "x$path" != "x$new_path"; then
54149    MSVC_DLL="$new_path"
54150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54151$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54152  fi
54153
54154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54156
54157    else
54158      # We're on a unix platform. Hooray! :)
54159      path="$MSVC_DLL"
54160      has_space=`$ECHO "$path" | $GREP " "`
54161      if test "x$has_space" != x; then
54162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54163$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54165      fi
54166
54167      # Use eval to expand a potential ~
54168      eval path="$path"
54169      if test ! -f "$path" && test ! -d "$path"; then
54170        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54171      fi
54172
54173      if test -d "$path"; then
54174        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54175      else
54176        dir="`$DIRNAME "$path"`"
54177        base="`$BASENAME "$path"`"
54178        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54179      fi
54180    fi
54181  fi
54182
54183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54184$as_echo_n "checking for $DLL_NAME... " >&6; }
54185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54186$as_echo "$MSVC_DLL" >&6; }
54187    else
54188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54189$as_echo "incorrect, ignoring" >&6; }
54190      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54191$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54192    fi
54193  fi
54194
54195    fi
54196  fi
54197
54198  if test "x$MSVC_DLL" = x; then
54199    # Probe: Check in the Boot JDK directory.
54200    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54201
54202  DLL_NAME="$DLL_NAME"
54203  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54204  METHOD="well-known location in Boot JDK"
54205  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54207$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54208
54209    # Need to check if the found msvcr is correct architecture
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54211$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54212    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54214      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54215      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54217        CORRECT_MSVCR_ARCH="PE32 executable"
54218      else
54219        CORRECT_MSVCR_ARCH="PE32+ executable"
54220      fi
54221    else
54222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54223        CORRECT_MSVCR_ARCH=386
54224      else
54225        CORRECT_MSVCR_ARCH=x86-64
54226      fi
54227    fi
54228    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54230$as_echo "ok" >&6; }
54231      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54232
54233  # Only process if variable expands to non-empty
54234
54235  if test "x$MSVC_DLL" != x; then
54236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54237
54238  # Input might be given as Windows format, start by converting to
54239  # unix format.
54240  path="$MSVC_DLL"
54241  new_path=`$CYGPATH -u "$path"`
54242
54243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54246  # "foo.exe" is OK but "foo" is an error.
54247  #
54248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54249  # It is also a way to make sure we got the proper file name for the real test later on.
54250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54251  if test "x$test_shortpath" = x; then
54252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54254    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54255  fi
54256
54257  # Call helper function which possibly converts this using DOS-style short mode.
54258  # If so, the updated path is stored in $new_path.
54259
54260  input_path="$new_path"
54261  # Check if we need to convert this using DOS-style short mode. If the path
54262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54263  # take no chances and rewrite it.
54264  # Note: m4 eats our [], so we need to use [ and ] instead.
54265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54266  if test "x$has_forbidden_chars" != x; then
54267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54271      # Going to short mode and back again did indeed matter. Since short mode is
54272      # case insensitive, let's make it lowercase to improve readability.
54273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54274      # Now convert it back to Unix-style (cygpath)
54275      input_path=`$CYGPATH -u "$shortmode_path"`
54276      new_path="$input_path"
54277    fi
54278  fi
54279
54280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54281  if test "x$test_cygdrive_prefix" = x; then
54282    # As a simple fix, exclude /usr/bin since it's not a real path.
54283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54285      # a path prefixed by /cygdrive for fixpath to work.
54286      new_path="$CYGWIN_ROOT_PATH$input_path"
54287    fi
54288  fi
54289
54290
54291  if test "x$path" != "x$new_path"; then
54292    MSVC_DLL="$new_path"
54293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54295  fi
54296
54297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54298
54299  path="$MSVC_DLL"
54300  has_colon=`$ECHO $path | $GREP ^.:`
54301  new_path="$path"
54302  if test "x$has_colon" = x; then
54303    # Not in mixed or Windows style, start by that.
54304    new_path=`cmd //c echo $path`
54305  fi
54306
54307
54308  input_path="$new_path"
54309  # Check if we need to convert this using DOS-style short mode. If the path
54310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54311  # take no chances and rewrite it.
54312  # Note: m4 eats our [], so we need to use [ and ] instead.
54313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54314  if test "x$has_forbidden_chars" != x; then
54315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54317  fi
54318
54319
54320  windows_path="$new_path"
54321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54322    unix_path=`$CYGPATH -u "$windows_path"`
54323    new_path="$unix_path"
54324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54326    new_path="$unix_path"
54327  fi
54328
54329  if test "x$path" != "x$new_path"; then
54330    MSVC_DLL="$new_path"
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54333  fi
54334
54335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54337
54338    else
54339      # We're on a unix platform. Hooray! :)
54340      path="$MSVC_DLL"
54341      has_space=`$ECHO "$path" | $GREP " "`
54342      if test "x$has_space" != x; then
54343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54346      fi
54347
54348      # Use eval to expand a potential ~
54349      eval path="$path"
54350      if test ! -f "$path" && test ! -d "$path"; then
54351        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54352      fi
54353
54354      if test -d "$path"; then
54355        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54356      else
54357        dir="`$DIRNAME "$path"`"
54358        base="`$BASENAME "$path"`"
54359        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54360      fi
54361    fi
54362  fi
54363
54364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54365$as_echo_n "checking for $DLL_NAME... " >&6; }
54366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54367$as_echo "$MSVC_DLL" >&6; }
54368    else
54369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54370$as_echo "incorrect, ignoring" >&6; }
54371      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54372$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54373    fi
54374  fi
54375
54376  fi
54377
54378  if test "x$MSVC_DLL" = x; then
54379    # Probe: Look in the Windows system32 directory
54380    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54381
54382  windows_path="$CYGWIN_SYSTEMROOT"
54383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54384    unix_path=`$CYGPATH -u "$windows_path"`
54385    CYGWIN_SYSTEMROOT="$unix_path"
54386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54388    CYGWIN_SYSTEMROOT="$unix_path"
54389  fi
54390
54391    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54392
54393  DLL_NAME="$DLL_NAME"
54394  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54395  METHOD="well-known location in SYSTEMROOT"
54396  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54398$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54399
54400    # Need to check if the found msvcr is correct architecture
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54402$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54403    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54405      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54406      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54407      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54408        CORRECT_MSVCR_ARCH="PE32 executable"
54409      else
54410        CORRECT_MSVCR_ARCH="PE32+ executable"
54411      fi
54412    else
54413      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54414        CORRECT_MSVCR_ARCH=386
54415      else
54416        CORRECT_MSVCR_ARCH=x86-64
54417      fi
54418    fi
54419    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54421$as_echo "ok" >&6; }
54422      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54423
54424  # Only process if variable expands to non-empty
54425
54426  if test "x$MSVC_DLL" != x; then
54427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54428
54429  # Input might be given as Windows format, start by converting to
54430  # unix format.
54431  path="$MSVC_DLL"
54432  new_path=`$CYGPATH -u "$path"`
54433
54434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54437  # "foo.exe" is OK but "foo" is an error.
54438  #
54439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54440  # It is also a way to make sure we got the proper file name for the real test later on.
54441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54442  if test "x$test_shortpath" = x; then
54443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54444$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54445    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54446  fi
54447
54448  # Call helper function which possibly converts this using DOS-style short mode.
54449  # If so, the updated path is stored in $new_path.
54450
54451  input_path="$new_path"
54452  # Check if we need to convert this using DOS-style short mode. If the path
54453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54454  # take no chances and rewrite it.
54455  # Note: m4 eats our [], so we need to use [ and ] instead.
54456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54457  if test "x$has_forbidden_chars" != x; then
54458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54462      # Going to short mode and back again did indeed matter. Since short mode is
54463      # case insensitive, let's make it lowercase to improve readability.
54464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54465      # Now convert it back to Unix-style (cygpath)
54466      input_path=`$CYGPATH -u "$shortmode_path"`
54467      new_path="$input_path"
54468    fi
54469  fi
54470
54471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54472  if test "x$test_cygdrive_prefix" = x; then
54473    # As a simple fix, exclude /usr/bin since it's not a real path.
54474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54476      # a path prefixed by /cygdrive for fixpath to work.
54477      new_path="$CYGWIN_ROOT_PATH$input_path"
54478    fi
54479  fi
54480
54481
54482  if test "x$path" != "x$new_path"; then
54483    MSVC_DLL="$new_path"
54484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54485$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54486  fi
54487
54488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54489
54490  path="$MSVC_DLL"
54491  has_colon=`$ECHO $path | $GREP ^.:`
54492  new_path="$path"
54493  if test "x$has_colon" = x; then
54494    # Not in mixed or Windows style, start by that.
54495    new_path=`cmd //c echo $path`
54496  fi
54497
54498
54499  input_path="$new_path"
54500  # Check if we need to convert this using DOS-style short mode. If the path
54501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54502  # take no chances and rewrite it.
54503  # Note: m4 eats our [], so we need to use [ and ] instead.
54504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54505  if test "x$has_forbidden_chars" != x; then
54506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54508  fi
54509
54510
54511  windows_path="$new_path"
54512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513    unix_path=`$CYGPATH -u "$windows_path"`
54514    new_path="$unix_path"
54515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54517    new_path="$unix_path"
54518  fi
54519
54520  if test "x$path" != "x$new_path"; then
54521    MSVC_DLL="$new_path"
54522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54523$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54524  fi
54525
54526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54528
54529    else
54530      # We're on a unix platform. Hooray! :)
54531      path="$MSVC_DLL"
54532      has_space=`$ECHO "$path" | $GREP " "`
54533      if test "x$has_space" != x; then
54534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54535$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54537      fi
54538
54539      # Use eval to expand a potential ~
54540      eval path="$path"
54541      if test ! -f "$path" && test ! -d "$path"; then
54542        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54543      fi
54544
54545      if test -d "$path"; then
54546        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54547      else
54548        dir="`$DIRNAME "$path"`"
54549        base="`$BASENAME "$path"`"
54550        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54551      fi
54552    fi
54553  fi
54554
54555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54556$as_echo_n "checking for $DLL_NAME... " >&6; }
54557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54558$as_echo "$MSVC_DLL" >&6; }
54559    else
54560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54561$as_echo "incorrect, ignoring" >&6; }
54562      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54563$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54564    fi
54565  fi
54566
54567  fi
54568
54569  if test "x$MSVC_DLL" = x; then
54570    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54571    if test "x$VS100COMNTOOLS" != x; then
54572      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54573
54574  windows_path="$CYGWIN_VS_TOOLS_DIR"
54575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54576    unix_path=`$CYGPATH -u "$windows_path"`
54577    CYGWIN_VS_TOOLS_DIR="$unix_path"
54578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54580    CYGWIN_VS_TOOLS_DIR="$unix_path"
54581  fi
54582
54583      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54584        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54585	    | $GREP -i /x64/ | $HEAD --lines 1`
54586      else
54587        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54588	    | $GREP -i /x86/ | $HEAD --lines 1`
54589      fi
54590
54591  DLL_NAME="$DLL_NAME"
54592  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54593  METHOD="search of VS100COMNTOOLS"
54594  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54595    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54596$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54597
54598    # Need to check if the found msvcr is correct architecture
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54600$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54601    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54603      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54604      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54605      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54606        CORRECT_MSVCR_ARCH="PE32 executable"
54607      else
54608        CORRECT_MSVCR_ARCH="PE32+ executable"
54609      fi
54610    else
54611      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54612        CORRECT_MSVCR_ARCH=386
54613      else
54614        CORRECT_MSVCR_ARCH=x86-64
54615      fi
54616    fi
54617    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54619$as_echo "ok" >&6; }
54620      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54621
54622  # Only process if variable expands to non-empty
54623
54624  if test "x$MSVC_DLL" != x; then
54625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54626
54627  # Input might be given as Windows format, start by converting to
54628  # unix format.
54629  path="$MSVC_DLL"
54630  new_path=`$CYGPATH -u "$path"`
54631
54632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54635  # "foo.exe" is OK but "foo" is an error.
54636  #
54637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54638  # It is also a way to make sure we got the proper file name for the real test later on.
54639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54640  if test "x$test_shortpath" = x; then
54641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54642$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54643    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54644  fi
54645
54646  # Call helper function which possibly converts this using DOS-style short mode.
54647  # If so, the updated path is stored in $new_path.
54648
54649  input_path="$new_path"
54650  # Check if we need to convert this using DOS-style short mode. If the path
54651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54652  # take no chances and rewrite it.
54653  # Note: m4 eats our [], so we need to use [ and ] instead.
54654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54655  if test "x$has_forbidden_chars" != x; then
54656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54660      # Going to short mode and back again did indeed matter. Since short mode is
54661      # case insensitive, let's make it lowercase to improve readability.
54662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54663      # Now convert it back to Unix-style (cygpath)
54664      input_path=`$CYGPATH -u "$shortmode_path"`
54665      new_path="$input_path"
54666    fi
54667  fi
54668
54669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54670  if test "x$test_cygdrive_prefix" = x; then
54671    # As a simple fix, exclude /usr/bin since it's not a real path.
54672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54674      # a path prefixed by /cygdrive for fixpath to work.
54675      new_path="$CYGWIN_ROOT_PATH$input_path"
54676    fi
54677  fi
54678
54679
54680  if test "x$path" != "x$new_path"; then
54681    MSVC_DLL="$new_path"
54682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54683$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54684  fi
54685
54686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54687
54688  path="$MSVC_DLL"
54689  has_colon=`$ECHO $path | $GREP ^.:`
54690  new_path="$path"
54691  if test "x$has_colon" = x; then
54692    # Not in mixed or Windows style, start by that.
54693    new_path=`cmd //c echo $path`
54694  fi
54695
54696
54697  input_path="$new_path"
54698  # Check if we need to convert this using DOS-style short mode. If the path
54699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54700  # take no chances and rewrite it.
54701  # Note: m4 eats our [], so we need to use [ and ] instead.
54702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54703  if test "x$has_forbidden_chars" != x; then
54704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54706  fi
54707
54708
54709  windows_path="$new_path"
54710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54711    unix_path=`$CYGPATH -u "$windows_path"`
54712    new_path="$unix_path"
54713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54715    new_path="$unix_path"
54716  fi
54717
54718  if test "x$path" != "x$new_path"; then
54719    MSVC_DLL="$new_path"
54720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54721$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54722  fi
54723
54724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54726
54727    else
54728      # We're on a unix platform. Hooray! :)
54729      path="$MSVC_DLL"
54730      has_space=`$ECHO "$path" | $GREP " "`
54731      if test "x$has_space" != x; then
54732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54733$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54735      fi
54736
54737      # Use eval to expand a potential ~
54738      eval path="$path"
54739      if test ! -f "$path" && test ! -d "$path"; then
54740        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54741      fi
54742
54743      if test -d "$path"; then
54744        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54745      else
54746        dir="`$DIRNAME "$path"`"
54747        base="`$BASENAME "$path"`"
54748        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54749      fi
54750    fi
54751  fi
54752
54753      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54754$as_echo_n "checking for $DLL_NAME... " >&6; }
54755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54756$as_echo "$MSVC_DLL" >&6; }
54757    else
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54759$as_echo "incorrect, ignoring" >&6; }
54760      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54761$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54762    fi
54763  fi
54764
54765    fi
54766  fi
54767
54768  if test "x$MSVC_DLL" = x; then
54769    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54770    # (This was the original behaviour; kept since it might turn something up)
54771    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54772      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54773        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54774	    | $GREP x64 | $HEAD --lines 1`
54775      else
54776        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54777	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54778        if test "x$POSSIBLE_MSVC_DLL" = x; then
54779          # We're grasping at straws now...
54780          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54781	      | $HEAD --lines 1`
54782        fi
54783      fi
54784
54785
54786  DLL_NAME="$DLL_NAME"
54787  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54788  METHOD="search of VCINSTALLDIR"
54789  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54790    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54791$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54792
54793    # Need to check if the found msvcr is correct architecture
54794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54795$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54796    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54798      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54799      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54800      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54801        CORRECT_MSVCR_ARCH="PE32 executable"
54802      else
54803        CORRECT_MSVCR_ARCH="PE32+ executable"
54804      fi
54805    else
54806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54807        CORRECT_MSVCR_ARCH=386
54808      else
54809        CORRECT_MSVCR_ARCH=x86-64
54810      fi
54811    fi
54812    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54814$as_echo "ok" >&6; }
54815      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54816
54817  # Only process if variable expands to non-empty
54818
54819  if test "x$MSVC_DLL" != x; then
54820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54821
54822  # Input might be given as Windows format, start by converting to
54823  # unix format.
54824  path="$MSVC_DLL"
54825  new_path=`$CYGPATH -u "$path"`
54826
54827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54830  # "foo.exe" is OK but "foo" is an error.
54831  #
54832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54833  # It is also a way to make sure we got the proper file name for the real test later on.
54834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54835  if test "x$test_shortpath" = x; then
54836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54837$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54838    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54839  fi
54840
54841  # Call helper function which possibly converts this using DOS-style short mode.
54842  # If so, the updated path is stored in $new_path.
54843
54844  input_path="$new_path"
54845  # Check if we need to convert this using DOS-style short mode. If the path
54846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54847  # take no chances and rewrite it.
54848  # Note: m4 eats our [], so we need to use [ and ] instead.
54849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54850  if test "x$has_forbidden_chars" != x; then
54851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54855      # Going to short mode and back again did indeed matter. Since short mode is
54856      # case insensitive, let's make it lowercase to improve readability.
54857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54858      # Now convert it back to Unix-style (cygpath)
54859      input_path=`$CYGPATH -u "$shortmode_path"`
54860      new_path="$input_path"
54861    fi
54862  fi
54863
54864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54865  if test "x$test_cygdrive_prefix" = x; then
54866    # As a simple fix, exclude /usr/bin since it's not a real path.
54867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54869      # a path prefixed by /cygdrive for fixpath to work.
54870      new_path="$CYGWIN_ROOT_PATH$input_path"
54871    fi
54872  fi
54873
54874
54875  if test "x$path" != "x$new_path"; then
54876    MSVC_DLL="$new_path"
54877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54878$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54879  fi
54880
54881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54882
54883  path="$MSVC_DLL"
54884  has_colon=`$ECHO $path | $GREP ^.:`
54885  new_path="$path"
54886  if test "x$has_colon" = x; then
54887    # Not in mixed or Windows style, start by that.
54888    new_path=`cmd //c echo $path`
54889  fi
54890
54891
54892  input_path="$new_path"
54893  # Check if we need to convert this using DOS-style short mode. If the path
54894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54895  # take no chances and rewrite it.
54896  # Note: m4 eats our [], so we need to use [ and ] instead.
54897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54898  if test "x$has_forbidden_chars" != x; then
54899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54901  fi
54902
54903
54904  windows_path="$new_path"
54905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54906    unix_path=`$CYGPATH -u "$windows_path"`
54907    new_path="$unix_path"
54908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54910    new_path="$unix_path"
54911  fi
54912
54913  if test "x$path" != "x$new_path"; then
54914    MSVC_DLL="$new_path"
54915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54916$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54917  fi
54918
54919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54921
54922    else
54923      # We're on a unix platform. Hooray! :)
54924      path="$MSVC_DLL"
54925      has_space=`$ECHO "$path" | $GREP " "`
54926      if test "x$has_space" != x; then
54927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54928$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54930      fi
54931
54932      # Use eval to expand a potential ~
54933      eval path="$path"
54934      if test ! -f "$path" && test ! -d "$path"; then
54935        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54936      fi
54937
54938      if test -d "$path"; then
54939        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54940      else
54941        dir="`$DIRNAME "$path"`"
54942        base="`$BASENAME "$path"`"
54943        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54944      fi
54945    fi
54946  fi
54947
54948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54949$as_echo_n "checking for $DLL_NAME... " >&6; }
54950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54951$as_echo "$MSVC_DLL" >&6; }
54952    else
54953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54954$as_echo "incorrect, ignoring" >&6; }
54955      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54956$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54957    fi
54958  fi
54959
54960    fi
54961  fi
54962
54963  if test "x$MSVC_DLL" = x; then
54964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54965$as_echo_n "checking for $DLL_NAME... " >&6; }
54966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54967$as_echo "no" >&6; }
54968    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54969  fi
54970
54971    MSVCR_DLL="$MSVC_DLL"
54972  fi
54973
54974
54975
54976# Check whether --with-msvcp-dll was given.
54977if test "${with_msvcp_dll+set}" = set; then :
54978  withval=$with_msvcp_dll;
54979fi
54980
54981
54982  if test "x$MSVCP_NAME" != "x"; then
54983    if test "x$with_msvcp_dll" != x; then
54984      # If given explicitly by user, do not probe. If not present, fail directly.
54985
54986  DLL_NAME="$MSVCP_NAME"
54987  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54988  METHOD="--with-msvcp-dll"
54989  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54991$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54992
54993    # Need to check if the found msvcr is correct architecture
54994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54995$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54996    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54998      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54999      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55000      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55001        CORRECT_MSVCR_ARCH="PE32 executable"
55002      else
55003        CORRECT_MSVCR_ARCH="PE32+ executable"
55004      fi
55005    else
55006      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55007        CORRECT_MSVCR_ARCH=386
55008      else
55009        CORRECT_MSVCR_ARCH=x86-64
55010      fi
55011    fi
55012    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55014$as_echo "ok" >&6; }
55015      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55016
55017  # Only process if variable expands to non-empty
55018
55019  if test "x$MSVC_DLL" != x; then
55020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55021
55022  # Input might be given as Windows format, start by converting to
55023  # unix format.
55024  path="$MSVC_DLL"
55025  new_path=`$CYGPATH -u "$path"`
55026
55027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55030  # "foo.exe" is OK but "foo" is an error.
55031  #
55032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55033  # It is also a way to make sure we got the proper file name for the real test later on.
55034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55035  if test "x$test_shortpath" = x; then
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55037$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55038    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55039  fi
55040
55041  # Call helper function which possibly converts this using DOS-style short mode.
55042  # If so, the updated path is stored in $new_path.
55043
55044  input_path="$new_path"
55045  # Check if we need to convert this using DOS-style short mode. If the path
55046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55047  # take no chances and rewrite it.
55048  # Note: m4 eats our [], so we need to use [ and ] instead.
55049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55050  if test "x$has_forbidden_chars" != x; then
55051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55055      # Going to short mode and back again did indeed matter. Since short mode is
55056      # case insensitive, let's make it lowercase to improve readability.
55057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55058      # Now convert it back to Unix-style (cygpath)
55059      input_path=`$CYGPATH -u "$shortmode_path"`
55060      new_path="$input_path"
55061    fi
55062  fi
55063
55064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55065  if test "x$test_cygdrive_prefix" = x; then
55066    # As a simple fix, exclude /usr/bin since it's not a real path.
55067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55069      # a path prefixed by /cygdrive for fixpath to work.
55070      new_path="$CYGWIN_ROOT_PATH$input_path"
55071    fi
55072  fi
55073
55074
55075  if test "x$path" != "x$new_path"; then
55076    MSVC_DLL="$new_path"
55077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55078$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55079  fi
55080
55081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55082
55083  path="$MSVC_DLL"
55084  has_colon=`$ECHO $path | $GREP ^.:`
55085  new_path="$path"
55086  if test "x$has_colon" = x; then
55087    # Not in mixed or Windows style, start by that.
55088    new_path=`cmd //c echo $path`
55089  fi
55090
55091
55092  input_path="$new_path"
55093  # Check if we need to convert this using DOS-style short mode. If the path
55094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55095  # take no chances and rewrite it.
55096  # Note: m4 eats our [], so we need to use [ and ] instead.
55097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55098  if test "x$has_forbidden_chars" != x; then
55099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55101  fi
55102
55103
55104  windows_path="$new_path"
55105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55106    unix_path=`$CYGPATH -u "$windows_path"`
55107    new_path="$unix_path"
55108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55110    new_path="$unix_path"
55111  fi
55112
55113  if test "x$path" != "x$new_path"; then
55114    MSVC_DLL="$new_path"
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55117  fi
55118
55119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55121
55122    else
55123      # We're on a unix platform. Hooray! :)
55124      path="$MSVC_DLL"
55125      has_space=`$ECHO "$path" | $GREP " "`
55126      if test "x$has_space" != x; then
55127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55130      fi
55131
55132      # Use eval to expand a potential ~
55133      eval path="$path"
55134      if test ! -f "$path" && test ! -d "$path"; then
55135        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55136      fi
55137
55138      if test -d "$path"; then
55139        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55140      else
55141        dir="`$DIRNAME "$path"`"
55142        base="`$BASENAME "$path"`"
55143        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55144      fi
55145    fi
55146  fi
55147
55148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55149$as_echo_n "checking for $DLL_NAME... " >&6; }
55150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55151$as_echo "$MSVC_DLL" >&6; }
55152    else
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55154$as_echo "incorrect, ignoring" >&6; }
55155      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55156$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55157    fi
55158  fi
55159
55160      if test "x$MSVC_DLL" = x; then
55161        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55162      fi
55163      MSVCP_DLL="$MSVC_DLL"
55164    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55165
55166  DLL_NAME="$MSVCP_NAME"
55167  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55168  METHOD="devkit"
55169  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55171$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55172
55173    # Need to check if the found msvcr is correct architecture
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55175$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55176    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55178      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55179      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55181        CORRECT_MSVCR_ARCH="PE32 executable"
55182      else
55183        CORRECT_MSVCR_ARCH="PE32+ executable"
55184      fi
55185    else
55186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55187        CORRECT_MSVCR_ARCH=386
55188      else
55189        CORRECT_MSVCR_ARCH=x86-64
55190      fi
55191    fi
55192    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55194$as_echo "ok" >&6; }
55195      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55196
55197  # Only process if variable expands to non-empty
55198
55199  if test "x$MSVC_DLL" != x; then
55200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55201
55202  # Input might be given as Windows format, start by converting to
55203  # unix format.
55204  path="$MSVC_DLL"
55205  new_path=`$CYGPATH -u "$path"`
55206
55207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55210  # "foo.exe" is OK but "foo" is an error.
55211  #
55212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55213  # It is also a way to make sure we got the proper file name for the real test later on.
55214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55215  if test "x$test_shortpath" = x; then
55216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55217$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55218    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55219  fi
55220
55221  # Call helper function which possibly converts this using DOS-style short mode.
55222  # If so, the updated path is stored in $new_path.
55223
55224  input_path="$new_path"
55225  # Check if we need to convert this using DOS-style short mode. If the path
55226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55227  # take no chances and rewrite it.
55228  # Note: m4 eats our [], so we need to use [ and ] instead.
55229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55230  if test "x$has_forbidden_chars" != x; then
55231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55235      # Going to short mode and back again did indeed matter. Since short mode is
55236      # case insensitive, let's make it lowercase to improve readability.
55237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55238      # Now convert it back to Unix-style (cygpath)
55239      input_path=`$CYGPATH -u "$shortmode_path"`
55240      new_path="$input_path"
55241    fi
55242  fi
55243
55244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55245  if test "x$test_cygdrive_prefix" = x; then
55246    # As a simple fix, exclude /usr/bin since it's not a real path.
55247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55249      # a path prefixed by /cygdrive for fixpath to work.
55250      new_path="$CYGWIN_ROOT_PATH$input_path"
55251    fi
55252  fi
55253
55254
55255  if test "x$path" != "x$new_path"; then
55256    MSVC_DLL="$new_path"
55257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55258$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55259  fi
55260
55261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55262
55263  path="$MSVC_DLL"
55264  has_colon=`$ECHO $path | $GREP ^.:`
55265  new_path="$path"
55266  if test "x$has_colon" = x; then
55267    # Not in mixed or Windows style, start by that.
55268    new_path=`cmd //c echo $path`
55269  fi
55270
55271
55272  input_path="$new_path"
55273  # Check if we need to convert this using DOS-style short mode. If the path
55274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55275  # take no chances and rewrite it.
55276  # Note: m4 eats our [], so we need to use [ and ] instead.
55277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55278  if test "x$has_forbidden_chars" != x; then
55279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55281  fi
55282
55283
55284  windows_path="$new_path"
55285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55286    unix_path=`$CYGPATH -u "$windows_path"`
55287    new_path="$unix_path"
55288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55290    new_path="$unix_path"
55291  fi
55292
55293  if test "x$path" != "x$new_path"; then
55294    MSVC_DLL="$new_path"
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55296$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55297  fi
55298
55299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55301
55302    else
55303      # We're on a unix platform. Hooray! :)
55304      path="$MSVC_DLL"
55305      has_space=`$ECHO "$path" | $GREP " "`
55306      if test "x$has_space" != x; then
55307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55308$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55310      fi
55311
55312      # Use eval to expand a potential ~
55313      eval path="$path"
55314      if test ! -f "$path" && test ! -d "$path"; then
55315        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55316      fi
55317
55318      if test -d "$path"; then
55319        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55320      else
55321        dir="`$DIRNAME "$path"`"
55322        base="`$BASENAME "$path"`"
55323        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55324      fi
55325    fi
55326  fi
55327
55328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55329$as_echo_n "checking for $DLL_NAME... " >&6; }
55330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55331$as_echo "$MSVC_DLL" >&6; }
55332    else
55333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55334$as_echo "incorrect, ignoring" >&6; }
55335      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55336$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55337    fi
55338  fi
55339
55340      if test "x$MSVC_DLL" = x; then
55341        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55342      fi
55343      MSVCP_DLL="$MSVC_DLL"
55344    else
55345
55346  DLL_NAME="${MSVCP_NAME}"
55347  MSVC_DLL=
55348
55349  if test "x$MSVC_DLL" = x; then
55350    # Probe: Using well-known location from Visual Studio 10.0
55351    if test "x$VCINSTALLDIR" != x; then
55352      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55353
55354  windows_path="$CYGWIN_VC_INSTALL_DIR"
55355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55356    unix_path=`$CYGPATH -u "$windows_path"`
55357    CYGWIN_VC_INSTALL_DIR="$unix_path"
55358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55360    CYGWIN_VC_INSTALL_DIR="$unix_path"
55361  fi
55362
55363      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55364        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55365      else
55366        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55367      fi
55368      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55369
55370  DLL_NAME="$DLL_NAME"
55371  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55372  METHOD="well-known location in VCINSTALLDIR"
55373  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55374    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55375$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55376
55377    # Need to check if the found msvcr is correct architecture
55378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55379$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55380    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55382      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55383      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55384      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55385        CORRECT_MSVCR_ARCH="PE32 executable"
55386      else
55387        CORRECT_MSVCR_ARCH="PE32+ executable"
55388      fi
55389    else
55390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55391        CORRECT_MSVCR_ARCH=386
55392      else
55393        CORRECT_MSVCR_ARCH=x86-64
55394      fi
55395    fi
55396    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55398$as_echo "ok" >&6; }
55399      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55400
55401  # Only process if variable expands to non-empty
55402
55403  if test "x$MSVC_DLL" != x; then
55404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55405
55406  # Input might be given as Windows format, start by converting to
55407  # unix format.
55408  path="$MSVC_DLL"
55409  new_path=`$CYGPATH -u "$path"`
55410
55411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55414  # "foo.exe" is OK but "foo" is an error.
55415  #
55416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55417  # It is also a way to make sure we got the proper file name for the real test later on.
55418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55419  if test "x$test_shortpath" = x; then
55420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55421$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55422    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55423  fi
55424
55425  # Call helper function which possibly converts this using DOS-style short mode.
55426  # If so, the updated path is stored in $new_path.
55427
55428  input_path="$new_path"
55429  # Check if we need to convert this using DOS-style short mode. If the path
55430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55431  # take no chances and rewrite it.
55432  # Note: m4 eats our [], so we need to use [ and ] instead.
55433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55434  if test "x$has_forbidden_chars" != x; then
55435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55439      # Going to short mode and back again did indeed matter. Since short mode is
55440      # case insensitive, let's make it lowercase to improve readability.
55441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55442      # Now convert it back to Unix-style (cygpath)
55443      input_path=`$CYGPATH -u "$shortmode_path"`
55444      new_path="$input_path"
55445    fi
55446  fi
55447
55448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55449  if test "x$test_cygdrive_prefix" = x; then
55450    # As a simple fix, exclude /usr/bin since it's not a real path.
55451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55453      # a path prefixed by /cygdrive for fixpath to work.
55454      new_path="$CYGWIN_ROOT_PATH$input_path"
55455    fi
55456  fi
55457
55458
55459  if test "x$path" != "x$new_path"; then
55460    MSVC_DLL="$new_path"
55461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55462$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55463  fi
55464
55465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55466
55467  path="$MSVC_DLL"
55468  has_colon=`$ECHO $path | $GREP ^.:`
55469  new_path="$path"
55470  if test "x$has_colon" = x; then
55471    # Not in mixed or Windows style, start by that.
55472    new_path=`cmd //c echo $path`
55473  fi
55474
55475
55476  input_path="$new_path"
55477  # Check if we need to convert this using DOS-style short mode. If the path
55478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55479  # take no chances and rewrite it.
55480  # Note: m4 eats our [], so we need to use [ and ] instead.
55481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55482  if test "x$has_forbidden_chars" != x; then
55483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55485  fi
55486
55487
55488  windows_path="$new_path"
55489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55490    unix_path=`$CYGPATH -u "$windows_path"`
55491    new_path="$unix_path"
55492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55494    new_path="$unix_path"
55495  fi
55496
55497  if test "x$path" != "x$new_path"; then
55498    MSVC_DLL="$new_path"
55499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55500$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55501  fi
55502
55503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55505
55506    else
55507      # We're on a unix platform. Hooray! :)
55508      path="$MSVC_DLL"
55509      has_space=`$ECHO "$path" | $GREP " "`
55510      if test "x$has_space" != x; then
55511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55512$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55514      fi
55515
55516      # Use eval to expand a potential ~
55517      eval path="$path"
55518      if test ! -f "$path" && test ! -d "$path"; then
55519        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55520      fi
55521
55522      if test -d "$path"; then
55523        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55524      else
55525        dir="`$DIRNAME "$path"`"
55526        base="`$BASENAME "$path"`"
55527        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55528      fi
55529    fi
55530  fi
55531
55532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55533$as_echo_n "checking for $DLL_NAME... " >&6; }
55534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55535$as_echo "$MSVC_DLL" >&6; }
55536    else
55537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55538$as_echo "incorrect, ignoring" >&6; }
55539      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55540$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55541    fi
55542  fi
55543
55544    fi
55545  fi
55546
55547  if test "x$MSVC_DLL" = x; then
55548    # Probe: Check in the Boot JDK directory.
55549    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55550
55551  DLL_NAME="$DLL_NAME"
55552  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55553  METHOD="well-known location in Boot JDK"
55554  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55556$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55557
55558    # Need to check if the found msvcr is correct architecture
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55560$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55561    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55563      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55564      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55565      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55566        CORRECT_MSVCR_ARCH="PE32 executable"
55567      else
55568        CORRECT_MSVCR_ARCH="PE32+ executable"
55569      fi
55570    else
55571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55572        CORRECT_MSVCR_ARCH=386
55573      else
55574        CORRECT_MSVCR_ARCH=x86-64
55575      fi
55576    fi
55577    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55579$as_echo "ok" >&6; }
55580      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55581
55582  # Only process if variable expands to non-empty
55583
55584  if test "x$MSVC_DLL" != x; then
55585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55586
55587  # Input might be given as Windows format, start by converting to
55588  # unix format.
55589  path="$MSVC_DLL"
55590  new_path=`$CYGPATH -u "$path"`
55591
55592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55595  # "foo.exe" is OK but "foo" is an error.
55596  #
55597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55598  # It is also a way to make sure we got the proper file name for the real test later on.
55599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55600  if test "x$test_shortpath" = x; then
55601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55602$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55603    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55604  fi
55605
55606  # Call helper function which possibly converts this using DOS-style short mode.
55607  # If so, the updated path is stored in $new_path.
55608
55609  input_path="$new_path"
55610  # Check if we need to convert this using DOS-style short mode. If the path
55611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55612  # take no chances and rewrite it.
55613  # Note: m4 eats our [], so we need to use [ and ] instead.
55614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55615  if test "x$has_forbidden_chars" != x; then
55616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55620      # Going to short mode and back again did indeed matter. Since short mode is
55621      # case insensitive, let's make it lowercase to improve readability.
55622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55623      # Now convert it back to Unix-style (cygpath)
55624      input_path=`$CYGPATH -u "$shortmode_path"`
55625      new_path="$input_path"
55626    fi
55627  fi
55628
55629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55630  if test "x$test_cygdrive_prefix" = x; then
55631    # As a simple fix, exclude /usr/bin since it's not a real path.
55632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55634      # a path prefixed by /cygdrive for fixpath to work.
55635      new_path="$CYGWIN_ROOT_PATH$input_path"
55636    fi
55637  fi
55638
55639
55640  if test "x$path" != "x$new_path"; then
55641    MSVC_DLL="$new_path"
55642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55643$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55644  fi
55645
55646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55647
55648  path="$MSVC_DLL"
55649  has_colon=`$ECHO $path | $GREP ^.:`
55650  new_path="$path"
55651  if test "x$has_colon" = x; then
55652    # Not in mixed or Windows style, start by that.
55653    new_path=`cmd //c echo $path`
55654  fi
55655
55656
55657  input_path="$new_path"
55658  # Check if we need to convert this using DOS-style short mode. If the path
55659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55660  # take no chances and rewrite it.
55661  # Note: m4 eats our [], so we need to use [ and ] instead.
55662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55663  if test "x$has_forbidden_chars" != x; then
55664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55666  fi
55667
55668
55669  windows_path="$new_path"
55670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55671    unix_path=`$CYGPATH -u "$windows_path"`
55672    new_path="$unix_path"
55673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55675    new_path="$unix_path"
55676  fi
55677
55678  if test "x$path" != "x$new_path"; then
55679    MSVC_DLL="$new_path"
55680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55681$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55682  fi
55683
55684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55686
55687    else
55688      # We're on a unix platform. Hooray! :)
55689      path="$MSVC_DLL"
55690      has_space=`$ECHO "$path" | $GREP " "`
55691      if test "x$has_space" != x; then
55692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55693$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55695      fi
55696
55697      # Use eval to expand a potential ~
55698      eval path="$path"
55699      if test ! -f "$path" && test ! -d "$path"; then
55700        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55701      fi
55702
55703      if test -d "$path"; then
55704        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55705      else
55706        dir="`$DIRNAME "$path"`"
55707        base="`$BASENAME "$path"`"
55708        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55709      fi
55710    fi
55711  fi
55712
55713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55714$as_echo_n "checking for $DLL_NAME... " >&6; }
55715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55716$as_echo "$MSVC_DLL" >&6; }
55717    else
55718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55719$as_echo "incorrect, ignoring" >&6; }
55720      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55721$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55722    fi
55723  fi
55724
55725  fi
55726
55727  if test "x$MSVC_DLL" = x; then
55728    # Probe: Look in the Windows system32 directory
55729    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55730
55731  windows_path="$CYGWIN_SYSTEMROOT"
55732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55733    unix_path=`$CYGPATH -u "$windows_path"`
55734    CYGWIN_SYSTEMROOT="$unix_path"
55735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55737    CYGWIN_SYSTEMROOT="$unix_path"
55738  fi
55739
55740    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55741
55742  DLL_NAME="$DLL_NAME"
55743  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55744  METHOD="well-known location in SYSTEMROOT"
55745  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55747$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55748
55749    # Need to check if the found msvcr is correct architecture
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55751$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55752    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55754      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55755      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55756      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55757        CORRECT_MSVCR_ARCH="PE32 executable"
55758      else
55759        CORRECT_MSVCR_ARCH="PE32+ executable"
55760      fi
55761    else
55762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55763        CORRECT_MSVCR_ARCH=386
55764      else
55765        CORRECT_MSVCR_ARCH=x86-64
55766      fi
55767    fi
55768    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55770$as_echo "ok" >&6; }
55771      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55772
55773  # Only process if variable expands to non-empty
55774
55775  if test "x$MSVC_DLL" != x; then
55776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55777
55778  # Input might be given as Windows format, start by converting to
55779  # unix format.
55780  path="$MSVC_DLL"
55781  new_path=`$CYGPATH -u "$path"`
55782
55783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55786  # "foo.exe" is OK but "foo" is an error.
55787  #
55788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55789  # It is also a way to make sure we got the proper file name for the real test later on.
55790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55791  if test "x$test_shortpath" = x; then
55792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55794    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55795  fi
55796
55797  # Call helper function which possibly converts this using DOS-style short mode.
55798  # If so, the updated path is stored in $new_path.
55799
55800  input_path="$new_path"
55801  # Check if we need to convert this using DOS-style short mode. If the path
55802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55803  # take no chances and rewrite it.
55804  # Note: m4 eats our [], so we need to use [ and ] instead.
55805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55806  if test "x$has_forbidden_chars" != x; then
55807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55811      # Going to short mode and back again did indeed matter. Since short mode is
55812      # case insensitive, let's make it lowercase to improve readability.
55813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55814      # Now convert it back to Unix-style (cygpath)
55815      input_path=`$CYGPATH -u "$shortmode_path"`
55816      new_path="$input_path"
55817    fi
55818  fi
55819
55820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55821  if test "x$test_cygdrive_prefix" = x; then
55822    # As a simple fix, exclude /usr/bin since it's not a real path.
55823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55825      # a path prefixed by /cygdrive for fixpath to work.
55826      new_path="$CYGWIN_ROOT_PATH$input_path"
55827    fi
55828  fi
55829
55830
55831  if test "x$path" != "x$new_path"; then
55832    MSVC_DLL="$new_path"
55833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55835  fi
55836
55837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55838
55839  path="$MSVC_DLL"
55840  has_colon=`$ECHO $path | $GREP ^.:`
55841  new_path="$path"
55842  if test "x$has_colon" = x; then
55843    # Not in mixed or Windows style, start by that.
55844    new_path=`cmd //c echo $path`
55845  fi
55846
55847
55848  input_path="$new_path"
55849  # Check if we need to convert this using DOS-style short mode. If the path
55850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55851  # take no chances and rewrite it.
55852  # Note: m4 eats our [], so we need to use [ and ] instead.
55853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55854  if test "x$has_forbidden_chars" != x; then
55855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55857  fi
55858
55859
55860  windows_path="$new_path"
55861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55862    unix_path=`$CYGPATH -u "$windows_path"`
55863    new_path="$unix_path"
55864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55866    new_path="$unix_path"
55867  fi
55868
55869  if test "x$path" != "x$new_path"; then
55870    MSVC_DLL="$new_path"
55871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55872$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55873  fi
55874
55875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55877
55878    else
55879      # We're on a unix platform. Hooray! :)
55880      path="$MSVC_DLL"
55881      has_space=`$ECHO "$path" | $GREP " "`
55882      if test "x$has_space" != x; then
55883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55884$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55886      fi
55887
55888      # Use eval to expand a potential ~
55889      eval path="$path"
55890      if test ! -f "$path" && test ! -d "$path"; then
55891        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55892      fi
55893
55894      if test -d "$path"; then
55895        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55896      else
55897        dir="`$DIRNAME "$path"`"
55898        base="`$BASENAME "$path"`"
55899        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55900      fi
55901    fi
55902  fi
55903
55904      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55905$as_echo_n "checking for $DLL_NAME... " >&6; }
55906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55907$as_echo "$MSVC_DLL" >&6; }
55908    else
55909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55910$as_echo "incorrect, ignoring" >&6; }
55911      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55912$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55913    fi
55914  fi
55915
55916  fi
55917
55918  if test "x$MSVC_DLL" = x; then
55919    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55920    if test "x$VS100COMNTOOLS" != x; then
55921      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55922
55923  windows_path="$CYGWIN_VS_TOOLS_DIR"
55924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55925    unix_path=`$CYGPATH -u "$windows_path"`
55926    CYGWIN_VS_TOOLS_DIR="$unix_path"
55927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55929    CYGWIN_VS_TOOLS_DIR="$unix_path"
55930  fi
55931
55932      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55933        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55934	    | $GREP -i /x64/ | $HEAD --lines 1`
55935      else
55936        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55937	    | $GREP -i /x86/ | $HEAD --lines 1`
55938      fi
55939
55940  DLL_NAME="$DLL_NAME"
55941  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55942  METHOD="search of VS100COMNTOOLS"
55943  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55944    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55945$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55946
55947    # Need to check if the found msvcr is correct architecture
55948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55949$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55950    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55952      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55953      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55955        CORRECT_MSVCR_ARCH="PE32 executable"
55956      else
55957        CORRECT_MSVCR_ARCH="PE32+ executable"
55958      fi
55959    else
55960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55961        CORRECT_MSVCR_ARCH=386
55962      else
55963        CORRECT_MSVCR_ARCH=x86-64
55964      fi
55965    fi
55966    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55968$as_echo "ok" >&6; }
55969      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55970
55971  # Only process if variable expands to non-empty
55972
55973  if test "x$MSVC_DLL" != x; then
55974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55975
55976  # Input might be given as Windows format, start by converting to
55977  # unix format.
55978  path="$MSVC_DLL"
55979  new_path=`$CYGPATH -u "$path"`
55980
55981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55984  # "foo.exe" is OK but "foo" is an error.
55985  #
55986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55987  # It is also a way to make sure we got the proper file name for the real test later on.
55988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55989  if test "x$test_shortpath" = x; then
55990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55991$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55992    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55993  fi
55994
55995  # Call helper function which possibly converts this using DOS-style short mode.
55996  # If so, the updated path is stored in $new_path.
55997
55998  input_path="$new_path"
55999  # Check if we need to convert this using DOS-style short mode. If the path
56000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56001  # take no chances and rewrite it.
56002  # Note: m4 eats our [], so we need to use [ and ] instead.
56003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56004  if test "x$has_forbidden_chars" != x; then
56005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56009      # Going to short mode and back again did indeed matter. Since short mode is
56010      # case insensitive, let's make it lowercase to improve readability.
56011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56012      # Now convert it back to Unix-style (cygpath)
56013      input_path=`$CYGPATH -u "$shortmode_path"`
56014      new_path="$input_path"
56015    fi
56016  fi
56017
56018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56019  if test "x$test_cygdrive_prefix" = x; then
56020    # As a simple fix, exclude /usr/bin since it's not a real path.
56021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56023      # a path prefixed by /cygdrive for fixpath to work.
56024      new_path="$CYGWIN_ROOT_PATH$input_path"
56025    fi
56026  fi
56027
56028
56029  if test "x$path" != "x$new_path"; then
56030    MSVC_DLL="$new_path"
56031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56032$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56033  fi
56034
56035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56036
56037  path="$MSVC_DLL"
56038  has_colon=`$ECHO $path | $GREP ^.:`
56039  new_path="$path"
56040  if test "x$has_colon" = x; then
56041    # Not in mixed or Windows style, start by that.
56042    new_path=`cmd //c echo $path`
56043  fi
56044
56045
56046  input_path="$new_path"
56047  # Check if we need to convert this using DOS-style short mode. If the path
56048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56049  # take no chances and rewrite it.
56050  # Note: m4 eats our [], so we need to use [ and ] instead.
56051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56052  if test "x$has_forbidden_chars" != x; then
56053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56055  fi
56056
56057
56058  windows_path="$new_path"
56059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56060    unix_path=`$CYGPATH -u "$windows_path"`
56061    new_path="$unix_path"
56062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56064    new_path="$unix_path"
56065  fi
56066
56067  if test "x$path" != "x$new_path"; then
56068    MSVC_DLL="$new_path"
56069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56070$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56071  fi
56072
56073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56075
56076    else
56077      # We're on a unix platform. Hooray! :)
56078      path="$MSVC_DLL"
56079      has_space=`$ECHO "$path" | $GREP " "`
56080      if test "x$has_space" != x; then
56081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56082$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56084      fi
56085
56086      # Use eval to expand a potential ~
56087      eval path="$path"
56088      if test ! -f "$path" && test ! -d "$path"; then
56089        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56090      fi
56091
56092      if test -d "$path"; then
56093        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56094      else
56095        dir="`$DIRNAME "$path"`"
56096        base="`$BASENAME "$path"`"
56097        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56098      fi
56099    fi
56100  fi
56101
56102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56103$as_echo_n "checking for $DLL_NAME... " >&6; }
56104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56105$as_echo "$MSVC_DLL" >&6; }
56106    else
56107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56108$as_echo "incorrect, ignoring" >&6; }
56109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56111    fi
56112  fi
56113
56114    fi
56115  fi
56116
56117  if test "x$MSVC_DLL" = x; then
56118    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56119    # (This was the original behaviour; kept since it might turn something up)
56120    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56121      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56122        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56123	    | $GREP x64 | $HEAD --lines 1`
56124      else
56125        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56126	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56127        if test "x$POSSIBLE_MSVC_DLL" = x; then
56128          # We're grasping at straws now...
56129          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56130	      | $HEAD --lines 1`
56131        fi
56132      fi
56133
56134
56135  DLL_NAME="$DLL_NAME"
56136  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56137  METHOD="search of VCINSTALLDIR"
56138  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56140$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56141
56142    # Need to check if the found msvcr is correct architecture
56143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56144$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56145    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56147      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56148      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56149      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56150        CORRECT_MSVCR_ARCH="PE32 executable"
56151      else
56152        CORRECT_MSVCR_ARCH="PE32+ executable"
56153      fi
56154    else
56155      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56156        CORRECT_MSVCR_ARCH=386
56157      else
56158        CORRECT_MSVCR_ARCH=x86-64
56159      fi
56160    fi
56161    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56163$as_echo "ok" >&6; }
56164      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56165
56166  # Only process if variable expands to non-empty
56167
56168  if test "x$MSVC_DLL" != x; then
56169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56170
56171  # Input might be given as Windows format, start by converting to
56172  # unix format.
56173  path="$MSVC_DLL"
56174  new_path=`$CYGPATH -u "$path"`
56175
56176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56179  # "foo.exe" is OK but "foo" is an error.
56180  #
56181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56182  # It is also a way to make sure we got the proper file name for the real test later on.
56183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56184  if test "x$test_shortpath" = x; then
56185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56187    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56188  fi
56189
56190  # Call helper function which possibly converts this using DOS-style short mode.
56191  # If so, the updated path is stored in $new_path.
56192
56193  input_path="$new_path"
56194  # Check if we need to convert this using DOS-style short mode. If the path
56195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56196  # take no chances and rewrite it.
56197  # Note: m4 eats our [], so we need to use [ and ] instead.
56198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56199  if test "x$has_forbidden_chars" != x; then
56200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56204      # Going to short mode and back again did indeed matter. Since short mode is
56205      # case insensitive, let's make it lowercase to improve readability.
56206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56207      # Now convert it back to Unix-style (cygpath)
56208      input_path=`$CYGPATH -u "$shortmode_path"`
56209      new_path="$input_path"
56210    fi
56211  fi
56212
56213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56214  if test "x$test_cygdrive_prefix" = x; then
56215    # As a simple fix, exclude /usr/bin since it's not a real path.
56216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56218      # a path prefixed by /cygdrive for fixpath to work.
56219      new_path="$CYGWIN_ROOT_PATH$input_path"
56220    fi
56221  fi
56222
56223
56224  if test "x$path" != "x$new_path"; then
56225    MSVC_DLL="$new_path"
56226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56228  fi
56229
56230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56231
56232  path="$MSVC_DLL"
56233  has_colon=`$ECHO $path | $GREP ^.:`
56234  new_path="$path"
56235  if test "x$has_colon" = x; then
56236    # Not in mixed or Windows style, start by that.
56237    new_path=`cmd //c echo $path`
56238  fi
56239
56240
56241  input_path="$new_path"
56242  # Check if we need to convert this using DOS-style short mode. If the path
56243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56244  # take no chances and rewrite it.
56245  # Note: m4 eats our [], so we need to use [ and ] instead.
56246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56247  if test "x$has_forbidden_chars" != x; then
56248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56250  fi
56251
56252
56253  windows_path="$new_path"
56254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56255    unix_path=`$CYGPATH -u "$windows_path"`
56256    new_path="$unix_path"
56257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56259    new_path="$unix_path"
56260  fi
56261
56262  if test "x$path" != "x$new_path"; then
56263    MSVC_DLL="$new_path"
56264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56265$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56266  fi
56267
56268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56270
56271    else
56272      # We're on a unix platform. Hooray! :)
56273      path="$MSVC_DLL"
56274      has_space=`$ECHO "$path" | $GREP " "`
56275      if test "x$has_space" != x; then
56276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56277$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56279      fi
56280
56281      # Use eval to expand a potential ~
56282      eval path="$path"
56283      if test ! -f "$path" && test ! -d "$path"; then
56284        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56285      fi
56286
56287      if test -d "$path"; then
56288        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56289      else
56290        dir="`$DIRNAME "$path"`"
56291        base="`$BASENAME "$path"`"
56292        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56293      fi
56294    fi
56295  fi
56296
56297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56298$as_echo_n "checking for $DLL_NAME... " >&6; }
56299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56300$as_echo "$MSVC_DLL" >&6; }
56301    else
56302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56303$as_echo "incorrect, ignoring" >&6; }
56304      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56305$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56306    fi
56307  fi
56308
56309    fi
56310  fi
56311
56312  if test "x$MSVC_DLL" = x; then
56313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56314$as_echo_n "checking for $DLL_NAME... " >&6; }
56315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56316$as_echo "no" >&6; }
56317    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56318  fi
56319
56320      MSVCP_DLL="$MSVC_DLL"
56321    fi
56322
56323  fi
56324
56325  fi
56326
56327
56328  if test "x$NEEDS_LIB_X11" = xfalse; then
56329    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56330      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56331$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56332    fi
56333    X_CFLAGS=
56334    X_LIBS=
56335  else
56336
56337    if test "x${with_x}" = xno; then
56338      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56339    fi
56340
56341    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56342      # The user has specified a X11 base directory. Use it for includes and
56343      # libraries, unless explicitly overridden.
56344      if test "x$x_includes" = xNONE; then
56345        x_includes="${with_x}/include"
56346      fi
56347      if test "x$x_libraries" = xNONE; then
56348        x_libraries="${with_x}/lib"
56349      fi
56350    else
56351      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56352      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56353      # --x-libraries for the sysroot, if that seems to be correct.
56354      if test "x$SYSROOT" != "x"; then
56355        if test "x$x_includes" = xNONE; then
56356          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56357            x_includes="$SYSROOT/usr/X11R6/include"
56358          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56359            x_includes="$SYSROOT/usr/include"
56360          fi
56361        fi
56362        if test "x$x_libraries" = xNONE; then
56363          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56364            x_libraries="$SYSROOT/usr/X11R6/lib"
56365          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56366            x_libraries="$SYSROOT/usr/lib64"
56367          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56368            x_libraries="$SYSROOT/usr/lib"
56369          fi
56370        fi
56371      fi
56372    fi
56373
56374    # Now let autoconf do it's magic
56375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56376$as_echo_n "checking for X... " >&6; }
56377
56378
56379# Check whether --with-x was given.
56380if test "${with_x+set}" = set; then :
56381  withval=$with_x;
56382fi
56383
56384# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56385if test "x$with_x" = xno; then
56386  # The user explicitly disabled X.
56387  have_x=disabled
56388else
56389  case $x_includes,$x_libraries in #(
56390    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56391    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56392  $as_echo_n "(cached) " >&6
56393else
56394  # One or both of the vars are not set, and there is no cached value.
56395ac_x_includes=no ac_x_libraries=no
56396rm -f -r conftest.dir
56397if mkdir conftest.dir; then
56398  cd conftest.dir
56399  cat >Imakefile <<'_ACEOF'
56400incroot:
56401	@echo incroot='${INCROOT}'
56402usrlibdir:
56403	@echo usrlibdir='${USRLIBDIR}'
56404libdir:
56405	@echo libdir='${LIBDIR}'
56406_ACEOF
56407  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56408    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56409    for ac_var in incroot usrlibdir libdir; do
56410      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56411    done
56412    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56413    for ac_extension in a so sl dylib la dll; do
56414      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56415	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56416	ac_im_usrlibdir=$ac_im_libdir; break
56417      fi
56418    done
56419    # Screen out bogus values from the imake configuration.  They are
56420    # bogus both because they are the default anyway, and because
56421    # using them would break gcc on systems where it needs fixed includes.
56422    case $ac_im_incroot in
56423	/usr/include) ac_x_includes= ;;
56424	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56425    esac
56426    case $ac_im_usrlibdir in
56427	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56428	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56429    esac
56430  fi
56431  cd ..
56432  rm -f -r conftest.dir
56433fi
56434
56435# Standard set of common directories for X headers.
56436# Check X11 before X11Rn because it is often a symlink to the current release.
56437ac_x_header_dirs='
56438/usr/X11/include
56439/usr/X11R7/include
56440/usr/X11R6/include
56441/usr/X11R5/include
56442/usr/X11R4/include
56443
56444/usr/include/X11
56445/usr/include/X11R7
56446/usr/include/X11R6
56447/usr/include/X11R5
56448/usr/include/X11R4
56449
56450/usr/local/X11/include
56451/usr/local/X11R7/include
56452/usr/local/X11R6/include
56453/usr/local/X11R5/include
56454/usr/local/X11R4/include
56455
56456/usr/local/include/X11
56457/usr/local/include/X11R7
56458/usr/local/include/X11R6
56459/usr/local/include/X11R5
56460/usr/local/include/X11R4
56461
56462/usr/X386/include
56463/usr/x386/include
56464/usr/XFree86/include/X11
56465
56466/usr/include
56467/usr/local/include
56468/usr/unsupported/include
56469/usr/athena/include
56470/usr/local/x11r5/include
56471/usr/lpp/Xamples/include
56472
56473/usr/openwin/include
56474/usr/openwin/share/include'
56475
56476if test "$ac_x_includes" = no; then
56477  # Guess where to find include files, by looking for Xlib.h.
56478  # First, try using that file with no special directory specified.
56479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56480/* end confdefs.h.  */
56481#include <X11/Xlib.h>
56482_ACEOF
56483if ac_fn_cxx_try_cpp "$LINENO"; then :
56484  # We can compile using X headers with no special include directory.
56485ac_x_includes=
56486else
56487  for ac_dir in $ac_x_header_dirs; do
56488  if test -r "$ac_dir/X11/Xlib.h"; then
56489    ac_x_includes=$ac_dir
56490    break
56491  fi
56492done
56493fi
56494rm -f conftest.err conftest.i conftest.$ac_ext
56495fi # $ac_x_includes = no
56496
56497if test "$ac_x_libraries" = no; then
56498  # Check for the libraries.
56499  # See if we find them without any special options.
56500  # Don't add to $LIBS permanently.
56501  ac_save_LIBS=$LIBS
56502  LIBS="-lX11 $LIBS"
56503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56504/* end confdefs.h.  */
56505#include <X11/Xlib.h>
56506int
56507main ()
56508{
56509XrmInitialize ()
56510  ;
56511  return 0;
56512}
56513_ACEOF
56514if ac_fn_cxx_try_link "$LINENO"; then :
56515  LIBS=$ac_save_LIBS
56516# We can link X programs with no special library path.
56517ac_x_libraries=
56518else
56519  LIBS=$ac_save_LIBS
56520for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56521do
56522  # Don't even attempt the hair of trying to link an X program!
56523  for ac_extension in a so sl dylib la dll; do
56524    if test -r "$ac_dir/libX11.$ac_extension"; then
56525      ac_x_libraries=$ac_dir
56526      break 2
56527    fi
56528  done
56529done
56530fi
56531rm -f core conftest.err conftest.$ac_objext \
56532    conftest$ac_exeext conftest.$ac_ext
56533fi # $ac_x_libraries = no
56534
56535case $ac_x_includes,$ac_x_libraries in #(
56536  no,* | *,no | *\'*)
56537    # Didn't find X, or a directory has "'" in its name.
56538    ac_cv_have_x="have_x=no";; #(
56539  *)
56540    # Record where we found X for the cache.
56541    ac_cv_have_x="have_x=yes\
56542	ac_x_includes='$ac_x_includes'\
56543	ac_x_libraries='$ac_x_libraries'"
56544esac
56545fi
56546;; #(
56547    *) have_x=yes;;
56548  esac
56549  eval "$ac_cv_have_x"
56550fi # $with_x != no
56551
56552if test "$have_x" != yes; then
56553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56554$as_echo "$have_x" >&6; }
56555  no_x=yes
56556else
56557  # If each of the values was on the command line, it overrides each guess.
56558  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56559  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56560  # Update the cache value to reflect the command line values.
56561  ac_cv_have_x="have_x=yes\
56562	ac_x_includes='$x_includes'\
56563	ac_x_libraries='$x_libraries'"
56564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56565$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56566fi
56567
56568    if test "$no_x" = yes; then
56569  # Not all programs may use this symbol, but it does not hurt to define it.
56570
56571$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56572
56573  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56574else
56575  if test -n "$x_includes"; then
56576    X_CFLAGS="$X_CFLAGS -I$x_includes"
56577  fi
56578
56579  # It would also be nice to do this for all -L options, not just this one.
56580  if test -n "$x_libraries"; then
56581    X_LIBS="$X_LIBS -L$x_libraries"
56582    # For Solaris; some versions of Sun CC require a space after -R and
56583    # others require no space.  Words are not sufficient . . . .
56584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56585$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56586    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56587    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56588    ac_cxx_werror_flag=yes
56589    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56590/* end confdefs.h.  */
56591
56592int
56593main ()
56594{
56595
56596  ;
56597  return 0;
56598}
56599_ACEOF
56600if ac_fn_cxx_try_link "$LINENO"; then :
56601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56602$as_echo "no" >&6; }
56603       X_LIBS="$X_LIBS -R$x_libraries"
56604else
56605  LIBS="$ac_xsave_LIBS -R $x_libraries"
56606       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56607/* end confdefs.h.  */
56608
56609int
56610main ()
56611{
56612
56613  ;
56614  return 0;
56615}
56616_ACEOF
56617if ac_fn_cxx_try_link "$LINENO"; then :
56618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56619$as_echo "yes" >&6; }
56620	  X_LIBS="$X_LIBS -R $x_libraries"
56621else
56622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56623$as_echo "neither works" >&6; }
56624fi
56625rm -f core conftest.err conftest.$ac_objext \
56626    conftest$ac_exeext conftest.$ac_ext
56627fi
56628rm -f core conftest.err conftest.$ac_objext \
56629    conftest$ac_exeext conftest.$ac_ext
56630    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56631    LIBS=$ac_xsave_LIBS
56632  fi
56633
56634  # Check for system-dependent libraries X programs must link with.
56635  # Do this before checking for the system-independent R6 libraries
56636  # (-lICE), since we may need -lsocket or whatever for X linking.
56637
56638  if test "$ISC" = yes; then
56639    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56640  else
56641    # Martyn Johnson says this is needed for Ultrix, if the X
56642    # libraries were built with DECnet support.  And Karl Berry says
56643    # the Alpha needs dnet_stub (dnet does not exist).
56644    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56645    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56646/* end confdefs.h.  */
56647
56648/* Override any GCC internal prototype to avoid an error.
56649   Use char because int might match the return type of a GCC
56650   builtin and then its argument prototype would still apply.  */
56651#ifdef __cplusplus
56652extern "C"
56653#endif
56654char XOpenDisplay ();
56655int
56656main ()
56657{
56658return XOpenDisplay ();
56659  ;
56660  return 0;
56661}
56662_ACEOF
56663if ac_fn_cxx_try_link "$LINENO"; then :
56664
56665else
56666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56667$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56668if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56669  $as_echo_n "(cached) " >&6
56670else
56671  ac_check_lib_save_LIBS=$LIBS
56672LIBS="-ldnet  $LIBS"
56673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56674/* end confdefs.h.  */
56675
56676/* Override any GCC internal prototype to avoid an error.
56677   Use char because int might match the return type of a GCC
56678   builtin and then its argument prototype would still apply.  */
56679#ifdef __cplusplus
56680extern "C"
56681#endif
56682char dnet_ntoa ();
56683int
56684main ()
56685{
56686return dnet_ntoa ();
56687  ;
56688  return 0;
56689}
56690_ACEOF
56691if ac_fn_cxx_try_link "$LINENO"; then :
56692  ac_cv_lib_dnet_dnet_ntoa=yes
56693else
56694  ac_cv_lib_dnet_dnet_ntoa=no
56695fi
56696rm -f core conftest.err conftest.$ac_objext \
56697    conftest$ac_exeext conftest.$ac_ext
56698LIBS=$ac_check_lib_save_LIBS
56699fi
56700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56701$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56702if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56703  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56704fi
56705
56706    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56708$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56709if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56710  $as_echo_n "(cached) " >&6
56711else
56712  ac_check_lib_save_LIBS=$LIBS
56713LIBS="-ldnet_stub  $LIBS"
56714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56715/* end confdefs.h.  */
56716
56717/* Override any GCC internal prototype to avoid an error.
56718   Use char because int might match the return type of a GCC
56719   builtin and then its argument prototype would still apply.  */
56720#ifdef __cplusplus
56721extern "C"
56722#endif
56723char dnet_ntoa ();
56724int
56725main ()
56726{
56727return dnet_ntoa ();
56728  ;
56729  return 0;
56730}
56731_ACEOF
56732if ac_fn_cxx_try_link "$LINENO"; then :
56733  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56734else
56735  ac_cv_lib_dnet_stub_dnet_ntoa=no
56736fi
56737rm -f core conftest.err conftest.$ac_objext \
56738    conftest$ac_exeext conftest.$ac_ext
56739LIBS=$ac_check_lib_save_LIBS
56740fi
56741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56742$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56743if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56744  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56745fi
56746
56747    fi
56748fi
56749rm -f core conftest.err conftest.$ac_objext \
56750    conftest$ac_exeext conftest.$ac_ext
56751    LIBS="$ac_xsave_LIBS"
56752
56753    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56754    # to get the SysV transport functions.
56755    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56756    # needs -lnsl.
56757    # The nsl library prevents programs from opening the X display
56758    # on Irix 5.2, according to T.E. Dickey.
56759    # The functions gethostbyname, getservbyname, and inet_addr are
56760    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56761    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56762if test "x$ac_cv_func_gethostbyname" = xyes; then :
56763
56764fi
56765
56766    if test $ac_cv_func_gethostbyname = no; then
56767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56768$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56769if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56770  $as_echo_n "(cached) " >&6
56771else
56772  ac_check_lib_save_LIBS=$LIBS
56773LIBS="-lnsl  $LIBS"
56774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56775/* end confdefs.h.  */
56776
56777/* Override any GCC internal prototype to avoid an error.
56778   Use char because int might match the return type of a GCC
56779   builtin and then its argument prototype would still apply.  */
56780#ifdef __cplusplus
56781extern "C"
56782#endif
56783char gethostbyname ();
56784int
56785main ()
56786{
56787return gethostbyname ();
56788  ;
56789  return 0;
56790}
56791_ACEOF
56792if ac_fn_cxx_try_link "$LINENO"; then :
56793  ac_cv_lib_nsl_gethostbyname=yes
56794else
56795  ac_cv_lib_nsl_gethostbyname=no
56796fi
56797rm -f core conftest.err conftest.$ac_objext \
56798    conftest$ac_exeext conftest.$ac_ext
56799LIBS=$ac_check_lib_save_LIBS
56800fi
56801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56802$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56803if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56804  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56805fi
56806
56807      if test $ac_cv_lib_nsl_gethostbyname = no; then
56808	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56809$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56810if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56811  $as_echo_n "(cached) " >&6
56812else
56813  ac_check_lib_save_LIBS=$LIBS
56814LIBS="-lbsd  $LIBS"
56815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56816/* end confdefs.h.  */
56817
56818/* Override any GCC internal prototype to avoid an error.
56819   Use char because int might match the return type of a GCC
56820   builtin and then its argument prototype would still apply.  */
56821#ifdef __cplusplus
56822extern "C"
56823#endif
56824char gethostbyname ();
56825int
56826main ()
56827{
56828return gethostbyname ();
56829  ;
56830  return 0;
56831}
56832_ACEOF
56833if ac_fn_cxx_try_link "$LINENO"; then :
56834  ac_cv_lib_bsd_gethostbyname=yes
56835else
56836  ac_cv_lib_bsd_gethostbyname=no
56837fi
56838rm -f core conftest.err conftest.$ac_objext \
56839    conftest$ac_exeext conftest.$ac_ext
56840LIBS=$ac_check_lib_save_LIBS
56841fi
56842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56843$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56844if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56845  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56846fi
56847
56848      fi
56849    fi
56850
56851    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56852    # socket/setsockopt and other routines are undefined under SCO ODT
56853    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56854    # on later versions), says Simon Leinen: it contains gethostby*
56855    # variants that don't use the name server (or something).  -lsocket
56856    # must be given before -lnsl if both are needed.  We assume that
56857    # if connect needs -lnsl, so does gethostbyname.
56858    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56859if test "x$ac_cv_func_connect" = xyes; then :
56860
56861fi
56862
56863    if test $ac_cv_func_connect = no; then
56864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56865$as_echo_n "checking for connect in -lsocket... " >&6; }
56866if ${ac_cv_lib_socket_connect+:} false; then :
56867  $as_echo_n "(cached) " >&6
56868else
56869  ac_check_lib_save_LIBS=$LIBS
56870LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56872/* end confdefs.h.  */
56873
56874/* Override any GCC internal prototype to avoid an error.
56875   Use char because int might match the return type of a GCC
56876   builtin and then its argument prototype would still apply.  */
56877#ifdef __cplusplus
56878extern "C"
56879#endif
56880char connect ();
56881int
56882main ()
56883{
56884return connect ();
56885  ;
56886  return 0;
56887}
56888_ACEOF
56889if ac_fn_cxx_try_link "$LINENO"; then :
56890  ac_cv_lib_socket_connect=yes
56891else
56892  ac_cv_lib_socket_connect=no
56893fi
56894rm -f core conftest.err conftest.$ac_objext \
56895    conftest$ac_exeext conftest.$ac_ext
56896LIBS=$ac_check_lib_save_LIBS
56897fi
56898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56899$as_echo "$ac_cv_lib_socket_connect" >&6; }
56900if test "x$ac_cv_lib_socket_connect" = xyes; then :
56901  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56902fi
56903
56904    fi
56905
56906    # Guillermo Gomez says -lposix is necessary on A/UX.
56907    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56908if test "x$ac_cv_func_remove" = xyes; then :
56909
56910fi
56911
56912    if test $ac_cv_func_remove = no; then
56913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56914$as_echo_n "checking for remove in -lposix... " >&6; }
56915if ${ac_cv_lib_posix_remove+:} false; then :
56916  $as_echo_n "(cached) " >&6
56917else
56918  ac_check_lib_save_LIBS=$LIBS
56919LIBS="-lposix  $LIBS"
56920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56921/* end confdefs.h.  */
56922
56923/* Override any GCC internal prototype to avoid an error.
56924   Use char because int might match the return type of a GCC
56925   builtin and then its argument prototype would still apply.  */
56926#ifdef __cplusplus
56927extern "C"
56928#endif
56929char remove ();
56930int
56931main ()
56932{
56933return remove ();
56934  ;
56935  return 0;
56936}
56937_ACEOF
56938if ac_fn_cxx_try_link "$LINENO"; then :
56939  ac_cv_lib_posix_remove=yes
56940else
56941  ac_cv_lib_posix_remove=no
56942fi
56943rm -f core conftest.err conftest.$ac_objext \
56944    conftest$ac_exeext conftest.$ac_ext
56945LIBS=$ac_check_lib_save_LIBS
56946fi
56947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56948$as_echo "$ac_cv_lib_posix_remove" >&6; }
56949if test "x$ac_cv_lib_posix_remove" = xyes; then :
56950  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56951fi
56952
56953    fi
56954
56955    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56956    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56957if test "x$ac_cv_func_shmat" = xyes; then :
56958
56959fi
56960
56961    if test $ac_cv_func_shmat = no; then
56962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56963$as_echo_n "checking for shmat in -lipc... " >&6; }
56964if ${ac_cv_lib_ipc_shmat+:} false; then :
56965  $as_echo_n "(cached) " >&6
56966else
56967  ac_check_lib_save_LIBS=$LIBS
56968LIBS="-lipc  $LIBS"
56969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56970/* end confdefs.h.  */
56971
56972/* Override any GCC internal prototype to avoid an error.
56973   Use char because int might match the return type of a GCC
56974   builtin and then its argument prototype would still apply.  */
56975#ifdef __cplusplus
56976extern "C"
56977#endif
56978char shmat ();
56979int
56980main ()
56981{
56982return shmat ();
56983  ;
56984  return 0;
56985}
56986_ACEOF
56987if ac_fn_cxx_try_link "$LINENO"; then :
56988  ac_cv_lib_ipc_shmat=yes
56989else
56990  ac_cv_lib_ipc_shmat=no
56991fi
56992rm -f core conftest.err conftest.$ac_objext \
56993    conftest$ac_exeext conftest.$ac_ext
56994LIBS=$ac_check_lib_save_LIBS
56995fi
56996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56997$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56998if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56999  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57000fi
57001
57002    fi
57003  fi
57004
57005  # Check for libraries that X11R6 Xt/Xaw programs need.
57006  ac_save_LDFLAGS=$LDFLAGS
57007  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57008  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57009  # check for ICE first), but we must link in the order -lSM -lICE or
57010  # we get undefined symbols.  So assume we have SM if we have ICE.
57011  # These have to be linked with before -lX11, unlike the other
57012  # libraries we check for below, so use a different variable.
57013  # John Interrante, Karl Berry
57014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57015$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57016if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57017  $as_echo_n "(cached) " >&6
57018else
57019  ac_check_lib_save_LIBS=$LIBS
57020LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57022/* end confdefs.h.  */
57023
57024/* Override any GCC internal prototype to avoid an error.
57025   Use char because int might match the return type of a GCC
57026   builtin and then its argument prototype would still apply.  */
57027#ifdef __cplusplus
57028extern "C"
57029#endif
57030char IceConnectionNumber ();
57031int
57032main ()
57033{
57034return IceConnectionNumber ();
57035  ;
57036  return 0;
57037}
57038_ACEOF
57039if ac_fn_cxx_try_link "$LINENO"; then :
57040  ac_cv_lib_ICE_IceConnectionNumber=yes
57041else
57042  ac_cv_lib_ICE_IceConnectionNumber=no
57043fi
57044rm -f core conftest.err conftest.$ac_objext \
57045    conftest$ac_exeext conftest.$ac_ext
57046LIBS=$ac_check_lib_save_LIBS
57047fi
57048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57049$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57050if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57051  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57052fi
57053
57054  LDFLAGS=$ac_save_LDFLAGS
57055
57056fi
57057
57058
57059    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57060    # this doesn't make sense so we remove it.
57061    if test "x$COMPILE_TYPE" = xcross; then
57062      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57063    fi
57064
57065    if test "x$no_x" = xyes; then
57066
57067  # Print a helpful message on how to acquire the necessary build dependency.
57068  # x11 is the help tag: freetype, cups, alsa etc
57069  MISSING_DEPENDENCY=x11
57070
57071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57072    cygwin_help $MISSING_DEPENDENCY
57073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57074    msys_help $MISSING_DEPENDENCY
57075  else
57076    PKGHANDLER_COMMAND=
57077
57078    case $PKGHANDLER in
57079      apt-get)
57080        apt_help     $MISSING_DEPENDENCY ;;
57081      yum)
57082        yum_help     $MISSING_DEPENDENCY ;;
57083      brew)
57084        brew_help    $MISSING_DEPENDENCY ;;
57085      port)
57086        port_help    $MISSING_DEPENDENCY ;;
57087      pkgutil)
57088        pkgutil_help $MISSING_DEPENDENCY ;;
57089      pkgadd)
57090        pkgadd_help  $MISSING_DEPENDENCY ;;
57091    esac
57092
57093    if test "x$PKGHANDLER_COMMAND" != x; then
57094      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57095    fi
57096  fi
57097
57098      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57099    fi
57100
57101    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57102      OPENWIN_HOME="/usr/openwin"
57103      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57104      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57105          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57106    fi
57107
57108    ac_ext=c
57109ac_cpp='$CPP $CPPFLAGS'
57110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57112ac_compiler_gnu=$ac_cv_c_compiler_gnu
57113
57114    OLD_CFLAGS="$CFLAGS"
57115    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57116
57117    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57118    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57119do :
57120  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57121ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57122          # include <X11/Xlib.h>
57123          # include <X11/Xutil.h>
57124
57125
57126"
57127if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57128  cat >>confdefs.h <<_ACEOF
57129#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57130_ACEOF
57131 X11_HEADERS_OK=yes
57132else
57133  X11_HEADERS_OK=no; break
57134fi
57135
57136done
57137
57138
57139    if test "x$X11_HEADERS_OK" = xno; then
57140
57141  # Print a helpful message on how to acquire the necessary build dependency.
57142  # x11 is the help tag: freetype, cups, alsa etc
57143  MISSING_DEPENDENCY=x11
57144
57145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57146    cygwin_help $MISSING_DEPENDENCY
57147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57148    msys_help $MISSING_DEPENDENCY
57149  else
57150    PKGHANDLER_COMMAND=
57151
57152    case $PKGHANDLER in
57153      apt-get)
57154        apt_help     $MISSING_DEPENDENCY ;;
57155      yum)
57156        yum_help     $MISSING_DEPENDENCY ;;
57157      brew)
57158        brew_help    $MISSING_DEPENDENCY ;;
57159      port)
57160        port_help    $MISSING_DEPENDENCY ;;
57161      pkgutil)
57162        pkgutil_help $MISSING_DEPENDENCY ;;
57163      pkgadd)
57164        pkgadd_help  $MISSING_DEPENDENCY ;;
57165    esac
57166
57167    if test "x$PKGHANDLER_COMMAND" != x; then
57168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57169    fi
57170  fi
57171
57172      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57173    fi
57174
57175    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57176    # defined in libawt_xawt.
57177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57178$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57179    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57180/* end confdefs.h.  */
57181#include <X11/extensions/Xrender.h>
57182int
57183main ()
57184{
57185XLinearGradient x;
57186  ;
57187  return 0;
57188}
57189_ACEOF
57190if ac_fn_c_try_compile "$LINENO"; then :
57191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57192$as_echo "yes" >&6; }
57193else
57194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57195$as_echo "no" >&6; }
57196         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57197fi
57198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57199
57200    CFLAGS="$OLD_CFLAGS"
57201    ac_ext=cpp
57202ac_cpp='$CXXCPP $CPPFLAGS'
57203ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57204ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57205ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57206
57207  fi # NEEDS_LIB_X11
57208
57209
57210
57211
57212
57213
57214# Check whether --with-cups was given.
57215if test "${with_cups+set}" = set; then :
57216  withval=$with_cups;
57217fi
57218
57219
57220# Check whether --with-cups-include was given.
57221if test "${with_cups_include+set}" = set; then :
57222  withval=$with_cups_include;
57223fi
57224
57225
57226  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57227    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57228        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57229      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57230$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57231    fi
57232    CUPS_CFLAGS=
57233  else
57234    CUPS_FOUND=no
57235
57236    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57237      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57238    fi
57239
57240    if test "x${with_cups}" != x; then
57241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57242$as_echo_n "checking for cups headers... " >&6; }
57243      if test -s "${with_cups}/include/cups/cups.h"; then
57244        CUPS_CFLAGS="-I${with_cups}/include"
57245        CUPS_FOUND=yes
57246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57247$as_echo "$CUPS_FOUND" >&6; }
57248      else
57249        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57250      fi
57251    fi
57252    if test "x${with_cups_include}" != x; then
57253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57254$as_echo_n "checking for cups headers... " >&6; }
57255      if test -s "${with_cups_include}/cups/cups.h"; then
57256        CUPS_CFLAGS="-I${with_cups_include}"
57257        CUPS_FOUND=yes
57258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57259$as_echo "$CUPS_FOUND" >&6; }
57260      else
57261        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57262      fi
57263    fi
57264    if test "x$CUPS_FOUND" = xno; then
57265      # Are the cups headers installed in the default /usr/include location?
57266      for ac_header in cups/cups.h cups/ppd.h
57267do :
57268  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57269ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57270if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57271  cat >>confdefs.h <<_ACEOF
57272#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57273_ACEOF
57274
57275          CUPS_FOUND=yes
57276          CUPS_CFLAGS=
57277          DEFAULT_CUPS=yes
57278
57279fi
57280
57281done
57282
57283    fi
57284    if test "x$CUPS_FOUND" = xno; then
57285
57286  # Print a helpful message on how to acquire the necessary build dependency.
57287  # cups is the help tag: freetype, cups, alsa etc
57288  MISSING_DEPENDENCY=cups
57289
57290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57291    cygwin_help $MISSING_DEPENDENCY
57292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57293    msys_help $MISSING_DEPENDENCY
57294  else
57295    PKGHANDLER_COMMAND=
57296
57297    case $PKGHANDLER in
57298      apt-get)
57299        apt_help     $MISSING_DEPENDENCY ;;
57300      yum)
57301        yum_help     $MISSING_DEPENDENCY ;;
57302      brew)
57303        brew_help    $MISSING_DEPENDENCY ;;
57304      port)
57305        port_help    $MISSING_DEPENDENCY ;;
57306      pkgutil)
57307        pkgutil_help $MISSING_DEPENDENCY ;;
57308      pkgadd)
57309        pkgadd_help  $MISSING_DEPENDENCY ;;
57310    esac
57311
57312    if test "x$PKGHANDLER_COMMAND" != x; then
57313      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57314    fi
57315  fi
57316
57317      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57318    fi
57319  fi
57320
57321
57322
57323
57324
57325# Check whether --with-freetype was given.
57326if test "${with_freetype+set}" = set; then :
57327  withval=$with_freetype;
57328fi
57329
57330
57331# Check whether --with-freetype-include was given.
57332if test "${with_freetype_include+set}" = set; then :
57333  withval=$with_freetype_include;
57334fi
57335
57336
57337# Check whether --with-freetype-lib was given.
57338if test "${with_freetype_lib+set}" = set; then :
57339  withval=$with_freetype_lib;
57340fi
57341
57342
57343# Check whether --with-freetype-src was given.
57344if test "${with_freetype_src+set}" = set; then :
57345  withval=$with_freetype_src;
57346fi
57347
57348  # Check whether --enable-freetype-bundling was given.
57349if test "${enable_freetype_bundling+set}" = set; then :
57350  enableval=$enable_freetype_bundling;
57351fi
57352
57353
57354  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57355  FREETYPE_BASE_NAME=freetype
57356  FREETYPE_CFLAGS=
57357  FREETYPE_LIBS=
57358  FREETYPE_BUNDLE_LIB_PATH=
57359
57360  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57361    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57362        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57363        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57364        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57365      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57366$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57367    fi
57368    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57369      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57370$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57371    fi
57372  else
57373    # freetype is needed to build; go get it!
57374
57375    BUNDLE_FREETYPE="$enable_freetype_bundling"
57376
57377    if  test "x$with_freetype_src" != x; then
57378      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57379        # Try to build freetype if --with-freetype-src was given on Windows
57380
57381  FREETYPE_SRC_PATH="$with_freetype_src"
57382  BUILD_FREETYPE=yes
57383
57384  # Check if the freetype sources are acessible..
57385  if ! test -d $FREETYPE_SRC_PATH; then
57386    { $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
57387$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57388    BUILD_FREETYPE=no
57389  fi
57390  # ..and contain a vc2010 project file
57391  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57392  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57393    { $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
57394$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57395    BUILD_FREETYPE=no
57396  fi
57397  # Now check if configure found a version of 'msbuild.exe'
57398  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57399    { $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
57400$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;}
57401    BUILD_FREETYPE=no
57402  fi
57403
57404  # Ready to go..
57405  if test "x$BUILD_FREETYPE" = xyes; then
57406    # msbuild requires trailing slashes for output directories
57407    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57408    freetype_lib_path_unix="$freetype_lib_path"
57409    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57410
57411  unix_path="$vcxproj_path"
57412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57413    windows_path=`$CYGPATH -m "$unix_path"`
57414    vcxproj_path="$windows_path"
57415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57416    windows_path=`cmd //c echo $unix_path`
57417    vcxproj_path="$windows_path"
57418  fi
57419
57420
57421  unix_path="$freetype_lib_path"
57422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57423    windows_path=`$CYGPATH -m "$unix_path"`
57424    freetype_lib_path="$windows_path"
57425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57426    windows_path=`cmd //c echo $unix_path`
57427    freetype_lib_path="$windows_path"
57428  fi
57429
57430
57431  unix_path="$freetype_obj_path"
57432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57433    windows_path=`$CYGPATH -m "$unix_path"`
57434    freetype_obj_path="$windows_path"
57435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57436    windows_path=`cmd //c echo $unix_path`
57437    freetype_obj_path="$windows_path"
57438  fi
57439
57440    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57441      freetype_platform=x64
57442    else
57443      freetype_platform=win32
57444    fi
57445
57446    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57447    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57448    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57449    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57450    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57451$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57452
57453    # First we try to build the freetype.dll
57454    $ECHO -e "@echo off\n"\
57455        "$MSBUILD $vcxproj_path "\
57456        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57457        "/p:Configuration=\"Release Multithreaded\" "\
57458        "/p:Platform=$freetype_platform "\
57459        "/p:ConfigurationType=DynamicLibrary "\
57460        "/p:TargetName=freetype "\
57461        "/p:OutDir=\"$freetype_lib_path\" "\
57462        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57463    cmd /c freetype.bat
57464
57465    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57466      # If that succeeds we also build freetype.lib
57467      $ECHO -e "@echo off\n"\
57468          "$MSBUILD $vcxproj_path "\
57469          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57470          "/p:Configuration=\"Release Multithreaded\" "\
57471          "/p:Platform=$freetype_platform "\
57472          "/p:ConfigurationType=StaticLibrary "\
57473          "/p:TargetName=freetype "\
57474          "/p:OutDir=\"$freetype_lib_path\" "\
57475          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57476      cmd /c freetype.bat
57477
57478      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57479        # Once we build both, lib and dll, set freetype lib and include path appropriately
57480        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57481        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57482        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57483$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57484      else
57485        BUILD_FREETYPE=no
57486      fi
57487    else
57488      BUILD_FREETYPE=no
57489    fi
57490  fi
57491
57492        if test "x$BUILD_FREETYPE" = xyes; then
57493          # Okay, we built it. Check that it works.
57494
57495  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57496  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57497  METHOD="--with-freetype-src"
57498
57499  # Let's start with an optimistic view of the world :-)
57500  FOUND_FREETYPE=yes
57501
57502  # First look for the canonical freetype main include file ft2build.h.
57503  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57504    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57505    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57506    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57507      # Fail.
57508      FOUND_FREETYPE=no
57509    fi
57510  fi
57511
57512  if test "x$FOUND_FREETYPE" = xyes; then
57513    # Include file found, let's continue the sanity check.
57514    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57515$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57516
57517    # Reset to default value
57518    FREETYPE_BASE_NAME=freetype
57519    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57520    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57521      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57522          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57523        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57524        # for the .6 version explicitly.
57525        FREETYPE_BASE_NAME=freetype.6
57526        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57527        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57528$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57529      else
57530        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57532        FOUND_FREETYPE=no
57533      fi
57534    else
57535      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57536        # On Windows, we will need both .lib and .dll file.
57537        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57538          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57539$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57540          FOUND_FREETYPE=no
57541        fi
57542      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57543          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57544        # Found lib in isa dir, use that instead.
57545        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57546        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57547$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57548      fi
57549    fi
57550  fi
57551
57552  if test "x$FOUND_FREETYPE" = xyes; then
57553
57554  # Only process if variable expands to non-empty
57555
57556  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57558
57559  # Input might be given as Windows format, start by converting to
57560  # unix format.
57561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57562  new_path=`$CYGPATH -u "$path"`
57563
57564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57567  # "foo.exe" is OK but "foo" is an error.
57568  #
57569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57570  # It is also a way to make sure we got the proper file name for the real test later on.
57571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57572  if test "x$test_shortpath" = x; then
57573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57576  fi
57577
57578  # Call helper function which possibly converts this using DOS-style short mode.
57579  # If so, the updated path is stored in $new_path.
57580
57581  input_path="$new_path"
57582  # Check if we need to convert this using DOS-style short mode. If the path
57583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57584  # take no chances and rewrite it.
57585  # Note: m4 eats our [], so we need to use [ and ] instead.
57586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57587  if test "x$has_forbidden_chars" != x; then
57588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57592      # Going to short mode and back again did indeed matter. Since short mode is
57593      # case insensitive, let's make it lowercase to improve readability.
57594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57595      # Now convert it back to Unix-style (cygpath)
57596      input_path=`$CYGPATH -u "$shortmode_path"`
57597      new_path="$input_path"
57598    fi
57599  fi
57600
57601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57602  if test "x$test_cygdrive_prefix" = x; then
57603    # As a simple fix, exclude /usr/bin since it's not a real path.
57604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57606      # a path prefixed by /cygdrive for fixpath to work.
57607      new_path="$CYGWIN_ROOT_PATH$input_path"
57608    fi
57609  fi
57610
57611
57612  if test "x$path" != "x$new_path"; then
57613    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57616  fi
57617
57618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57619
57620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57621  has_colon=`$ECHO $path | $GREP ^.:`
57622  new_path="$path"
57623  if test "x$has_colon" = x; then
57624    # Not in mixed or Windows style, start by that.
57625    new_path=`cmd //c echo $path`
57626  fi
57627
57628
57629  input_path="$new_path"
57630  # Check if we need to convert this using DOS-style short mode. If the path
57631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57632  # take no chances and rewrite it.
57633  # Note: m4 eats our [], so we need to use [ and ] instead.
57634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57635  if test "x$has_forbidden_chars" != x; then
57636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57638  fi
57639
57640
57641  windows_path="$new_path"
57642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57643    unix_path=`$CYGPATH -u "$windows_path"`
57644    new_path="$unix_path"
57645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57647    new_path="$unix_path"
57648  fi
57649
57650  if test "x$path" != "x$new_path"; then
57651    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57654  fi
57655
57656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57658
57659    else
57660      # We're on a unix platform. Hooray! :)
57661      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57662      has_space=`$ECHO "$path" | $GREP " "`
57663      if test "x$has_space" != x; then
57664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57667      fi
57668
57669      # Use eval to expand a potential ~
57670      eval path="$path"
57671      if test ! -f "$path" && test ! -d "$path"; then
57672        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57673      fi
57674
57675      if test -d "$path"; then
57676        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57677      else
57678        dir="`$DIRNAME "$path"`"
57679        base="`$BASENAME "$path"`"
57680        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57681      fi
57682    fi
57683  fi
57684
57685
57686  # Only process if variable expands to non-empty
57687
57688  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57690
57691  # Input might be given as Windows format, start by converting to
57692  # unix format.
57693  path="$POTENTIAL_FREETYPE_LIB_PATH"
57694  new_path=`$CYGPATH -u "$path"`
57695
57696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57699  # "foo.exe" is OK but "foo" is an error.
57700  #
57701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57702  # It is also a way to make sure we got the proper file name for the real test later on.
57703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57704  if test "x$test_shortpath" = x; then
57705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57706$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57707    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57708  fi
57709
57710  # Call helper function which possibly converts this using DOS-style short mode.
57711  # If so, the updated path is stored in $new_path.
57712
57713  input_path="$new_path"
57714  # Check if we need to convert this using DOS-style short mode. If the path
57715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57716  # take no chances and rewrite it.
57717  # Note: m4 eats our [], so we need to use [ and ] instead.
57718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57719  if test "x$has_forbidden_chars" != x; then
57720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57724      # Going to short mode and back again did indeed matter. Since short mode is
57725      # case insensitive, let's make it lowercase to improve readability.
57726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57727      # Now convert it back to Unix-style (cygpath)
57728      input_path=`$CYGPATH -u "$shortmode_path"`
57729      new_path="$input_path"
57730    fi
57731  fi
57732
57733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57734  if test "x$test_cygdrive_prefix" = x; then
57735    # As a simple fix, exclude /usr/bin since it's not a real path.
57736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57738      # a path prefixed by /cygdrive for fixpath to work.
57739      new_path="$CYGWIN_ROOT_PATH$input_path"
57740    fi
57741  fi
57742
57743
57744  if test "x$path" != "x$new_path"; then
57745    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57748  fi
57749
57750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57751
57752  path="$POTENTIAL_FREETYPE_LIB_PATH"
57753  has_colon=`$ECHO $path | $GREP ^.:`
57754  new_path="$path"
57755  if test "x$has_colon" = x; then
57756    # Not in mixed or Windows style, start by that.
57757    new_path=`cmd //c echo $path`
57758  fi
57759
57760
57761  input_path="$new_path"
57762  # Check if we need to convert this using DOS-style short mode. If the path
57763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57764  # take no chances and rewrite it.
57765  # Note: m4 eats our [], so we need to use [ and ] instead.
57766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57767  if test "x$has_forbidden_chars" != x; then
57768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57770  fi
57771
57772
57773  windows_path="$new_path"
57774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57775    unix_path=`$CYGPATH -u "$windows_path"`
57776    new_path="$unix_path"
57777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57779    new_path="$unix_path"
57780  fi
57781
57782  if test "x$path" != "x$new_path"; then
57783    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57785$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57786  fi
57787
57788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57790
57791    else
57792      # We're on a unix platform. Hooray! :)
57793      path="$POTENTIAL_FREETYPE_LIB_PATH"
57794      has_space=`$ECHO "$path" | $GREP " "`
57795      if test "x$has_space" != x; then
57796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57799      fi
57800
57801      # Use eval to expand a potential ~
57802      eval path="$path"
57803      if test ! -f "$path" && test ! -d "$path"; then
57804        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57805      fi
57806
57807      if test -d "$path"; then
57808        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57809      else
57810        dir="`$DIRNAME "$path"`"
57811        base="`$BASENAME "$path"`"
57812        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57813      fi
57814    fi
57815  fi
57816
57817
57818    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57820$as_echo_n "checking for freetype includes... " >&6; }
57821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57822$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57823    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57825$as_echo_n "checking for freetype libraries... " >&6; }
57826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57827$as_echo "$FREETYPE_LIB_PATH" >&6; }
57828  fi
57829
57830          if test "x$FOUND_FREETYPE" != xyes; then
57831            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57832          fi
57833        else
57834          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57835$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57836          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57837        fi
57838      else
57839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57840$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57841      fi
57842    fi
57843
57844    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57845      # User has specified settings
57846
57847      if test "x$BUNDLE_FREETYPE" = x; then
57848        # If not specified, default is to bundle freetype
57849        BUNDLE_FREETYPE=yes
57850      fi
57851
57852      if test "x$with_freetype" != x; then
57853        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57854        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57855      fi
57856
57857      # Allow --with-freetype-lib and --with-freetype-include to override
57858      if test "x$with_freetype_include" != x; then
57859        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57860      fi
57861      if test "x$with_freetype_lib" != x; then
57862        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57863      fi
57864
57865      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57866        # Okay, we got it. Check that it works.
57867
57868  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57869  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57870  METHOD="--with-freetype"
57871
57872  # Let's start with an optimistic view of the world :-)
57873  FOUND_FREETYPE=yes
57874
57875  # First look for the canonical freetype main include file ft2build.h.
57876  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57877    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57878    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57879    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57880      # Fail.
57881      FOUND_FREETYPE=no
57882    fi
57883  fi
57884
57885  if test "x$FOUND_FREETYPE" = xyes; then
57886    # Include file found, let's continue the sanity check.
57887    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57888$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57889
57890    # Reset to default value
57891    FREETYPE_BASE_NAME=freetype
57892    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57893    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57894      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57895          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57896        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57897        # for the .6 version explicitly.
57898        FREETYPE_BASE_NAME=freetype.6
57899        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57900        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57901$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57902      else
57903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57904$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57905        FOUND_FREETYPE=no
57906      fi
57907    else
57908      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57909        # On Windows, we will need both .lib and .dll file.
57910        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57911          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57912$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57913          FOUND_FREETYPE=no
57914        fi
57915      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57917        # Found lib in isa dir, use that instead.
57918        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57919        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57920$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57921      fi
57922    fi
57923  fi
57924
57925  if test "x$FOUND_FREETYPE" = xyes; then
57926
57927  # Only process if variable expands to non-empty
57928
57929  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57931
57932  # Input might be given as Windows format, start by converting to
57933  # unix format.
57934  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57935  new_path=`$CYGPATH -u "$path"`
57936
57937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57940  # "foo.exe" is OK but "foo" is an error.
57941  #
57942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57943  # It is also a way to make sure we got the proper file name for the real test later on.
57944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57945  if test "x$test_shortpath" = x; then
57946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57948    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57949  fi
57950
57951  # Call helper function which possibly converts this using DOS-style short mode.
57952  # If so, the updated path is stored in $new_path.
57953
57954  input_path="$new_path"
57955  # Check if we need to convert this using DOS-style short mode. If the path
57956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57957  # take no chances and rewrite it.
57958  # Note: m4 eats our [], so we need to use [ and ] instead.
57959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57960  if test "x$has_forbidden_chars" != x; then
57961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57965      # Going to short mode and back again did indeed matter. Since short mode is
57966      # case insensitive, let's make it lowercase to improve readability.
57967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57968      # Now convert it back to Unix-style (cygpath)
57969      input_path=`$CYGPATH -u "$shortmode_path"`
57970      new_path="$input_path"
57971    fi
57972  fi
57973
57974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57975  if test "x$test_cygdrive_prefix" = x; then
57976    # As a simple fix, exclude /usr/bin since it's not a real path.
57977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57979      # a path prefixed by /cygdrive for fixpath to work.
57980      new_path="$CYGWIN_ROOT_PATH$input_path"
57981    fi
57982  fi
57983
57984
57985  if test "x$path" != "x$new_path"; then
57986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57989  fi
57990
57991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57992
57993  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57994  has_colon=`$ECHO $path | $GREP ^.:`
57995  new_path="$path"
57996  if test "x$has_colon" = x; then
57997    # Not in mixed or Windows style, start by that.
57998    new_path=`cmd //c echo $path`
57999  fi
58000
58001
58002  input_path="$new_path"
58003  # Check if we need to convert this using DOS-style short mode. If the path
58004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58005  # take no chances and rewrite it.
58006  # Note: m4 eats our [], so we need to use [ and ] instead.
58007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58008  if test "x$has_forbidden_chars" != x; then
58009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58011  fi
58012
58013
58014  windows_path="$new_path"
58015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58016    unix_path=`$CYGPATH -u "$windows_path"`
58017    new_path="$unix_path"
58018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58020    new_path="$unix_path"
58021  fi
58022
58023  if test "x$path" != "x$new_path"; then
58024    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58027  fi
58028
58029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58031
58032    else
58033      # We're on a unix platform. Hooray! :)
58034      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58035      has_space=`$ECHO "$path" | $GREP " "`
58036      if test "x$has_space" != x; then
58037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58040      fi
58041
58042      # Use eval to expand a potential ~
58043      eval path="$path"
58044      if test ! -f "$path" && test ! -d "$path"; then
58045        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58046      fi
58047
58048      if test -d "$path"; then
58049        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58050      else
58051        dir="`$DIRNAME "$path"`"
58052        base="`$BASENAME "$path"`"
58053        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58054      fi
58055    fi
58056  fi
58057
58058
58059  # Only process if variable expands to non-empty
58060
58061  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58063
58064  # Input might be given as Windows format, start by converting to
58065  # unix format.
58066  path="$POTENTIAL_FREETYPE_LIB_PATH"
58067  new_path=`$CYGPATH -u "$path"`
58068
58069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58072  # "foo.exe" is OK but "foo" is an error.
58073  #
58074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58075  # It is also a way to make sure we got the proper file name for the real test later on.
58076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58077  if test "x$test_shortpath" = x; then
58078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58080    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58081  fi
58082
58083  # Call helper function which possibly converts this using DOS-style short mode.
58084  # If so, the updated path is stored in $new_path.
58085
58086  input_path="$new_path"
58087  # Check if we need to convert this using DOS-style short mode. If the path
58088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58089  # take no chances and rewrite it.
58090  # Note: m4 eats our [], so we need to use [ and ] instead.
58091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58092  if test "x$has_forbidden_chars" != x; then
58093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58097      # Going to short mode and back again did indeed matter. Since short mode is
58098      # case insensitive, let's make it lowercase to improve readability.
58099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58100      # Now convert it back to Unix-style (cygpath)
58101      input_path=`$CYGPATH -u "$shortmode_path"`
58102      new_path="$input_path"
58103    fi
58104  fi
58105
58106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58107  if test "x$test_cygdrive_prefix" = x; then
58108    # As a simple fix, exclude /usr/bin since it's not a real path.
58109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58111      # a path prefixed by /cygdrive for fixpath to work.
58112      new_path="$CYGWIN_ROOT_PATH$input_path"
58113    fi
58114  fi
58115
58116
58117  if test "x$path" != "x$new_path"; then
58118    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58121  fi
58122
58123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58124
58125  path="$POTENTIAL_FREETYPE_LIB_PATH"
58126  has_colon=`$ECHO $path | $GREP ^.:`
58127  new_path="$path"
58128  if test "x$has_colon" = x; then
58129    # Not in mixed or Windows style, start by that.
58130    new_path=`cmd //c echo $path`
58131  fi
58132
58133
58134  input_path="$new_path"
58135  # Check if we need to convert this using DOS-style short mode. If the path
58136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58137  # take no chances and rewrite it.
58138  # Note: m4 eats our [], so we need to use [ and ] instead.
58139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58140  if test "x$has_forbidden_chars" != x; then
58141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58143  fi
58144
58145
58146  windows_path="$new_path"
58147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58148    unix_path=`$CYGPATH -u "$windows_path"`
58149    new_path="$unix_path"
58150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58152    new_path="$unix_path"
58153  fi
58154
58155  if test "x$path" != "x$new_path"; then
58156    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58159  fi
58160
58161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58163
58164    else
58165      # We're on a unix platform. Hooray! :)
58166      path="$POTENTIAL_FREETYPE_LIB_PATH"
58167      has_space=`$ECHO "$path" | $GREP " "`
58168      if test "x$has_space" != x; then
58169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58172      fi
58173
58174      # Use eval to expand a potential ~
58175      eval path="$path"
58176      if test ! -f "$path" && test ! -d "$path"; then
58177        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58178      fi
58179
58180      if test -d "$path"; then
58181        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58182      else
58183        dir="`$DIRNAME "$path"`"
58184        base="`$BASENAME "$path"`"
58185        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58186      fi
58187    fi
58188  fi
58189
58190
58191    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58193$as_echo_n "checking for freetype includes... " >&6; }
58194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58195$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58196    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58198$as_echo_n "checking for freetype libraries... " >&6; }
58199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58200$as_echo "$FREETYPE_LIB_PATH" >&6; }
58201  fi
58202
58203        if test "x$FOUND_FREETYPE" != xyes; then
58204          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58205        fi
58206      else
58207        # User specified only one of lib or include. This is an error.
58208        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58209          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58210$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58211          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58212        else
58213          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58214$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58215          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58216        fi
58217      fi
58218    else
58219      # User did not specify settings, but we need freetype. Try to locate it.
58220
58221      if test "x$BUNDLE_FREETYPE" = x; then
58222        # If not specified, default is to bundle freetype only on windows
58223        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58224          BUNDLE_FREETYPE=yes
58225        else
58226          BUNDLE_FREETYPE=no
58227        fi
58228      fi
58229
58230      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58231      if test "x$SYSROOT" = x; then
58232        if test "x$FOUND_FREETYPE" != xyes; then
58233          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58234          if test "x$PKG_CONFIG" != x; then
58235
58236pkg_failed=no
58237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58238$as_echo_n "checking for FREETYPE... " >&6; }
58239
58240if test -n "$FREETYPE_CFLAGS"; then
58241    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58242 elif test -n "$PKG_CONFIG"; then
58243    if test -n "$PKG_CONFIG" && \
58244    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58245  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58246  ac_status=$?
58247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58248  test $ac_status = 0; }; then
58249  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58250else
58251  pkg_failed=yes
58252fi
58253 else
58254    pkg_failed=untried
58255fi
58256if test -n "$FREETYPE_LIBS"; then
58257    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58258 elif test -n "$PKG_CONFIG"; then
58259    if test -n "$PKG_CONFIG" && \
58260    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58261  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58262  ac_status=$?
58263  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58264  test $ac_status = 0; }; then
58265  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58266else
58267  pkg_failed=yes
58268fi
58269 else
58270    pkg_failed=untried
58271fi
58272
58273
58274
58275if test $pkg_failed = yes; then
58276
58277if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58278        _pkg_short_errors_supported=yes
58279else
58280        _pkg_short_errors_supported=no
58281fi
58282        if test $_pkg_short_errors_supported = yes; then
58283	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58284        else
58285	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58286        fi
58287	# Put the nasty error message in config.log where it belongs
58288	echo "$FREETYPE_PKG_ERRORS" >&5
58289
58290	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58291$as_echo "no" >&6; }
58292                FOUND_FREETYPE=no
58293elif test $pkg_failed = untried; then
58294	FOUND_FREETYPE=no
58295else
58296	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58297	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58299$as_echo "yes" >&6; }
58300	FOUND_FREETYPE=yes
58301fi
58302            if test "x$FOUND_FREETYPE" = xyes; then
58303              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58304              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58305              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58306              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58307                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58308              fi
58309              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58310              if test "x$BUNDLE_FREETYPE" = xyes; then
58311                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58312$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58313                FOUND_FREETYPE=no
58314              else
58315                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58316$as_echo_n "checking for freetype... " >&6; }
58317                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58318$as_echo "yes (using pkg-config)" >&6; }
58319              fi
58320            fi
58321          fi
58322        fi
58323      fi
58324
58325      if test "x$FOUND_FREETYPE" != xyes; then
58326        # Check in well-known locations
58327        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58328          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58329
58330  windows_path="$FREETYPE_BASE_DIR"
58331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58332    unix_path=`$CYGPATH -u "$windows_path"`
58333    FREETYPE_BASE_DIR="$unix_path"
58334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58336    FREETYPE_BASE_DIR="$unix_path"
58337  fi
58338
58339
58340  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58341  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58342  METHOD="well-known location"
58343
58344  # Let's start with an optimistic view of the world :-)
58345  FOUND_FREETYPE=yes
58346
58347  # First look for the canonical freetype main include file ft2build.h.
58348  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58349    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58350    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58351    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58352      # Fail.
58353      FOUND_FREETYPE=no
58354    fi
58355  fi
58356
58357  if test "x$FOUND_FREETYPE" = xyes; then
58358    # Include file found, let's continue the sanity check.
58359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58360$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58361
58362    # Reset to default value
58363    FREETYPE_BASE_NAME=freetype
58364    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58365    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58366      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58367          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58368        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58369        # for the .6 version explicitly.
58370        FREETYPE_BASE_NAME=freetype.6
58371        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58372        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58373$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58374      else
58375        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58376$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58377        FOUND_FREETYPE=no
58378      fi
58379    else
58380      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58381        # On Windows, we will need both .lib and .dll file.
58382        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58383          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58384$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58385          FOUND_FREETYPE=no
58386        fi
58387      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58388          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58389        # Found lib in isa dir, use that instead.
58390        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58391        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58392$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58393      fi
58394    fi
58395  fi
58396
58397  if test "x$FOUND_FREETYPE" = xyes; then
58398
58399  # Only process if variable expands to non-empty
58400
58401  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58403
58404  # Input might be given as Windows format, start by converting to
58405  # unix format.
58406  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58407  new_path=`$CYGPATH -u "$path"`
58408
58409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58412  # "foo.exe" is OK but "foo" is an error.
58413  #
58414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58415  # It is also a way to make sure we got the proper file name for the real test later on.
58416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58417  if test "x$test_shortpath" = x; then
58418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58420    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58421  fi
58422
58423  # Call helper function which possibly converts this using DOS-style short mode.
58424  # If so, the updated path is stored in $new_path.
58425
58426  input_path="$new_path"
58427  # Check if we need to convert this using DOS-style short mode. If the path
58428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58429  # take no chances and rewrite it.
58430  # Note: m4 eats our [], so we need to use [ and ] instead.
58431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58432  if test "x$has_forbidden_chars" != x; then
58433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58437      # Going to short mode and back again did indeed matter. Since short mode is
58438      # case insensitive, let's make it lowercase to improve readability.
58439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58440      # Now convert it back to Unix-style (cygpath)
58441      input_path=`$CYGPATH -u "$shortmode_path"`
58442      new_path="$input_path"
58443    fi
58444  fi
58445
58446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58447  if test "x$test_cygdrive_prefix" = x; then
58448    # As a simple fix, exclude /usr/bin since it's not a real path.
58449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58451      # a path prefixed by /cygdrive for fixpath to work.
58452      new_path="$CYGWIN_ROOT_PATH$input_path"
58453    fi
58454  fi
58455
58456
58457  if test "x$path" != "x$new_path"; then
58458    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58461  fi
58462
58463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58464
58465  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58466  has_colon=`$ECHO $path | $GREP ^.:`
58467  new_path="$path"
58468  if test "x$has_colon" = x; then
58469    # Not in mixed or Windows style, start by that.
58470    new_path=`cmd //c echo $path`
58471  fi
58472
58473
58474  input_path="$new_path"
58475  # Check if we need to convert this using DOS-style short mode. If the path
58476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58477  # take no chances and rewrite it.
58478  # Note: m4 eats our [], so we need to use [ and ] instead.
58479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58480  if test "x$has_forbidden_chars" != x; then
58481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58483  fi
58484
58485
58486  windows_path="$new_path"
58487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58488    unix_path=`$CYGPATH -u "$windows_path"`
58489    new_path="$unix_path"
58490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58492    new_path="$unix_path"
58493  fi
58494
58495  if test "x$path" != "x$new_path"; then
58496    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58499  fi
58500
58501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58503
58504    else
58505      # We're on a unix platform. Hooray! :)
58506      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58507      has_space=`$ECHO "$path" | $GREP " "`
58508      if test "x$has_space" != x; then
58509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58512      fi
58513
58514      # Use eval to expand a potential ~
58515      eval path="$path"
58516      if test ! -f "$path" && test ! -d "$path"; then
58517        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58518      fi
58519
58520      if test -d "$path"; then
58521        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58522      else
58523        dir="`$DIRNAME "$path"`"
58524        base="`$BASENAME "$path"`"
58525        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58526      fi
58527    fi
58528  fi
58529
58530
58531  # Only process if variable expands to non-empty
58532
58533  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58535
58536  # Input might be given as Windows format, start by converting to
58537  # unix format.
58538  path="$POTENTIAL_FREETYPE_LIB_PATH"
58539  new_path=`$CYGPATH -u "$path"`
58540
58541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58544  # "foo.exe" is OK but "foo" is an error.
58545  #
58546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58547  # It is also a way to make sure we got the proper file name for the real test later on.
58548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58549  if test "x$test_shortpath" = x; then
58550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58552    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58553  fi
58554
58555  # Call helper function which possibly converts this using DOS-style short mode.
58556  # If so, the updated path is stored in $new_path.
58557
58558  input_path="$new_path"
58559  # Check if we need to convert this using DOS-style short mode. If the path
58560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58561  # take no chances and rewrite it.
58562  # Note: m4 eats our [], so we need to use [ and ] instead.
58563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58564  if test "x$has_forbidden_chars" != x; then
58565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58569      # Going to short mode and back again did indeed matter. Since short mode is
58570      # case insensitive, let's make it lowercase to improve readability.
58571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58572      # Now convert it back to Unix-style (cygpath)
58573      input_path=`$CYGPATH -u "$shortmode_path"`
58574      new_path="$input_path"
58575    fi
58576  fi
58577
58578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58579  if test "x$test_cygdrive_prefix" = x; then
58580    # As a simple fix, exclude /usr/bin since it's not a real path.
58581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58583      # a path prefixed by /cygdrive for fixpath to work.
58584      new_path="$CYGWIN_ROOT_PATH$input_path"
58585    fi
58586  fi
58587
58588
58589  if test "x$path" != "x$new_path"; then
58590    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58593  fi
58594
58595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58596
58597  path="$POTENTIAL_FREETYPE_LIB_PATH"
58598  has_colon=`$ECHO $path | $GREP ^.:`
58599  new_path="$path"
58600  if test "x$has_colon" = x; then
58601    # Not in mixed or Windows style, start by that.
58602    new_path=`cmd //c echo $path`
58603  fi
58604
58605
58606  input_path="$new_path"
58607  # Check if we need to convert this using DOS-style short mode. If the path
58608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58609  # take no chances and rewrite it.
58610  # Note: m4 eats our [], so we need to use [ and ] instead.
58611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58612  if test "x$has_forbidden_chars" != x; then
58613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58615  fi
58616
58617
58618  windows_path="$new_path"
58619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58620    unix_path=`$CYGPATH -u "$windows_path"`
58621    new_path="$unix_path"
58622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58624    new_path="$unix_path"
58625  fi
58626
58627  if test "x$path" != "x$new_path"; then
58628    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58631  fi
58632
58633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58635
58636    else
58637      # We're on a unix platform. Hooray! :)
58638      path="$POTENTIAL_FREETYPE_LIB_PATH"
58639      has_space=`$ECHO "$path" | $GREP " "`
58640      if test "x$has_space" != x; then
58641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58644      fi
58645
58646      # Use eval to expand a potential ~
58647      eval path="$path"
58648      if test ! -f "$path" && test ! -d "$path"; then
58649        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58650      fi
58651
58652      if test -d "$path"; then
58653        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58654      else
58655        dir="`$DIRNAME "$path"`"
58656        base="`$BASENAME "$path"`"
58657        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58658      fi
58659    fi
58660  fi
58661
58662
58663    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58665$as_echo_n "checking for freetype includes... " >&6; }
58666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58667$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58668    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58670$as_echo_n "checking for freetype libraries... " >&6; }
58671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58672$as_echo "$FREETYPE_LIB_PATH" >&6; }
58673  fi
58674
58675          if test "x$FOUND_FREETYPE" != xyes; then
58676            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58677
58678  windows_path="$FREETYPE_BASE_DIR"
58679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58680    unix_path=`$CYGPATH -u "$windows_path"`
58681    FREETYPE_BASE_DIR="$unix_path"
58682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58684    FREETYPE_BASE_DIR="$unix_path"
58685  fi
58686
58687
58688  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58689  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58690  METHOD="well-known location"
58691
58692  # Let's start with an optimistic view of the world :-)
58693  FOUND_FREETYPE=yes
58694
58695  # First look for the canonical freetype main include file ft2build.h.
58696  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58697    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58698    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58699    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58700      # Fail.
58701      FOUND_FREETYPE=no
58702    fi
58703  fi
58704
58705  if test "x$FOUND_FREETYPE" = xyes; then
58706    # Include file found, let's continue the sanity check.
58707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58708$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58709
58710    # Reset to default value
58711    FREETYPE_BASE_NAME=freetype
58712    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58713    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58714      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58715          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58716        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58717        # for the .6 version explicitly.
58718        FREETYPE_BASE_NAME=freetype.6
58719        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58720        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58721$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58722      else
58723        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58725        FOUND_FREETYPE=no
58726      fi
58727    else
58728      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58729        # On Windows, we will need both .lib and .dll file.
58730        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58731          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58732$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58733          FOUND_FREETYPE=no
58734        fi
58735      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58736          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58737        # Found lib in isa dir, use that instead.
58738        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58739        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58740$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58741      fi
58742    fi
58743  fi
58744
58745  if test "x$FOUND_FREETYPE" = xyes; then
58746
58747  # Only process if variable expands to non-empty
58748
58749  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58751
58752  # Input might be given as Windows format, start by converting to
58753  # unix format.
58754  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58755  new_path=`$CYGPATH -u "$path"`
58756
58757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58760  # "foo.exe" is OK but "foo" is an error.
58761  #
58762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58763  # It is also a way to make sure we got the proper file name for the real test later on.
58764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58765  if test "x$test_shortpath" = x; then
58766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58768    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58769  fi
58770
58771  # Call helper function which possibly converts this using DOS-style short mode.
58772  # If so, the updated path is stored in $new_path.
58773
58774  input_path="$new_path"
58775  # Check if we need to convert this using DOS-style short mode. If the path
58776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58777  # take no chances and rewrite it.
58778  # Note: m4 eats our [], so we need to use [ and ] instead.
58779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58780  if test "x$has_forbidden_chars" != x; then
58781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58785      # Going to short mode and back again did indeed matter. Since short mode is
58786      # case insensitive, let's make it lowercase to improve readability.
58787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58788      # Now convert it back to Unix-style (cygpath)
58789      input_path=`$CYGPATH -u "$shortmode_path"`
58790      new_path="$input_path"
58791    fi
58792  fi
58793
58794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58795  if test "x$test_cygdrive_prefix" = x; then
58796    # As a simple fix, exclude /usr/bin since it's not a real path.
58797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58799      # a path prefixed by /cygdrive for fixpath to work.
58800      new_path="$CYGWIN_ROOT_PATH$input_path"
58801    fi
58802  fi
58803
58804
58805  if test "x$path" != "x$new_path"; then
58806    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58809  fi
58810
58811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58812
58813  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58814  has_colon=`$ECHO $path | $GREP ^.:`
58815  new_path="$path"
58816  if test "x$has_colon" = x; then
58817    # Not in mixed or Windows style, start by that.
58818    new_path=`cmd //c echo $path`
58819  fi
58820
58821
58822  input_path="$new_path"
58823  # Check if we need to convert this using DOS-style short mode. If the path
58824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58825  # take no chances and rewrite it.
58826  # Note: m4 eats our [], so we need to use [ and ] instead.
58827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58828  if test "x$has_forbidden_chars" != x; then
58829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58831  fi
58832
58833
58834  windows_path="$new_path"
58835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58836    unix_path=`$CYGPATH -u "$windows_path"`
58837    new_path="$unix_path"
58838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58840    new_path="$unix_path"
58841  fi
58842
58843  if test "x$path" != "x$new_path"; then
58844    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58847  fi
58848
58849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58851
58852    else
58853      # We're on a unix platform. Hooray! :)
58854      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58855      has_space=`$ECHO "$path" | $GREP " "`
58856      if test "x$has_space" != x; then
58857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58860      fi
58861
58862      # Use eval to expand a potential ~
58863      eval path="$path"
58864      if test ! -f "$path" && test ! -d "$path"; then
58865        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58866      fi
58867
58868      if test -d "$path"; then
58869        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58870      else
58871        dir="`$DIRNAME "$path"`"
58872        base="`$BASENAME "$path"`"
58873        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58874      fi
58875    fi
58876  fi
58877
58878
58879  # Only process if variable expands to non-empty
58880
58881  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58883
58884  # Input might be given as Windows format, start by converting to
58885  # unix format.
58886  path="$POTENTIAL_FREETYPE_LIB_PATH"
58887  new_path=`$CYGPATH -u "$path"`
58888
58889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58892  # "foo.exe" is OK but "foo" is an error.
58893  #
58894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58895  # It is also a way to make sure we got the proper file name for the real test later on.
58896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58897  if test "x$test_shortpath" = x; then
58898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58899$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58900    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58901  fi
58902
58903  # Call helper function which possibly converts this using DOS-style short mode.
58904  # If so, the updated path is stored in $new_path.
58905
58906  input_path="$new_path"
58907  # Check if we need to convert this using DOS-style short mode. If the path
58908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58909  # take no chances and rewrite it.
58910  # Note: m4 eats our [], so we need to use [ and ] instead.
58911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58912  if test "x$has_forbidden_chars" != x; then
58913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58917      # Going to short mode and back again did indeed matter. Since short mode is
58918      # case insensitive, let's make it lowercase to improve readability.
58919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58920      # Now convert it back to Unix-style (cygpath)
58921      input_path=`$CYGPATH -u "$shortmode_path"`
58922      new_path="$input_path"
58923    fi
58924  fi
58925
58926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58927  if test "x$test_cygdrive_prefix" = x; then
58928    # As a simple fix, exclude /usr/bin since it's not a real path.
58929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58931      # a path prefixed by /cygdrive for fixpath to work.
58932      new_path="$CYGWIN_ROOT_PATH$input_path"
58933    fi
58934  fi
58935
58936
58937  if test "x$path" != "x$new_path"; then
58938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58941  fi
58942
58943    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58944
58945  path="$POTENTIAL_FREETYPE_LIB_PATH"
58946  has_colon=`$ECHO $path | $GREP ^.:`
58947  new_path="$path"
58948  if test "x$has_colon" = x; then
58949    # Not in mixed or Windows style, start by that.
58950    new_path=`cmd //c echo $path`
58951  fi
58952
58953
58954  input_path="$new_path"
58955  # Check if we need to convert this using DOS-style short mode. If the path
58956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58957  # take no chances and rewrite it.
58958  # Note: m4 eats our [], so we need to use [ and ] instead.
58959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58960  if test "x$has_forbidden_chars" != x; then
58961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58963  fi
58964
58965
58966  windows_path="$new_path"
58967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58968    unix_path=`$CYGPATH -u "$windows_path"`
58969    new_path="$unix_path"
58970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58972    new_path="$unix_path"
58973  fi
58974
58975  if test "x$path" != "x$new_path"; then
58976    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58978$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58979  fi
58980
58981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58983
58984    else
58985      # We're on a unix platform. Hooray! :)
58986      path="$POTENTIAL_FREETYPE_LIB_PATH"
58987      has_space=`$ECHO "$path" | $GREP " "`
58988      if test "x$has_space" != x; then
58989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58991        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58992      fi
58993
58994      # Use eval to expand a potential ~
58995      eval path="$path"
58996      if test ! -f "$path" && test ! -d "$path"; then
58997        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58998      fi
58999
59000      if test -d "$path"; then
59001        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59002      else
59003        dir="`$DIRNAME "$path"`"
59004        base="`$BASENAME "$path"`"
59005        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59006      fi
59007    fi
59008  fi
59009
59010
59011    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59013$as_echo_n "checking for freetype includes... " >&6; }
59014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59015$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59016    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59018$as_echo_n "checking for freetype libraries... " >&6; }
59019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59020$as_echo "$FREETYPE_LIB_PATH" >&6; }
59021  fi
59022
59023          fi
59024          if test "x$FOUND_FREETYPE" != xyes; then
59025            FREETYPE_BASE_DIR="$HOME/freetype"
59026
59027  windows_path="$FREETYPE_BASE_DIR"
59028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59029    unix_path=`$CYGPATH -u "$windows_path"`
59030    FREETYPE_BASE_DIR="$unix_path"
59031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59033    FREETYPE_BASE_DIR="$unix_path"
59034  fi
59035
59036            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59037
59038  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59039  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59040  METHOD="well-known location"
59041
59042  # Let's start with an optimistic view of the world :-)
59043  FOUND_FREETYPE=yes
59044
59045  # First look for the canonical freetype main include file ft2build.h.
59046  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59047    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59048    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59049    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59050      # Fail.
59051      FOUND_FREETYPE=no
59052    fi
59053  fi
59054
59055  if test "x$FOUND_FREETYPE" = xyes; then
59056    # Include file found, let's continue the sanity check.
59057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59058$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59059
59060    # Reset to default value
59061    FREETYPE_BASE_NAME=freetype
59062    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59063    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59064      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59065          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59066        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59067        # for the .6 version explicitly.
59068        FREETYPE_BASE_NAME=freetype.6
59069        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59070        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59071$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59072      else
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59074$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59075        FOUND_FREETYPE=no
59076      fi
59077    else
59078      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59079        # On Windows, we will need both .lib and .dll file.
59080        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59081          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59082$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59083          FOUND_FREETYPE=no
59084        fi
59085      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59086          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59087        # Found lib in isa dir, use that instead.
59088        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59089        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59090$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59091      fi
59092    fi
59093  fi
59094
59095  if test "x$FOUND_FREETYPE" = xyes; then
59096
59097  # Only process if variable expands to non-empty
59098
59099  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59101
59102  # Input might be given as Windows format, start by converting to
59103  # unix format.
59104  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59105  new_path=`$CYGPATH -u "$path"`
59106
59107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59110  # "foo.exe" is OK but "foo" is an error.
59111  #
59112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59113  # It is also a way to make sure we got the proper file name for the real test later on.
59114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59115  if test "x$test_shortpath" = x; then
59116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59118    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59119  fi
59120
59121  # Call helper function which possibly converts this using DOS-style short mode.
59122  # If so, the updated path is stored in $new_path.
59123
59124  input_path="$new_path"
59125  # Check if we need to convert this using DOS-style short mode. If the path
59126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59127  # take no chances and rewrite it.
59128  # Note: m4 eats our [], so we need to use [ and ] instead.
59129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59130  if test "x$has_forbidden_chars" != x; then
59131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59135      # Going to short mode and back again did indeed matter. Since short mode is
59136      # case insensitive, let's make it lowercase to improve readability.
59137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59138      # Now convert it back to Unix-style (cygpath)
59139      input_path=`$CYGPATH -u "$shortmode_path"`
59140      new_path="$input_path"
59141    fi
59142  fi
59143
59144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59145  if test "x$test_cygdrive_prefix" = x; then
59146    # As a simple fix, exclude /usr/bin since it's not a real path.
59147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59149      # a path prefixed by /cygdrive for fixpath to work.
59150      new_path="$CYGWIN_ROOT_PATH$input_path"
59151    fi
59152  fi
59153
59154
59155  if test "x$path" != "x$new_path"; then
59156    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59159  fi
59160
59161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59162
59163  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59164  has_colon=`$ECHO $path | $GREP ^.:`
59165  new_path="$path"
59166  if test "x$has_colon" = x; then
59167    # Not in mixed or Windows style, start by that.
59168    new_path=`cmd //c echo $path`
59169  fi
59170
59171
59172  input_path="$new_path"
59173  # Check if we need to convert this using DOS-style short mode. If the path
59174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59175  # take no chances and rewrite it.
59176  # Note: m4 eats our [], so we need to use [ and ] instead.
59177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59178  if test "x$has_forbidden_chars" != x; then
59179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59181  fi
59182
59183
59184  windows_path="$new_path"
59185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59186    unix_path=`$CYGPATH -u "$windows_path"`
59187    new_path="$unix_path"
59188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59190    new_path="$unix_path"
59191  fi
59192
59193  if test "x$path" != "x$new_path"; then
59194    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59197  fi
59198
59199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59201
59202    else
59203      # We're on a unix platform. Hooray! :)
59204      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59205      has_space=`$ECHO "$path" | $GREP " "`
59206      if test "x$has_space" != x; then
59207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59210      fi
59211
59212      # Use eval to expand a potential ~
59213      eval path="$path"
59214      if test ! -f "$path" && test ! -d "$path"; then
59215        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59216      fi
59217
59218      if test -d "$path"; then
59219        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59220      else
59221        dir="`$DIRNAME "$path"`"
59222        base="`$BASENAME "$path"`"
59223        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59224      fi
59225    fi
59226  fi
59227
59228
59229  # Only process if variable expands to non-empty
59230
59231  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59233
59234  # Input might be given as Windows format, start by converting to
59235  # unix format.
59236  path="$POTENTIAL_FREETYPE_LIB_PATH"
59237  new_path=`$CYGPATH -u "$path"`
59238
59239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59242  # "foo.exe" is OK but "foo" is an error.
59243  #
59244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59245  # It is also a way to make sure we got the proper file name for the real test later on.
59246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59247  if test "x$test_shortpath" = x; then
59248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59250    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59251  fi
59252
59253  # Call helper function which possibly converts this using DOS-style short mode.
59254  # If so, the updated path is stored in $new_path.
59255
59256  input_path="$new_path"
59257  # Check if we need to convert this using DOS-style short mode. If the path
59258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59259  # take no chances and rewrite it.
59260  # Note: m4 eats our [], so we need to use [ and ] instead.
59261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59262  if test "x$has_forbidden_chars" != x; then
59263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59267      # Going to short mode and back again did indeed matter. Since short mode is
59268      # case insensitive, let's make it lowercase to improve readability.
59269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59270      # Now convert it back to Unix-style (cygpath)
59271      input_path=`$CYGPATH -u "$shortmode_path"`
59272      new_path="$input_path"
59273    fi
59274  fi
59275
59276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59277  if test "x$test_cygdrive_prefix" = x; then
59278    # As a simple fix, exclude /usr/bin since it's not a real path.
59279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59281      # a path prefixed by /cygdrive for fixpath to work.
59282      new_path="$CYGWIN_ROOT_PATH$input_path"
59283    fi
59284  fi
59285
59286
59287  if test "x$path" != "x$new_path"; then
59288    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59291  fi
59292
59293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59294
59295  path="$POTENTIAL_FREETYPE_LIB_PATH"
59296  has_colon=`$ECHO $path | $GREP ^.:`
59297  new_path="$path"
59298  if test "x$has_colon" = x; then
59299    # Not in mixed or Windows style, start by that.
59300    new_path=`cmd //c echo $path`
59301  fi
59302
59303
59304  input_path="$new_path"
59305  # Check if we need to convert this using DOS-style short mode. If the path
59306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59307  # take no chances and rewrite it.
59308  # Note: m4 eats our [], so we need to use [ and ] instead.
59309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59310  if test "x$has_forbidden_chars" != x; then
59311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59313  fi
59314
59315
59316  windows_path="$new_path"
59317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59318    unix_path=`$CYGPATH -u "$windows_path"`
59319    new_path="$unix_path"
59320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59322    new_path="$unix_path"
59323  fi
59324
59325  if test "x$path" != "x$new_path"; then
59326    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59329  fi
59330
59331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59333
59334    else
59335      # We're on a unix platform. Hooray! :)
59336      path="$POTENTIAL_FREETYPE_LIB_PATH"
59337      has_space=`$ECHO "$path" | $GREP " "`
59338      if test "x$has_space" != x; then
59339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59342      fi
59343
59344      # Use eval to expand a potential ~
59345      eval path="$path"
59346      if test ! -f "$path" && test ! -d "$path"; then
59347        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59348      fi
59349
59350      if test -d "$path"; then
59351        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59352      else
59353        dir="`$DIRNAME "$path"`"
59354        base="`$BASENAME "$path"`"
59355        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59356      fi
59357    fi
59358  fi
59359
59360
59361    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59363$as_echo_n "checking for freetype includes... " >&6; }
59364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59365$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59366    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59368$as_echo_n "checking for freetype libraries... " >&6; }
59369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59370$as_echo "$FREETYPE_LIB_PATH" >&6; }
59371  fi
59372
59373            else
59374
59375  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59376  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59377  METHOD="well-known location"
59378
59379  # Let's start with an optimistic view of the world :-)
59380  FOUND_FREETYPE=yes
59381
59382  # First look for the canonical freetype main include file ft2build.h.
59383  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59384    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59385    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59386    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59387      # Fail.
59388      FOUND_FREETYPE=no
59389    fi
59390  fi
59391
59392  if test "x$FOUND_FREETYPE" = xyes; then
59393    # Include file found, let's continue the sanity check.
59394    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59395$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59396
59397    # Reset to default value
59398    FREETYPE_BASE_NAME=freetype
59399    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59400    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59401      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59402          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59403        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59404        # for the .6 version explicitly.
59405        FREETYPE_BASE_NAME=freetype.6
59406        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59407        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59408$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59409      else
59410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59411$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59412        FOUND_FREETYPE=no
59413      fi
59414    else
59415      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59416        # On Windows, we will need both .lib and .dll file.
59417        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59418          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59419$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59420          FOUND_FREETYPE=no
59421        fi
59422      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59423          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59424        # Found lib in isa dir, use that instead.
59425        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59426        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59427$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59428      fi
59429    fi
59430  fi
59431
59432  if test "x$FOUND_FREETYPE" = xyes; then
59433
59434  # Only process if variable expands to non-empty
59435
59436  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59438
59439  # Input might be given as Windows format, start by converting to
59440  # unix format.
59441  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59442  new_path=`$CYGPATH -u "$path"`
59443
59444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59447  # "foo.exe" is OK but "foo" is an error.
59448  #
59449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59450  # It is also a way to make sure we got the proper file name for the real test later on.
59451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59452  if test "x$test_shortpath" = x; then
59453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59454$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59455    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59456  fi
59457
59458  # Call helper function which possibly converts this using DOS-style short mode.
59459  # If so, the updated path is stored in $new_path.
59460
59461  input_path="$new_path"
59462  # Check if we need to convert this using DOS-style short mode. If the path
59463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59464  # take no chances and rewrite it.
59465  # Note: m4 eats our [], so we need to use [ and ] instead.
59466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59467  if test "x$has_forbidden_chars" != x; then
59468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59472      # Going to short mode and back again did indeed matter. Since short mode is
59473      # case insensitive, let's make it lowercase to improve readability.
59474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59475      # Now convert it back to Unix-style (cygpath)
59476      input_path=`$CYGPATH -u "$shortmode_path"`
59477      new_path="$input_path"
59478    fi
59479  fi
59480
59481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59482  if test "x$test_cygdrive_prefix" = x; then
59483    # As a simple fix, exclude /usr/bin since it's not a real path.
59484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59486      # a path prefixed by /cygdrive for fixpath to work.
59487      new_path="$CYGWIN_ROOT_PATH$input_path"
59488    fi
59489  fi
59490
59491
59492  if test "x$path" != "x$new_path"; then
59493    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59495$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59496  fi
59497
59498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59499
59500  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59501  has_colon=`$ECHO $path | $GREP ^.:`
59502  new_path="$path"
59503  if test "x$has_colon" = x; then
59504    # Not in mixed or Windows style, start by that.
59505    new_path=`cmd //c echo $path`
59506  fi
59507
59508
59509  input_path="$new_path"
59510  # Check if we need to convert this using DOS-style short mode. If the path
59511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59512  # take no chances and rewrite it.
59513  # Note: m4 eats our [], so we need to use [ and ] instead.
59514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59515  if test "x$has_forbidden_chars" != x; then
59516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59518  fi
59519
59520
59521  windows_path="$new_path"
59522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59523    unix_path=`$CYGPATH -u "$windows_path"`
59524    new_path="$unix_path"
59525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59527    new_path="$unix_path"
59528  fi
59529
59530  if test "x$path" != "x$new_path"; then
59531    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59534  fi
59535
59536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59538
59539    else
59540      # We're on a unix platform. Hooray! :)
59541      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59542      has_space=`$ECHO "$path" | $GREP " "`
59543      if test "x$has_space" != x; then
59544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59545$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59547      fi
59548
59549      # Use eval to expand a potential ~
59550      eval path="$path"
59551      if test ! -f "$path" && test ! -d "$path"; then
59552        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59553      fi
59554
59555      if test -d "$path"; then
59556        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59557      else
59558        dir="`$DIRNAME "$path"`"
59559        base="`$BASENAME "$path"`"
59560        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59561      fi
59562    fi
59563  fi
59564
59565
59566  # Only process if variable expands to non-empty
59567
59568  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59570
59571  # Input might be given as Windows format, start by converting to
59572  # unix format.
59573  path="$POTENTIAL_FREETYPE_LIB_PATH"
59574  new_path=`$CYGPATH -u "$path"`
59575
59576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59579  # "foo.exe" is OK but "foo" is an error.
59580  #
59581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59582  # It is also a way to make sure we got the proper file name for the real test later on.
59583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59584  if test "x$test_shortpath" = x; then
59585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59587    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59588  fi
59589
59590  # Call helper function which possibly converts this using DOS-style short mode.
59591  # If so, the updated path is stored in $new_path.
59592
59593  input_path="$new_path"
59594  # Check if we need to convert this using DOS-style short mode. If the path
59595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59596  # take no chances and rewrite it.
59597  # Note: m4 eats our [], so we need to use [ and ] instead.
59598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59599  if test "x$has_forbidden_chars" != x; then
59600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59604      # Going to short mode and back again did indeed matter. Since short mode is
59605      # case insensitive, let's make it lowercase to improve readability.
59606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59607      # Now convert it back to Unix-style (cygpath)
59608      input_path=`$CYGPATH -u "$shortmode_path"`
59609      new_path="$input_path"
59610    fi
59611  fi
59612
59613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59614  if test "x$test_cygdrive_prefix" = x; then
59615    # As a simple fix, exclude /usr/bin since it's not a real path.
59616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59618      # a path prefixed by /cygdrive for fixpath to work.
59619      new_path="$CYGWIN_ROOT_PATH$input_path"
59620    fi
59621  fi
59622
59623
59624  if test "x$path" != "x$new_path"; then
59625    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59628  fi
59629
59630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59631
59632  path="$POTENTIAL_FREETYPE_LIB_PATH"
59633  has_colon=`$ECHO $path | $GREP ^.:`
59634  new_path="$path"
59635  if test "x$has_colon" = x; then
59636    # Not in mixed or Windows style, start by that.
59637    new_path=`cmd //c echo $path`
59638  fi
59639
59640
59641  input_path="$new_path"
59642  # Check if we need to convert this using DOS-style short mode. If the path
59643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59644  # take no chances and rewrite it.
59645  # Note: m4 eats our [], so we need to use [ and ] instead.
59646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59647  if test "x$has_forbidden_chars" != x; then
59648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59650  fi
59651
59652
59653  windows_path="$new_path"
59654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59655    unix_path=`$CYGPATH -u "$windows_path"`
59656    new_path="$unix_path"
59657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59659    new_path="$unix_path"
59660  fi
59661
59662  if test "x$path" != "x$new_path"; then
59663    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59666  fi
59667
59668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59670
59671    else
59672      # We're on a unix platform. Hooray! :)
59673      path="$POTENTIAL_FREETYPE_LIB_PATH"
59674      has_space=`$ECHO "$path" | $GREP " "`
59675      if test "x$has_space" != x; then
59676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59679      fi
59680
59681      # Use eval to expand a potential ~
59682      eval path="$path"
59683      if test ! -f "$path" && test ! -d "$path"; then
59684        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59685      fi
59686
59687      if test -d "$path"; then
59688        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59689      else
59690        dir="`$DIRNAME "$path"`"
59691        base="`$BASENAME "$path"`"
59692        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59693      fi
59694    fi
59695  fi
59696
59697
59698    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59700$as_echo_n "checking for freetype includes... " >&6; }
59701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59702$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59703    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59705$as_echo_n "checking for freetype libraries... " >&6; }
59706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59707$as_echo "$FREETYPE_LIB_PATH" >&6; }
59708  fi
59709
59710            fi
59711            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59712                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59713              # Source is available, as a last resort try to build freetype in default location
59714
59715  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59716  BUILD_FREETYPE=yes
59717
59718  # Check if the freetype sources are acessible..
59719  if ! test -d $FREETYPE_SRC_PATH; then
59720    { $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
59721$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59722    BUILD_FREETYPE=no
59723  fi
59724  # ..and contain a vc2010 project file
59725  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59726  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59727    { $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
59728$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59729    BUILD_FREETYPE=no
59730  fi
59731  # Now check if configure found a version of 'msbuild.exe'
59732  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59733    { $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
59734$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;}
59735    BUILD_FREETYPE=no
59736  fi
59737
59738  # Ready to go..
59739  if test "x$BUILD_FREETYPE" = xyes; then
59740    # msbuild requires trailing slashes for output directories
59741    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59742    freetype_lib_path_unix="$freetype_lib_path"
59743    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59744
59745  unix_path="$vcxproj_path"
59746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59747    windows_path=`$CYGPATH -m "$unix_path"`
59748    vcxproj_path="$windows_path"
59749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59750    windows_path=`cmd //c echo $unix_path`
59751    vcxproj_path="$windows_path"
59752  fi
59753
59754
59755  unix_path="$freetype_lib_path"
59756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59757    windows_path=`$CYGPATH -m "$unix_path"`
59758    freetype_lib_path="$windows_path"
59759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59760    windows_path=`cmd //c echo $unix_path`
59761    freetype_lib_path="$windows_path"
59762  fi
59763
59764
59765  unix_path="$freetype_obj_path"
59766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59767    windows_path=`$CYGPATH -m "$unix_path"`
59768    freetype_obj_path="$windows_path"
59769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59770    windows_path=`cmd //c echo $unix_path`
59771    freetype_obj_path="$windows_path"
59772  fi
59773
59774    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59775      freetype_platform=x64
59776    else
59777      freetype_platform=win32
59778    fi
59779
59780    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59781    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59782    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59783    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59785$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59786
59787    # First we try to build the freetype.dll
59788    $ECHO -e "@echo off\n"\
59789        "$MSBUILD $vcxproj_path "\
59790        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59791        "/p:Configuration=\"Release Multithreaded\" "\
59792        "/p:Platform=$freetype_platform "\
59793        "/p:ConfigurationType=DynamicLibrary "\
59794        "/p:TargetName=freetype "\
59795        "/p:OutDir=\"$freetype_lib_path\" "\
59796        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59797    cmd /c freetype.bat
59798
59799    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59800      # If that succeeds we also build freetype.lib
59801      $ECHO -e "@echo off\n"\
59802          "$MSBUILD $vcxproj_path "\
59803          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59804          "/p:Configuration=\"Release Multithreaded\" "\
59805          "/p:Platform=$freetype_platform "\
59806          "/p:ConfigurationType=StaticLibrary "\
59807          "/p:TargetName=freetype "\
59808          "/p:OutDir=\"$freetype_lib_path\" "\
59809          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59810      cmd /c freetype.bat
59811
59812      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59813        # Once we build both, lib and dll, set freetype lib and include path appropriately
59814        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59815        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59817$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59818      else
59819        BUILD_FREETYPE=no
59820      fi
59821    else
59822      BUILD_FREETYPE=no
59823    fi
59824  fi
59825
59826              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59827
59828  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59829  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59830  METHOD="well-known location"
59831
59832  # Let's start with an optimistic view of the world :-)
59833  FOUND_FREETYPE=yes
59834
59835  # First look for the canonical freetype main include file ft2build.h.
59836  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59837    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59838    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59839    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59840      # Fail.
59841      FOUND_FREETYPE=no
59842    fi
59843  fi
59844
59845  if test "x$FOUND_FREETYPE" = xyes; then
59846    # Include file found, let's continue the sanity check.
59847    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59848$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59849
59850    # Reset to default value
59851    FREETYPE_BASE_NAME=freetype
59852    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59853    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59854      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59855          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59856        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59857        # for the .6 version explicitly.
59858        FREETYPE_BASE_NAME=freetype.6
59859        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59860        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59861$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59862      else
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59864$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59865        FOUND_FREETYPE=no
59866      fi
59867    else
59868      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59869        # On Windows, we will need both .lib and .dll file.
59870        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59871          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59872$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59873          FOUND_FREETYPE=no
59874        fi
59875      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59876          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59877        # Found lib in isa dir, use that instead.
59878        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59879        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59880$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59881      fi
59882    fi
59883  fi
59884
59885  if test "x$FOUND_FREETYPE" = xyes; then
59886
59887  # Only process if variable expands to non-empty
59888
59889  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59891
59892  # Input might be given as Windows format, start by converting to
59893  # unix format.
59894  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59895  new_path=`$CYGPATH -u "$path"`
59896
59897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59900  # "foo.exe" is OK but "foo" is an error.
59901  #
59902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59903  # It is also a way to make sure we got the proper file name for the real test later on.
59904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59905  if test "x$test_shortpath" = x; then
59906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59907$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59908    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59909  fi
59910
59911  # Call helper function which possibly converts this using DOS-style short mode.
59912  # If so, the updated path is stored in $new_path.
59913
59914  input_path="$new_path"
59915  # Check if we need to convert this using DOS-style short mode. If the path
59916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59917  # take no chances and rewrite it.
59918  # Note: m4 eats our [], so we need to use [ and ] instead.
59919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59920  if test "x$has_forbidden_chars" != x; then
59921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59925      # Going to short mode and back again did indeed matter. Since short mode is
59926      # case insensitive, let's make it lowercase to improve readability.
59927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59928      # Now convert it back to Unix-style (cygpath)
59929      input_path=`$CYGPATH -u "$shortmode_path"`
59930      new_path="$input_path"
59931    fi
59932  fi
59933
59934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59935  if test "x$test_cygdrive_prefix" = x; then
59936    # As a simple fix, exclude /usr/bin since it's not a real path.
59937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59939      # a path prefixed by /cygdrive for fixpath to work.
59940      new_path="$CYGWIN_ROOT_PATH$input_path"
59941    fi
59942  fi
59943
59944
59945  if test "x$path" != "x$new_path"; then
59946    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59948$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59949  fi
59950
59951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59952
59953  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59954  has_colon=`$ECHO $path | $GREP ^.:`
59955  new_path="$path"
59956  if test "x$has_colon" = x; then
59957    # Not in mixed or Windows style, start by that.
59958    new_path=`cmd //c echo $path`
59959  fi
59960
59961
59962  input_path="$new_path"
59963  # Check if we need to convert this using DOS-style short mode. If the path
59964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59965  # take no chances and rewrite it.
59966  # Note: m4 eats our [], so we need to use [ and ] instead.
59967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59968  if test "x$has_forbidden_chars" != x; then
59969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59971  fi
59972
59973
59974  windows_path="$new_path"
59975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59976    unix_path=`$CYGPATH -u "$windows_path"`
59977    new_path="$unix_path"
59978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59980    new_path="$unix_path"
59981  fi
59982
59983  if test "x$path" != "x$new_path"; then
59984    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59986$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59987  fi
59988
59989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59991
59992    else
59993      # We're on a unix platform. Hooray! :)
59994      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59995      has_space=`$ECHO "$path" | $GREP " "`
59996      if test "x$has_space" != x; then
59997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59998$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60000      fi
60001
60002      # Use eval to expand a potential ~
60003      eval path="$path"
60004      if test ! -f "$path" && test ! -d "$path"; then
60005        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60006      fi
60007
60008      if test -d "$path"; then
60009        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60010      else
60011        dir="`$DIRNAME "$path"`"
60012        base="`$BASENAME "$path"`"
60013        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60014      fi
60015    fi
60016  fi
60017
60018
60019  # Only process if variable expands to non-empty
60020
60021  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60023
60024  # Input might be given as Windows format, start by converting to
60025  # unix format.
60026  path="$POTENTIAL_FREETYPE_LIB_PATH"
60027  new_path=`$CYGPATH -u "$path"`
60028
60029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60032  # "foo.exe" is OK but "foo" is an error.
60033  #
60034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60035  # It is also a way to make sure we got the proper file name for the real test later on.
60036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60037  if test "x$test_shortpath" = x; then
60038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60039$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60040    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60041  fi
60042
60043  # Call helper function which possibly converts this using DOS-style short mode.
60044  # If so, the updated path is stored in $new_path.
60045
60046  input_path="$new_path"
60047  # Check if we need to convert this using DOS-style short mode. If the path
60048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60049  # take no chances and rewrite it.
60050  # Note: m4 eats our [], so we need to use [ and ] instead.
60051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60052  if test "x$has_forbidden_chars" != x; then
60053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60057      # Going to short mode and back again did indeed matter. Since short mode is
60058      # case insensitive, let's make it lowercase to improve readability.
60059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60060      # Now convert it back to Unix-style (cygpath)
60061      input_path=`$CYGPATH -u "$shortmode_path"`
60062      new_path="$input_path"
60063    fi
60064  fi
60065
60066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60067  if test "x$test_cygdrive_prefix" = x; then
60068    # As a simple fix, exclude /usr/bin since it's not a real path.
60069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60071      # a path prefixed by /cygdrive for fixpath to work.
60072      new_path="$CYGWIN_ROOT_PATH$input_path"
60073    fi
60074  fi
60075
60076
60077  if test "x$path" != "x$new_path"; then
60078    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60080$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60081  fi
60082
60083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60084
60085  path="$POTENTIAL_FREETYPE_LIB_PATH"
60086  has_colon=`$ECHO $path | $GREP ^.:`
60087  new_path="$path"
60088  if test "x$has_colon" = x; then
60089    # Not in mixed or Windows style, start by that.
60090    new_path=`cmd //c echo $path`
60091  fi
60092
60093
60094  input_path="$new_path"
60095  # Check if we need to convert this using DOS-style short mode. If the path
60096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60097  # take no chances and rewrite it.
60098  # Note: m4 eats our [], so we need to use [ and ] instead.
60099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60100  if test "x$has_forbidden_chars" != x; then
60101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60103  fi
60104
60105
60106  windows_path="$new_path"
60107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60108    unix_path=`$CYGPATH -u "$windows_path"`
60109    new_path="$unix_path"
60110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60112    new_path="$unix_path"
60113  fi
60114
60115  if test "x$path" != "x$new_path"; then
60116    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60118$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60119  fi
60120
60121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60123
60124    else
60125      # We're on a unix platform. Hooray! :)
60126      path="$POTENTIAL_FREETYPE_LIB_PATH"
60127      has_space=`$ECHO "$path" | $GREP " "`
60128      if test "x$has_space" != x; then
60129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60132      fi
60133
60134      # Use eval to expand a potential ~
60135      eval path="$path"
60136      if test ! -f "$path" && test ! -d "$path"; then
60137        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60138      fi
60139
60140      if test -d "$path"; then
60141        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60142      else
60143        dir="`$DIRNAME "$path"`"
60144        base="`$BASENAME "$path"`"
60145        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60146      fi
60147    fi
60148  fi
60149
60150
60151    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60152    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60153$as_echo_n "checking for freetype includes... " >&6; }
60154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60155$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60156    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60158$as_echo_n "checking for freetype libraries... " >&6; }
60159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60160$as_echo "$FREETYPE_LIB_PATH" >&6; }
60161  fi
60162
60163              else
60164
60165  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60166  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60167  METHOD="well-known location"
60168
60169  # Let's start with an optimistic view of the world :-)
60170  FOUND_FREETYPE=yes
60171
60172  # First look for the canonical freetype main include file ft2build.h.
60173  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60174    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60175    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60176    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60177      # Fail.
60178      FOUND_FREETYPE=no
60179    fi
60180  fi
60181
60182  if test "x$FOUND_FREETYPE" = xyes; then
60183    # Include file found, let's continue the sanity check.
60184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60185$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60186
60187    # Reset to default value
60188    FREETYPE_BASE_NAME=freetype
60189    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60190    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60191      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60192          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60193        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60194        # for the .6 version explicitly.
60195        FREETYPE_BASE_NAME=freetype.6
60196        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60197        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60198$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60199      else
60200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60201$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60202        FOUND_FREETYPE=no
60203      fi
60204    else
60205      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60206        # On Windows, we will need both .lib and .dll file.
60207        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60208          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60209$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60210          FOUND_FREETYPE=no
60211        fi
60212      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60213          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60214        # Found lib in isa dir, use that instead.
60215        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60216        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60217$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60218      fi
60219    fi
60220  fi
60221
60222  if test "x$FOUND_FREETYPE" = xyes; then
60223
60224  # Only process if variable expands to non-empty
60225
60226  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60228
60229  # Input might be given as Windows format, start by converting to
60230  # unix format.
60231  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60232  new_path=`$CYGPATH -u "$path"`
60233
60234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60237  # "foo.exe" is OK but "foo" is an error.
60238  #
60239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60240  # It is also a way to make sure we got the proper file name for the real test later on.
60241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60242  if test "x$test_shortpath" = x; then
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60245    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60246  fi
60247
60248  # Call helper function which possibly converts this using DOS-style short mode.
60249  # If so, the updated path is stored in $new_path.
60250
60251  input_path="$new_path"
60252  # Check if we need to convert this using DOS-style short mode. If the path
60253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60254  # take no chances and rewrite it.
60255  # Note: m4 eats our [], so we need to use [ and ] instead.
60256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60257  if test "x$has_forbidden_chars" != x; then
60258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60262      # Going to short mode and back again did indeed matter. Since short mode is
60263      # case insensitive, let's make it lowercase to improve readability.
60264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60265      # Now convert it back to Unix-style (cygpath)
60266      input_path=`$CYGPATH -u "$shortmode_path"`
60267      new_path="$input_path"
60268    fi
60269  fi
60270
60271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60272  if test "x$test_cygdrive_prefix" = x; then
60273    # As a simple fix, exclude /usr/bin since it's not a real path.
60274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60276      # a path prefixed by /cygdrive for fixpath to work.
60277      new_path="$CYGWIN_ROOT_PATH$input_path"
60278    fi
60279  fi
60280
60281
60282  if test "x$path" != "x$new_path"; then
60283    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60286  fi
60287
60288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60289
60290  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60291  has_colon=`$ECHO $path | $GREP ^.:`
60292  new_path="$path"
60293  if test "x$has_colon" = x; then
60294    # Not in mixed or Windows style, start by that.
60295    new_path=`cmd //c echo $path`
60296  fi
60297
60298
60299  input_path="$new_path"
60300  # Check if we need to convert this using DOS-style short mode. If the path
60301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60302  # take no chances and rewrite it.
60303  # Note: m4 eats our [], so we need to use [ and ] instead.
60304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60305  if test "x$has_forbidden_chars" != x; then
60306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60308  fi
60309
60310
60311  windows_path="$new_path"
60312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60313    unix_path=`$CYGPATH -u "$windows_path"`
60314    new_path="$unix_path"
60315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60317    new_path="$unix_path"
60318  fi
60319
60320  if test "x$path" != "x$new_path"; then
60321    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60324  fi
60325
60326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60328
60329    else
60330      # We're on a unix platform. Hooray! :)
60331      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60332      has_space=`$ECHO "$path" | $GREP " "`
60333      if test "x$has_space" != x; then
60334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60337      fi
60338
60339      # Use eval to expand a potential ~
60340      eval path="$path"
60341      if test ! -f "$path" && test ! -d "$path"; then
60342        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60343      fi
60344
60345      if test -d "$path"; then
60346        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60347      else
60348        dir="`$DIRNAME "$path"`"
60349        base="`$BASENAME "$path"`"
60350        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60351      fi
60352    fi
60353  fi
60354
60355
60356  # Only process if variable expands to non-empty
60357
60358  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60360
60361  # Input might be given as Windows format, start by converting to
60362  # unix format.
60363  path="$POTENTIAL_FREETYPE_LIB_PATH"
60364  new_path=`$CYGPATH -u "$path"`
60365
60366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60369  # "foo.exe" is OK but "foo" is an error.
60370  #
60371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60372  # It is also a way to make sure we got the proper file name for the real test later on.
60373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60374  if test "x$test_shortpath" = x; then
60375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60378  fi
60379
60380  # Call helper function which possibly converts this using DOS-style short mode.
60381  # If so, the updated path is stored in $new_path.
60382
60383  input_path="$new_path"
60384  # Check if we need to convert this using DOS-style short mode. If the path
60385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60386  # take no chances and rewrite it.
60387  # Note: m4 eats our [], so we need to use [ and ] instead.
60388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60389  if test "x$has_forbidden_chars" != x; then
60390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60394      # Going to short mode and back again did indeed matter. Since short mode is
60395      # case insensitive, let's make it lowercase to improve readability.
60396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60397      # Now convert it back to Unix-style (cygpath)
60398      input_path=`$CYGPATH -u "$shortmode_path"`
60399      new_path="$input_path"
60400    fi
60401  fi
60402
60403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60404  if test "x$test_cygdrive_prefix" = x; then
60405    # As a simple fix, exclude /usr/bin since it's not a real path.
60406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60408      # a path prefixed by /cygdrive for fixpath to work.
60409      new_path="$CYGWIN_ROOT_PATH$input_path"
60410    fi
60411  fi
60412
60413
60414  if test "x$path" != "x$new_path"; then
60415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60418  fi
60419
60420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60421
60422  path="$POTENTIAL_FREETYPE_LIB_PATH"
60423  has_colon=`$ECHO $path | $GREP ^.:`
60424  new_path="$path"
60425  if test "x$has_colon" = x; then
60426    # Not in mixed or Windows style, start by that.
60427    new_path=`cmd //c echo $path`
60428  fi
60429
60430
60431  input_path="$new_path"
60432  # Check if we need to convert this using DOS-style short mode. If the path
60433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60434  # take no chances and rewrite it.
60435  # Note: m4 eats our [], so we need to use [ and ] instead.
60436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60437  if test "x$has_forbidden_chars" != x; then
60438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60440  fi
60441
60442
60443  windows_path="$new_path"
60444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60445    unix_path=`$CYGPATH -u "$windows_path"`
60446    new_path="$unix_path"
60447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60449    new_path="$unix_path"
60450  fi
60451
60452  if test "x$path" != "x$new_path"; then
60453    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60456  fi
60457
60458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60460
60461    else
60462      # We're on a unix platform. Hooray! :)
60463      path="$POTENTIAL_FREETYPE_LIB_PATH"
60464      has_space=`$ECHO "$path" | $GREP " "`
60465      if test "x$has_space" != x; then
60466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60469      fi
60470
60471      # Use eval to expand a potential ~
60472      eval path="$path"
60473      if test ! -f "$path" && test ! -d "$path"; then
60474        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60475      fi
60476
60477      if test -d "$path"; then
60478        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60479      else
60480        dir="`$DIRNAME "$path"`"
60481        base="`$BASENAME "$path"`"
60482        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60483      fi
60484    fi
60485  fi
60486
60487
60488    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60490$as_echo_n "checking for freetype includes... " >&6; }
60491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60492$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60493    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60495$as_echo_n "checking for freetype libraries... " >&6; }
60496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60497$as_echo "$FREETYPE_LIB_PATH" >&6; }
60498  fi
60499
60500              fi
60501            fi
60502          fi
60503        else
60504          FREETYPE_BASE_DIR="$SYSROOT/usr"
60505
60506  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60507  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60508  METHOD="well-known location"
60509
60510  # Let's start with an optimistic view of the world :-)
60511  FOUND_FREETYPE=yes
60512
60513  # First look for the canonical freetype main include file ft2build.h.
60514  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60515    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60516    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60517    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60518      # Fail.
60519      FOUND_FREETYPE=no
60520    fi
60521  fi
60522
60523  if test "x$FOUND_FREETYPE" = xyes; then
60524    # Include file found, let's continue the sanity check.
60525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60526$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60527
60528    # Reset to default value
60529    FREETYPE_BASE_NAME=freetype
60530    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60531    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60532      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60533          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60534        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60535        # for the .6 version explicitly.
60536        FREETYPE_BASE_NAME=freetype.6
60537        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60538        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60539$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60540      else
60541        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60542$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60543        FOUND_FREETYPE=no
60544      fi
60545    else
60546      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60547        # On Windows, we will need both .lib and .dll file.
60548        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60549          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60550$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60551          FOUND_FREETYPE=no
60552        fi
60553      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60554          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60555        # Found lib in isa dir, use that instead.
60556        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60557        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60558$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60559      fi
60560    fi
60561  fi
60562
60563  if test "x$FOUND_FREETYPE" = xyes; then
60564
60565  # Only process if variable expands to non-empty
60566
60567  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60569
60570  # Input might be given as Windows format, start by converting to
60571  # unix format.
60572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60573  new_path=`$CYGPATH -u "$path"`
60574
60575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60578  # "foo.exe" is OK but "foo" is an error.
60579  #
60580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60581  # It is also a way to make sure we got the proper file name for the real test later on.
60582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60583  if test "x$test_shortpath" = x; then
60584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60586    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60587  fi
60588
60589  # Call helper function which possibly converts this using DOS-style short mode.
60590  # If so, the updated path is stored in $new_path.
60591
60592  input_path="$new_path"
60593  # Check if we need to convert this using DOS-style short mode. If the path
60594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60595  # take no chances and rewrite it.
60596  # Note: m4 eats our [], so we need to use [ and ] instead.
60597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60598  if test "x$has_forbidden_chars" != x; then
60599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60603      # Going to short mode and back again did indeed matter. Since short mode is
60604      # case insensitive, let's make it lowercase to improve readability.
60605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60606      # Now convert it back to Unix-style (cygpath)
60607      input_path=`$CYGPATH -u "$shortmode_path"`
60608      new_path="$input_path"
60609    fi
60610  fi
60611
60612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60613  if test "x$test_cygdrive_prefix" = x; then
60614    # As a simple fix, exclude /usr/bin since it's not a real path.
60615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60617      # a path prefixed by /cygdrive for fixpath to work.
60618      new_path="$CYGWIN_ROOT_PATH$input_path"
60619    fi
60620  fi
60621
60622
60623  if test "x$path" != "x$new_path"; then
60624    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60626$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60627  fi
60628
60629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60630
60631  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60632  has_colon=`$ECHO $path | $GREP ^.:`
60633  new_path="$path"
60634  if test "x$has_colon" = x; then
60635    # Not in mixed or Windows style, start by that.
60636    new_path=`cmd //c echo $path`
60637  fi
60638
60639
60640  input_path="$new_path"
60641  # Check if we need to convert this using DOS-style short mode. If the path
60642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60643  # take no chances and rewrite it.
60644  # Note: m4 eats our [], so we need to use [ and ] instead.
60645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60646  if test "x$has_forbidden_chars" != x; then
60647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60649  fi
60650
60651
60652  windows_path="$new_path"
60653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60654    unix_path=`$CYGPATH -u "$windows_path"`
60655    new_path="$unix_path"
60656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60658    new_path="$unix_path"
60659  fi
60660
60661  if test "x$path" != "x$new_path"; then
60662    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60665  fi
60666
60667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60669
60670    else
60671      # We're on a unix platform. Hooray! :)
60672      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60673      has_space=`$ECHO "$path" | $GREP " "`
60674      if test "x$has_space" != x; then
60675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60678      fi
60679
60680      # Use eval to expand a potential ~
60681      eval path="$path"
60682      if test ! -f "$path" && test ! -d "$path"; then
60683        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60684      fi
60685
60686      if test -d "$path"; then
60687        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60688      else
60689        dir="`$DIRNAME "$path"`"
60690        base="`$BASENAME "$path"`"
60691        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60692      fi
60693    fi
60694  fi
60695
60696
60697  # Only process if variable expands to non-empty
60698
60699  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60701
60702  # Input might be given as Windows format, start by converting to
60703  # unix format.
60704  path="$POTENTIAL_FREETYPE_LIB_PATH"
60705  new_path=`$CYGPATH -u "$path"`
60706
60707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60710  # "foo.exe" is OK but "foo" is an error.
60711  #
60712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60713  # It is also a way to make sure we got the proper file name for the real test later on.
60714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60715  if test "x$test_shortpath" = x; then
60716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60718    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60719  fi
60720
60721  # Call helper function which possibly converts this using DOS-style short mode.
60722  # If so, the updated path is stored in $new_path.
60723
60724  input_path="$new_path"
60725  # Check if we need to convert this using DOS-style short mode. If the path
60726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60727  # take no chances and rewrite it.
60728  # Note: m4 eats our [], so we need to use [ and ] instead.
60729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60730  if test "x$has_forbidden_chars" != x; then
60731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60735      # Going to short mode and back again did indeed matter. Since short mode is
60736      # case insensitive, let's make it lowercase to improve readability.
60737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60738      # Now convert it back to Unix-style (cygpath)
60739      input_path=`$CYGPATH -u "$shortmode_path"`
60740      new_path="$input_path"
60741    fi
60742  fi
60743
60744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60745  if test "x$test_cygdrive_prefix" = x; then
60746    # As a simple fix, exclude /usr/bin since it's not a real path.
60747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60749      # a path prefixed by /cygdrive for fixpath to work.
60750      new_path="$CYGWIN_ROOT_PATH$input_path"
60751    fi
60752  fi
60753
60754
60755  if test "x$path" != "x$new_path"; then
60756    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60759  fi
60760
60761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60762
60763  path="$POTENTIAL_FREETYPE_LIB_PATH"
60764  has_colon=`$ECHO $path | $GREP ^.:`
60765  new_path="$path"
60766  if test "x$has_colon" = x; then
60767    # Not in mixed or Windows style, start by that.
60768    new_path=`cmd //c echo $path`
60769  fi
60770
60771
60772  input_path="$new_path"
60773  # Check if we need to convert this using DOS-style short mode. If the path
60774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60775  # take no chances and rewrite it.
60776  # Note: m4 eats our [], so we need to use [ and ] instead.
60777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60778  if test "x$has_forbidden_chars" != x; then
60779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60781  fi
60782
60783
60784  windows_path="$new_path"
60785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60786    unix_path=`$CYGPATH -u "$windows_path"`
60787    new_path="$unix_path"
60788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60790    new_path="$unix_path"
60791  fi
60792
60793  if test "x$path" != "x$new_path"; then
60794    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60797  fi
60798
60799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60801
60802    else
60803      # We're on a unix platform. Hooray! :)
60804      path="$POTENTIAL_FREETYPE_LIB_PATH"
60805      has_space=`$ECHO "$path" | $GREP " "`
60806      if test "x$has_space" != x; then
60807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60810      fi
60811
60812      # Use eval to expand a potential ~
60813      eval path="$path"
60814      if test ! -f "$path" && test ! -d "$path"; then
60815        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60816      fi
60817
60818      if test -d "$path"; then
60819        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60820      else
60821        dir="`$DIRNAME "$path"`"
60822        base="`$BASENAME "$path"`"
60823        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60824      fi
60825    fi
60826  fi
60827
60828
60829    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60831$as_echo_n "checking for freetype includes... " >&6; }
60832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60833$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60834    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60836$as_echo_n "checking for freetype libraries... " >&6; }
60837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60838$as_echo "$FREETYPE_LIB_PATH" >&6; }
60839  fi
60840
60841
60842          if test "x$FOUND_FREETYPE" != xyes; then
60843            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60844
60845  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60846  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60847  METHOD="well-known location"
60848
60849  # Let's start with an optimistic view of the world :-)
60850  FOUND_FREETYPE=yes
60851
60852  # First look for the canonical freetype main include file ft2build.h.
60853  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60854    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60855    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60856    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60857      # Fail.
60858      FOUND_FREETYPE=no
60859    fi
60860  fi
60861
60862  if test "x$FOUND_FREETYPE" = xyes; then
60863    # Include file found, let's continue the sanity check.
60864    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60865$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60866
60867    # Reset to default value
60868    FREETYPE_BASE_NAME=freetype
60869    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60870    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60871      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60872          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60873        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60874        # for the .6 version explicitly.
60875        FREETYPE_BASE_NAME=freetype.6
60876        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60877        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60878$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60879      else
60880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60881$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60882        FOUND_FREETYPE=no
60883      fi
60884    else
60885      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60886        # On Windows, we will need both .lib and .dll file.
60887        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60888          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60889$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60890          FOUND_FREETYPE=no
60891        fi
60892      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60893          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60894        # Found lib in isa dir, use that instead.
60895        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60896        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60897$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60898      fi
60899    fi
60900  fi
60901
60902  if test "x$FOUND_FREETYPE" = xyes; then
60903
60904  # Only process if variable expands to non-empty
60905
60906  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60908
60909  # Input might be given as Windows format, start by converting to
60910  # unix format.
60911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60912  new_path=`$CYGPATH -u "$path"`
60913
60914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60917  # "foo.exe" is OK but "foo" is an error.
60918  #
60919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60920  # It is also a way to make sure we got the proper file name for the real test later on.
60921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60922  if test "x$test_shortpath" = x; then
60923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60924$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60925    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60926  fi
60927
60928  # Call helper function which possibly converts this using DOS-style short mode.
60929  # If so, the updated path is stored in $new_path.
60930
60931  input_path="$new_path"
60932  # Check if we need to convert this using DOS-style short mode. If the path
60933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60934  # take no chances and rewrite it.
60935  # Note: m4 eats our [], so we need to use [ and ] instead.
60936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60937  if test "x$has_forbidden_chars" != x; then
60938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60942      # Going to short mode and back again did indeed matter. Since short mode is
60943      # case insensitive, let's make it lowercase to improve readability.
60944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60945      # Now convert it back to Unix-style (cygpath)
60946      input_path=`$CYGPATH -u "$shortmode_path"`
60947      new_path="$input_path"
60948    fi
60949  fi
60950
60951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60952  if test "x$test_cygdrive_prefix" = x; then
60953    # As a simple fix, exclude /usr/bin since it's not a real path.
60954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60956      # a path prefixed by /cygdrive for fixpath to work.
60957      new_path="$CYGWIN_ROOT_PATH$input_path"
60958    fi
60959  fi
60960
60961
60962  if test "x$path" != "x$new_path"; then
60963    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60966  fi
60967
60968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60969
60970  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60971  has_colon=`$ECHO $path | $GREP ^.:`
60972  new_path="$path"
60973  if test "x$has_colon" = x; then
60974    # Not in mixed or Windows style, start by that.
60975    new_path=`cmd //c echo $path`
60976  fi
60977
60978
60979  input_path="$new_path"
60980  # Check if we need to convert this using DOS-style short mode. If the path
60981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60982  # take no chances and rewrite it.
60983  # Note: m4 eats our [], so we need to use [ and ] instead.
60984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60985  if test "x$has_forbidden_chars" != x; then
60986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60988  fi
60989
60990
60991  windows_path="$new_path"
60992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60993    unix_path=`$CYGPATH -u "$windows_path"`
60994    new_path="$unix_path"
60995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60997    new_path="$unix_path"
60998  fi
60999
61000  if test "x$path" != "x$new_path"; then
61001    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61003$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61004  fi
61005
61006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61008
61009    else
61010      # We're on a unix platform. Hooray! :)
61011      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61012      has_space=`$ECHO "$path" | $GREP " "`
61013      if test "x$has_space" != x; then
61014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61015$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61017      fi
61018
61019      # Use eval to expand a potential ~
61020      eval path="$path"
61021      if test ! -f "$path" && test ! -d "$path"; then
61022        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61023      fi
61024
61025      if test -d "$path"; then
61026        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61027      else
61028        dir="`$DIRNAME "$path"`"
61029        base="`$BASENAME "$path"`"
61030        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61031      fi
61032    fi
61033  fi
61034
61035
61036  # Only process if variable expands to non-empty
61037
61038  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61040
61041  # Input might be given as Windows format, start by converting to
61042  # unix format.
61043  path="$POTENTIAL_FREETYPE_LIB_PATH"
61044  new_path=`$CYGPATH -u "$path"`
61045
61046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61049  # "foo.exe" is OK but "foo" is an error.
61050  #
61051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61052  # It is also a way to make sure we got the proper file name for the real test later on.
61053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61054  if test "x$test_shortpath" = x; then
61055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61057    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61058  fi
61059
61060  # Call helper function which possibly converts this using DOS-style short mode.
61061  # If so, the updated path is stored in $new_path.
61062
61063  input_path="$new_path"
61064  # Check if we need to convert this using DOS-style short mode. If the path
61065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61066  # take no chances and rewrite it.
61067  # Note: m4 eats our [], so we need to use [ and ] instead.
61068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61069  if test "x$has_forbidden_chars" != x; then
61070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61074      # Going to short mode and back again did indeed matter. Since short mode is
61075      # case insensitive, let's make it lowercase to improve readability.
61076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61077      # Now convert it back to Unix-style (cygpath)
61078      input_path=`$CYGPATH -u "$shortmode_path"`
61079      new_path="$input_path"
61080    fi
61081  fi
61082
61083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61084  if test "x$test_cygdrive_prefix" = x; then
61085    # As a simple fix, exclude /usr/bin since it's not a real path.
61086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61088      # a path prefixed by /cygdrive for fixpath to work.
61089      new_path="$CYGWIN_ROOT_PATH$input_path"
61090    fi
61091  fi
61092
61093
61094  if test "x$path" != "x$new_path"; then
61095    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61098  fi
61099
61100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61101
61102  path="$POTENTIAL_FREETYPE_LIB_PATH"
61103  has_colon=`$ECHO $path | $GREP ^.:`
61104  new_path="$path"
61105  if test "x$has_colon" = x; then
61106    # Not in mixed or Windows style, start by that.
61107    new_path=`cmd //c echo $path`
61108  fi
61109
61110
61111  input_path="$new_path"
61112  # Check if we need to convert this using DOS-style short mode. If the path
61113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61114  # take no chances and rewrite it.
61115  # Note: m4 eats our [], so we need to use [ and ] instead.
61116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61117  if test "x$has_forbidden_chars" != x; then
61118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61120  fi
61121
61122
61123  windows_path="$new_path"
61124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61125    unix_path=`$CYGPATH -u "$windows_path"`
61126    new_path="$unix_path"
61127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61129    new_path="$unix_path"
61130  fi
61131
61132  if test "x$path" != "x$new_path"; then
61133    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61136  fi
61137
61138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61140
61141    else
61142      # We're on a unix platform. Hooray! :)
61143      path="$POTENTIAL_FREETYPE_LIB_PATH"
61144      has_space=`$ECHO "$path" | $GREP " "`
61145      if test "x$has_space" != x; then
61146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61147$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61149      fi
61150
61151      # Use eval to expand a potential ~
61152      eval path="$path"
61153      if test ! -f "$path" && test ! -d "$path"; then
61154        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61155      fi
61156
61157      if test -d "$path"; then
61158        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61159      else
61160        dir="`$DIRNAME "$path"`"
61161        base="`$BASENAME "$path"`"
61162        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61163      fi
61164    fi
61165  fi
61166
61167
61168    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61170$as_echo_n "checking for freetype includes... " >&6; }
61171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61172$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61173    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61175$as_echo_n "checking for freetype libraries... " >&6; }
61176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61177$as_echo "$FREETYPE_LIB_PATH" >&6; }
61178  fi
61179
61180          fi
61181          if test "x$FOUND_FREETYPE" != xyes; then
61182            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61183
61184  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61185  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61186  METHOD="well-known location"
61187
61188  # Let's start with an optimistic view of the world :-)
61189  FOUND_FREETYPE=yes
61190
61191  # First look for the canonical freetype main include file ft2build.h.
61192  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61193    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61194    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61195    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61196      # Fail.
61197      FOUND_FREETYPE=no
61198    fi
61199  fi
61200
61201  if test "x$FOUND_FREETYPE" = xyes; then
61202    # Include file found, let's continue the sanity check.
61203    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61204$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61205
61206    # Reset to default value
61207    FREETYPE_BASE_NAME=freetype
61208    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61209    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61210      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61211          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61212        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61213        # for the .6 version explicitly.
61214        FREETYPE_BASE_NAME=freetype.6
61215        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61216        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61217$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61218      else
61219        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61220$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61221        FOUND_FREETYPE=no
61222      fi
61223    else
61224      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61225        # On Windows, we will need both .lib and .dll file.
61226        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61227          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61228$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61229          FOUND_FREETYPE=no
61230        fi
61231      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61233        # Found lib in isa dir, use that instead.
61234        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61235        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61236$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61237      fi
61238    fi
61239  fi
61240
61241  if test "x$FOUND_FREETYPE" = xyes; then
61242
61243  # Only process if variable expands to non-empty
61244
61245  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61247
61248  # Input might be given as Windows format, start by converting to
61249  # unix format.
61250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61251  new_path=`$CYGPATH -u "$path"`
61252
61253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61256  # "foo.exe" is OK but "foo" is an error.
61257  #
61258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61259  # It is also a way to make sure we got the proper file name for the real test later on.
61260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61261  if test "x$test_shortpath" = x; then
61262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61265  fi
61266
61267  # Call helper function which possibly converts this using DOS-style short mode.
61268  # If so, the updated path is stored in $new_path.
61269
61270  input_path="$new_path"
61271  # Check if we need to convert this using DOS-style short mode. If the path
61272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61273  # take no chances and rewrite it.
61274  # Note: m4 eats our [], so we need to use [ and ] instead.
61275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61276  if test "x$has_forbidden_chars" != x; then
61277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61281      # Going to short mode and back again did indeed matter. Since short mode is
61282      # case insensitive, let's make it lowercase to improve readability.
61283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61284      # Now convert it back to Unix-style (cygpath)
61285      input_path=`$CYGPATH -u "$shortmode_path"`
61286      new_path="$input_path"
61287    fi
61288  fi
61289
61290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61291  if test "x$test_cygdrive_prefix" = x; then
61292    # As a simple fix, exclude /usr/bin since it's not a real path.
61293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61295      # a path prefixed by /cygdrive for fixpath to work.
61296      new_path="$CYGWIN_ROOT_PATH$input_path"
61297    fi
61298  fi
61299
61300
61301  if test "x$path" != "x$new_path"; then
61302    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61305  fi
61306
61307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61308
61309  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61310  has_colon=`$ECHO $path | $GREP ^.:`
61311  new_path="$path"
61312  if test "x$has_colon" = x; then
61313    # Not in mixed or Windows style, start by that.
61314    new_path=`cmd //c echo $path`
61315  fi
61316
61317
61318  input_path="$new_path"
61319  # Check if we need to convert this using DOS-style short mode. If the path
61320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61321  # take no chances and rewrite it.
61322  # Note: m4 eats our [], so we need to use [ and ] instead.
61323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61324  if test "x$has_forbidden_chars" != x; then
61325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61327  fi
61328
61329
61330  windows_path="$new_path"
61331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61332    unix_path=`$CYGPATH -u "$windows_path"`
61333    new_path="$unix_path"
61334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61336    new_path="$unix_path"
61337  fi
61338
61339  if test "x$path" != "x$new_path"; then
61340    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61343  fi
61344
61345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61347
61348    else
61349      # We're on a unix platform. Hooray! :)
61350      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61351      has_space=`$ECHO "$path" | $GREP " "`
61352      if test "x$has_space" != x; then
61353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61356      fi
61357
61358      # Use eval to expand a potential ~
61359      eval path="$path"
61360      if test ! -f "$path" && test ! -d "$path"; then
61361        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61362      fi
61363
61364      if test -d "$path"; then
61365        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61366      else
61367        dir="`$DIRNAME "$path"`"
61368        base="`$BASENAME "$path"`"
61369        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61370      fi
61371    fi
61372  fi
61373
61374
61375  # Only process if variable expands to non-empty
61376
61377  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61379
61380  # Input might be given as Windows format, start by converting to
61381  # unix format.
61382  path="$POTENTIAL_FREETYPE_LIB_PATH"
61383  new_path=`$CYGPATH -u "$path"`
61384
61385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61388  # "foo.exe" is OK but "foo" is an error.
61389  #
61390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61391  # It is also a way to make sure we got the proper file name for the real test later on.
61392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61393  if test "x$test_shortpath" = x; then
61394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61395$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61396    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61397  fi
61398
61399  # Call helper function which possibly converts this using DOS-style short mode.
61400  # If so, the updated path is stored in $new_path.
61401
61402  input_path="$new_path"
61403  # Check if we need to convert this using DOS-style short mode. If the path
61404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61405  # take no chances and rewrite it.
61406  # Note: m4 eats our [], so we need to use [ and ] instead.
61407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61408  if test "x$has_forbidden_chars" != x; then
61409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61413      # Going to short mode and back again did indeed matter. Since short mode is
61414      # case insensitive, let's make it lowercase to improve readability.
61415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61416      # Now convert it back to Unix-style (cygpath)
61417      input_path=`$CYGPATH -u "$shortmode_path"`
61418      new_path="$input_path"
61419    fi
61420  fi
61421
61422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61423  if test "x$test_cygdrive_prefix" = x; then
61424    # As a simple fix, exclude /usr/bin since it's not a real path.
61425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61427      # a path prefixed by /cygdrive for fixpath to work.
61428      new_path="$CYGWIN_ROOT_PATH$input_path"
61429    fi
61430  fi
61431
61432
61433  if test "x$path" != "x$new_path"; then
61434    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61436$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61437  fi
61438
61439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61440
61441  path="$POTENTIAL_FREETYPE_LIB_PATH"
61442  has_colon=`$ECHO $path | $GREP ^.:`
61443  new_path="$path"
61444  if test "x$has_colon" = x; then
61445    # Not in mixed or Windows style, start by that.
61446    new_path=`cmd //c echo $path`
61447  fi
61448
61449
61450  input_path="$new_path"
61451  # Check if we need to convert this using DOS-style short mode. If the path
61452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61453  # take no chances and rewrite it.
61454  # Note: m4 eats our [], so we need to use [ and ] instead.
61455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61456  if test "x$has_forbidden_chars" != x; then
61457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61459  fi
61460
61461
61462  windows_path="$new_path"
61463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61464    unix_path=`$CYGPATH -u "$windows_path"`
61465    new_path="$unix_path"
61466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61468    new_path="$unix_path"
61469  fi
61470
61471  if test "x$path" != "x$new_path"; then
61472    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61475  fi
61476
61477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61479
61480    else
61481      # We're on a unix platform. Hooray! :)
61482      path="$POTENTIAL_FREETYPE_LIB_PATH"
61483      has_space=`$ECHO "$path" | $GREP " "`
61484      if test "x$has_space" != x; then
61485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61486$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61488      fi
61489
61490      # Use eval to expand a potential ~
61491      eval path="$path"
61492      if test ! -f "$path" && test ! -d "$path"; then
61493        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61494      fi
61495
61496      if test -d "$path"; then
61497        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61498      else
61499        dir="`$DIRNAME "$path"`"
61500        base="`$BASENAME "$path"`"
61501        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61502      fi
61503    fi
61504  fi
61505
61506
61507    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61509$as_echo_n "checking for freetype includes... " >&6; }
61510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61511$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61512    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61514$as_echo_n "checking for freetype libraries... " >&6; }
61515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61516$as_echo "$FREETYPE_LIB_PATH" >&6; }
61517  fi
61518
61519          fi
61520
61521          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61522            if test "x$FOUND_FREETYPE" != xyes; then
61523              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61524              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61525
61526  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61527  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61528  METHOD="well-known location"
61529
61530  # Let's start with an optimistic view of the world :-)
61531  FOUND_FREETYPE=yes
61532
61533  # First look for the canonical freetype main include file ft2build.h.
61534  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61535    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61536    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61537    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61538      # Fail.
61539      FOUND_FREETYPE=no
61540    fi
61541  fi
61542
61543  if test "x$FOUND_FREETYPE" = xyes; then
61544    # Include file found, let's continue the sanity check.
61545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61546$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61547
61548    # Reset to default value
61549    FREETYPE_BASE_NAME=freetype
61550    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61551    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61552      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61553          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61554        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61555        # for the .6 version explicitly.
61556        FREETYPE_BASE_NAME=freetype.6
61557        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61558        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61559$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61560      else
61561        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61562$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61563        FOUND_FREETYPE=no
61564      fi
61565    else
61566      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61567        # On Windows, we will need both .lib and .dll file.
61568        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61569          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61570$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61571          FOUND_FREETYPE=no
61572        fi
61573      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61574          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61575        # Found lib in isa dir, use that instead.
61576        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61577        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61578$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61579      fi
61580    fi
61581  fi
61582
61583  if test "x$FOUND_FREETYPE" = xyes; then
61584
61585  # Only process if variable expands to non-empty
61586
61587  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61589
61590  # Input might be given as Windows format, start by converting to
61591  # unix format.
61592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61593  new_path=`$CYGPATH -u "$path"`
61594
61595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61598  # "foo.exe" is OK but "foo" is an error.
61599  #
61600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61601  # It is also a way to make sure we got the proper file name for the real test later on.
61602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61603  if test "x$test_shortpath" = x; then
61604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61606    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61607  fi
61608
61609  # Call helper function which possibly converts this using DOS-style short mode.
61610  # If so, the updated path is stored in $new_path.
61611
61612  input_path="$new_path"
61613  # Check if we need to convert this using DOS-style short mode. If the path
61614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61615  # take no chances and rewrite it.
61616  # Note: m4 eats our [], so we need to use [ and ] instead.
61617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61618  if test "x$has_forbidden_chars" != x; then
61619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61623      # Going to short mode and back again did indeed matter. Since short mode is
61624      # case insensitive, let's make it lowercase to improve readability.
61625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61626      # Now convert it back to Unix-style (cygpath)
61627      input_path=`$CYGPATH -u "$shortmode_path"`
61628      new_path="$input_path"
61629    fi
61630  fi
61631
61632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61633  if test "x$test_cygdrive_prefix" = x; then
61634    # As a simple fix, exclude /usr/bin since it's not a real path.
61635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61637      # a path prefixed by /cygdrive for fixpath to work.
61638      new_path="$CYGWIN_ROOT_PATH$input_path"
61639    fi
61640  fi
61641
61642
61643  if test "x$path" != "x$new_path"; then
61644    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61646$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61647  fi
61648
61649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61650
61651  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61652  has_colon=`$ECHO $path | $GREP ^.:`
61653  new_path="$path"
61654  if test "x$has_colon" = x; then
61655    # Not in mixed or Windows style, start by that.
61656    new_path=`cmd //c echo $path`
61657  fi
61658
61659
61660  input_path="$new_path"
61661  # Check if we need to convert this using DOS-style short mode. If the path
61662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61663  # take no chances and rewrite it.
61664  # Note: m4 eats our [], so we need to use [ and ] instead.
61665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61666  if test "x$has_forbidden_chars" != x; then
61667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61669  fi
61670
61671
61672  windows_path="$new_path"
61673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61674    unix_path=`$CYGPATH -u "$windows_path"`
61675    new_path="$unix_path"
61676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61678    new_path="$unix_path"
61679  fi
61680
61681  if test "x$path" != "x$new_path"; then
61682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61685  fi
61686
61687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61689
61690    else
61691      # We're on a unix platform. Hooray! :)
61692      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61693      has_space=`$ECHO "$path" | $GREP " "`
61694      if test "x$has_space" != x; then
61695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61698      fi
61699
61700      # Use eval to expand a potential ~
61701      eval path="$path"
61702      if test ! -f "$path" && test ! -d "$path"; then
61703        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61704      fi
61705
61706      if test -d "$path"; then
61707        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61708      else
61709        dir="`$DIRNAME "$path"`"
61710        base="`$BASENAME "$path"`"
61711        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61712      fi
61713    fi
61714  fi
61715
61716
61717  # Only process if variable expands to non-empty
61718
61719  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61721
61722  # Input might be given as Windows format, start by converting to
61723  # unix format.
61724  path="$POTENTIAL_FREETYPE_LIB_PATH"
61725  new_path=`$CYGPATH -u "$path"`
61726
61727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61730  # "foo.exe" is OK but "foo" is an error.
61731  #
61732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61733  # It is also a way to make sure we got the proper file name for the real test later on.
61734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61735  if test "x$test_shortpath" = x; then
61736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61738    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61739  fi
61740
61741  # Call helper function which possibly converts this using DOS-style short mode.
61742  # If so, the updated path is stored in $new_path.
61743
61744  input_path="$new_path"
61745  # Check if we need to convert this using DOS-style short mode. If the path
61746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61747  # take no chances and rewrite it.
61748  # Note: m4 eats our [], so we need to use [ and ] instead.
61749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61750  if test "x$has_forbidden_chars" != x; then
61751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61755      # Going to short mode and back again did indeed matter. Since short mode is
61756      # case insensitive, let's make it lowercase to improve readability.
61757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61758      # Now convert it back to Unix-style (cygpath)
61759      input_path=`$CYGPATH -u "$shortmode_path"`
61760      new_path="$input_path"
61761    fi
61762  fi
61763
61764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61765  if test "x$test_cygdrive_prefix" = x; then
61766    # As a simple fix, exclude /usr/bin since it's not a real path.
61767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61769      # a path prefixed by /cygdrive for fixpath to work.
61770      new_path="$CYGWIN_ROOT_PATH$input_path"
61771    fi
61772  fi
61773
61774
61775  if test "x$path" != "x$new_path"; then
61776    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61779  fi
61780
61781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61782
61783  path="$POTENTIAL_FREETYPE_LIB_PATH"
61784  has_colon=`$ECHO $path | $GREP ^.:`
61785  new_path="$path"
61786  if test "x$has_colon" = x; then
61787    # Not in mixed or Windows style, start by that.
61788    new_path=`cmd //c echo $path`
61789  fi
61790
61791
61792  input_path="$new_path"
61793  # Check if we need to convert this using DOS-style short mode. If the path
61794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61795  # take no chances and rewrite it.
61796  # Note: m4 eats our [], so we need to use [ and ] instead.
61797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61798  if test "x$has_forbidden_chars" != x; then
61799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61801  fi
61802
61803
61804  windows_path="$new_path"
61805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61806    unix_path=`$CYGPATH -u "$windows_path"`
61807    new_path="$unix_path"
61808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61810    new_path="$unix_path"
61811  fi
61812
61813  if test "x$path" != "x$new_path"; then
61814    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61817  fi
61818
61819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61821
61822    else
61823      # We're on a unix platform. Hooray! :)
61824      path="$POTENTIAL_FREETYPE_LIB_PATH"
61825      has_space=`$ECHO "$path" | $GREP " "`
61826      if test "x$has_space" != x; then
61827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61830      fi
61831
61832      # Use eval to expand a potential ~
61833      eval path="$path"
61834      if test ! -f "$path" && test ! -d "$path"; then
61835        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61836      fi
61837
61838      if test -d "$path"; then
61839        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61840      else
61841        dir="`$DIRNAME "$path"`"
61842        base="`$BASENAME "$path"`"
61843        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61844      fi
61845    fi
61846  fi
61847
61848
61849    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61851$as_echo_n "checking for freetype includes... " >&6; }
61852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61853$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61854    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61856$as_echo_n "checking for freetype libraries... " >&6; }
61857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61858$as_echo "$FREETYPE_LIB_PATH" >&6; }
61859  fi
61860
61861            fi
61862          fi
61863
61864          if test "x$FOUND_FREETYPE" != xyes; then
61865            FREETYPE_BASE_DIR="$SYSROOT/usr"
61866            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61867
61868  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61869  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61870  METHOD="well-known location"
61871
61872  # Let's start with an optimistic view of the world :-)
61873  FOUND_FREETYPE=yes
61874
61875  # First look for the canonical freetype main include file ft2build.h.
61876  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61877    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61878    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61879    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61880      # Fail.
61881      FOUND_FREETYPE=no
61882    fi
61883  fi
61884
61885  if test "x$FOUND_FREETYPE" = xyes; then
61886    # Include file found, let's continue the sanity check.
61887    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61888$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61889
61890    # Reset to default value
61891    FREETYPE_BASE_NAME=freetype
61892    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61893    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61894      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61895          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61896        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61897        # for the .6 version explicitly.
61898        FREETYPE_BASE_NAME=freetype.6
61899        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61900        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61901$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61902      else
61903        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61904$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61905        FOUND_FREETYPE=no
61906      fi
61907    else
61908      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61909        # On Windows, we will need both .lib and .dll file.
61910        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61911          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61912$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61913          FOUND_FREETYPE=no
61914        fi
61915      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61917        # Found lib in isa dir, use that instead.
61918        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61919        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61920$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61921      fi
61922    fi
61923  fi
61924
61925  if test "x$FOUND_FREETYPE" = xyes; then
61926
61927  # Only process if variable expands to non-empty
61928
61929  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61931
61932  # Input might be given as Windows format, start by converting to
61933  # unix format.
61934  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61935  new_path=`$CYGPATH -u "$path"`
61936
61937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61940  # "foo.exe" is OK but "foo" is an error.
61941  #
61942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61943  # It is also a way to make sure we got the proper file name for the real test later on.
61944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61945  if test "x$test_shortpath" = x; then
61946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61948    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61949  fi
61950
61951  # Call helper function which possibly converts this using DOS-style short mode.
61952  # If so, the updated path is stored in $new_path.
61953
61954  input_path="$new_path"
61955  # Check if we need to convert this using DOS-style short mode. If the path
61956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61957  # take no chances and rewrite it.
61958  # Note: m4 eats our [], so we need to use [ and ] instead.
61959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61960  if test "x$has_forbidden_chars" != x; then
61961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61965      # Going to short mode and back again did indeed matter. Since short mode is
61966      # case insensitive, let's make it lowercase to improve readability.
61967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61968      # Now convert it back to Unix-style (cygpath)
61969      input_path=`$CYGPATH -u "$shortmode_path"`
61970      new_path="$input_path"
61971    fi
61972  fi
61973
61974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61975  if test "x$test_cygdrive_prefix" = x; then
61976    # As a simple fix, exclude /usr/bin since it's not a real path.
61977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61979      # a path prefixed by /cygdrive for fixpath to work.
61980      new_path="$CYGWIN_ROOT_PATH$input_path"
61981    fi
61982  fi
61983
61984
61985  if test "x$path" != "x$new_path"; then
61986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61989  fi
61990
61991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61992
61993  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61994  has_colon=`$ECHO $path | $GREP ^.:`
61995  new_path="$path"
61996  if test "x$has_colon" = x; then
61997    # Not in mixed or Windows style, start by that.
61998    new_path=`cmd //c echo $path`
61999  fi
62000
62001
62002  input_path="$new_path"
62003  # Check if we need to convert this using DOS-style short mode. If the path
62004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62005  # take no chances and rewrite it.
62006  # Note: m4 eats our [], so we need to use [ and ] instead.
62007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62008  if test "x$has_forbidden_chars" != x; then
62009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62011  fi
62012
62013
62014  windows_path="$new_path"
62015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62016    unix_path=`$CYGPATH -u "$windows_path"`
62017    new_path="$unix_path"
62018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62020    new_path="$unix_path"
62021  fi
62022
62023  if test "x$path" != "x$new_path"; then
62024    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62027  fi
62028
62029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62031
62032    else
62033      # We're on a unix platform. Hooray! :)
62034      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62035      has_space=`$ECHO "$path" | $GREP " "`
62036      if test "x$has_space" != x; then
62037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62040      fi
62041
62042      # Use eval to expand a potential ~
62043      eval path="$path"
62044      if test ! -f "$path" && test ! -d "$path"; then
62045        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62046      fi
62047
62048      if test -d "$path"; then
62049        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62050      else
62051        dir="`$DIRNAME "$path"`"
62052        base="`$BASENAME "$path"`"
62053        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62054      fi
62055    fi
62056  fi
62057
62058
62059  # Only process if variable expands to non-empty
62060
62061  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62063
62064  # Input might be given as Windows format, start by converting to
62065  # unix format.
62066  path="$POTENTIAL_FREETYPE_LIB_PATH"
62067  new_path=`$CYGPATH -u "$path"`
62068
62069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62072  # "foo.exe" is OK but "foo" is an error.
62073  #
62074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62075  # It is also a way to make sure we got the proper file name for the real test later on.
62076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62077  if test "x$test_shortpath" = x; then
62078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62080    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62081  fi
62082
62083  # Call helper function which possibly converts this using DOS-style short mode.
62084  # If so, the updated path is stored in $new_path.
62085
62086  input_path="$new_path"
62087  # Check if we need to convert this using DOS-style short mode. If the path
62088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62089  # take no chances and rewrite it.
62090  # Note: m4 eats our [], so we need to use [ and ] instead.
62091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62092  if test "x$has_forbidden_chars" != x; then
62093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62097      # Going to short mode and back again did indeed matter. Since short mode is
62098      # case insensitive, let's make it lowercase to improve readability.
62099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62100      # Now convert it back to Unix-style (cygpath)
62101      input_path=`$CYGPATH -u "$shortmode_path"`
62102      new_path="$input_path"
62103    fi
62104  fi
62105
62106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62107  if test "x$test_cygdrive_prefix" = x; then
62108    # As a simple fix, exclude /usr/bin since it's not a real path.
62109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62111      # a path prefixed by /cygdrive for fixpath to work.
62112      new_path="$CYGWIN_ROOT_PATH$input_path"
62113    fi
62114  fi
62115
62116
62117  if test "x$path" != "x$new_path"; then
62118    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62121  fi
62122
62123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62124
62125  path="$POTENTIAL_FREETYPE_LIB_PATH"
62126  has_colon=`$ECHO $path | $GREP ^.:`
62127  new_path="$path"
62128  if test "x$has_colon" = x; then
62129    # Not in mixed or Windows style, start by that.
62130    new_path=`cmd //c echo $path`
62131  fi
62132
62133
62134  input_path="$new_path"
62135  # Check if we need to convert this using DOS-style short mode. If the path
62136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62137  # take no chances and rewrite it.
62138  # Note: m4 eats our [], so we need to use [ and ] instead.
62139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62140  if test "x$has_forbidden_chars" != x; then
62141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62143  fi
62144
62145
62146  windows_path="$new_path"
62147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62148    unix_path=`$CYGPATH -u "$windows_path"`
62149    new_path="$unix_path"
62150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62152    new_path="$unix_path"
62153  fi
62154
62155  if test "x$path" != "x$new_path"; then
62156    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62159  fi
62160
62161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62163
62164    else
62165      # We're on a unix platform. Hooray! :)
62166      path="$POTENTIAL_FREETYPE_LIB_PATH"
62167      has_space=`$ECHO "$path" | $GREP " "`
62168      if test "x$has_space" != x; then
62169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62172      fi
62173
62174      # Use eval to expand a potential ~
62175      eval path="$path"
62176      if test ! -f "$path" && test ! -d "$path"; then
62177        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62178      fi
62179
62180      if test -d "$path"; then
62181        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62182      else
62183        dir="`$DIRNAME "$path"`"
62184        base="`$BASENAME "$path"`"
62185        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62186      fi
62187    fi
62188  fi
62189
62190
62191    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62193$as_echo_n "checking for freetype includes... " >&6; }
62194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62195$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62196    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62198$as_echo_n "checking for freetype libraries... " >&6; }
62199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62200$as_echo "$FREETYPE_LIB_PATH" >&6; }
62201  fi
62202
62203            else
62204
62205  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62206  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62207  METHOD="well-known location"
62208
62209  # Let's start with an optimistic view of the world :-)
62210  FOUND_FREETYPE=yes
62211
62212  # First look for the canonical freetype main include file ft2build.h.
62213  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62214    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62215    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62216    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62217      # Fail.
62218      FOUND_FREETYPE=no
62219    fi
62220  fi
62221
62222  if test "x$FOUND_FREETYPE" = xyes; then
62223    # Include file found, let's continue the sanity check.
62224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62226
62227    # Reset to default value
62228    FREETYPE_BASE_NAME=freetype
62229    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62230    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62231      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62233        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62234        # for the .6 version explicitly.
62235        FREETYPE_BASE_NAME=freetype.6
62236        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62237        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62238$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62239      else
62240        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62242        FOUND_FREETYPE=no
62243      fi
62244    else
62245      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62246        # On Windows, we will need both .lib and .dll file.
62247        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62248          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62249$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62250          FOUND_FREETYPE=no
62251        fi
62252      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62254        # Found lib in isa dir, use that instead.
62255        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62256        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62257$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62258      fi
62259    fi
62260  fi
62261
62262  if test "x$FOUND_FREETYPE" = xyes; then
62263
62264  # Only process if variable expands to non-empty
62265
62266  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62268
62269  # Input might be given as Windows format, start by converting to
62270  # unix format.
62271  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62272  new_path=`$CYGPATH -u "$path"`
62273
62274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62277  # "foo.exe" is OK but "foo" is an error.
62278  #
62279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62280  # It is also a way to make sure we got the proper file name for the real test later on.
62281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62282  if test "x$test_shortpath" = x; then
62283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62285    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62286  fi
62287
62288  # Call helper function which possibly converts this using DOS-style short mode.
62289  # If so, the updated path is stored in $new_path.
62290
62291  input_path="$new_path"
62292  # Check if we need to convert this using DOS-style short mode. If the path
62293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62294  # take no chances and rewrite it.
62295  # Note: m4 eats our [], so we need to use [ and ] instead.
62296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62297  if test "x$has_forbidden_chars" != x; then
62298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62302      # Going to short mode and back again did indeed matter. Since short mode is
62303      # case insensitive, let's make it lowercase to improve readability.
62304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62305      # Now convert it back to Unix-style (cygpath)
62306      input_path=`$CYGPATH -u "$shortmode_path"`
62307      new_path="$input_path"
62308    fi
62309  fi
62310
62311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62312  if test "x$test_cygdrive_prefix" = x; then
62313    # As a simple fix, exclude /usr/bin since it's not a real path.
62314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62316      # a path prefixed by /cygdrive for fixpath to work.
62317      new_path="$CYGWIN_ROOT_PATH$input_path"
62318    fi
62319  fi
62320
62321
62322  if test "x$path" != "x$new_path"; then
62323    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62326  fi
62327
62328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62329
62330  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62331  has_colon=`$ECHO $path | $GREP ^.:`
62332  new_path="$path"
62333  if test "x$has_colon" = x; then
62334    # Not in mixed or Windows style, start by that.
62335    new_path=`cmd //c echo $path`
62336  fi
62337
62338
62339  input_path="$new_path"
62340  # Check if we need to convert this using DOS-style short mode. If the path
62341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62342  # take no chances and rewrite it.
62343  # Note: m4 eats our [], so we need to use [ and ] instead.
62344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62345  if test "x$has_forbidden_chars" != x; then
62346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62348  fi
62349
62350
62351  windows_path="$new_path"
62352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62353    unix_path=`$CYGPATH -u "$windows_path"`
62354    new_path="$unix_path"
62355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62357    new_path="$unix_path"
62358  fi
62359
62360  if test "x$path" != "x$new_path"; then
62361    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62364  fi
62365
62366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62368
62369    else
62370      # We're on a unix platform. Hooray! :)
62371      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62372      has_space=`$ECHO "$path" | $GREP " "`
62373      if test "x$has_space" != x; then
62374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62376        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62377      fi
62378
62379      # Use eval to expand a potential ~
62380      eval path="$path"
62381      if test ! -f "$path" && test ! -d "$path"; then
62382        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62383      fi
62384
62385      if test -d "$path"; then
62386        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62387      else
62388        dir="`$DIRNAME "$path"`"
62389        base="`$BASENAME "$path"`"
62390        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62391      fi
62392    fi
62393  fi
62394
62395
62396  # Only process if variable expands to non-empty
62397
62398  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62400
62401  # Input might be given as Windows format, start by converting to
62402  # unix format.
62403  path="$POTENTIAL_FREETYPE_LIB_PATH"
62404  new_path=`$CYGPATH -u "$path"`
62405
62406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62409  # "foo.exe" is OK but "foo" is an error.
62410  #
62411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62412  # It is also a way to make sure we got the proper file name for the real test later on.
62413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62414  if test "x$test_shortpath" = x; then
62415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62417    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62418  fi
62419
62420  # Call helper function which possibly converts this using DOS-style short mode.
62421  # If so, the updated path is stored in $new_path.
62422
62423  input_path="$new_path"
62424  # Check if we need to convert this using DOS-style short mode. If the path
62425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62426  # take no chances and rewrite it.
62427  # Note: m4 eats our [], so we need to use [ and ] instead.
62428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62429  if test "x$has_forbidden_chars" != x; then
62430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62434      # Going to short mode and back again did indeed matter. Since short mode is
62435      # case insensitive, let's make it lowercase to improve readability.
62436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62437      # Now convert it back to Unix-style (cygpath)
62438      input_path=`$CYGPATH -u "$shortmode_path"`
62439      new_path="$input_path"
62440    fi
62441  fi
62442
62443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62444  if test "x$test_cygdrive_prefix" = x; then
62445    # As a simple fix, exclude /usr/bin since it's not a real path.
62446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62448      # a path prefixed by /cygdrive for fixpath to work.
62449      new_path="$CYGWIN_ROOT_PATH$input_path"
62450    fi
62451  fi
62452
62453
62454  if test "x$path" != "x$new_path"; then
62455    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62458  fi
62459
62460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62461
62462  path="$POTENTIAL_FREETYPE_LIB_PATH"
62463  has_colon=`$ECHO $path | $GREP ^.:`
62464  new_path="$path"
62465  if test "x$has_colon" = x; then
62466    # Not in mixed or Windows style, start by that.
62467    new_path=`cmd //c echo $path`
62468  fi
62469
62470
62471  input_path="$new_path"
62472  # Check if we need to convert this using DOS-style short mode. If the path
62473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62474  # take no chances and rewrite it.
62475  # Note: m4 eats our [], so we need to use [ and ] instead.
62476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62477  if test "x$has_forbidden_chars" != x; then
62478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62480  fi
62481
62482
62483  windows_path="$new_path"
62484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62485    unix_path=`$CYGPATH -u "$windows_path"`
62486    new_path="$unix_path"
62487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62489    new_path="$unix_path"
62490  fi
62491
62492  if test "x$path" != "x$new_path"; then
62493    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62495$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62496  fi
62497
62498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62500
62501    else
62502      # We're on a unix platform. Hooray! :)
62503      path="$POTENTIAL_FREETYPE_LIB_PATH"
62504      has_space=`$ECHO "$path" | $GREP " "`
62505      if test "x$has_space" != x; then
62506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62509      fi
62510
62511      # Use eval to expand a potential ~
62512      eval path="$path"
62513      if test ! -f "$path" && test ! -d "$path"; then
62514        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62515      fi
62516
62517      if test -d "$path"; then
62518        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62519      else
62520        dir="`$DIRNAME "$path"`"
62521        base="`$BASENAME "$path"`"
62522        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62523      fi
62524    fi
62525  fi
62526
62527
62528    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62530$as_echo_n "checking for freetype includes... " >&6; }
62531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62532$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62533    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62535$as_echo_n "checking for freetype libraries... " >&6; }
62536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62537$as_echo "$FREETYPE_LIB_PATH" >&6; }
62538  fi
62539
62540              if test "x$FOUND_FREETYPE" != xyes; then
62541
62542  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62543  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62544  METHOD="well-known location"
62545
62546  # Let's start with an optimistic view of the world :-)
62547  FOUND_FREETYPE=yes
62548
62549  # First look for the canonical freetype main include file ft2build.h.
62550  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62551    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62552    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62553    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62554      # Fail.
62555      FOUND_FREETYPE=no
62556    fi
62557  fi
62558
62559  if test "x$FOUND_FREETYPE" = xyes; then
62560    # Include file found, let's continue the sanity check.
62561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62562$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62563
62564    # Reset to default value
62565    FREETYPE_BASE_NAME=freetype
62566    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62567    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62568      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62569          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62570        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62571        # for the .6 version explicitly.
62572        FREETYPE_BASE_NAME=freetype.6
62573        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62574        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62575$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62576      else
62577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62578$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62579        FOUND_FREETYPE=no
62580      fi
62581    else
62582      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62583        # On Windows, we will need both .lib and .dll file.
62584        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62585          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62586$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62587          FOUND_FREETYPE=no
62588        fi
62589      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62590          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62591        # Found lib in isa dir, use that instead.
62592        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62593        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62594$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62595      fi
62596    fi
62597  fi
62598
62599  if test "x$FOUND_FREETYPE" = xyes; then
62600
62601  # Only process if variable expands to non-empty
62602
62603  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62605
62606  # Input might be given as Windows format, start by converting to
62607  # unix format.
62608  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62609  new_path=`$CYGPATH -u "$path"`
62610
62611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62614  # "foo.exe" is OK but "foo" is an error.
62615  #
62616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62617  # It is also a way to make sure we got the proper file name for the real test later on.
62618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62619  if test "x$test_shortpath" = x; then
62620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62621$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62622    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62623  fi
62624
62625  # Call helper function which possibly converts this using DOS-style short mode.
62626  # If so, the updated path is stored in $new_path.
62627
62628  input_path="$new_path"
62629  # Check if we need to convert this using DOS-style short mode. If the path
62630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62631  # take no chances and rewrite it.
62632  # Note: m4 eats our [], so we need to use [ and ] instead.
62633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62634  if test "x$has_forbidden_chars" != x; then
62635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62639      # Going to short mode and back again did indeed matter. Since short mode is
62640      # case insensitive, let's make it lowercase to improve readability.
62641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62642      # Now convert it back to Unix-style (cygpath)
62643      input_path=`$CYGPATH -u "$shortmode_path"`
62644      new_path="$input_path"
62645    fi
62646  fi
62647
62648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62649  if test "x$test_cygdrive_prefix" = x; then
62650    # As a simple fix, exclude /usr/bin since it's not a real path.
62651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62653      # a path prefixed by /cygdrive for fixpath to work.
62654      new_path="$CYGWIN_ROOT_PATH$input_path"
62655    fi
62656  fi
62657
62658
62659  if test "x$path" != "x$new_path"; then
62660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62663  fi
62664
62665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62666
62667  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62668  has_colon=`$ECHO $path | $GREP ^.:`
62669  new_path="$path"
62670  if test "x$has_colon" = x; then
62671    # Not in mixed or Windows style, start by that.
62672    new_path=`cmd //c echo $path`
62673  fi
62674
62675
62676  input_path="$new_path"
62677  # Check if we need to convert this using DOS-style short mode. If the path
62678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62679  # take no chances and rewrite it.
62680  # Note: m4 eats our [], so we need to use [ and ] instead.
62681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62682  if test "x$has_forbidden_chars" != x; then
62683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62685  fi
62686
62687
62688  windows_path="$new_path"
62689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62690    unix_path=`$CYGPATH -u "$windows_path"`
62691    new_path="$unix_path"
62692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62694    new_path="$unix_path"
62695  fi
62696
62697  if test "x$path" != "x$new_path"; then
62698    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62701  fi
62702
62703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62705
62706    else
62707      # We're on a unix platform. Hooray! :)
62708      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62709      has_space=`$ECHO "$path" | $GREP " "`
62710      if test "x$has_space" != x; then
62711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62714      fi
62715
62716      # Use eval to expand a potential ~
62717      eval path="$path"
62718      if test ! -f "$path" && test ! -d "$path"; then
62719        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62720      fi
62721
62722      if test -d "$path"; then
62723        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62724      else
62725        dir="`$DIRNAME "$path"`"
62726        base="`$BASENAME "$path"`"
62727        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62728      fi
62729    fi
62730  fi
62731
62732
62733  # Only process if variable expands to non-empty
62734
62735  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62737
62738  # Input might be given as Windows format, start by converting to
62739  # unix format.
62740  path="$POTENTIAL_FREETYPE_LIB_PATH"
62741  new_path=`$CYGPATH -u "$path"`
62742
62743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62746  # "foo.exe" is OK but "foo" is an error.
62747  #
62748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62749  # It is also a way to make sure we got the proper file name for the real test later on.
62750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62751  if test "x$test_shortpath" = x; then
62752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62754    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62755  fi
62756
62757  # Call helper function which possibly converts this using DOS-style short mode.
62758  # If so, the updated path is stored in $new_path.
62759
62760  input_path="$new_path"
62761  # Check if we need to convert this using DOS-style short mode. If the path
62762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62763  # take no chances and rewrite it.
62764  # Note: m4 eats our [], so we need to use [ and ] instead.
62765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62766  if test "x$has_forbidden_chars" != x; then
62767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62771      # Going to short mode and back again did indeed matter. Since short mode is
62772      # case insensitive, let's make it lowercase to improve readability.
62773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62774      # Now convert it back to Unix-style (cygpath)
62775      input_path=`$CYGPATH -u "$shortmode_path"`
62776      new_path="$input_path"
62777    fi
62778  fi
62779
62780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62781  if test "x$test_cygdrive_prefix" = x; then
62782    # As a simple fix, exclude /usr/bin since it's not a real path.
62783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62785      # a path prefixed by /cygdrive for fixpath to work.
62786      new_path="$CYGWIN_ROOT_PATH$input_path"
62787    fi
62788  fi
62789
62790
62791  if test "x$path" != "x$new_path"; then
62792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62795  fi
62796
62797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62798
62799  path="$POTENTIAL_FREETYPE_LIB_PATH"
62800  has_colon=`$ECHO $path | $GREP ^.:`
62801  new_path="$path"
62802  if test "x$has_colon" = x; then
62803    # Not in mixed or Windows style, start by that.
62804    new_path=`cmd //c echo $path`
62805  fi
62806
62807
62808  input_path="$new_path"
62809  # Check if we need to convert this using DOS-style short mode. If the path
62810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62811  # take no chances and rewrite it.
62812  # Note: m4 eats our [], so we need to use [ and ] instead.
62813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62814  if test "x$has_forbidden_chars" != x; then
62815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62817  fi
62818
62819
62820  windows_path="$new_path"
62821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62822    unix_path=`$CYGPATH -u "$windows_path"`
62823    new_path="$unix_path"
62824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62826    new_path="$unix_path"
62827  fi
62828
62829  if test "x$path" != "x$new_path"; then
62830    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62832$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62833  fi
62834
62835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62837
62838    else
62839      # We're on a unix platform. Hooray! :)
62840      path="$POTENTIAL_FREETYPE_LIB_PATH"
62841      has_space=`$ECHO "$path" | $GREP " "`
62842      if test "x$has_space" != x; then
62843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62846      fi
62847
62848      # Use eval to expand a potential ~
62849      eval path="$path"
62850      if test ! -f "$path" && test ! -d "$path"; then
62851        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62852      fi
62853
62854      if test -d "$path"; then
62855        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62856      else
62857        dir="`$DIRNAME "$path"`"
62858        base="`$BASENAME "$path"`"
62859        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62860      fi
62861    fi
62862  fi
62863
62864
62865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62867$as_echo_n "checking for freetype includes... " >&6; }
62868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62872$as_echo_n "checking for freetype libraries... " >&6; }
62873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62874$as_echo "$FREETYPE_LIB_PATH" >&6; }
62875  fi
62876
62877              fi
62878            fi
62879          fi
62880        fi
62881      fi # end check in well-known locations
62882
62883      if test "x$FOUND_FREETYPE" != xyes; then
62884
62885  # Print a helpful message on how to acquire the necessary build dependency.
62886  # freetype is the help tag: freetype, cups, alsa etc
62887  MISSING_DEPENDENCY=freetype
62888
62889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62890    cygwin_help $MISSING_DEPENDENCY
62891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62892    msys_help $MISSING_DEPENDENCY
62893  else
62894    PKGHANDLER_COMMAND=
62895
62896    case $PKGHANDLER in
62897      apt-get)
62898        apt_help     $MISSING_DEPENDENCY ;;
62899      yum)
62900        yum_help     $MISSING_DEPENDENCY ;;
62901      brew)
62902        brew_help    $MISSING_DEPENDENCY ;;
62903      port)
62904        port_help    $MISSING_DEPENDENCY ;;
62905      pkgutil)
62906        pkgutil_help $MISSING_DEPENDENCY ;;
62907      pkgadd)
62908        pkgadd_help  $MISSING_DEPENDENCY ;;
62909    esac
62910
62911    if test "x$PKGHANDLER_COMMAND" != x; then
62912      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62913    fi
62914  fi
62915
62916        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62917      fi
62918    fi # end user specified settings
62919
62920    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62921    if test "x$FREETYPE_CFLAGS" = x; then
62922
62923  # Only process if variable expands to non-empty
62924
62925  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62927
62928  # Input might be given as Windows format, start by converting to
62929  # unix format.
62930  path="$FREETYPE_INCLUDE_PATH"
62931  new_path=`$CYGPATH -u "$path"`
62932
62933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62936  # "foo.exe" is OK but "foo" is an error.
62937  #
62938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62939  # It is also a way to make sure we got the proper file name for the real test later on.
62940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62941  if test "x$test_shortpath" = x; then
62942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62943$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62944    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62945  fi
62946
62947  # Call helper function which possibly converts this using DOS-style short mode.
62948  # If so, the updated path is stored in $new_path.
62949
62950  input_path="$new_path"
62951  # Check if we need to convert this using DOS-style short mode. If the path
62952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62953  # take no chances and rewrite it.
62954  # Note: m4 eats our [], so we need to use [ and ] instead.
62955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62956  if test "x$has_forbidden_chars" != x; then
62957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62961      # Going to short mode and back again did indeed matter. Since short mode is
62962      # case insensitive, let's make it lowercase to improve readability.
62963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62964      # Now convert it back to Unix-style (cygpath)
62965      input_path=`$CYGPATH -u "$shortmode_path"`
62966      new_path="$input_path"
62967    fi
62968  fi
62969
62970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62971  if test "x$test_cygdrive_prefix" = x; then
62972    # As a simple fix, exclude /usr/bin since it's not a real path.
62973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62975      # a path prefixed by /cygdrive for fixpath to work.
62976      new_path="$CYGWIN_ROOT_PATH$input_path"
62977    fi
62978  fi
62979
62980
62981  if test "x$path" != "x$new_path"; then
62982    FREETYPE_INCLUDE_PATH="$new_path"
62983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62984$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62985  fi
62986
62987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62988
62989  path="$FREETYPE_INCLUDE_PATH"
62990  has_colon=`$ECHO $path | $GREP ^.:`
62991  new_path="$path"
62992  if test "x$has_colon" = x; then
62993    # Not in mixed or Windows style, start by that.
62994    new_path=`cmd //c echo $path`
62995  fi
62996
62997
62998  input_path="$new_path"
62999  # Check if we need to convert this using DOS-style short mode. If the path
63000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63001  # take no chances and rewrite it.
63002  # Note: m4 eats our [], so we need to use [ and ] instead.
63003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63004  if test "x$has_forbidden_chars" != x; then
63005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63007  fi
63008
63009
63010  windows_path="$new_path"
63011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63012    unix_path=`$CYGPATH -u "$windows_path"`
63013    new_path="$unix_path"
63014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63016    new_path="$unix_path"
63017  fi
63018
63019  if test "x$path" != "x$new_path"; then
63020    FREETYPE_INCLUDE_PATH="$new_path"
63021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63022$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63023  fi
63024
63025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63027
63028    else
63029      # We're on a unix platform. Hooray! :)
63030      path="$FREETYPE_INCLUDE_PATH"
63031      has_space=`$ECHO "$path" | $GREP " "`
63032      if test "x$has_space" != x; then
63033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63034$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63036      fi
63037
63038      # Use eval to expand a potential ~
63039      eval path="$path"
63040      if test ! -f "$path" && test ! -d "$path"; then
63041        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63042      fi
63043
63044      if test -d "$path"; then
63045        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63046      else
63047        dir="`$DIRNAME "$path"`"
63048        base="`$BASENAME "$path"`"
63049        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63050      fi
63051    fi
63052  fi
63053
63054      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63055        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63056      else
63057        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63058      fi
63059    fi
63060
63061    if test "x$FREETYPE_LIBS" = x; then
63062
63063  # Only process if variable expands to non-empty
63064
63065  if test "x$FREETYPE_LIB_PATH" != x; then
63066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63067
63068  # Input might be given as Windows format, start by converting to
63069  # unix format.
63070  path="$FREETYPE_LIB_PATH"
63071  new_path=`$CYGPATH -u "$path"`
63072
63073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63076  # "foo.exe" is OK but "foo" is an error.
63077  #
63078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63079  # It is also a way to make sure we got the proper file name for the real test later on.
63080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63081  if test "x$test_shortpath" = x; then
63082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63083$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63084    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63085  fi
63086
63087  # Call helper function which possibly converts this using DOS-style short mode.
63088  # If so, the updated path is stored in $new_path.
63089
63090  input_path="$new_path"
63091  # Check if we need to convert this using DOS-style short mode. If the path
63092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63093  # take no chances and rewrite it.
63094  # Note: m4 eats our [], so we need to use [ and ] instead.
63095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63096  if test "x$has_forbidden_chars" != x; then
63097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63101      # Going to short mode and back again did indeed matter. Since short mode is
63102      # case insensitive, let's make it lowercase to improve readability.
63103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63104      # Now convert it back to Unix-style (cygpath)
63105      input_path=`$CYGPATH -u "$shortmode_path"`
63106      new_path="$input_path"
63107    fi
63108  fi
63109
63110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63111  if test "x$test_cygdrive_prefix" = x; then
63112    # As a simple fix, exclude /usr/bin since it's not a real path.
63113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63115      # a path prefixed by /cygdrive for fixpath to work.
63116      new_path="$CYGWIN_ROOT_PATH$input_path"
63117    fi
63118  fi
63119
63120
63121  if test "x$path" != "x$new_path"; then
63122    FREETYPE_LIB_PATH="$new_path"
63123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63124$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63125  fi
63126
63127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63128
63129  path="$FREETYPE_LIB_PATH"
63130  has_colon=`$ECHO $path | $GREP ^.:`
63131  new_path="$path"
63132  if test "x$has_colon" = x; then
63133    # Not in mixed or Windows style, start by that.
63134    new_path=`cmd //c echo $path`
63135  fi
63136
63137
63138  input_path="$new_path"
63139  # Check if we need to convert this using DOS-style short mode. If the path
63140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63141  # take no chances and rewrite it.
63142  # Note: m4 eats our [], so we need to use [ and ] instead.
63143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63144  if test "x$has_forbidden_chars" != x; then
63145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63147  fi
63148
63149
63150  windows_path="$new_path"
63151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63152    unix_path=`$CYGPATH -u "$windows_path"`
63153    new_path="$unix_path"
63154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63156    new_path="$unix_path"
63157  fi
63158
63159  if test "x$path" != "x$new_path"; then
63160    FREETYPE_LIB_PATH="$new_path"
63161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63162$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63163  fi
63164
63165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63167
63168    else
63169      # We're on a unix platform. Hooray! :)
63170      path="$FREETYPE_LIB_PATH"
63171      has_space=`$ECHO "$path" | $GREP " "`
63172      if test "x$has_space" != x; then
63173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63174$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63175        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63176      fi
63177
63178      # Use eval to expand a potential ~
63179      eval path="$path"
63180      if test ! -f "$path" && test ! -d "$path"; then
63181        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63182      fi
63183
63184      if test -d "$path"; then
63185        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63186      else
63187        dir="`$DIRNAME "$path"`"
63188        base="`$BASENAME "$path"`"
63189        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63190      fi
63191    fi
63192  fi
63193
63194      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63195        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63196      else
63197        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63198      fi
63199    fi
63200
63201    # Try to compile it
63202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63203$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63204    ac_ext=cpp
63205ac_cpp='$CXXCPP $CPPFLAGS'
63206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63209
63210    PREV_CXXCFLAGS="$CXXFLAGS"
63211    PREV_LIBS="$LIBS"
63212    PREV_CXX="$CXX"
63213    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63214    LIBS="$LIBS $FREETYPE_LIBS"
63215    CXX="$FIXPATH $CXX"
63216    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63217/* end confdefs.h.  */
63218
63219          #include<ft2build.h>
63220          #include FT_FREETYPE_H
63221          int main () {
63222            FT_Init_FreeType(NULL);
63223            return 0;
63224          }
63225
63226_ACEOF
63227if ac_fn_cxx_try_link "$LINENO"; then :
63228
63229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63230$as_echo "yes" >&6; }
63231
63232else
63233
63234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63235$as_echo "no" >&6; }
63236          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63237$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63238          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63239$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63240
63241
63242  # Print a helpful message on how to acquire the necessary build dependency.
63243  # freetype is the help tag: freetype, cups, alsa etc
63244  MISSING_DEPENDENCY=freetype
63245
63246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63247    cygwin_help $MISSING_DEPENDENCY
63248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63249    msys_help $MISSING_DEPENDENCY
63250  else
63251    PKGHANDLER_COMMAND=
63252
63253    case $PKGHANDLER in
63254      apt-get)
63255        apt_help     $MISSING_DEPENDENCY ;;
63256      yum)
63257        yum_help     $MISSING_DEPENDENCY ;;
63258      brew)
63259        brew_help    $MISSING_DEPENDENCY ;;
63260      port)
63261        port_help    $MISSING_DEPENDENCY ;;
63262      pkgutil)
63263        pkgutil_help $MISSING_DEPENDENCY ;;
63264      pkgadd)
63265        pkgadd_help  $MISSING_DEPENDENCY ;;
63266    esac
63267
63268    if test "x$PKGHANDLER_COMMAND" != x; then
63269      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63270    fi
63271  fi
63272
63273
63274          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63275
63276
63277fi
63278rm -f core conftest.err conftest.$ac_objext \
63279    conftest$ac_exeext conftest.$ac_ext
63280    CXXCFLAGS="$PREV_CXXFLAGS"
63281    LIBS="$PREV_LIBS"
63282    CXX="$PREV_CXX"
63283    ac_ext=cpp
63284ac_cpp='$CXXCPP $CPPFLAGS'
63285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63288
63289
63290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63291$as_echo_n "checking if we should bundle freetype... " >&6; }
63292    if test "x$BUNDLE_FREETYPE" = xyes; then
63293      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63294    fi
63295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63296$as_echo "$BUNDLE_FREETYPE" >&6; }
63297
63298  fi # end freetype needed
63299
63300
63301
63302
63303
63304
63305
63306# Check whether --with-alsa was given.
63307if test "${with_alsa+set}" = set; then :
63308  withval=$with_alsa;
63309fi
63310
63311
63312# Check whether --with-alsa-include was given.
63313if test "${with_alsa_include+set}" = set; then :
63314  withval=$with_alsa_include;
63315fi
63316
63317
63318# Check whether --with-alsa-lib was given.
63319if test "${with_alsa_lib+set}" = set; then :
63320  withval=$with_alsa_lib;
63321fi
63322
63323
63324  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63325    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63326        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63327        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63328      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63329$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63330    fi
63331    ALSA_CFLAGS=
63332    ALSA_LIBS=
63333  else
63334    ALSA_FOUND=no
63335
63336    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63337      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63338    fi
63339
63340    if test "x${with_alsa}" != x; then
63341      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63342      ALSA_CFLAGS="-I${with_alsa}/include"
63343      ALSA_FOUND=yes
63344    fi
63345    if test "x${with_alsa_include}" != x; then
63346      ALSA_CFLAGS="-I${with_alsa_include}"
63347      ALSA_FOUND=yes
63348    fi
63349    if test "x${with_alsa_lib}" != x; then
63350      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63351      ALSA_FOUND=yes
63352    fi
63353    # Do not try pkg-config if we have a sysroot set.
63354    if test "x$SYSROOT" = x; then
63355      if test "x$ALSA_FOUND" = xno; then
63356
63357pkg_failed=no
63358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63359$as_echo_n "checking for ALSA... " >&6; }
63360
63361if test -n "$ALSA_CFLAGS"; then
63362    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63363 elif test -n "$PKG_CONFIG"; then
63364    if test -n "$PKG_CONFIG" && \
63365    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63366  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63367  ac_status=$?
63368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63369  test $ac_status = 0; }; then
63370  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63371else
63372  pkg_failed=yes
63373fi
63374 else
63375    pkg_failed=untried
63376fi
63377if test -n "$ALSA_LIBS"; then
63378    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63379 elif test -n "$PKG_CONFIG"; then
63380    if test -n "$PKG_CONFIG" && \
63381    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63382  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63383  ac_status=$?
63384  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63385  test $ac_status = 0; }; then
63386  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63387else
63388  pkg_failed=yes
63389fi
63390 else
63391    pkg_failed=untried
63392fi
63393
63394
63395
63396if test $pkg_failed = yes; then
63397
63398if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63399        _pkg_short_errors_supported=yes
63400else
63401        _pkg_short_errors_supported=no
63402fi
63403        if test $_pkg_short_errors_supported = yes; then
63404	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63405        else
63406	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63407        fi
63408	# Put the nasty error message in config.log where it belongs
63409	echo "$ALSA_PKG_ERRORS" >&5
63410
63411	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63412$as_echo "no" >&6; }
63413                ALSA_FOUND=no
63414elif test $pkg_failed = untried; then
63415	ALSA_FOUND=no
63416else
63417	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63418	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63420$as_echo "yes" >&6; }
63421	ALSA_FOUND=yes
63422fi
63423      fi
63424    fi
63425    if test "x$ALSA_FOUND" = xno; then
63426      for ac_header in alsa/asoundlib.h
63427do :
63428  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63429if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63430  cat >>confdefs.h <<_ACEOF
63431#define HAVE_ALSA_ASOUNDLIB_H 1
63432_ACEOF
63433
63434            ALSA_FOUND=yes
63435            ALSA_CFLAGS=-Iignoreme
63436            ALSA_LIBS=-lasound
63437            DEFAULT_ALSA=yes
63438
63439else
63440  ALSA_FOUND=no
63441
63442fi
63443
63444done
63445
63446    fi
63447    if test "x$ALSA_FOUND" = xno; then
63448
63449  # Print a helpful message on how to acquire the necessary build dependency.
63450  # alsa is the help tag: freetype, cups, alsa etc
63451  MISSING_DEPENDENCY=alsa
63452
63453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63454    cygwin_help $MISSING_DEPENDENCY
63455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63456    msys_help $MISSING_DEPENDENCY
63457  else
63458    PKGHANDLER_COMMAND=
63459
63460    case $PKGHANDLER in
63461      apt-get)
63462        apt_help     $MISSING_DEPENDENCY ;;
63463      yum)
63464        yum_help     $MISSING_DEPENDENCY ;;
63465      brew)
63466        brew_help    $MISSING_DEPENDENCY ;;
63467      port)
63468        port_help    $MISSING_DEPENDENCY ;;
63469      pkgutil)
63470        pkgutil_help $MISSING_DEPENDENCY ;;
63471      pkgadd)
63472        pkgadd_help  $MISSING_DEPENDENCY ;;
63473    esac
63474
63475    if test "x$PKGHANDLER_COMMAND" != x; then
63476      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63477    fi
63478  fi
63479
63480      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63481    fi
63482  fi
63483
63484
63485
63486
63487
63488
63489# Check whether --with-libffi was given.
63490if test "${with_libffi+set}" = set; then :
63491  withval=$with_libffi;
63492fi
63493
63494
63495# Check whether --with-libffi-include was given.
63496if test "${with_libffi_include+set}" = set; then :
63497  withval=$with_libffi_include;
63498fi
63499
63500
63501# Check whether --with-libffi-lib was given.
63502if test "${with_libffi_lib+set}" = set; then :
63503  withval=$with_libffi_lib;
63504fi
63505
63506  # Check whether --enable-libffi-bundling was given.
63507if test "${enable_libffi_bundling+set}" = set; then :
63508  enableval=$enable_libffi_bundling;
63509fi
63510
63511
63512  if test "x$NEEDS_LIB_FFI" = xfalse; then
63513    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63514        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63515        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63516      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63517$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63518    fi
63519    LIBFFI_CFLAGS=
63520    LIBFFI_LIBS=
63521  else
63522    LIBFFI_FOUND=no
63523
63524    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63525      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63526    fi
63527
63528    if test "x${with_libffi}" != x; then
63529      LIBFFI_LIB_PATH="${with_libffi}/lib"
63530      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63531      LIBFFI_CFLAGS="-I${with_libffi}/include"
63532      LIBFFI_FOUND=yes
63533    fi
63534    if test "x${with_libffi_include}" != x; then
63535      LIBFFI_CFLAGS="-I${with_libffi_include}"
63536      LIBFFI_FOUND=yes
63537    fi
63538    if test "x${with_libffi_lib}" != x; then
63539      LIBFFI_LIB_PATH="${with_libffi_lib}"
63540      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63541      LIBFFI_FOUND=yes
63542    fi
63543    # Do not try pkg-config if we have a sysroot set.
63544    if test "x$SYSROOT" = x; then
63545      if test "x$LIBFFI_FOUND" = xno; then
63546        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63547
63548pkg_failed=no
63549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63550$as_echo_n "checking for LIBFFI... " >&6; }
63551
63552if test -n "$LIBFFI_CFLAGS"; then
63553    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63554 elif test -n "$PKG_CONFIG"; then
63555    if test -n "$PKG_CONFIG" && \
63556    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63557  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63558  ac_status=$?
63559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63560  test $ac_status = 0; }; then
63561  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63562else
63563  pkg_failed=yes
63564fi
63565 else
63566    pkg_failed=untried
63567fi
63568if test -n "$LIBFFI_LIBS"; then
63569    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63570 elif test -n "$PKG_CONFIG"; then
63571    if test -n "$PKG_CONFIG" && \
63572    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63573  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63574  ac_status=$?
63575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63576  test $ac_status = 0; }; then
63577  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63578else
63579  pkg_failed=yes
63580fi
63581 else
63582    pkg_failed=untried
63583fi
63584
63585
63586
63587if test $pkg_failed = yes; then
63588
63589if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63590        _pkg_short_errors_supported=yes
63591else
63592        _pkg_short_errors_supported=no
63593fi
63594        if test $_pkg_short_errors_supported = yes; then
63595	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63596        else
63597	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63598        fi
63599	# Put the nasty error message in config.log where it belongs
63600	echo "$LIBFFI_PKG_ERRORS" >&5
63601
63602	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63603$as_echo "no" >&6; }
63604                LIBFFI_FOUND=no
63605elif test $pkg_failed = untried; then
63606	LIBFFI_FOUND=no
63607else
63608	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63609	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63611$as_echo "yes" >&6; }
63612	LIBFFI_FOUND=yes
63613fi
63614      fi
63615    fi
63616    if test "x$LIBFFI_FOUND" = xno; then
63617      for ac_header in ffi.h
63618do :
63619  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63620if test "x$ac_cv_header_ffi_h" = xyes; then :
63621  cat >>confdefs.h <<_ACEOF
63622#define HAVE_FFI_H 1
63623_ACEOF
63624
63625            LIBFFI_FOUND=yes
63626            LIBFFI_CFLAGS=
63627            LIBFFI_LIBS=-lffi
63628
63629else
63630  LIBFFI_FOUND=no
63631
63632fi
63633
63634done
63635
63636    fi
63637    if test "x$LIBFFI_FOUND" = xno; then
63638
63639  # Print a helpful message on how to acquire the necessary build dependency.
63640  # ffi is the help tag: freetype, cups, alsa etc
63641  MISSING_DEPENDENCY=ffi
63642
63643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63644    cygwin_help $MISSING_DEPENDENCY
63645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63646    msys_help $MISSING_DEPENDENCY
63647  else
63648    PKGHANDLER_COMMAND=
63649
63650    case $PKGHANDLER in
63651      apt-get)
63652        apt_help     $MISSING_DEPENDENCY ;;
63653      yum)
63654        yum_help     $MISSING_DEPENDENCY ;;
63655      brew)
63656        brew_help    $MISSING_DEPENDENCY ;;
63657      port)
63658        port_help    $MISSING_DEPENDENCY ;;
63659      pkgutil)
63660        pkgutil_help $MISSING_DEPENDENCY ;;
63661      pkgadd)
63662        pkgadd_help  $MISSING_DEPENDENCY ;;
63663    esac
63664
63665    if test "x$PKGHANDLER_COMMAND" != x; then
63666      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63667    fi
63668  fi
63669
63670      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63671    fi
63672
63673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63674$as_echo_n "checking if libffi works... " >&6; }
63675    ac_ext=c
63676ac_cpp='$CPP $CPPFLAGS'
63677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63679ac_compiler_gnu=$ac_cv_c_compiler_gnu
63680
63681    OLD_CFLAGS="$CFLAGS"
63682    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63683    OLD_LIBS="$LIBS"
63684    LIBS="$LIBS $LIBFFI_LIBS"
63685    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63686/* end confdefs.h.  */
63687#include <ffi.h>
63688int
63689main ()
63690{
63691
63692          ffi_call(NULL, NULL, NULL, NULL);
63693          return 0;
63694
63695  ;
63696  return 0;
63697}
63698_ACEOF
63699if ac_fn_c_try_link "$LINENO"; then :
63700  LIBFFI_WORKS=yes
63701else
63702  LIBFFI_WORKS=no
63703
63704fi
63705rm -f core conftest.err conftest.$ac_objext \
63706    conftest$ac_exeext conftest.$ac_ext
63707    CFLAGS="$OLD_CFLAGS"
63708    LIBS="$OLD_LIBS"
63709    ac_ext=cpp
63710ac_cpp='$CXXCPP $CPPFLAGS'
63711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63714
63715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63716$as_echo "$LIBFFI_WORKS" >&6; }
63717
63718    if test "x$LIBFFI_WORKS" = xno; then
63719
63720  # Print a helpful message on how to acquire the necessary build dependency.
63721  # ffi is the help tag: freetype, cups, alsa etc
63722  MISSING_DEPENDENCY=ffi
63723
63724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63725    cygwin_help $MISSING_DEPENDENCY
63726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63727    msys_help $MISSING_DEPENDENCY
63728  else
63729    PKGHANDLER_COMMAND=
63730
63731    case $PKGHANDLER in
63732      apt-get)
63733        apt_help     $MISSING_DEPENDENCY ;;
63734      yum)
63735        yum_help     $MISSING_DEPENDENCY ;;
63736      brew)
63737        brew_help    $MISSING_DEPENDENCY ;;
63738      port)
63739        port_help    $MISSING_DEPENDENCY ;;
63740      pkgutil)
63741        pkgutil_help $MISSING_DEPENDENCY ;;
63742      pkgadd)
63743        pkgadd_help  $MISSING_DEPENDENCY ;;
63744    esac
63745
63746    if test "x$PKGHANDLER_COMMAND" != x; then
63747      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63748    fi
63749  fi
63750
63751      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63752    fi
63753
63754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63755$as_echo_n "checking if libffi should be bundled... " >&6; }
63756    if test "x$enable_libffi_bundling" = "x"; then
63757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63758$as_echo "no" >&6; }
63759      ENABLE_LIBFFI_BUNDLING=false
63760    elif  test "x$enable_libffi_bundling" = "xno"; then
63761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63762$as_echo "no, forced" >&6; }
63763      ENABLE_LIBFFI_BUNDLING=false
63764    elif  test "x$enable_libffi_bundling" = "xyes"; then
63765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63766$as_echo "yes, forced" >&6; }
63767      ENABLE_LIBFFI_BUNDLING=true
63768    else
63769      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63770    fi
63771
63772    # Find the libffi.so.X to bundle
63773    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63774      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63775$as_echo_n "checking for libffi lib file location... " >&6; }
63776      if test "x${LIBFFI_LIB_PATH}" != x; then
63777        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63778          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63779        else
63780          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63781        fi
63782      else
63783        # If we don't have an explicit path, look in a few obvious places
63784        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63785          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63786            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63787          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63788            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63789          else
63790            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63791          fi
63792        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63793          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63794            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63795          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63796            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63797          else
63798            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63799          fi
63800        else
63801          # Fallback on the default /usr/lib dir
63802          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63803            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63804          else
63805            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63806          fi
63807        fi
63808      fi
63809      # Make sure the wildcard is evaluated
63810      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63812$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63813    fi
63814  fi
63815
63816
63817
63818
63819
63820
63821
63822  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63823    # Extract the first word of "llvm-config", so it can be a program name with args.
63824set dummy llvm-config; ac_word=$2
63825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63826$as_echo_n "checking for $ac_word... " >&6; }
63827if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63828  $as_echo_n "(cached) " >&6
63829else
63830  if test -n "$LLVM_CONFIG"; then
63831  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63832else
63833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63834for as_dir in $PATH
63835do
63836  IFS=$as_save_IFS
63837  test -z "$as_dir" && as_dir=.
63838    for ac_exec_ext in '' $ac_executable_extensions; do
63839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63840    ac_cv_prog_LLVM_CONFIG="llvm-config"
63841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63842    break 2
63843  fi
63844done
63845  done
63846IFS=$as_save_IFS
63847
63848fi
63849fi
63850LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63851if test -n "$LLVM_CONFIG"; then
63852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63853$as_echo "$LLVM_CONFIG" >&6; }
63854else
63855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63856$as_echo "no" >&6; }
63857fi
63858
63859
63860
63861    if test "x$LLVM_CONFIG" != xllvm-config; then
63862      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63863    fi
63864
63865    llvm_components="jit mcjit engine nativecodegen native"
63866    unset LLVM_CFLAGS
63867    for flag in $("$LLVM_CONFIG" --cxxflags); do
63868      if echo "${flag}" | grep -q '^-[ID]'; then
63869        if test "${flag}" != "-D_DEBUG" ; then
63870          if test "${LLVM_CFLAGS}" != "" ; then
63871            LLVM_CFLAGS="${LLVM_CFLAGS} "
63872          fi
63873          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63874        fi
63875      fi
63876    done
63877    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63878    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63879
63880    unset LLVM_LDFLAGS
63881    for flag in $("${LLVM_CONFIG}" --ldflags); do
63882      if echo "${flag}" | grep -q '^-L'; then
63883        if test "${LLVM_LDFLAGS}" != ""; then
63884          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63885        fi
63886        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63887      fi
63888    done
63889
63890    unset LLVM_LIBS
63891    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63892      if echo "${flag}" | grep -q '^-l'; then
63893        if test "${LLVM_LIBS}" != ""; then
63894          LLVM_LIBS="${LLVM_LIBS} "
63895        fi
63896        LLVM_LIBS="${LLVM_LIBS}${flag}"
63897      fi
63898    done
63899
63900    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63901    # always properly detect -ltinfo
63902    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63903
63904
63905
63906
63907  fi
63908
63909
63910
63911# Check whether --with-libjpeg was given.
63912if test "${with_libjpeg+set}" = set; then :
63913  withval=$with_libjpeg;
63914fi
63915
63916
63917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63918$as_echo_n "checking for which libjpeg to use... " >&6; }
63919  # default is bundled
63920  DEFAULT_LIBJPEG=bundled
63921  # if user didn't specify, use DEFAULT_LIBJPEG
63922  if test "x${with_libjpeg}" = "x"; then
63923    with_libjpeg=${DEFAULT_LIBJPEG}
63924  fi
63925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63926$as_echo "${with_libjpeg}" >&6; }
63927
63928  if test "x${with_libjpeg}" = "xbundled"; then
63929    USE_EXTERNAL_LIBJPEG=false
63930  elif test "x${with_libjpeg}" = "xsystem"; then
63931    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63932if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63933
63934else
63935   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63936fi
63937
63938
63939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63940$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63941if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63942  $as_echo_n "(cached) " >&6
63943else
63944  ac_check_lib_save_LIBS=$LIBS
63945LIBS="-ljpeg  $LIBS"
63946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63947/* end confdefs.h.  */
63948
63949/* Override any GCC internal prototype to avoid an error.
63950   Use char because int might match the return type of a GCC
63951   builtin and then its argument prototype would still apply.  */
63952#ifdef __cplusplus
63953extern "C"
63954#endif
63955char jpeg_CreateDecompress ();
63956int
63957main ()
63958{
63959return jpeg_CreateDecompress ();
63960  ;
63961  return 0;
63962}
63963_ACEOF
63964if ac_fn_cxx_try_link "$LINENO"; then :
63965  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63966else
63967  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63968fi
63969rm -f core conftest.err conftest.$ac_objext \
63970    conftest$ac_exeext conftest.$ac_ext
63971LIBS=$ac_check_lib_save_LIBS
63972fi
63973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63974$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63975if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63976  cat >>confdefs.h <<_ACEOF
63977#define HAVE_LIBJPEG 1
63978_ACEOF
63979
63980  LIBS="-ljpeg $LIBS"
63981
63982else
63983   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63984fi
63985
63986
63987    USE_EXTERNAL_LIBJPEG=true
63988  else
63989    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63990  fi
63991
63992
63993
63994
63995
63996# Check whether --with-giflib was given.
63997if test "${with_giflib+set}" = set; then :
63998  withval=$with_giflib;
63999fi
64000
64001
64002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64003$as_echo_n "checking for which giflib to use... " >&6; }
64004  # default is bundled
64005  DEFAULT_GIFLIB=bundled
64006  # if user didn't specify, use DEFAULT_GIFLIB
64007  if test "x${with_giflib}" = "x"; then
64008    with_giflib=${DEFAULT_GIFLIB}
64009  fi
64010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64011$as_echo "${with_giflib}" >&6; }
64012
64013  if test "x${with_giflib}" = "xbundled"; then
64014    USE_EXTERNAL_LIBGIF=false
64015  elif test "x${with_giflib}" = "xsystem"; then
64016    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64017if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64018
64019else
64020   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64021fi
64022
64023
64024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64025$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64026if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64027  $as_echo_n "(cached) " >&6
64028else
64029  ac_check_lib_save_LIBS=$LIBS
64030LIBS="-lgif  $LIBS"
64031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64032/* end confdefs.h.  */
64033
64034/* Override any GCC internal prototype to avoid an error.
64035   Use char because int might match the return type of a GCC
64036   builtin and then its argument prototype would still apply.  */
64037#ifdef __cplusplus
64038extern "C"
64039#endif
64040char DGifGetCode ();
64041int
64042main ()
64043{
64044return DGifGetCode ();
64045  ;
64046  return 0;
64047}
64048_ACEOF
64049if ac_fn_cxx_try_link "$LINENO"; then :
64050  ac_cv_lib_gif_DGifGetCode=yes
64051else
64052  ac_cv_lib_gif_DGifGetCode=no
64053fi
64054rm -f core conftest.err conftest.$ac_objext \
64055    conftest$ac_exeext conftest.$ac_ext
64056LIBS=$ac_check_lib_save_LIBS
64057fi
64058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64059$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64060if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64061  cat >>confdefs.h <<_ACEOF
64062#define HAVE_LIBGIF 1
64063_ACEOF
64064
64065  LIBS="-lgif $LIBS"
64066
64067else
64068   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64069fi
64070
64071
64072    USE_EXTERNAL_LIBGIF=true
64073  else
64074    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64075  fi
64076
64077
64078
64079
64080
64081# Check whether --with-libpng was given.
64082if test "${with_libpng+set}" = set; then :
64083  withval=$with_libpng;
64084fi
64085
64086
64087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64088$as_echo_n "checking for which libpng to use... " >&6; }
64089
64090  # default is bundled
64091  DEFAULT_LIBPNG=bundled
64092  # if user didn't specify, use DEFAULT_LIBPNG
64093  if test "x${with_libpng}" = "x"; then
64094    with_libpng=${DEFAULT_LIBPNG}
64095  fi
64096
64097  if test "x${with_libpng}" = "xbundled"; then
64098    USE_EXTERNAL_LIBPNG=false
64099    PNG_CFLAGS=""
64100    PNG_LIBS=""
64101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64102$as_echo "bundled" >&6; }
64103  elif test "x${with_libpng}" = "xsystem"; then
64104
64105pkg_failed=no
64106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64107$as_echo_n "checking for PNG... " >&6; }
64108
64109if test -n "$PNG_CFLAGS"; then
64110    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64111 elif test -n "$PKG_CONFIG"; then
64112    if test -n "$PKG_CONFIG" && \
64113    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64114  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64115  ac_status=$?
64116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64117  test $ac_status = 0; }; then
64118  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64119else
64120  pkg_failed=yes
64121fi
64122 else
64123    pkg_failed=untried
64124fi
64125if test -n "$PNG_LIBS"; then
64126    pkg_cv_PNG_LIBS="$PNG_LIBS"
64127 elif test -n "$PKG_CONFIG"; then
64128    if test -n "$PKG_CONFIG" && \
64129    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64130  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64131  ac_status=$?
64132  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64133  test $ac_status = 0; }; then
64134  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64135else
64136  pkg_failed=yes
64137fi
64138 else
64139    pkg_failed=untried
64140fi
64141
64142
64143
64144if test $pkg_failed = yes; then
64145
64146if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64147        _pkg_short_errors_supported=yes
64148else
64149        _pkg_short_errors_supported=no
64150fi
64151        if test $_pkg_short_errors_supported = yes; then
64152	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64153        else
64154	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64155        fi
64156	# Put the nasty error message in config.log where it belongs
64157	echo "$PNG_PKG_ERRORS" >&5
64158
64159	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64160$as_echo "no" >&6; }
64161                LIBPNG_FOUND=no
64162elif test $pkg_failed = untried; then
64163	LIBPNG_FOUND=no
64164else
64165	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64166	PNG_LIBS=$pkg_cv_PNG_LIBS
64167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64168$as_echo "yes" >&6; }
64169	LIBPNG_FOUND=yes
64170fi
64171    if test "x${LIBPNG_FOUND}" = "xyes"; then
64172      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64173      USE_EXTERNAL_LIBPNG=true
64174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64175$as_echo "system" >&6; }
64176    else
64177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64178$as_echo "system not found" >&6; }
64179      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64180    fi
64181  else
64182    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64183  fi
64184
64185
64186
64187
64188
64189
64190
64191# Check whether --with-zlib was given.
64192if test "${with_zlib+set}" = set; then :
64193  withval=$with_zlib;
64194fi
64195
64196
64197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64198$as_echo_n "checking for compress in -lz... " >&6; }
64199if ${ac_cv_lib_z_compress+:} false; then :
64200  $as_echo_n "(cached) " >&6
64201else
64202  ac_check_lib_save_LIBS=$LIBS
64203LIBS="-lz  $LIBS"
64204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64205/* end confdefs.h.  */
64206
64207/* Override any GCC internal prototype to avoid an error.
64208   Use char because int might match the return type of a GCC
64209   builtin and then its argument prototype would still apply.  */
64210#ifdef __cplusplus
64211extern "C"
64212#endif
64213char compress ();
64214int
64215main ()
64216{
64217return compress ();
64218  ;
64219  return 0;
64220}
64221_ACEOF
64222if ac_fn_cxx_try_link "$LINENO"; then :
64223  ac_cv_lib_z_compress=yes
64224else
64225  ac_cv_lib_z_compress=no
64226fi
64227rm -f core conftest.err conftest.$ac_objext \
64228    conftest$ac_exeext conftest.$ac_ext
64229LIBS=$ac_check_lib_save_LIBS
64230fi
64231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64232$as_echo "$ac_cv_lib_z_compress" >&6; }
64233if test "x$ac_cv_lib_z_compress" = xyes; then :
64234   ZLIB_FOUND=yes
64235else
64236   ZLIB_FOUND=no
64237fi
64238
64239
64240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64241$as_echo_n "checking for which zlib to use... " >&6; }
64242
64243  DEFAULT_ZLIB=system
64244  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64245    # On windows default is bundled...on others default is system
64246    DEFAULT_ZLIB=bundled
64247  fi
64248
64249  if test "x${ZLIB_FOUND}" != "xyes"; then
64250    # If we don't find any system...set default to bundled
64251    DEFAULT_ZLIB=bundled
64252  fi
64253
64254  # If user didn't specify, use DEFAULT_ZLIB
64255  if test "x${with_zlib}" = "x"; then
64256    with_zlib=${DEFAULT_ZLIB}
64257  fi
64258
64259  if test "x${with_zlib}" = "xbundled"; then
64260    USE_EXTERNAL_LIBZ=false
64261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64262$as_echo "bundled" >&6; }
64263  elif test "x${with_zlib}" = "xsystem"; then
64264    if test "x${ZLIB_FOUND}" = "xyes"; then
64265      USE_EXTERNAL_LIBZ=true
64266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64267$as_echo "system" >&6; }
64268    else
64269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64270$as_echo "system not found" >&6; }
64271      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64272    fi
64273  else
64274    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64275  fi
64276
64277
64278
64279
64280
64281# Check whether --with-lcms was given.
64282if test "${with_lcms+set}" = set; then :
64283  withval=$with_lcms;
64284fi
64285
64286
64287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64288$as_echo_n "checking for which lcms to use... " >&6; }
64289
64290  DEFAULT_LCMS=bundled
64291  # If user didn't specify, use DEFAULT_LCMS
64292  if test "x${with_lcms}" = "x"; then
64293    with_lcms=${DEFAULT_LCMS}
64294  fi
64295
64296  if test "x${with_lcms}" = "xbundled"; then
64297    USE_EXTERNAL_LCMS=false
64298    LCMS_CFLAGS=""
64299    LCMS_LIBS=""
64300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64301$as_echo "bundled" >&6; }
64302  elif test "x${with_lcms}" = "xsystem"; then
64303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64304$as_echo "system" >&6; }
64305
64306pkg_failed=no
64307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64308$as_echo_n "checking for LCMS... " >&6; }
64309
64310if test -n "$LCMS_CFLAGS"; then
64311    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64312 elif test -n "$PKG_CONFIG"; then
64313    if test -n "$PKG_CONFIG" && \
64314    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64315  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64316  ac_status=$?
64317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64318  test $ac_status = 0; }; then
64319  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64320else
64321  pkg_failed=yes
64322fi
64323 else
64324    pkg_failed=untried
64325fi
64326if test -n "$LCMS_LIBS"; then
64327    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64328 elif test -n "$PKG_CONFIG"; then
64329    if test -n "$PKG_CONFIG" && \
64330    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64331  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64332  ac_status=$?
64333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64334  test $ac_status = 0; }; then
64335  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64336else
64337  pkg_failed=yes
64338fi
64339 else
64340    pkg_failed=untried
64341fi
64342
64343
64344
64345if test $pkg_failed = yes; then
64346
64347if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64348        _pkg_short_errors_supported=yes
64349else
64350        _pkg_short_errors_supported=no
64351fi
64352        if test $_pkg_short_errors_supported = yes; then
64353	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64354        else
64355	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64356        fi
64357	# Put the nasty error message in config.log where it belongs
64358	echo "$LCMS_PKG_ERRORS" >&5
64359
64360	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64361$as_echo "no" >&6; }
64362                LCMS_FOUND=no
64363elif test $pkg_failed = untried; then
64364	LCMS_FOUND=no
64365else
64366	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64367	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64369$as_echo "yes" >&6; }
64370	LCMS_FOUND=yes
64371fi
64372    if test "x${LCMS_FOUND}" = "xyes"; then
64373      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64374      USE_EXTERNAL_LCMS=true
64375    else
64376      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64377    fi
64378  else
64379    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64380  fi
64381
64382
64383
64384
64385
64386
64387
64388
64389
64390
64391
64392
64393
64394  # Setup libm (the maths library)
64395  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64397$as_echo_n "checking for cos in -lm... " >&6; }
64398if ${ac_cv_lib_m_cos+:} false; then :
64399  $as_echo_n "(cached) " >&6
64400else
64401  ac_check_lib_save_LIBS=$LIBS
64402LIBS="-lm  $LIBS"
64403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64404/* end confdefs.h.  */
64405
64406/* Override any GCC internal prototype to avoid an error.
64407   Use char because int might match the return type of a GCC
64408   builtin and then its argument prototype would still apply.  */
64409#ifdef __cplusplus
64410extern "C"
64411#endif
64412char cos ();
64413int
64414main ()
64415{
64416return cos ();
64417  ;
64418  return 0;
64419}
64420_ACEOF
64421if ac_fn_cxx_try_link "$LINENO"; then :
64422  ac_cv_lib_m_cos=yes
64423else
64424  ac_cv_lib_m_cos=no
64425fi
64426rm -f core conftest.err conftest.$ac_objext \
64427    conftest$ac_exeext conftest.$ac_ext
64428LIBS=$ac_check_lib_save_LIBS
64429fi
64430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64431$as_echo "$ac_cv_lib_m_cos" >&6; }
64432if test "x$ac_cv_lib_m_cos" = xyes; then :
64433  cat >>confdefs.h <<_ACEOF
64434#define HAVE_LIBM 1
64435_ACEOF
64436
64437  LIBS="-lm $LIBS"
64438
64439else
64440
64441        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64442$as_echo "$as_me: Maths library was not found" >&6;}
64443
64444fi
64445
64446    LIBM="-lm"
64447  else
64448    LIBM=""
64449  fi
64450
64451
64452  # Setup libdl (for dynamic library loading)
64453  save_LIBS="$LIBS"
64454  LIBS=""
64455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64456$as_echo_n "checking for dlopen in -ldl... " >&6; }
64457if ${ac_cv_lib_dl_dlopen+:} false; then :
64458  $as_echo_n "(cached) " >&6
64459else
64460  ac_check_lib_save_LIBS=$LIBS
64461LIBS="-ldl  $LIBS"
64462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64463/* end confdefs.h.  */
64464
64465/* Override any GCC internal prototype to avoid an error.
64466   Use char because int might match the return type of a GCC
64467   builtin and then its argument prototype would still apply.  */
64468#ifdef __cplusplus
64469extern "C"
64470#endif
64471char dlopen ();
64472int
64473main ()
64474{
64475return dlopen ();
64476  ;
64477  return 0;
64478}
64479_ACEOF
64480if ac_fn_cxx_try_link "$LINENO"; then :
64481  ac_cv_lib_dl_dlopen=yes
64482else
64483  ac_cv_lib_dl_dlopen=no
64484fi
64485rm -f core conftest.err conftest.$ac_objext \
64486    conftest$ac_exeext conftest.$ac_ext
64487LIBS=$ac_check_lib_save_LIBS
64488fi
64489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64490$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64491if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64492  cat >>confdefs.h <<_ACEOF
64493#define HAVE_LIBDL 1
64494_ACEOF
64495
64496  LIBS="-ldl $LIBS"
64497
64498fi
64499
64500  LIBDL="$LIBS"
64501
64502  LIBS="$save_LIBS"
64503
64504  # Deprecated libraries, keep the flags for backwards compatibility
64505  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64506
64507
64508# Check whether --with-dxsdk was given.
64509if test "${with_dxsdk+set}" = set; then :
64510  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64511$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64512fi
64513
64514
64515
64516
64517# Check whether --with-dxsdk-lib was given.
64518if test "${with_dxsdk_lib+set}" = set; then :
64519  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64520$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64521fi
64522
64523
64524
64525
64526# Check whether --with-dxsdk-include was given.
64527if test "${with_dxsdk_include+set}" = set; then :
64528  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64529$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64530fi
64531
64532
64533  fi
64534
64535  # Control if libzip can use mmap. Available for purposes of overriding.
64536  LIBZIP_CAN_USE_MMAP=true
64537
64538
64539
64540  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64541    # Find the root of the Solaris Studio installation from the compiler path
64542    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64543    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64545$as_echo_n "checking for libstlport.so.1... " >&6; }
64546    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64547      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64548      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64549    fi
64550    if test -f "$STLPORT_LIB"; then
64551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64552$as_echo "yes, $STLPORT_LIB" >&6; }
64553
64554  # Only process if variable expands to non-empty
64555
64556  if test "x$STLPORT_LIB" != x; then
64557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64558
64559  # Input might be given as Windows format, start by converting to
64560  # unix format.
64561  path="$STLPORT_LIB"
64562  new_path=`$CYGPATH -u "$path"`
64563
64564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64567  # "foo.exe" is OK but "foo" is an error.
64568  #
64569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64570  # It is also a way to make sure we got the proper file name for the real test later on.
64571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64572  if test "x$test_shortpath" = x; then
64573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64574$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64575    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64576  fi
64577
64578  # Call helper function which possibly converts this using DOS-style short mode.
64579  # If so, the updated path is stored in $new_path.
64580
64581  input_path="$new_path"
64582  # Check if we need to convert this using DOS-style short mode. If the path
64583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64584  # take no chances and rewrite it.
64585  # Note: m4 eats our [], so we need to use [ and ] instead.
64586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64587  if test "x$has_forbidden_chars" != x; then
64588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64592      # Going to short mode and back again did indeed matter. Since short mode is
64593      # case insensitive, let's make it lowercase to improve readability.
64594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64595      # Now convert it back to Unix-style (cygpath)
64596      input_path=`$CYGPATH -u "$shortmode_path"`
64597      new_path="$input_path"
64598    fi
64599  fi
64600
64601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64602  if test "x$test_cygdrive_prefix" = x; then
64603    # As a simple fix, exclude /usr/bin since it's not a real path.
64604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64606      # a path prefixed by /cygdrive for fixpath to work.
64607      new_path="$CYGWIN_ROOT_PATH$input_path"
64608    fi
64609  fi
64610
64611
64612  if test "x$path" != "x$new_path"; then
64613    STLPORT_LIB="$new_path"
64614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64615$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64616  fi
64617
64618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64619
64620  path="$STLPORT_LIB"
64621  has_colon=`$ECHO $path | $GREP ^.:`
64622  new_path="$path"
64623  if test "x$has_colon" = x; then
64624    # Not in mixed or Windows style, start by that.
64625    new_path=`cmd //c echo $path`
64626  fi
64627
64628
64629  input_path="$new_path"
64630  # Check if we need to convert this using DOS-style short mode. If the path
64631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64632  # take no chances and rewrite it.
64633  # Note: m4 eats our [], so we need to use [ and ] instead.
64634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64635  if test "x$has_forbidden_chars" != x; then
64636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64638  fi
64639
64640
64641  windows_path="$new_path"
64642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64643    unix_path=`$CYGPATH -u "$windows_path"`
64644    new_path="$unix_path"
64645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64647    new_path="$unix_path"
64648  fi
64649
64650  if test "x$path" != "x$new_path"; then
64651    STLPORT_LIB="$new_path"
64652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64653$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64654  fi
64655
64656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64658
64659    else
64660      # We're on a unix platform. Hooray! :)
64661      path="$STLPORT_LIB"
64662      has_space=`$ECHO "$path" | $GREP " "`
64663      if test "x$has_space" != x; then
64664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64665$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64667      fi
64668
64669      # Use eval to expand a potential ~
64670      eval path="$path"
64671      if test ! -f "$path" && test ! -d "$path"; then
64672        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64673      fi
64674
64675      if test -d "$path"; then
64676        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64677      else
64678        dir="`$DIRNAME "$path"`"
64679        base="`$BASENAME "$path"`"
64680        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64681      fi
64682    fi
64683  fi
64684
64685    else
64686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64687$as_echo "no, not found at $STLPORT_LIB" >&6; }
64688      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64689    fi
64690
64691  fi
64692
64693
64694
64695# Check whether --with-libelf was given.
64696if test "${with_libelf+set}" = set; then :
64697  withval=$with_libelf;
64698fi
64699
64700
64701# Check whether --with-libelf-include was given.
64702if test "${with_libelf_include+set}" = set; then :
64703  withval=$with_libelf_include;
64704fi
64705
64706
64707# Check whether --with-libelf-lib was given.
64708if test "${with_libelf_lib+set}" = set; then :
64709  withval=$with_libelf_lib;
64710fi
64711
64712
64713  if test "x$ENABLE_AOT" = xfalse; then
64714    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64715        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64716        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64717      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64718$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64719    fi
64720    LIBELF_CFLAGS=
64721    LIBELF_LIBS=
64722  else
64723    LIBELF_FOUND=no
64724
64725    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64726      ENABLE_AOT="false"
64727      if test "x${enable_aot}" = xyes; then
64728        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64729      fi
64730    else
64731      if test "x${with_libelf}" != x; then
64732        ELF_LIBS="-L${with_libelf}/lib -lelf"
64733        ELF_CFLAGS="-I${with_libelf}/include"
64734        LIBELF_FOUND=yes
64735      fi
64736      if test "x${with_libelf_include}" != x; then
64737        ELF_CFLAGS="-I${with_libelf_include}"
64738        LIBELF_FOUND=yes
64739      fi
64740      if test "x${with_libelf_lib}" != x; then
64741        ELF_LIBS="-L${with_libelf_lib} -lelf"
64742        LIBELF_FOUND=yes
64743      fi
64744      # Do not try pkg-config if we have a sysroot set.
64745      if test "x$SYSROOT" = x; then
64746        if test "x$LIBELF_FOUND" = xno; then
64747          # Figure out ELF_CFLAGS and ELF_LIBS
64748
64749pkg_failed=no
64750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64751$as_echo_n "checking for ELF... " >&6; }
64752
64753if test -n "$ELF_CFLAGS"; then
64754    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64755 elif test -n "$PKG_CONFIG"; then
64756    if test -n "$PKG_CONFIG" && \
64757    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64758  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64759  ac_status=$?
64760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64761  test $ac_status = 0; }; then
64762  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64763else
64764  pkg_failed=yes
64765fi
64766 else
64767    pkg_failed=untried
64768fi
64769if test -n "$ELF_LIBS"; then
64770    pkg_cv_ELF_LIBS="$ELF_LIBS"
64771 elif test -n "$PKG_CONFIG"; then
64772    if test -n "$PKG_CONFIG" && \
64773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64774  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64775  ac_status=$?
64776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64777  test $ac_status = 0; }; then
64778  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64779else
64780  pkg_failed=yes
64781fi
64782 else
64783    pkg_failed=untried
64784fi
64785
64786
64787
64788if test $pkg_failed = yes; then
64789
64790if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64791        _pkg_short_errors_supported=yes
64792else
64793        _pkg_short_errors_supported=no
64794fi
64795        if test $_pkg_short_errors_supported = yes; then
64796	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64797        else
64798	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64799        fi
64800	# Put the nasty error message in config.log where it belongs
64801	echo "$ELF_PKG_ERRORS" >&5
64802
64803	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64804$as_echo "no" >&6; }
64805                LIBELF_FOUND=no
64806elif test $pkg_failed = untried; then
64807	LIBELF_FOUND=no
64808else
64809	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64810	ELF_LIBS=$pkg_cv_ELF_LIBS
64811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64812$as_echo "yes" >&6; }
64813	LIBELF_FOUND=yes
64814fi
64815        fi
64816      fi
64817      if test "x$LIBELF_FOUND" = xno; then
64818        for ac_header in libelf.h
64819do :
64820  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64821if test "x$ac_cv_header_libelf_h" = xyes; then :
64822  cat >>confdefs.h <<_ACEOF
64823#define HAVE_LIBELF_H 1
64824_ACEOF
64825
64826              LIBELF_FOUND=yes
64827              ELF_CFLAGS=
64828              ELF_LIBS=-lelf
64829
64830else
64831  LIBELF_FOUND=no
64832
64833fi
64834
64835done
64836
64837      fi
64838      if test "x$LIBELF_FOUND" = xno; then
64839        ENABLE_AOT="false"
64840
64841  # Print a helpful message on how to acquire the necessary build dependency.
64842  # elf is the help tag: freetype, cups, alsa etc
64843  MISSING_DEPENDENCY=elf
64844
64845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64846    cygwin_help $MISSING_DEPENDENCY
64847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64848    msys_help $MISSING_DEPENDENCY
64849  else
64850    PKGHANDLER_COMMAND=
64851
64852    case $PKGHANDLER in
64853      apt-get)
64854        apt_help     $MISSING_DEPENDENCY ;;
64855      yum)
64856        yum_help     $MISSING_DEPENDENCY ;;
64857      brew)
64858        brew_help    $MISSING_DEPENDENCY ;;
64859      port)
64860        port_help    $MISSING_DEPENDENCY ;;
64861      pkgutil)
64862        pkgutil_help $MISSING_DEPENDENCY ;;
64863      pkgadd)
64864        pkgadd_help  $MISSING_DEPENDENCY ;;
64865    esac
64866
64867    if test "x$PKGHANDLER_COMMAND" != x; then
64868      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64869    fi
64870  fi
64871
64872        if test "x${enable_aot}" = xyes; then
64873          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64874        else
64875          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64876$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64877        fi
64878      else
64879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64880$as_echo_n "checking if libelf works... " >&6; }
64881        ac_ext=c
64882ac_cpp='$CPP $CPPFLAGS'
64883ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64884ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64885ac_compiler_gnu=$ac_cv_c_compiler_gnu
64886
64887        OLD_CFLAGS="$CFLAGS"
64888        CFLAGS="$CFLAGS $ELF_CFLAGS"
64889        OLD_LIBS="$LIBS"
64890        LIBS="$LIBS $ELF_LIBS"
64891        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64892/* end confdefs.h.  */
64893#include <libelf.h>
64894int
64895main ()
64896{
64897
64898              elf_version(0);
64899              return 0;
64900
64901  ;
64902  return 0;
64903}
64904_ACEOF
64905if ac_fn_c_try_link "$LINENO"; then :
64906  LIBELF_WORKS=yes
64907else
64908  LIBELF_WORKS=no
64909
64910fi
64911rm -f core conftest.err conftest.$ac_objext \
64912    conftest$ac_exeext conftest.$ac_ext
64913        CFLAGS="$OLD_CFLAGS"
64914        LIBS="$OLD_LIBS"
64915        ac_ext=cpp
64916ac_cpp='$CXXCPP $CPPFLAGS'
64917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64920
64921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64922$as_echo "$LIBELF_WORKS" >&6; }
64923
64924        if test "x$LIBELF_WORKS" = xno; then
64925          ENABLE_AOT="false"
64926
64927  # Print a helpful message on how to acquire the necessary build dependency.
64928  # elf is the help tag: freetype, cups, alsa etc
64929  MISSING_DEPENDENCY=elf
64930
64931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64932    cygwin_help $MISSING_DEPENDENCY
64933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64934    msys_help $MISSING_DEPENDENCY
64935  else
64936    PKGHANDLER_COMMAND=
64937
64938    case $PKGHANDLER in
64939      apt-get)
64940        apt_help     $MISSING_DEPENDENCY ;;
64941      yum)
64942        yum_help     $MISSING_DEPENDENCY ;;
64943      brew)
64944        brew_help    $MISSING_DEPENDENCY ;;
64945      port)
64946        port_help    $MISSING_DEPENDENCY ;;
64947      pkgutil)
64948        pkgutil_help $MISSING_DEPENDENCY ;;
64949      pkgadd)
64950        pkgadd_help  $MISSING_DEPENDENCY ;;
64951    esac
64952
64953    if test "x$PKGHANDLER_COMMAND" != x; then
64954      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64955    fi
64956  fi
64957
64958          if test "x$enable_aot" = "xyes"; then
64959            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64960          else
64961            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64962$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64963          fi
64964        fi
64965      fi
64966    fi
64967  fi
64968
64969
64970
64971
64972
64973
64974
64975
64976
64977
64978
64979
64980
64981
64982
64983
64984
64985
64986# Hotspot setup depends on lib checks (AOT needs libelf).
64987
64988
64989  # The user can in some cases supply additional jvm features. For the custom
64990  # variant, this defines the entire variant.
64991
64992# Check whether --with-jvm-features was given.
64993if test "${with_jvm_features+set}" = set; then :
64994  withval=$with_jvm_features;
64995fi
64996
64997  if test "x$with_jvm_features" != x; then
64998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64999$as_echo_n "checking additional JVM features... " >&6; }
65000    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65002$as_echo "$JVM_FEATURES" >&6; }
65003  fi
65004
65005  # Override hotspot cpu definitions for ARM platforms
65006  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65007    HOTSPOT_TARGET_CPU=arm_32
65008    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65009    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65010    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65011  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65012    HOTSPOT_TARGET_CPU=arm_64
65013    HOTSPOT_TARGET_CPU_ARCH=arm
65014    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65015    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65016  fi
65017
65018  # Verify that dependencies are met for explicitly set features.
65019  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65020    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65021  fi
65022
65023  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65024    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65025  fi
65026
65027  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65028    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65029  fi
65030
65031  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65032    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65033  fi
65034
65035  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65036    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65037  fi
65038
65039  # Turn on additional features based on other parts of configure
65040  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65041    JVM_FEATURES="$JVM_FEATURES dtrace"
65042  else
65043    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65044      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65045    fi
65046  fi
65047
65048  if test "x$STATIC_BUILD" = "xtrue"; then
65049    JVM_FEATURES="$JVM_FEATURES static-build"
65050  else
65051    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65052      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65053    fi
65054  fi
65055
65056  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65057    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65058      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65059    fi
65060  fi
65061
65062  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65063    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65064      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65065    fi
65066  fi
65067
65068  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65069  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65070     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65071     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65072    JVM_FEATURES_jvmci="jvmci"
65073  else
65074    JVM_FEATURES_jvmci=""
65075  fi
65076
65077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65078$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65079  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65081$as_echo "yes, forced" >&6; }
65082    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65083      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65084    fi
65085    INCLUDE_GRAAL="true"
65086  else
65087    # By default enable graal build where AOT is available
65088    if test "x$ENABLE_AOT" = "xtrue"; then
65089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65090$as_echo "yes" >&6; }
65091      JVM_FEATURES_graal="graal"
65092      INCLUDE_GRAAL="true"
65093    else
65094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65095$as_echo "no" >&6; }
65096      JVM_FEATURES_graal=""
65097      INCLUDE_GRAAL="false"
65098    fi
65099  fi
65100
65101
65102
65103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65104$as_echo_n "checking if aot should be enabled... " >&6; }
65105  if test "x$ENABLE_AOT" = "xtrue"; then
65106    if test "x$enable_aot" = "xyes"; then
65107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65108$as_echo "yes, forced" >&6; }
65109    else
65110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65111$as_echo "yes" >&6; }
65112    fi
65113    JVM_FEATURES_aot="aot"
65114  else
65115    if test "x$enable_aot" = "xno"; then
65116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65117$as_echo "no, forced" >&6; }
65118    else
65119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65120$as_echo "no" >&6; }
65121    fi
65122    JVM_FEATURES_aot=""
65123  fi
65124
65125  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65126    # Default to use link time optimizations on minimal on arm
65127    JVM_FEATURES_link_time_opt="link-time-opt"
65128  else
65129    JVM_FEATURES_link_time_opt=""
65130  fi
65131
65132  # All variants but minimal (and custom) get these features
65133  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65134
65135  # Enable features depending on variant.
65136  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65137  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65138  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65139  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65140  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65141  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65142  JVM_FEATURES_custom="$JVM_FEATURES"
65143
65144
65145
65146
65147
65148
65149
65150
65151
65152  # Used for verification of Makefiles by check-jvm-feature
65153
65154
65155  # We don't support --with-jvm-interpreter anymore, use zero instead.
65156
65157
65158# Check whether --with-jvm-interpreter was given.
65159if test "${with_jvm_interpreter+set}" = set; then :
65160  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65161$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65162fi
65163
65164
65165
65166
65167###############################################################################
65168#
65169# We need to do some final tweaking, when everything else is done.
65170#
65171###############################################################################
65172
65173
65174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65175$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65176
65177  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65178    ENABLE_INTREE_EC=true
65179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65180$as_echo "yes" >&6; }
65181  else
65182    ENABLE_INTREE_EC=false
65183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65184$as_echo "no" >&6; }
65185  fi
65186
65187
65188
65189
65190  # Check whether --enable-jtreg-failure-handler was given.
65191if test "${enable_jtreg_failure_handler+set}" = set; then :
65192  enableval=$enable_jtreg_failure_handler;
65193fi
65194
65195
65196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65197$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65198
65199  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65200    if test "x$JT_HOME" = "x"; then
65201      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65202    else
65203      BUILD_FAILURE_HANDLER=true
65204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65205$as_echo "yes, forced" >&6; }
65206    fi
65207  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65208    BUILD_FAILURE_HANDLER=false
65209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65210$as_echo "no, forced" >&6; }
65211  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65212      || test "x$enable_jtreg_failure_handler" = "x"; then
65213    if test "x$JT_HOME" = "x"; then
65214      BUILD_FAILURE_HANDLER=false
65215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65216$as_echo "no, missing jtreg" >&6; }
65217    else
65218      BUILD_FAILURE_HANDLER=true
65219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65220$as_echo "yes, jtreg present" >&6; }
65221    fi
65222  else
65223    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65224  fi
65225
65226
65227
65228
65229  # Check whether --enable-generate-classlist was given.
65230if test "${enable_generate_classlist+set}" = set; then :
65231  enableval=$enable_generate_classlist;
65232fi
65233
65234
65235  # Check if it's likely that it's possible to generate the classlist. Depending
65236  # on exact jvm configuration it could be possible anyway.
65237  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65238    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65239  else
65240    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65241  fi
65242
65243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65244$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65245  if test "x$enable_generate_classlist" = "xyes"; then
65246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65247$as_echo "yes, forced" >&6; }
65248    ENABLE_GENERATE_CLASSLIST="true"
65249    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65250      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65251$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65252    fi
65253  elif test "x$enable_generate_classlist" = "xno"; then
65254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65255$as_echo "no, forced" >&6; }
65256    ENABLE_GENERATE_CLASSLIST="false"
65257  elif test "x$enable_generate_classlist" = "x"; then
65258    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65260$as_echo "yes" >&6; }
65261      ENABLE_GENERATE_CLASSLIST="true"
65262    else
65263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65264$as_echo "no" >&6; }
65265      ENABLE_GENERATE_CLASSLIST="false"
65266    fi
65267  else
65268    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65269  fi
65270
65271
65272
65273
65274###############################################################################
65275#
65276# Configure parts of the build that only affect the build performance,
65277# not the result.
65278#
65279###############################################################################
65280
65281
65282  # How many cores do we have on this build system?
65283
65284# Check whether --with-num-cores was given.
65285if test "${with_num_cores+set}" = set; then :
65286  withval=$with_num_cores;
65287fi
65288
65289  if test "x$with_num_cores" = x; then
65290    # The number of cores were not specified, try to probe them.
65291
65292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65293$as_echo_n "checking for number of cores... " >&6; }
65294  NUM_CORES=1
65295  FOUND_CORES=no
65296
65297  if test -f /proc/cpuinfo; then
65298    # Looks like a Linux (or cygwin) system
65299    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65300    FOUND_CORES=yes
65301  elif test -x /usr/sbin/psrinfo; then
65302    # Looks like a Solaris system
65303    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65304    FOUND_CORES=yes
65305  elif test -x /usr/sbin/sysctl; then
65306    # Looks like a MacOSX system
65307    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65308    FOUND_CORES=yes
65309  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65310    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65311    FOUND_CORES=yes
65312  elif test -n "$NUMBER_OF_PROCESSORS"; then
65313    # On windows, look in the env
65314    NUM_CORES=$NUMBER_OF_PROCESSORS
65315    FOUND_CORES=yes
65316  fi
65317
65318  if test "x$FOUND_CORES" = xyes; then
65319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65320$as_echo "$NUM_CORES" >&6; }
65321  else
65322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65323$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65324    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65325$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65326  fi
65327
65328  else
65329    NUM_CORES=$with_num_cores
65330  fi
65331
65332
65333
65334  # How much memory do we have on this build system?
65335
65336# Check whether --with-memory-size was given.
65337if test "${with_memory_size+set}" = set; then :
65338  withval=$with_memory_size;
65339fi
65340
65341  if test "x$with_memory_size" = x; then
65342    # The memory size was not specified, try to probe it.
65343
65344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65345$as_echo_n "checking for memory size... " >&6; }
65346  # Default to 1024 MB
65347  MEMORY_SIZE=1024
65348  FOUND_MEM=no
65349
65350  if test -f /proc/meminfo; then
65351    # Looks like a Linux (or cygwin) system
65352    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65353    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65354    FOUND_MEM=yes
65355  elif test -x /usr/sbin/prtconf; then
65356    # Looks like a Solaris or AIX system
65357    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65358    FOUND_MEM=yes
65359  elif test -x /usr/sbin/sysctl; then
65360    # Looks like a MacOSX system
65361    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65362    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65363    FOUND_MEM=yes
65364  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65365    # Windows, but without cygwin
65366    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65367    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65368    FOUND_MEM=yes
65369  fi
65370
65371  if test "x$FOUND_MEM" = xyes; then
65372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65373$as_echo "$MEMORY_SIZE MB" >&6; }
65374  else
65375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65376$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65378$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65379  fi
65380
65381  else
65382    MEMORY_SIZE=$with_memory_size
65383  fi
65384
65385
65386
65387  # Provide a decent default number of parallel jobs for make depending on
65388  # number of cores, amount of memory and machine architecture.
65389
65390# Check whether --with-jobs was given.
65391if test "${with_jobs+set}" = set; then :
65392  withval=$with_jobs;
65393fi
65394
65395  if test "x$with_jobs" = x; then
65396    # Number of jobs was not specified, calculate.
65397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65398$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65399    # Approximate memory in GB.
65400    memory_gb=`expr $MEMORY_SIZE / 1024`
65401    # Pick the lowest of memory in gb and number of cores.
65402    if test "$memory_gb" -lt "$NUM_CORES"; then
65403      JOBS="$memory_gb"
65404    else
65405      JOBS="$NUM_CORES"
65406    fi
65407    if test "$JOBS" -eq "0"; then
65408      JOBS=1
65409    fi
65410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65411$as_echo "$JOBS" >&6; }
65412  else
65413    JOBS=$with_jobs
65414  fi
65415
65416
65417
65418  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65419
65420# Check whether --with-test-jobs was given.
65421if test "${with_test_jobs+set}" = set; then :
65422  withval=$with_test_jobs;
65423fi
65424
65425  if test "x$with_test_jobs" = x; then
65426      TEST_JOBS=0
65427  else
65428      TEST_JOBS=$with_test_jobs
65429  fi
65430
65431
65432
65433# Setup arguments for the boot jdk (after cores and memory have been setup)
65434
65435  ##############################################################################
65436  #
65437  # Specify jvm options for anything that is run with the Boot JDK.
65438  # Not all JVM:s accept the same arguments on the command line.
65439  #
65440
65441# Check whether --with-boot-jdk-jvmargs was given.
65442if test "${with_boot_jdk_jvmargs+set}" = set; then :
65443  withval=$with_boot_jdk_jvmargs;
65444fi
65445
65446
65447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65448$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65449
65450  # Disable special log output when a debug build is used as Boot JDK...
65451
65452  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65453  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65454  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65455  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65456  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65457  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65458    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65459    JVM_ARG_OK=true
65460  else
65461    $ECHO "Arg failed:" >&5
65462    $ECHO "$OUTPUT" >&5
65463    JVM_ARG_OK=false
65464  fi
65465
65466
65467  # Force en-US environment
65468
65469  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65470  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65471  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65472  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65473  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65474  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65475    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65476    JVM_ARG_OK=true
65477  else
65478    $ECHO "Arg failed:" >&5
65479    $ECHO "$OUTPUT" >&5
65480    JVM_ARG_OK=false
65481  fi
65482
65483
65484  # Apply user provided options.
65485
65486  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65487  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65488  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65489  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65490  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65491  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65492    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65493    JVM_ARG_OK=true
65494  else
65495    $ECHO "Arg failed:" >&5
65496    $ECHO "$OUTPUT" >&5
65497    JVM_ARG_OK=false
65498  fi
65499
65500
65501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65502$as_echo "$boot_jdk_jvmargs" >&6; }
65503
65504  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65505  JAVA_FLAGS=$boot_jdk_jvmargs
65506
65507
65508
65509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65510$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65511
65512  # Starting amount of heap memory.
65513
65514  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65515  $ECHO "Command: $JAVA -Xms64M -version" >&5
65516  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65517  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65518  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65519  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65520    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65521    JVM_ARG_OK=true
65522  else
65523    $ECHO "Arg failed:" >&5
65524    $ECHO "$OUTPUT" >&5
65525    JVM_ARG_OK=false
65526  fi
65527
65528  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65529
65530  # Maximum amount of heap memory and stack size.
65531  JVM_HEAP_LIMIT_32="1024"
65532  # Running a 64 bit JVM allows for and requires a bigger heap
65533  JVM_HEAP_LIMIT_64="1600"
65534  STACK_SIZE_32=768
65535  STACK_SIZE_64=1536
65536  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65537  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65538    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65539  fi
65540  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65541    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65542  fi
65543  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65544    JVM_HEAP_LIMIT_32=512
65545    JVM_HEAP_LIMIT_64=512
65546  fi
65547
65548  if test "x$BOOT_JDK_BITS" = "x32"; then
65549    STACK_SIZE=$STACK_SIZE_32
65550    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65551  else
65552    STACK_SIZE=$STACK_SIZE_64
65553    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65554  fi
65555
65556  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65557  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65558  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65559  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65560  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65561  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65562    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65563    JVM_ARG_OK=true
65564  else
65565    $ECHO "Arg failed:" >&5
65566    $ECHO "$OUTPUT" >&5
65567    JVM_ARG_OK=false
65568  fi
65569
65570
65571  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65572  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65573  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65574  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65575  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65576  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65577    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65578    JVM_ARG_OK=true
65579  else
65580    $ECHO "Arg failed:" >&5
65581    $ECHO "$OUTPUT" >&5
65582    JVM_ARG_OK=false
65583  fi
65584
65585
65586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65587$as_echo "$boot_jdk_jvmargs_big" >&6; }
65588
65589  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65590
65591
65592  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65593    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65594    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65595  else
65596    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65597    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65598  fi
65599  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65600  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65602$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65604$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65605
65606
65607  # By default, the main javac compilations use big
65608  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65609
65610
65611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65612$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65613
65614  # Use serial gc for small short lived tools if possible
65615
65616  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65617  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65618  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65619  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65620  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65621  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65622    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65623    JVM_ARG_OK=true
65624  else
65625    $ECHO "Arg failed:" >&5
65626    $ECHO "$OUTPUT" >&5
65627    JVM_ARG_OK=false
65628  fi
65629
65630
65631  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65632  $ECHO "Command: $JAVA -Xms32M -version" >&5
65633  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65634  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65635  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65636  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65637    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65638    JVM_ARG_OK=true
65639  else
65640    $ECHO "Arg failed:" >&5
65641    $ECHO "$OUTPUT" >&5
65642    JVM_ARG_OK=false
65643  fi
65644
65645
65646  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65647  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65648  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65649  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65650  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65651  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65652    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65653    JVM_ARG_OK=true
65654  else
65655    $ECHO "Arg failed:" >&5
65656    $ECHO "$OUTPUT" >&5
65657    JVM_ARG_OK=false
65658  fi
65659
65660
65661  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65662  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65663  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65664  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65665  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65666  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65667    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65668    JVM_ARG_OK=true
65669  else
65670    $ECHO "Arg failed:" >&5
65671    $ECHO "$OUTPUT" >&5
65672    JVM_ARG_OK=false
65673  fi
65674
65675
65676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65677$as_echo "$boot_jdk_jvmargs_small" >&6; }
65678
65679  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65680
65681
65682  JAVA_TOOL_FLAGS_SMALL=""
65683  for f in $JAVA_FLAGS_SMALL; do
65684    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65685  done
65686
65687
65688
65689# Setup smart javac (after cores and memory have been setup)
65690
65691
65692# Check whether --with-sjavac-server-java was given.
65693if test "${with_sjavac_server_java+set}" = set; then :
65694  withval=$with_sjavac_server_java;
65695fi
65696
65697
65698  if test "x$with_sjavac_server_java" != x; then
65699    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65700    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65701    if test "x$FOUND_VERSION" = x; then
65702      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65703    fi
65704  else
65705    SJAVAC_SERVER_JAVA="$JAVA"
65706  fi
65707
65708
65709  if test "$MEMORY_SIZE" -gt "3000"; then
65710
65711  $ECHO "Check if jvm arg is ok: -d64" >&5
65712  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65713  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65714  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65715  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65716  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65717    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65718    JVM_ARG_OK=true
65719  else
65720    $ECHO "Arg failed:" >&5
65721    $ECHO "$OUTPUT" >&5
65722    JVM_ARG_OK=false
65723  fi
65724
65725    if test "$JVM_ARG_OK" = true; then
65726      JVM_64BIT=true
65727      JVM_ARG_OK=false
65728    fi
65729  fi
65730
65731  MX_VALUE=`expr $MEMORY_SIZE / 2`
65732  if test "$JVM_64BIT" = true; then
65733    # Set ms lower than mx since more than one instance of the server might
65734    # get launched at the same time before they figure out which instance won.
65735    MS_VALUE=512
65736    if test "$MX_VALUE" -gt "2048"; then
65737      MX_VALUE=2048
65738    fi
65739  else
65740    MS_VALUE=256
65741    if test "$MX_VALUE" -gt "1500"; then
65742      MX_VALUE=1500
65743    fi
65744  fi
65745  if test "$MX_VALUE" -lt "512"; then
65746    MX_VALUE=512
65747  fi
65748
65749  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65750  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65751  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65752  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65753  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65754  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65755    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65756    JVM_ARG_OK=true
65757  else
65758    $ECHO "Arg failed:" >&5
65759    $ECHO "$OUTPUT" >&5
65760    JVM_ARG_OK=false
65761  fi
65762
65763
65764
65765  # Check whether --enable-sjavac was given.
65766if test "${enable_sjavac+set}" = set; then :
65767  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65768else
65769  ENABLE_SJAVAC="no"
65770fi
65771
65772  if test "x$JVM_ARG_OK" = "xfalse"; then
65773    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65774$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65775    ENABLE_SJAVAC="no"
65776  fi
65777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65778$as_echo_n "checking whether to use sjavac... " >&6; }
65779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65780$as_echo "$ENABLE_SJAVAC" >&6; }
65781
65782
65783  # Check whether --enable-javac-server was given.
65784if test "${enable_javac_server+set}" = set; then :
65785  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65786else
65787  ENABLE_JAVAC_SERVER="yes"
65788fi
65789
65790  if test "x$JVM_ARG_OK" = "xfalse"; then
65791    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65792$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65793    ENABLE_JAVAC_SERVER="no"
65794  fi
65795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65796$as_echo_n "checking whether to use javac server... " >&6; }
65797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65798$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65799
65800
65801  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65802    # When using a server javac, the small client instances do not need much
65803    # resources.
65804    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65805  fi
65806
65807
65808# Setup use of icecc if requested
65809
65810  # Check whether --enable-icecc was given.
65811if test "${enable_icecc+set}" = set; then :
65812  enableval=$enable_icecc;
65813fi
65814
65815
65816  if test "x${enable_icecc}" = "xyes"; then
65817
65818
65819
65820  # Publish this variable in the help.
65821
65822
65823  if [ -z "${ICECC_CMD+x}" ]; then
65824    # The variable is not set by user, try to locate tool using the code snippet
65825    for ac_prog in icecc
65826do
65827  # Extract the first word of "$ac_prog", so it can be a program name with args.
65828set dummy $ac_prog; ac_word=$2
65829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65830$as_echo_n "checking for $ac_word... " >&6; }
65831if ${ac_cv_path_ICECC_CMD+:} false; then :
65832  $as_echo_n "(cached) " >&6
65833else
65834  case $ICECC_CMD in
65835  [\\/]* | ?:[\\/]*)
65836  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65837  ;;
65838  *)
65839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65840for as_dir in $PATH
65841do
65842  IFS=$as_save_IFS
65843  test -z "$as_dir" && as_dir=.
65844    for ac_exec_ext in '' $ac_executable_extensions; do
65845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65846    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65848    break 2
65849  fi
65850done
65851  done
65852IFS=$as_save_IFS
65853
65854  ;;
65855esac
65856fi
65857ICECC_CMD=$ac_cv_path_ICECC_CMD
65858if test -n "$ICECC_CMD"; then
65859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65860$as_echo "$ICECC_CMD" >&6; }
65861else
65862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65863$as_echo "no" >&6; }
65864fi
65865
65866
65867  test -n "$ICECC_CMD" && break
65868done
65869
65870  else
65871    # The variable is set, but is it from the command line or the environment?
65872
65873    # Try to remove the string !ICECC_CMD! from our list.
65874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65876      # If it failed, the variable was not from the command line. Ignore it,
65877      # but warn the user (except for BASH, which is always set by the calling BASH).
65878      if test "xICECC_CMD" != xBASH; then
65879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65880$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65881      fi
65882      # Try to locate tool using the code snippet
65883      for ac_prog in icecc
65884do
65885  # Extract the first word of "$ac_prog", so it can be a program name with args.
65886set dummy $ac_prog; ac_word=$2
65887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65888$as_echo_n "checking for $ac_word... " >&6; }
65889if ${ac_cv_path_ICECC_CMD+:} false; then :
65890  $as_echo_n "(cached) " >&6
65891else
65892  case $ICECC_CMD in
65893  [\\/]* | ?:[\\/]*)
65894  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65895  ;;
65896  *)
65897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65898for as_dir in $PATH
65899do
65900  IFS=$as_save_IFS
65901  test -z "$as_dir" && as_dir=.
65902    for ac_exec_ext in '' $ac_executable_extensions; do
65903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65904    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65906    break 2
65907  fi
65908done
65909  done
65910IFS=$as_save_IFS
65911
65912  ;;
65913esac
65914fi
65915ICECC_CMD=$ac_cv_path_ICECC_CMD
65916if test -n "$ICECC_CMD"; then
65917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65918$as_echo "$ICECC_CMD" >&6; }
65919else
65920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65921$as_echo "no" >&6; }
65922fi
65923
65924
65925  test -n "$ICECC_CMD" && break
65926done
65927
65928    else
65929      # If it succeeded, then it was overridden by the user. We will use it
65930      # for the tool.
65931
65932      # First remove it from the list of overridden variables, so we can test
65933      # for unknown variables in the end.
65934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65935
65936      # Check if we try to supply an empty value
65937      if test "x$ICECC_CMD" = x; then
65938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65939$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65941$as_echo_n "checking for ICECC_CMD... " >&6; }
65942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65943$as_echo "disabled" >&6; }
65944      else
65945        # Check if the provided tool contains a complete path.
65946        tool_specified="$ICECC_CMD"
65947        tool_basename="${tool_specified##*/}"
65948        if test "x$tool_basename" = "x$tool_specified"; then
65949          # A command without a complete path is provided, search $PATH.
65950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65951$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65952          # Extract the first word of "$tool_basename", so it can be a program name with args.
65953set dummy $tool_basename; ac_word=$2
65954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65955$as_echo_n "checking for $ac_word... " >&6; }
65956if ${ac_cv_path_ICECC_CMD+:} false; then :
65957  $as_echo_n "(cached) " >&6
65958else
65959  case $ICECC_CMD in
65960  [\\/]* | ?:[\\/]*)
65961  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65962  ;;
65963  *)
65964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65965for as_dir in $PATH
65966do
65967  IFS=$as_save_IFS
65968  test -z "$as_dir" && as_dir=.
65969    for ac_exec_ext in '' $ac_executable_extensions; do
65970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65971    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65973    break 2
65974  fi
65975done
65976  done
65977IFS=$as_save_IFS
65978
65979  ;;
65980esac
65981fi
65982ICECC_CMD=$ac_cv_path_ICECC_CMD
65983if test -n "$ICECC_CMD"; then
65984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65985$as_echo "$ICECC_CMD" >&6; }
65986else
65987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65988$as_echo "no" >&6; }
65989fi
65990
65991
65992          if test "x$ICECC_CMD" = x; then
65993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65994          fi
65995        else
65996          # Otherwise we believe it is a complete path. Use it as it is.
65997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65998$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66000$as_echo_n "checking for ICECC_CMD... " >&6; }
66001          if test ! -x "$tool_specified"; then
66002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66003$as_echo "not found" >&6; }
66004            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66005          fi
66006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66007$as_echo "$tool_specified" >&6; }
66008        fi
66009      fi
66010    fi
66011
66012  fi
66013
66014
66015
66016  if test "x$ICECC_CMD" = x; then
66017    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66018  fi
66019
66020
66021    old_path="$PATH"
66022
66023    # Look for icecc-create-env in some known places
66024    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66025
66026
66027
66028  # Publish this variable in the help.
66029
66030
66031  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66032    # The variable is not set by user, try to locate tool using the code snippet
66033    for ac_prog in icecc-create-env
66034do
66035  # Extract the first word of "$ac_prog", so it can be a program name with args.
66036set dummy $ac_prog; ac_word=$2
66037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66038$as_echo_n "checking for $ac_word... " >&6; }
66039if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66040  $as_echo_n "(cached) " >&6
66041else
66042  case $ICECC_CREATE_ENV in
66043  [\\/]* | ?:[\\/]*)
66044  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66045  ;;
66046  *)
66047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66048for as_dir in $PATH
66049do
66050  IFS=$as_save_IFS
66051  test -z "$as_dir" && as_dir=.
66052    for ac_exec_ext in '' $ac_executable_extensions; do
66053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66054    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66056    break 2
66057  fi
66058done
66059  done
66060IFS=$as_save_IFS
66061
66062  ;;
66063esac
66064fi
66065ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66066if test -n "$ICECC_CREATE_ENV"; then
66067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66068$as_echo "$ICECC_CREATE_ENV" >&6; }
66069else
66070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66071$as_echo "no" >&6; }
66072fi
66073
66074
66075  test -n "$ICECC_CREATE_ENV" && break
66076done
66077
66078  else
66079    # The variable is set, but is it from the command line or the environment?
66080
66081    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66084      # If it failed, the variable was not from the command line. Ignore it,
66085      # but warn the user (except for BASH, which is always set by the calling BASH).
66086      if test "xICECC_CREATE_ENV" != xBASH; then
66087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66088$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66089      fi
66090      # Try to locate tool using the code snippet
66091      for ac_prog in icecc-create-env
66092do
66093  # Extract the first word of "$ac_prog", so it can be a program name with args.
66094set dummy $ac_prog; ac_word=$2
66095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66096$as_echo_n "checking for $ac_word... " >&6; }
66097if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66098  $as_echo_n "(cached) " >&6
66099else
66100  case $ICECC_CREATE_ENV in
66101  [\\/]* | ?:[\\/]*)
66102  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66103  ;;
66104  *)
66105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66106for as_dir in $PATH
66107do
66108  IFS=$as_save_IFS
66109  test -z "$as_dir" && as_dir=.
66110    for ac_exec_ext in '' $ac_executable_extensions; do
66111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66112    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66114    break 2
66115  fi
66116done
66117  done
66118IFS=$as_save_IFS
66119
66120  ;;
66121esac
66122fi
66123ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66124if test -n "$ICECC_CREATE_ENV"; then
66125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66126$as_echo "$ICECC_CREATE_ENV" >&6; }
66127else
66128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66129$as_echo "no" >&6; }
66130fi
66131
66132
66133  test -n "$ICECC_CREATE_ENV" && break
66134done
66135
66136    else
66137      # If it succeeded, then it was overridden by the user. We will use it
66138      # for the tool.
66139
66140      # First remove it from the list of overridden variables, so we can test
66141      # for unknown variables in the end.
66142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66143
66144      # Check if we try to supply an empty value
66145      if test "x$ICECC_CREATE_ENV" = x; then
66146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66147$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66149$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66151$as_echo "disabled" >&6; }
66152      else
66153        # Check if the provided tool contains a complete path.
66154        tool_specified="$ICECC_CREATE_ENV"
66155        tool_basename="${tool_specified##*/}"
66156        if test "x$tool_basename" = "x$tool_specified"; then
66157          # A command without a complete path is provided, search $PATH.
66158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66159$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66160          # Extract the first word of "$tool_basename", so it can be a program name with args.
66161set dummy $tool_basename; ac_word=$2
66162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66163$as_echo_n "checking for $ac_word... " >&6; }
66164if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66165  $as_echo_n "(cached) " >&6
66166else
66167  case $ICECC_CREATE_ENV in
66168  [\\/]* | ?:[\\/]*)
66169  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66170  ;;
66171  *)
66172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66173for as_dir in $PATH
66174do
66175  IFS=$as_save_IFS
66176  test -z "$as_dir" && as_dir=.
66177    for ac_exec_ext in '' $ac_executable_extensions; do
66178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66179    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66181    break 2
66182  fi
66183done
66184  done
66185IFS=$as_save_IFS
66186
66187  ;;
66188esac
66189fi
66190ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66191if test -n "$ICECC_CREATE_ENV"; then
66192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66193$as_echo "$ICECC_CREATE_ENV" >&6; }
66194else
66195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66196$as_echo "no" >&6; }
66197fi
66198
66199
66200          if test "x$ICECC_CREATE_ENV" = x; then
66201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66202          fi
66203        else
66204          # Otherwise we believe it is a complete path. Use it as it is.
66205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66206$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66208$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66209          if test ! -x "$tool_specified"; then
66210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66211$as_echo "not found" >&6; }
66212            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66213          fi
66214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66215$as_echo "$tool_specified" >&6; }
66216        fi
66217      fi
66218    fi
66219
66220  fi
66221
66222
66223
66224  if test "x$ICECC_CREATE_ENV" = x; then
66225    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66226  fi
66227
66228
66229    # Use icecc-create-env to create a minimal compilation environment that can
66230    # be sent to the other hosts in the icecream cluster.
66231    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66232    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66233    # Older versions of icecc does not have the --gcc parameter
66234    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66235      icecc_gcc_arg="--gcc"
66236    fi
66237    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66238
66239  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66240      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66241          ${icecc_create_env_log} 2>&1 )
66242  if test "$?" != "0"; then
66243    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66244$as_echo "$as_me: icecc-create-env output:" >&6;}
66245    cat \
66246          ${icecc_create_env_log}
66247    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66248  fi
66249
66250    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66251      # For clang, the icecc compilerwrapper is needed. It usually resides next
66252      # to icecc-create-env.
66253
66254
66255
66256  # Publish this variable in the help.
66257
66258
66259  if [ -z "${ICECC_WRAPPER+x}" ]; then
66260    # The variable is not set by user, try to locate tool using the code snippet
66261    for ac_prog in compilerwrapper
66262do
66263  # Extract the first word of "$ac_prog", so it can be a program name with args.
66264set dummy $ac_prog; ac_word=$2
66265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66266$as_echo_n "checking for $ac_word... " >&6; }
66267if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66268  $as_echo_n "(cached) " >&6
66269else
66270  case $ICECC_WRAPPER in
66271  [\\/]* | ?:[\\/]*)
66272  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66273  ;;
66274  *)
66275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66276for as_dir in $PATH
66277do
66278  IFS=$as_save_IFS
66279  test -z "$as_dir" && as_dir=.
66280    for ac_exec_ext in '' $ac_executable_extensions; do
66281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66282    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66284    break 2
66285  fi
66286done
66287  done
66288IFS=$as_save_IFS
66289
66290  ;;
66291esac
66292fi
66293ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66294if test -n "$ICECC_WRAPPER"; then
66295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66296$as_echo "$ICECC_WRAPPER" >&6; }
66297else
66298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66299$as_echo "no" >&6; }
66300fi
66301
66302
66303  test -n "$ICECC_WRAPPER" && break
66304done
66305
66306  else
66307    # The variable is set, but is it from the command line or the environment?
66308
66309    # Try to remove the string !ICECC_WRAPPER! from our list.
66310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66312      # If it failed, the variable was not from the command line. Ignore it,
66313      # but warn the user (except for BASH, which is always set by the calling BASH).
66314      if test "xICECC_WRAPPER" != xBASH; then
66315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66316$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66317      fi
66318      # Try to locate tool using the code snippet
66319      for ac_prog in compilerwrapper
66320do
66321  # Extract the first word of "$ac_prog", so it can be a program name with args.
66322set dummy $ac_prog; ac_word=$2
66323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66324$as_echo_n "checking for $ac_word... " >&6; }
66325if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66326  $as_echo_n "(cached) " >&6
66327else
66328  case $ICECC_WRAPPER in
66329  [\\/]* | ?:[\\/]*)
66330  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66331  ;;
66332  *)
66333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66334for as_dir in $PATH
66335do
66336  IFS=$as_save_IFS
66337  test -z "$as_dir" && as_dir=.
66338    for ac_exec_ext in '' $ac_executable_extensions; do
66339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66340    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66342    break 2
66343  fi
66344done
66345  done
66346IFS=$as_save_IFS
66347
66348  ;;
66349esac
66350fi
66351ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66352if test -n "$ICECC_WRAPPER"; then
66353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66354$as_echo "$ICECC_WRAPPER" >&6; }
66355else
66356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66357$as_echo "no" >&6; }
66358fi
66359
66360
66361  test -n "$ICECC_WRAPPER" && break
66362done
66363
66364    else
66365      # If it succeeded, then it was overridden by the user. We will use it
66366      # for the tool.
66367
66368      # First remove it from the list of overridden variables, so we can test
66369      # for unknown variables in the end.
66370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66371
66372      # Check if we try to supply an empty value
66373      if test "x$ICECC_WRAPPER" = x; then
66374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66375$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66377$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66379$as_echo "disabled" >&6; }
66380      else
66381        # Check if the provided tool contains a complete path.
66382        tool_specified="$ICECC_WRAPPER"
66383        tool_basename="${tool_specified##*/}"
66384        if test "x$tool_basename" = "x$tool_specified"; then
66385          # A command without a complete path is provided, search $PATH.
66386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66387$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66388          # Extract the first word of "$tool_basename", so it can be a program name with args.
66389set dummy $tool_basename; ac_word=$2
66390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66391$as_echo_n "checking for $ac_word... " >&6; }
66392if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66393  $as_echo_n "(cached) " >&6
66394else
66395  case $ICECC_WRAPPER in
66396  [\\/]* | ?:[\\/]*)
66397  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66398  ;;
66399  *)
66400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66401for as_dir in $PATH
66402do
66403  IFS=$as_save_IFS
66404  test -z "$as_dir" && as_dir=.
66405    for ac_exec_ext in '' $ac_executable_extensions; do
66406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66407    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66409    break 2
66410  fi
66411done
66412  done
66413IFS=$as_save_IFS
66414
66415  ;;
66416esac
66417fi
66418ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66419if test -n "$ICECC_WRAPPER"; then
66420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66421$as_echo "$ICECC_WRAPPER" >&6; }
66422else
66423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66424$as_echo "no" >&6; }
66425fi
66426
66427
66428          if test "x$ICECC_WRAPPER" = x; then
66429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66430          fi
66431        else
66432          # Otherwise we believe it is a complete path. Use it as it is.
66433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66434$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66436$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66437          if test ! -x "$tool_specified"; then
66438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66439$as_echo "not found" >&6; }
66440            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66441          fi
66442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66443$as_echo "$tool_specified" >&6; }
66444        fi
66445      fi
66446    fi
66447
66448  fi
66449
66450
66451
66452  if test "x$ICECC_WRAPPER" = x; then
66453    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66454  fi
66455
66456
66457
66458  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66459      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66460  if test "$?" != "0"; then
66461    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66462$as_echo "$as_me: icecc-create-env output:" >&6;}
66463    cat ${icecc_create_env_log}
66464    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66465  fi
66466
66467    else
66468      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66469    fi
66470    PATH="$old_path"
66471    # The bundle with the compiler gets a name based on checksums. Parse log file
66472    # to find it.
66473    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66474    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66475    if test ! -f ${ICECC_ENV_BUNDLE}; then
66476      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66477    fi
66478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66479$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66481$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66482    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66483
66484    if test "x${COMPILE_TYPE}" = "xcross"; then
66485      # If cross compiling, create a separate env package for the build compiler
66486      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66487      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66488      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66489
66490  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66491      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66492            ${icecc_create_env_log_build} 2>&1 )
66493  if test "$?" != "0"; then
66494    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66495$as_echo "$as_me: icecc-create-env output:" >&6;}
66496    cat \
66497            ${icecc_create_env_log_build}
66498    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66499  fi
66500
66501      elif test "x${BUILD_CC##*/}" = "xclang"; then
66502
66503  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66504      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66505  if test "$?" != "0"; then
66506    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66507$as_echo "$as_me: icecc-create-env output:" >&6;}
66508    cat ${icecc_create_env_log_build}
66509    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66510  fi
66511
66512      else
66513        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66514      fi
66515      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66516      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66517      if test ! -f ${ICECC_ENV_BUNDLE}; then
66518        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66519      fi
66520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66521$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66523$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66524      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66525          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66526    else
66527      BUILD_ICECC="${ICECC}"
66528    fi
66529
66530
66531  fi
66532
66533
66534# Can the C/C++ compiler use precompiled headers?
66535
66536
66537  ###############################################################################
66538  #
66539  # Can the C/C++ compiler use precompiled headers?
66540  #
66541  # Check whether --enable-precompiled-headers was given.
66542if test "${enable_precompiled_headers+set}" = set; then :
66543  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66544else
66545  ENABLE_PRECOMPH=yes
66546fi
66547
66548
66549  USE_PRECOMPILED_HEADER=true
66550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66551$as_echo_n "checking If precompiled header is enabled... " >&6; }
66552  if test "x$ENABLE_PRECOMPH" = xno; then
66553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66554$as_echo "no, forced" >&6; }
66555    USE_PRECOMPILED_HEADER=false
66556  elif test "x$ICECC" != "x"; then
66557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66558$as_echo "no, does not work effectively with icecc" >&6; }
66559    USE_PRECOMPILED_HEADER=false
66560  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66562$as_echo "no, does not work with Solaris Studio" >&6; }
66563    USE_PRECOMPILED_HEADER=false
66564  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66566$as_echo "no, does not work with xlc" >&6; }
66567    USE_PRECOMPILED_HEADER=false
66568  else
66569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66570$as_echo "yes" >&6; }
66571  fi
66572
66573  if test "x$ENABLE_PRECOMPH" = xyes; then
66574    # Check that the compiler actually supports precomp headers.
66575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66577$as_echo_n "checking that precompiled headers work... " >&6; }
66578      echo "int alfa();" > conftest.h
66579      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66580      if test ! -f conftest.hpp.gch; then
66581        USE_PRECOMPILED_HEADER=false
66582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66583$as_echo "no" >&6; }
66584      else
66585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66586$as_echo "yes" >&6; }
66587      fi
66588      $RM conftest.h conftest.hpp.gch
66589    fi
66590  fi
66591
66592
66593
66594
66595# Setup use of ccache, if available
66596
66597  # Check whether --enable-ccache was given.
66598if test "${enable_ccache+set}" = set; then :
66599  enableval=$enable_ccache;
66600fi
66601
66602
66603  CCACHE_STATUS=
66604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66605$as_echo_n "checking is ccache enabled... " >&6; }
66606  if test "x$enable_ccache" = xyes; then
66607    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66609$as_echo "yes" >&6; }
66610      OLD_PATH="$PATH"
66611      if test "x$TOOLCHAIN_PATH" != x; then
66612        PATH=$TOOLCHAIN_PATH:$PATH
66613      fi
66614
66615
66616
66617  # Publish this variable in the help.
66618
66619
66620  if [ -z "${CCACHE+x}" ]; then
66621    # The variable is not set by user, try to locate tool using the code snippet
66622    for ac_prog in ccache
66623do
66624  # Extract the first word of "$ac_prog", so it can be a program name with args.
66625set dummy $ac_prog; ac_word=$2
66626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66627$as_echo_n "checking for $ac_word... " >&6; }
66628if ${ac_cv_path_CCACHE+:} false; then :
66629  $as_echo_n "(cached) " >&6
66630else
66631  case $CCACHE in
66632  [\\/]* | ?:[\\/]*)
66633  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66634  ;;
66635  *)
66636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66637for as_dir in $PATH
66638do
66639  IFS=$as_save_IFS
66640  test -z "$as_dir" && as_dir=.
66641    for ac_exec_ext in '' $ac_executable_extensions; do
66642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66643    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66645    break 2
66646  fi
66647done
66648  done
66649IFS=$as_save_IFS
66650
66651  ;;
66652esac
66653fi
66654CCACHE=$ac_cv_path_CCACHE
66655if test -n "$CCACHE"; then
66656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66657$as_echo "$CCACHE" >&6; }
66658else
66659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66660$as_echo "no" >&6; }
66661fi
66662
66663
66664  test -n "$CCACHE" && break
66665done
66666
66667  else
66668    # The variable is set, but is it from the command line or the environment?
66669
66670    # Try to remove the string !CCACHE! from our list.
66671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66673      # If it failed, the variable was not from the command line. Ignore it,
66674      # but warn the user (except for BASH, which is always set by the calling BASH).
66675      if test "xCCACHE" != xBASH; then
66676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66677$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66678      fi
66679      # Try to locate tool using the code snippet
66680      for ac_prog in ccache
66681do
66682  # Extract the first word of "$ac_prog", so it can be a program name with args.
66683set dummy $ac_prog; ac_word=$2
66684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66685$as_echo_n "checking for $ac_word... " >&6; }
66686if ${ac_cv_path_CCACHE+:} false; then :
66687  $as_echo_n "(cached) " >&6
66688else
66689  case $CCACHE in
66690  [\\/]* | ?:[\\/]*)
66691  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66692  ;;
66693  *)
66694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66695for as_dir in $PATH
66696do
66697  IFS=$as_save_IFS
66698  test -z "$as_dir" && as_dir=.
66699    for ac_exec_ext in '' $ac_executable_extensions; do
66700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66701    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66703    break 2
66704  fi
66705done
66706  done
66707IFS=$as_save_IFS
66708
66709  ;;
66710esac
66711fi
66712CCACHE=$ac_cv_path_CCACHE
66713if test -n "$CCACHE"; then
66714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66715$as_echo "$CCACHE" >&6; }
66716else
66717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66718$as_echo "no" >&6; }
66719fi
66720
66721
66722  test -n "$CCACHE" && break
66723done
66724
66725    else
66726      # If it succeeded, then it was overridden by the user. We will use it
66727      # for the tool.
66728
66729      # First remove it from the list of overridden variables, so we can test
66730      # for unknown variables in the end.
66731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66732
66733      # Check if we try to supply an empty value
66734      if test "x$CCACHE" = x; then
66735        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66736$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66738$as_echo_n "checking for CCACHE... " >&6; }
66739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66740$as_echo "disabled" >&6; }
66741      else
66742        # Check if the provided tool contains a complete path.
66743        tool_specified="$CCACHE"
66744        tool_basename="${tool_specified##*/}"
66745        if test "x$tool_basename" = "x$tool_specified"; then
66746          # A command without a complete path is provided, search $PATH.
66747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66748$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66749          # Extract the first word of "$tool_basename", so it can be a program name with args.
66750set dummy $tool_basename; ac_word=$2
66751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66752$as_echo_n "checking for $ac_word... " >&6; }
66753if ${ac_cv_path_CCACHE+:} false; then :
66754  $as_echo_n "(cached) " >&6
66755else
66756  case $CCACHE in
66757  [\\/]* | ?:[\\/]*)
66758  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66759  ;;
66760  *)
66761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66762for as_dir in $PATH
66763do
66764  IFS=$as_save_IFS
66765  test -z "$as_dir" && as_dir=.
66766    for ac_exec_ext in '' $ac_executable_extensions; do
66767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66768    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66770    break 2
66771  fi
66772done
66773  done
66774IFS=$as_save_IFS
66775
66776  ;;
66777esac
66778fi
66779CCACHE=$ac_cv_path_CCACHE
66780if test -n "$CCACHE"; then
66781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66782$as_echo "$CCACHE" >&6; }
66783else
66784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66785$as_echo "no" >&6; }
66786fi
66787
66788
66789          if test "x$CCACHE" = x; then
66790            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66791          fi
66792        else
66793          # Otherwise we believe it is a complete path. Use it as it is.
66794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66795$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66796          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66797$as_echo_n "checking for CCACHE... " >&6; }
66798          if test ! -x "$tool_specified"; then
66799            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66800$as_echo "not found" >&6; }
66801            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66802          fi
66803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66804$as_echo "$tool_specified" >&6; }
66805        fi
66806      fi
66807    fi
66808
66809  fi
66810
66811
66812
66813  if test "x$CCACHE" = x; then
66814    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66815  fi
66816
66817
66818      PATH="$OLD_PATH"
66819      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66820      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66821    else
66822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66823$as_echo "no" >&6; }
66824      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66825$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66826    fi
66827  elif test "x$enable_ccache" = xno; then
66828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66829$as_echo "no, explicitly disabled" >&6; }
66830    CCACHE_STATUS="Disabled"
66831  elif test "x$enable_ccache" = x; then
66832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66833$as_echo "no" >&6; }
66834  else
66835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66836$as_echo "unknown" >&6; }
66837    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66838  fi
66839
66840
66841
66842# Check whether --with-ccache-dir was given.
66843if test "${with_ccache_dir+set}" = set; then :
66844  withval=$with_ccache_dir;
66845fi
66846
66847
66848  if test "x$with_ccache_dir" != x; then
66849    # When using a non home ccache directory, assume the use is to share ccache files
66850    # with other users. Thus change the umask.
66851    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66852    if test "x$CCACHE" = x; then
66853      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66854$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66855    fi
66856  fi
66857
66858  if test "x$CCACHE" != x; then
66859
66860  if test "x$CCACHE" != x; then
66861    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66862      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66863          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66864      if test "x$HAS_BAD_CCACHE" != "x"; then
66865        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66866      fi
66867    fi
66868    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66869      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66870          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66871      if test "x$HAS_BAD_CCACHE" != "x"; then
66872        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66873      fi
66874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66875$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66876      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66877      PUSHED_FLAGS="$CXXFLAGS"
66878      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66879      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66880/* end confdefs.h.  */
66881
66882int
66883main ()
66884{
66885
66886  ;
66887  return 0;
66888}
66889_ACEOF
66890if ac_fn_cxx_try_compile "$LINENO"; then :
66891  CC_KNOWS_CCACHE_TRICK=yes
66892else
66893  CC_KNOWS_CCACHE_TRICK=no
66894fi
66895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66896      CXXFLAGS="$PUSHED_FLAGS"
66897      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66899$as_echo "yes" >&6; }
66900        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66901
66902        CCACHE_SLOPPINESS=pch_defines,time_macros
66903      else
66904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66905$as_echo "no" >&6; }
66906        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66907      fi
66908    fi
66909
66910    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66911        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66912
66913    if test "x$SET_CCACHE_DIR" != x; then
66914      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66915      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66916    fi
66917  fi
66918
66919  fi
66920
66921
66922###############################################################################
66923#
66924# And now the finish...
66925#
66926###############################################################################
66927
66928# Check for some common pitfalls
66929
66930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66931    file_to_test="$SRC_ROOT/LICENSE"
66932    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66933      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
66934    fi
66935  fi
66936
66937
66938  # Did user specify any unknown variables?
66939
66940  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66941    # Replace the separating ! with spaces before presenting for end user.
66942    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66943    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66944$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66945  fi
66946
66947
66948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66949$as_echo_n "checking if build directory is on local disk... " >&6; }
66950
66951  # df -l lists only local disks; if the given directory is not found then
66952  # a non-zero exit code is given
66953  if test "x$DF" = x; then
66954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66955      # msys does not have df; use Windows "net use" instead.
66956      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66957      if test "x$IS_NETWORK_DISK" = x; then
66958        OUTPUT_DIR_IS_LOCAL="yes"
66959      else
66960        OUTPUT_DIR_IS_LOCAL="no"
66961      fi
66962    else
66963      # No df here, say it's local
66964      OUTPUT_DIR_IS_LOCAL="yes"
66965    fi
66966  else
66967    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66968      OUTPUT_DIR_IS_LOCAL="yes"
66969    else
66970      OUTPUT_DIR_IS_LOCAL="no"
66971    fi
66972  fi
66973
66974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66975$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66976
66977
66978
66979  # Check if the user has any old-style ALT_ variables set.
66980  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66981
66982  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66983  # Since we can't properly handle the dependencies for this, warn the user about the situation
66984  if test -e $OUTPUT_ROOT/spec.gmk; then
66985    IS_RECONFIGURE=yes
66986  else
66987    IS_RECONFIGURE=no
66988  fi
66989
66990
66991# At the end, call the custom hook. (Dummy macro if no custom sources available)
66992
66993
66994# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66995
66996  # Keep feature lists sorted and free of duplicates
66997  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66998  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66999  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67000  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67001  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67002  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67003  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67004
67005  # Validate features
67006  for variant in $JVM_VARIANTS; do
67007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67008$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67009    features_var_name=JVM_FEATURES_$variant
67010    JVM_FEATURES_TO_TEST=${!features_var_name}
67011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67012$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67013    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67014    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67015    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67016    if test "x$INVALID_FEATURES" != x; then
67017      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67018    fi
67019  done
67020
67021
67022# We're messing a bit with internal autoconf variables to put the config.status
67023# in the output directory instead of the current directory.
67024CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67025
67026# Create the actual output files. Now the main work of configure is done.
67027cat >confcache <<\_ACEOF
67028# This file is a shell script that caches the results of configure
67029# tests run on this system so they can be shared between configure
67030# scripts and configure runs, see configure's option --config-cache.
67031# It is not useful on other systems.  If it contains results you don't
67032# want to keep, you may remove or edit it.
67033#
67034# config.status only pays attention to the cache file if you give it
67035# the --recheck option to rerun configure.
67036#
67037# `ac_cv_env_foo' variables (set or unset) will be overridden when
67038# loading this file, other *unset* `ac_cv_foo' will be assigned the
67039# following values.
67040
67041_ACEOF
67042
67043# The following way of writing the cache mishandles newlines in values,
67044# but we know of no workaround that is simple, portable, and efficient.
67045# So, we kill variables containing newlines.
67046# Ultrix sh set writes to stderr and can't be redirected directly,
67047# and sets the high bit in the cache file unless we assign to the vars.
67048(
67049  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67050    eval ac_val=\$$ac_var
67051    case $ac_val in #(
67052    *${as_nl}*)
67053      case $ac_var in #(
67054      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67055$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67056      esac
67057      case $ac_var in #(
67058      _ | IFS | as_nl) ;; #(
67059      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67060      *) { eval $ac_var=; unset $ac_var;} ;;
67061      esac ;;
67062    esac
67063  done
67064
67065  (set) 2>&1 |
67066    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67067    *${as_nl}ac_space=\ *)
67068      # `set' does not quote correctly, so add quotes: double-quote
67069      # substitution turns \\\\ into \\, and sed turns \\ into \.
67070      sed -n \
67071	"s/'/'\\\\''/g;
67072	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67073      ;; #(
67074    *)
67075      # `set' quotes correctly as required by POSIX, so do not add quotes.
67076      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67077      ;;
67078    esac |
67079    sort
67080) |
67081  sed '
67082     /^ac_cv_env_/b end
67083     t clear
67084     :clear
67085     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67086     t end
67087     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67088     :end' >>confcache
67089if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67090  if test -w "$cache_file"; then
67091    if test "x$cache_file" != "x/dev/null"; then
67092      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67093$as_echo "$as_me: updating cache $cache_file" >&6;}
67094      if test ! -f "$cache_file" || test -h "$cache_file"; then
67095	cat confcache >"$cache_file"
67096      else
67097        case $cache_file in #(
67098        */* | ?:*)
67099	  mv -f confcache "$cache_file"$$ &&
67100	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67101        *)
67102	  mv -f confcache "$cache_file" ;;
67103	esac
67104      fi
67105    fi
67106  else
67107    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67108$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67109  fi
67110fi
67111rm -f confcache
67112
67113test "x$prefix" = xNONE && prefix=$ac_default_prefix
67114# Let make expand exec_prefix.
67115test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67116
67117# Transform confdefs.h into DEFS.
67118# Protect against shell expansion while executing Makefile rules.
67119# Protect against Makefile macro expansion.
67120#
67121# If the first sed substitution is executed (which looks for macros that
67122# take arguments), then branch to the quote section.  Otherwise,
67123# look for a macro that doesn't take arguments.
67124ac_script='
67125:mline
67126/\\$/{
67127 N
67128 s,\\\n,,
67129 b mline
67130}
67131t clear
67132:clear
67133s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67134t quote
67135s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67136t quote
67137b any
67138:quote
67139s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67140s/\[/\\&/g
67141s/\]/\\&/g
67142s/\$/$$/g
67143H
67144:any
67145${
67146	g
67147	s/^\n//
67148	s/\n/ /g
67149	p
67150}
67151'
67152DEFS=`sed -n "$ac_script" confdefs.h`
67153
67154
67155ac_libobjs=
67156ac_ltlibobjs=
67157U=
67158for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67159  # 1. Remove the extension, and $U if already installed.
67160  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67161  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67162  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67163  #    will be set to the directory where LIBOBJS objects are built.
67164  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67165  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67166done
67167LIBOBJS=$ac_libobjs
67168
67169LTLIBOBJS=$ac_ltlibobjs
67170
67171
67172
67173: "${CONFIG_STATUS=./config.status}"
67174ac_write_fail=0
67175ac_clean_files_save=$ac_clean_files
67176ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67177{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67178$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67179as_write_fail=0
67180cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67181#! $SHELL
67182# Generated by $as_me.
67183# Run this file to recreate the current configuration.
67184# Compiler output produced by configure, useful for debugging
67185# configure, is in config.log if it exists.
67186
67187debug=false
67188ac_cs_recheck=false
67189ac_cs_silent=false
67190
67191SHELL=\${CONFIG_SHELL-$SHELL}
67192export SHELL
67193_ASEOF
67194cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67195## -------------------- ##
67196## M4sh Initialization. ##
67197## -------------------- ##
67198
67199# Be more Bourne compatible
67200DUALCASE=1; export DUALCASE # for MKS sh
67201if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67202  emulate sh
67203  NULLCMD=:
67204  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67205  # is contrary to our usage.  Disable this feature.
67206  alias -g '${1+"$@"}'='"$@"'
67207  setopt NO_GLOB_SUBST
67208else
67209  case `(set -o) 2>/dev/null` in #(
67210  *posix*) :
67211    set -o posix ;; #(
67212  *) :
67213     ;;
67214esac
67215fi
67216
67217
67218as_nl='
67219'
67220export as_nl
67221# Printing a long string crashes Solaris 7 /usr/bin/printf.
67222as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67223as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67224as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67225# Prefer a ksh shell builtin over an external printf program on Solaris,
67226# but without wasting forks for bash or zsh.
67227if test -z "$BASH_VERSION$ZSH_VERSION" \
67228    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67229  as_echo='print -r --'
67230  as_echo_n='print -rn --'
67231elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67232  as_echo='printf %s\n'
67233  as_echo_n='printf %s'
67234else
67235  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67236    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67237    as_echo_n='/usr/ucb/echo -n'
67238  else
67239    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67240    as_echo_n_body='eval
67241      arg=$1;
67242      case $arg in #(
67243      *"$as_nl"*)
67244	expr "X$arg" : "X\\(.*\\)$as_nl";
67245	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67246      esac;
67247      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67248    '
67249    export as_echo_n_body
67250    as_echo_n='sh -c $as_echo_n_body as_echo'
67251  fi
67252  export as_echo_body
67253  as_echo='sh -c $as_echo_body as_echo'
67254fi
67255
67256# The user is always right.
67257if test "${PATH_SEPARATOR+set}" != set; then
67258  PATH_SEPARATOR=:
67259  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67260    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67261      PATH_SEPARATOR=';'
67262  }
67263fi
67264
67265
67266# IFS
67267# We need space, tab and new line, in precisely that order.  Quoting is
67268# there to prevent editors from complaining about space-tab.
67269# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67270# splitting by setting IFS to empty value.)
67271IFS=" ""	$as_nl"
67272
67273# Find who we are.  Look in the path if we contain no directory separator.
67274as_myself=
67275case $0 in #((
67276  *[\\/]* ) as_myself=$0 ;;
67277  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67278for as_dir in $PATH
67279do
67280  IFS=$as_save_IFS
67281  test -z "$as_dir" && as_dir=.
67282    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67283  done
67284IFS=$as_save_IFS
67285
67286     ;;
67287esac
67288# We did not find ourselves, most probably we were run as `sh COMMAND'
67289# in which case we are not to be found in the path.
67290if test "x$as_myself" = x; then
67291  as_myself=$0
67292fi
67293if test ! -f "$as_myself"; then
67294  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67295  exit 1
67296fi
67297
67298# Unset variables that we do not need and which cause bugs (e.g. in
67299# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67300# suppresses any "Segmentation fault" message there.  '((' could
67301# trigger a bug in pdksh 5.2.14.
67302for as_var in BASH_ENV ENV MAIL MAILPATH
67303do eval test x\${$as_var+set} = xset \
67304  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67305done
67306PS1='$ '
67307PS2='> '
67308PS4='+ '
67309
67310# NLS nuisances.
67311LC_ALL=C
67312export LC_ALL
67313LANGUAGE=C
67314export LANGUAGE
67315
67316# CDPATH.
67317(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67318
67319
67320# as_fn_error STATUS ERROR [LINENO LOG_FD]
67321# ----------------------------------------
67322# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67323# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67324# script with STATUS, using 1 if that was 0.
67325as_fn_error ()
67326{
67327  as_status=$1; test $as_status -eq 0 && as_status=1
67328  if test "$4"; then
67329    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67330    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67331  fi
67332  $as_echo "$as_me: error: $2" >&2
67333  as_fn_exit $as_status
67334} # as_fn_error
67335
67336
67337# as_fn_set_status STATUS
67338# -----------------------
67339# Set $? to STATUS, without forking.
67340as_fn_set_status ()
67341{
67342  return $1
67343} # as_fn_set_status
67344
67345# as_fn_exit STATUS
67346# -----------------
67347# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67348as_fn_exit ()
67349{
67350  set +e
67351  as_fn_set_status $1
67352  exit $1
67353} # as_fn_exit
67354
67355# as_fn_unset VAR
67356# ---------------
67357# Portably unset VAR.
67358as_fn_unset ()
67359{
67360  { eval $1=; unset $1;}
67361}
67362as_unset=as_fn_unset
67363# as_fn_append VAR VALUE
67364# ----------------------
67365# Append the text in VALUE to the end of the definition contained in VAR. Take
67366# advantage of any shell optimizations that allow amortized linear growth over
67367# repeated appends, instead of the typical quadratic growth present in naive
67368# implementations.
67369if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67370  eval 'as_fn_append ()
67371  {
67372    eval $1+=\$2
67373  }'
67374else
67375  as_fn_append ()
67376  {
67377    eval $1=\$$1\$2
67378  }
67379fi # as_fn_append
67380
67381# as_fn_arith ARG...
67382# ------------------
67383# Perform arithmetic evaluation on the ARGs, and store the result in the
67384# global $as_val. Take advantage of shells that can avoid forks. The arguments
67385# must be portable across $(()) and expr.
67386if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67387  eval 'as_fn_arith ()
67388  {
67389    as_val=$(( $* ))
67390  }'
67391else
67392  as_fn_arith ()
67393  {
67394    as_val=`expr "$@" || test $? -eq 1`
67395  }
67396fi # as_fn_arith
67397
67398
67399if expr a : '\(a\)' >/dev/null 2>&1 &&
67400   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67401  as_expr=expr
67402else
67403  as_expr=false
67404fi
67405
67406if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67407  as_basename=basename
67408else
67409  as_basename=false
67410fi
67411
67412if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67413  as_dirname=dirname
67414else
67415  as_dirname=false
67416fi
67417
67418as_me=`$as_basename -- "$0" ||
67419$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67420	 X"$0" : 'X\(//\)$' \| \
67421	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67422$as_echo X/"$0" |
67423    sed '/^.*\/\([^/][^/]*\)\/*$/{
67424	    s//\1/
67425	    q
67426	  }
67427	  /^X\/\(\/\/\)$/{
67428	    s//\1/
67429	    q
67430	  }
67431	  /^X\/\(\/\).*/{
67432	    s//\1/
67433	    q
67434	  }
67435	  s/.*/./; q'`
67436
67437# Avoid depending upon Character Ranges.
67438as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67439as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67440as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67441as_cr_digits='0123456789'
67442as_cr_alnum=$as_cr_Letters$as_cr_digits
67443
67444ECHO_C= ECHO_N= ECHO_T=
67445case `echo -n x` in #(((((
67446-n*)
67447  case `echo 'xy\c'` in
67448  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67449  xy)  ECHO_C='\c';;
67450  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67451       ECHO_T='	';;
67452  esac;;
67453*)
67454  ECHO_N='-n';;
67455esac
67456
67457rm -f conf$$ conf$$.exe conf$$.file
67458if test -d conf$$.dir; then
67459  rm -f conf$$.dir/conf$$.file
67460else
67461  rm -f conf$$.dir
67462  mkdir conf$$.dir 2>/dev/null
67463fi
67464if (echo >conf$$.file) 2>/dev/null; then
67465  if ln -s conf$$.file conf$$ 2>/dev/null; then
67466    as_ln_s='ln -s'
67467    # ... but there are two gotchas:
67468    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67469    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67470    # In both cases, we have to default to `cp -pR'.
67471    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67472      as_ln_s='cp -pR'
67473  elif ln conf$$.file conf$$ 2>/dev/null; then
67474    as_ln_s=ln
67475  else
67476    as_ln_s='cp -pR'
67477  fi
67478else
67479  as_ln_s='cp -pR'
67480fi
67481rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67482rmdir conf$$.dir 2>/dev/null
67483
67484
67485# as_fn_mkdir_p
67486# -------------
67487# Create "$as_dir" as a directory, including parents if necessary.
67488as_fn_mkdir_p ()
67489{
67490
67491  case $as_dir in #(
67492  -*) as_dir=./$as_dir;;
67493  esac
67494  test -d "$as_dir" || eval $as_mkdir_p || {
67495    as_dirs=
67496    while :; do
67497      case $as_dir in #(
67498      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67499      *) as_qdir=$as_dir;;
67500      esac
67501      as_dirs="'$as_qdir' $as_dirs"
67502      as_dir=`$as_dirname -- "$as_dir" ||
67503$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67504	 X"$as_dir" : 'X\(//\)[^/]' \| \
67505	 X"$as_dir" : 'X\(//\)$' \| \
67506	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67507$as_echo X"$as_dir" |
67508    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67509	    s//\1/
67510	    q
67511	  }
67512	  /^X\(\/\/\)[^/].*/{
67513	    s//\1/
67514	    q
67515	  }
67516	  /^X\(\/\/\)$/{
67517	    s//\1/
67518	    q
67519	  }
67520	  /^X\(\/\).*/{
67521	    s//\1/
67522	    q
67523	  }
67524	  s/.*/./; q'`
67525      test -d "$as_dir" && break
67526    done
67527    test -z "$as_dirs" || eval "mkdir $as_dirs"
67528  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67529
67530
67531} # as_fn_mkdir_p
67532if mkdir -p . 2>/dev/null; then
67533  as_mkdir_p='mkdir -p "$as_dir"'
67534else
67535  test -d ./-p && rmdir ./-p
67536  as_mkdir_p=false
67537fi
67538
67539
67540# as_fn_executable_p FILE
67541# -----------------------
67542# Test if FILE is an executable regular file.
67543as_fn_executable_p ()
67544{
67545  test -f "$1" && test -x "$1"
67546} # as_fn_executable_p
67547as_test_x='test -x'
67548as_executable_p=as_fn_executable_p
67549
67550# Sed expression to map a string onto a valid CPP name.
67551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67552
67553# Sed expression to map a string onto a valid variable name.
67554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67555
67556
67557exec 6>&1
67558## ----------------------------------- ##
67559## Main body of $CONFIG_STATUS script. ##
67560## ----------------------------------- ##
67561_ASEOF
67562test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67563
67564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67565# Save the log message, to keep $0 and so on meaningful, and to
67566# report actual input values of CONFIG_FILES etc. instead of their
67567# values after options handling.
67568ac_log="
67569This file was extended by OpenJDK $as_me jdk9, which was
67570generated by GNU Autoconf 2.69.  Invocation command line was
67571
67572  CONFIG_FILES    = $CONFIG_FILES
67573  CONFIG_HEADERS  = $CONFIG_HEADERS
67574  CONFIG_LINKS    = $CONFIG_LINKS
67575  CONFIG_COMMANDS = $CONFIG_COMMANDS
67576  $ $0 $@
67577
67578on `(hostname || uname -n) 2>/dev/null | sed 1q`
67579"
67580
67581_ACEOF
67582
67583case $ac_config_files in *"
67584"*) set x $ac_config_files; shift; ac_config_files=$*;;
67585esac
67586
67587
67588
67589cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67590# Files that config.status was made for.
67591config_files="$ac_config_files"
67592
67593_ACEOF
67594
67595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67596ac_cs_usage="\
67597\`$as_me' instantiates files and other configuration actions
67598from templates according to the current configuration.  Unless the files
67599and actions are specified as TAGs, all are instantiated by default.
67600
67601Usage: $0 [OPTION]... [TAG]...
67602
67603  -h, --help       print this help, then exit
67604  -V, --version    print version number and configuration settings, then exit
67605      --config     print configuration, then exit
67606  -q, --quiet, --silent
67607                   do not print progress messages
67608  -d, --debug      don't remove temporary files
67609      --recheck    update $as_me by reconfiguring in the same conditions
67610      --file=FILE[:TEMPLATE]
67611                   instantiate the configuration file FILE
67612
67613Configuration files:
67614$config_files
67615
67616Report bugs to <build-dev@openjdk.java.net>.
67617OpenJDK home page: <http://openjdk.java.net>."
67618
67619_ACEOF
67620cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67621ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67622ac_cs_version="\\
67623OpenJDK config.status jdk9
67624configured by $0, generated by GNU Autoconf 2.69,
67625  with options \\"\$ac_cs_config\\"
67626
67627Copyright (C) 2012 Free Software Foundation, Inc.
67628This config.status script is free software; the Free Software Foundation
67629gives unlimited permission to copy, distribute and modify it."
67630
67631ac_pwd='$ac_pwd'
67632srcdir='$srcdir'
67633AWK='$AWK'
67634test -n "\$AWK" || AWK=awk
67635_ACEOF
67636
67637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67638# The default lists apply if the user does not specify any file.
67639ac_need_defaults=:
67640while test $# != 0
67641do
67642  case $1 in
67643  --*=?*)
67644    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67645    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67646    ac_shift=:
67647    ;;
67648  --*=)
67649    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67650    ac_optarg=
67651    ac_shift=:
67652    ;;
67653  *)
67654    ac_option=$1
67655    ac_optarg=$2
67656    ac_shift=shift
67657    ;;
67658  esac
67659
67660  case $ac_option in
67661  # Handling of the options.
67662  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67663    ac_cs_recheck=: ;;
67664  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67665    $as_echo "$ac_cs_version"; exit ;;
67666  --config | --confi | --conf | --con | --co | --c )
67667    $as_echo "$ac_cs_config"; exit ;;
67668  --debug | --debu | --deb | --de | --d | -d )
67669    debug=: ;;
67670  --file | --fil | --fi | --f )
67671    $ac_shift
67672    case $ac_optarg in
67673    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67674    '') as_fn_error $? "missing file argument" ;;
67675    esac
67676    as_fn_append CONFIG_FILES " '$ac_optarg'"
67677    ac_need_defaults=false;;
67678  --he | --h |  --help | --hel | -h )
67679    $as_echo "$ac_cs_usage"; exit ;;
67680  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67681  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67682    ac_cs_silent=: ;;
67683
67684  # This is an error.
67685  -*) as_fn_error $? "unrecognized option: \`$1'
67686Try \`$0 --help' for more information." ;;
67687
67688  *) as_fn_append ac_config_targets " $1"
67689     ac_need_defaults=false ;;
67690
67691  esac
67692  shift
67693done
67694
67695ac_configure_extra_args=
67696
67697if $ac_cs_silent; then
67698  exec 6>/dev/null
67699  ac_configure_extra_args="$ac_configure_extra_args --silent"
67700fi
67701
67702_ACEOF
67703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67704if \$ac_cs_recheck; then
67705  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67706  shift
67707  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67708  CONFIG_SHELL='$SHELL'
67709  export CONFIG_SHELL
67710  exec "\$@"
67711fi
67712
67713_ACEOF
67714cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67715exec 5>>config.log
67716{
67717  echo
67718  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67719## Running $as_me. ##
67720_ASBOX
67721  $as_echo "$ac_log"
67722} >&5
67723
67724_ACEOF
67725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67726_ACEOF
67727
67728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67729
67730# Handling of arguments.
67731for ac_config_target in $ac_config_targets
67732do
67733  case $ac_config_target in
67734    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67735    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67736    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67737    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67738    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67739
67740  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67741  esac
67742done
67743
67744
67745# If the user did not use the arguments to specify the items to instantiate,
67746# then the envvar interface is used.  Set only those that are not.
67747# We use the long form for the default assignment because of an extremely
67748# bizarre bug on SunOS 4.1.3.
67749if $ac_need_defaults; then
67750  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67751fi
67752
67753# Have a temporary directory for convenience.  Make it in the build tree
67754# simply because there is no reason against having it here, and in addition,
67755# creating and moving files from /tmp can sometimes cause problems.
67756# Hook for its removal unless debugging.
67757# Note that there is a small window in which the directory will not be cleaned:
67758# after its creation but before its name has been assigned to `$tmp'.
67759$debug ||
67760{
67761  tmp= ac_tmp=
67762  trap 'exit_status=$?
67763  : "${ac_tmp:=$tmp}"
67764  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67765' 0
67766  trap 'as_fn_exit 1' 1 2 13 15
67767}
67768# Create a (secure) tmp directory for tmp files.
67769
67770{
67771  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67772  test -d "$tmp"
67773}  ||
67774{
67775  tmp=./conf$$-$RANDOM
67776  (umask 077 && mkdir "$tmp")
67777} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67778ac_tmp=$tmp
67779
67780# Set up the scripts for CONFIG_FILES section.
67781# No need to generate them if there are no CONFIG_FILES.
67782# This happens for instance with `./config.status config.h'.
67783if test -n "$CONFIG_FILES"; then
67784
67785
67786ac_cr=`echo X | tr X '\015'`
67787# On cygwin, bash can eat \r inside `` if the user requested igncr.
67788# But we know of no other shell where ac_cr would be empty at this
67789# point, so we can use a bashism as a fallback.
67790if test "x$ac_cr" = x; then
67791  eval ac_cr=\$\'\\r\'
67792fi
67793ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67794if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67795  ac_cs_awk_cr='\\r'
67796else
67797  ac_cs_awk_cr=$ac_cr
67798fi
67799
67800echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67801_ACEOF
67802
67803
67804{
67805  echo "cat >conf$$subs.awk <<_ACEOF" &&
67806  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67807  echo "_ACEOF"
67808} >conf$$subs.sh ||
67809  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67810ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67811ac_delim='%!_!# '
67812for ac_last_try in false false false false false :; do
67813  . ./conf$$subs.sh ||
67814    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67815
67816  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67817  if test $ac_delim_n = $ac_delim_num; then
67818    break
67819  elif $ac_last_try; then
67820    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67821  else
67822    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67823  fi
67824done
67825rm -f conf$$subs.sh
67826
67827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67828cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67829_ACEOF
67830sed -n '
67831h
67832s/^/S["/; s/!.*/"]=/
67833p
67834g
67835s/^[^!]*!//
67836:repl
67837t repl
67838s/'"$ac_delim"'$//
67839t delim
67840:nl
67841h
67842s/\(.\{148\}\)..*/\1/
67843t more1
67844s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67845p
67846n
67847b repl
67848:more1
67849s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67850p
67851g
67852s/.\{148\}//
67853t nl
67854:delim
67855h
67856s/\(.\{148\}\)..*/\1/
67857t more2
67858s/["\\]/\\&/g; s/^/"/; s/$/"/
67859p
67860b
67861:more2
67862s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67863p
67864g
67865s/.\{148\}//
67866t delim
67867' <conf$$subs.awk | sed '
67868/^[^""]/{
67869  N
67870  s/\n//
67871}
67872' >>$CONFIG_STATUS || ac_write_fail=1
67873rm -f conf$$subs.awk
67874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67875_ACAWK
67876cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67877  for (key in S) S_is_set[key] = 1
67878  FS = ""
67879
67880}
67881{
67882  line = $ 0
67883  nfields = split(line, field, "@")
67884  substed = 0
67885  len = length(field[1])
67886  for (i = 2; i < nfields; i++) {
67887    key = field[i]
67888    keylen = length(key)
67889    if (S_is_set[key]) {
67890      value = S[key]
67891      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67892      len += length(value) + length(field[++i])
67893      substed = 1
67894    } else
67895      len += 1 + keylen
67896  }
67897
67898  print line
67899}
67900
67901_ACAWK
67902_ACEOF
67903cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67904if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67905  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67906else
67907  cat
67908fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67909  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67910_ACEOF
67911
67912# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67913# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67914# trailing colons and then remove the whole line if VPATH becomes empty
67915# (actually we leave an empty line to preserve line numbers).
67916if test "x$srcdir" = x.; then
67917  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67918h
67919s///
67920s/^/:/
67921s/[	 ]*$/:/
67922s/:\$(srcdir):/:/g
67923s/:\${srcdir}:/:/g
67924s/:@srcdir@:/:/g
67925s/^:*//
67926s/:*$//
67927x
67928s/\(=[	 ]*\).*/\1/
67929G
67930s/\n//
67931s/^[^=]*=[	 ]*$//
67932}'
67933fi
67934
67935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67936fi # test -n "$CONFIG_FILES"
67937
67938
67939eval set X "  :F $CONFIG_FILES      "
67940shift
67941for ac_tag
67942do
67943  case $ac_tag in
67944  :[FHLC]) ac_mode=$ac_tag; continue;;
67945  esac
67946  case $ac_mode$ac_tag in
67947  :[FHL]*:*);;
67948  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67949  :[FH]-) ac_tag=-:-;;
67950  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67951  esac
67952  ac_save_IFS=$IFS
67953  IFS=:
67954  set x $ac_tag
67955  IFS=$ac_save_IFS
67956  shift
67957  ac_file=$1
67958  shift
67959
67960  case $ac_mode in
67961  :L) ac_source=$1;;
67962  :[FH])
67963    ac_file_inputs=
67964    for ac_f
67965    do
67966      case $ac_f in
67967      -) ac_f="$ac_tmp/stdin";;
67968      *) # Look for the file first in the build tree, then in the source tree
67969	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67970	 # because $ac_f cannot contain `:'.
67971	 test -f "$ac_f" ||
67972	   case $ac_f in
67973	   [\\/$]*) false;;
67974	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67975	   esac ||
67976	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67977      esac
67978      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67979      as_fn_append ac_file_inputs " '$ac_f'"
67980    done
67981
67982    # Let's still pretend it is `configure' which instantiates (i.e., don't
67983    # use $as_me), people would be surprised to read:
67984    #    /* config.h.  Generated by config.status.  */
67985    configure_input='Generated from '`
67986	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67987	`' by configure.'
67988    if test x"$ac_file" != x-; then
67989      configure_input="$ac_file.  $configure_input"
67990      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67991$as_echo "$as_me: creating $ac_file" >&6;}
67992    fi
67993    # Neutralize special characters interpreted by sed in replacement strings.
67994    case $configure_input in #(
67995    *\&* | *\|* | *\\* )
67996       ac_sed_conf_input=`$as_echo "$configure_input" |
67997       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67998    *) ac_sed_conf_input=$configure_input;;
67999    esac
68000
68001    case $ac_tag in
68002    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68003      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68004    esac
68005    ;;
68006  esac
68007
68008  ac_dir=`$as_dirname -- "$ac_file" ||
68009$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68010	 X"$ac_file" : 'X\(//\)[^/]' \| \
68011	 X"$ac_file" : 'X\(//\)$' \| \
68012	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68013$as_echo X"$ac_file" |
68014    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68015	    s//\1/
68016	    q
68017	  }
68018	  /^X\(\/\/\)[^/].*/{
68019	    s//\1/
68020	    q
68021	  }
68022	  /^X\(\/\/\)$/{
68023	    s//\1/
68024	    q
68025	  }
68026	  /^X\(\/\).*/{
68027	    s//\1/
68028	    q
68029	  }
68030	  s/.*/./; q'`
68031  as_dir="$ac_dir"; as_fn_mkdir_p
68032  ac_builddir=.
68033
68034case "$ac_dir" in
68035.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68036*)
68037  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68038  # A ".." for each directory in $ac_dir_suffix.
68039  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68040  case $ac_top_builddir_sub in
68041  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68042  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68043  esac ;;
68044esac
68045ac_abs_top_builddir=$ac_pwd
68046ac_abs_builddir=$ac_pwd$ac_dir_suffix
68047# for backward compatibility:
68048ac_top_builddir=$ac_top_build_prefix
68049
68050case $srcdir in
68051  .)  # We are building in place.
68052    ac_srcdir=.
68053    ac_top_srcdir=$ac_top_builddir_sub
68054    ac_abs_top_srcdir=$ac_pwd ;;
68055  [\\/]* | ?:[\\/]* )  # Absolute name.
68056    ac_srcdir=$srcdir$ac_dir_suffix;
68057    ac_top_srcdir=$srcdir
68058    ac_abs_top_srcdir=$srcdir ;;
68059  *) # Relative name.
68060    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68061    ac_top_srcdir=$ac_top_build_prefix$srcdir
68062    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68063esac
68064ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68065
68066
68067  case $ac_mode in
68068  :F)
68069  #
68070  # CONFIG_FILE
68071  #
68072
68073_ACEOF
68074
68075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68076# If the template does not know about datarootdir, expand it.
68077# FIXME: This hack should be removed a few years after 2.60.
68078ac_datarootdir_hack=; ac_datarootdir_seen=
68079ac_sed_dataroot='
68080/datarootdir/ {
68081  p
68082  q
68083}
68084/@datadir@/p
68085/@docdir@/p
68086/@infodir@/p
68087/@localedir@/p
68088/@mandir@/p'
68089case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68090*datarootdir*) ac_datarootdir_seen=yes;;
68091*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68092  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68093$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68094_ACEOF
68095cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68096  ac_datarootdir_hack='
68097  s&@datadir@&$datadir&g
68098  s&@docdir@&$docdir&g
68099  s&@infodir@&$infodir&g
68100  s&@localedir@&$localedir&g
68101  s&@mandir@&$mandir&g
68102  s&\\\${datarootdir}&$datarootdir&g' ;;
68103esac
68104_ACEOF
68105
68106# Neutralize VPATH when `$srcdir' = `.'.
68107# Shell code in configure.ac might set extrasub.
68108# FIXME: do we really want to maintain this feature?
68109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68110ac_sed_extra="$ac_vpsub
68111$extrasub
68112_ACEOF
68113cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68114:t
68115/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68116s|@configure_input@|$ac_sed_conf_input|;t t
68117s&@top_builddir@&$ac_top_builddir_sub&;t t
68118s&@top_build_prefix@&$ac_top_build_prefix&;t t
68119s&@srcdir@&$ac_srcdir&;t t
68120s&@abs_srcdir@&$ac_abs_srcdir&;t t
68121s&@top_srcdir@&$ac_top_srcdir&;t t
68122s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68123s&@builddir@&$ac_builddir&;t t
68124s&@abs_builddir@&$ac_abs_builddir&;t t
68125s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68126$ac_datarootdir_hack
68127"
68128eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68129  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68130
68131test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68132  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68133  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68134      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68135  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68136which seems to be undefined.  Please make sure it is defined" >&5
68137$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68138which seems to be undefined.  Please make sure it is defined" >&2;}
68139
68140  rm -f "$ac_tmp/stdin"
68141  case $ac_file in
68142  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68143  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68144  esac \
68145  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68146 ;;
68147
68148
68149
68150  esac
68151
68152done # for ac_tag
68153
68154
68155as_fn_exit 0
68156_ACEOF
68157ac_clean_files=$ac_clean_files_save
68158
68159test $ac_write_fail = 0 ||
68160  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68161
68162
68163# configure is writing to config.log, and then calls config.status.
68164# config.status does its own redirection, appending to config.log.
68165# Unfortunately, on DOS this fails, as config.log is still kept open
68166# by configure, so config.status won't be able to write to it; its
68167# output is simply discarded.  So we exec the FD to /dev/null,
68168# effectively closing config.log, so it can be properly (re)opened and
68169# appended to by config.status.  When coming back to configure, we
68170# need to make the FD available again.
68171if test "$no_create" != yes; then
68172  ac_cs_success=:
68173  ac_config_status_args=
68174  test "$silent" = yes &&
68175    ac_config_status_args="$ac_config_status_args --quiet"
68176  exec 5>/dev/null
68177  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68178  exec 5>>config.log
68179  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68180  # would make configure fail if this is the last instruction.
68181  $ac_cs_success || as_fn_exit 1
68182fi
68183if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68184  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68185$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68186fi
68187
68188
68189# After AC_OUTPUT, we need to do final work
68190
68191
68192  # Try to move config.log (generated by autoconf) to the configure-support directory.
68193  if test -e ./config.log; then
68194    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68195  fi
68196
68197  # Rotate our log file (configure.log)
68198  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68199    $RM -f "$OUTPUT_ROOT/configure.log.old"
68200  fi
68201  if test -e "$OUTPUT_ROOT/configure.log"; then
68202    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68203  fi
68204
68205  # Move configure.log from current directory to the build output root
68206  if test -e ./configure.log; then
68207    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68208  fi
68209
68210  # Make the compare script executable
68211  $CHMOD +x $OUTPUT_ROOT/compare.sh
68212
68213
68214# Finally output some useful information to the user
68215
68216  # Finally output some useful information to the user
68217
68218  printf "\n"
68219  printf "====================================================\n"
68220  if test "x$no_create" != "xyes"; then
68221    if test "x$IS_RECONFIGURE" != "xyes"; then
68222      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68223    else
68224      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68225    fi
68226  else
68227    if test "x$IS_RECONFIGURE" != "xyes"; then
68228      printf "A configuration has been successfully checked but not created\n"
68229    else
68230      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68231    fi
68232  fi
68233  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68234    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68235  else
68236    printf "using default settings.\n"
68237  fi
68238
68239  printf "\n"
68240  printf "Configuration summary:\n"
68241  printf "* Debug level:    $DEBUG_LEVEL\n"
68242  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68243  printf "* JDK variant:    $JDK_VARIANT\n"
68244  printf "* JVM variants:   $JVM_VARIANTS\n"
68245  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68246  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68247
68248  printf "\n"
68249  printf "Tools summary:\n"
68250  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68251    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68252  fi
68253  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68254  if test "x$TOOLCHAIN_VERSION" != "x"; then
68255    print_version=" $TOOLCHAIN_VERSION"
68256  fi
68257  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68258  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68259  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68260
68261  printf "\n"
68262  printf "Build performance summary:\n"
68263  printf "* Cores to use:   $JOBS\n"
68264  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68265  if test "x$CCACHE_STATUS" != "x"; then
68266    printf "* ccache status:  $CCACHE_STATUS\n"
68267  fi
68268  printf "\n"
68269
68270  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68271    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68272    printf "will result in longer build times.\n"
68273    printf "\n"
68274  fi
68275
68276  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68277    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68278    printf "These are not respected, and will be ignored. It is recommended\n"
68279    printf "that you clean your environment. The following variables are set:\n"
68280    printf "$FOUND_ALT_VARIABLES\n"
68281    printf "\n"
68282  fi
68283
68284  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68285    printf "WARNING: Your build output directory is not on a local disk.\n"
68286    printf "This will severely degrade build performance!\n"
68287    printf "It is recommended that you create an output directory on a local disk,\n"
68288    printf "and run the configure script again from that directory.\n"
68289    printf "\n"
68290  fi
68291
68292  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68293    printf "WARNING: The result of this configuration has overridden an older\n"
68294    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68295    printf "proper build. Failure to do so might result in strange build problems.\n"
68296    printf "\n"
68297  fi
68298
68299  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68300    printf "WARNING: The result of this configuration was not saved.\n"
68301    printf "You should run without '--no-create | -n' to create the configuration.\n"
68302    printf "\n"
68303  fi
68304
68305
68306
68307  # Locate config.log.
68308  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68309    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68310  elif test -e "./config.log"; then
68311    CONFIG_LOG_PATH="."
68312  fi
68313
68314  if test -e "$CONFIG_LOG_PATH/config.log"; then
68315    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68316    if test $? -eq 0; then
68317      printf "The following warnings were produced. Repeated here for convenience:\n"
68318      # We must quote sed expression (using []) to stop m4 from eating the [].
68319      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68320      printf "\n"
68321    fi
68322  fi
68323
68324