generated-configure.sh revision 2586:35017c286513
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
998OPENJDK_MODULE_TARGET_OS_ARCH
999OPENJDK_MODULE_TARGET_OS_NAME
1000COMPILE_TYPE
1001OPENJDK_TARGET_CPU_ENDIAN
1002OPENJDK_TARGET_CPU_BITS
1003OPENJDK_TARGET_CPU_ARCH
1004OPENJDK_TARGET_CPU
1005OPENJDK_TARGET_OS_ENV
1006OPENJDK_TARGET_OS_TYPE
1007OPENJDK_TARGET_OS
1008OPENJDK_BUILD_CPU_ENDIAN
1009OPENJDK_BUILD_CPU_BITS
1010OPENJDK_BUILD_CPU_ARCH
1011OPENJDK_BUILD_CPU
1012OPENJDK_BUILD_OS_ENV
1013OPENJDK_BUILD_OS_TYPE
1014OPENJDK_BUILD_OS
1015OPENJDK_BUILD_AUTOCONF_NAME
1016OPENJDK_TARGET_AUTOCONF_NAME
1017target_os
1018target_vendor
1019target_cpu
1020target
1021host_os
1022host_vendor
1023host_cpu
1024host
1025build_os
1026build_vendor
1027build_cpu
1028build
1029PANDOC
1030NICE
1031CPIO
1032DF
1033READLINK
1034CYGPATH
1035SED
1036FGREP
1037EGREP
1038GREP
1039AWK
1040XARGS
1041WHICH
1042WC
1043UNIQ
1044UNAME
1045TR
1046TOUCH
1047TEE
1048TAR
1049TAIL
1050SORT
1051SH
1052RMDIR
1053RM
1054PRINTF
1055NAWK
1056MV
1057MKTEMP
1058MKDIR
1059LS
1060LN
1061GZIP
1062GUNZIP
1063HEAD
1064FIND
1065FILE
1066EXPR
1067ECHO
1068DIRNAME
1069DIFF
1070DATE
1071CUT
1072CP
1073COMM
1074CMP
1075CHMOD
1076CAT
1077BASH
1078BASENAME
1079DATE_WHEN_CONFIGURED
1080ORIGINAL_PATH
1081CONFIGURE_COMMAND_LINE
1082target_alias
1083host_alias
1084build_alias
1085LIBS
1086ECHO_T
1087ECHO_N
1088ECHO_C
1089DEFS
1090mandir
1091localedir
1092libdir
1093psdir
1094pdfdir
1095dvidir
1096htmldir
1097infodir
1098docdir
1099oldincludedir
1100includedir
1101localstatedir
1102sharedstatedir
1103sysconfdir
1104datadir
1105datarootdir
1106libexecdir
1107sbindir
1108bindir
1109program_transform_name
1110prefix
1111exec_prefix
1112PACKAGE_URL
1113PACKAGE_BUGREPORT
1114PACKAGE_STRING
1115PACKAGE_VERSION
1116PACKAGE_TARNAME
1117PACKAGE_NAME
1118PATH_SEPARATOR
1119SHELL'
1120ac_subst_files=''
1121ac_user_opts='
1122enable_option_checking
1123with_target_bits
1124enable_openjdk_only
1125with_custom_make_dir
1126with_jdk_variant
1127enable_debug
1128with_debug_level
1129with_jvm_variants
1130with_cpu_port
1131with_devkit
1132with_sys_root
1133with_sysroot
1134with_tools_dir
1135with_toolchain_path
1136with_extra_path
1137with_sdk_name
1138with_conf_name
1139with_output_sync
1140with_default_make_target
1141enable_headless_only
1142enable_full_docs
1143with_cacerts_file
1144enable_unlimited_crypto
1145with_copyright_year
1146enable_keep_packaged_modules
1147with_milestone
1148with_update_version
1149with_user_release_suffix
1150with_build_number
1151with_version_string
1152with_version_pre
1153with_version_opt
1154with_version_build
1155with_version_major
1156with_version_minor
1157with_version_security
1158with_version_patch
1159with_boot_jdk
1160with_build_jdk
1161with_add_source_root
1162with_override_source_root
1163with_adds_and_overrides
1164with_override_langtools
1165with_override_corba
1166with_override_jaxp
1167with_override_jaxws
1168with_override_hotspot
1169with_override_nashorn
1170with_override_jdk
1171with_import_hotspot
1172with_import_modules
1173enable_static_build
1174with_toolchain_type
1175with_extra_cflags
1176with_extra_cxxflags
1177with_extra_ldflags
1178with_toolchain_version
1179with_build_devkit
1180with_jtreg
1181with_abi_profile
1182enable_warnings_as_errors
1183with_native_debug_symbols
1184enable_debug_symbols
1185enable_zip_debug_info
1186enable_native_coverage
1187enable_dtrace
1188enable_aot
1189enable_hotspot_gtest
1190with_stdc__lib
1191with_msvcr_dll
1192with_msvcp_dll
1193with_x
1194with_cups
1195with_cups_include
1196with_freetype
1197with_freetype_include
1198with_freetype_lib
1199with_freetype_src
1200enable_freetype_bundling
1201with_alsa
1202with_alsa_include
1203with_alsa_lib
1204with_libffi
1205with_libffi_include
1206with_libffi_lib
1207enable_libffi_bundling
1208with_libjpeg
1209with_giflib
1210with_libpng
1211with_zlib
1212with_lcms
1213with_dxsdk
1214with_dxsdk_lib
1215with_dxsdk_include
1216with_libelf
1217with_libelf_include
1218with_libelf_lib
1219with_jvm_features
1220with_jvm_interpreter
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288PANDOC
1289MAKE
1290UNZIP
1291ZIPEXE
1292LDD
1293OTOOL
1294READELF
1295DOT
1296HG
1297STAT
1298TIME
1299DTRACE
1300PATCH
1301DSYMUTIL
1302XATTR
1303CODESIGN
1304SETFILE
1305PKG_CONFIG
1306JAVA
1307JAVAC
1308JAVAH
1309JAR
1310JARSIGNER
1311CC
1312CFLAGS
1313LDFLAGS
1314LIBS
1315CPPFLAGS
1316CXX
1317CXXFLAGS
1318CCC
1319CPP
1320CXXCPP
1321AS
1322AR
1323LIPO
1324STRIP
1325NM
1326GNM
1327OBJCOPY
1328OBJDUMP
1329BUILD_CC
1330BUILD_CXX
1331BUILD_NM
1332BUILD_AR
1333BUILD_OBJCOPY
1334BUILD_STRIP
1335JTREGEXE
1336XMKMF
1337FREETYPE_CFLAGS
1338FREETYPE_LIBS
1339ALSA_CFLAGS
1340ALSA_LIBS
1341LIBFFI_CFLAGS
1342LIBFFI_LIBS
1343PNG_CFLAGS
1344PNG_LIBS
1345LCMS_CFLAGS
1346LCMS_LIBS
1347ELF_CFLAGS
1348ELF_LIBS
1349ICECC_CMD
1350ICECC_CREATE_ENV
1351ICECC_WRAPPER
1352CCACHE'
1353
1354
1355# Initialize some variables set by options.
1356ac_init_help=
1357ac_init_version=false
1358ac_unrecognized_opts=
1359ac_unrecognized_sep=
1360# The variables have the same names as the options, with
1361# dashes changed to underlines.
1362cache_file=/dev/null
1363exec_prefix=NONE
1364no_create=
1365no_recursion=
1366prefix=NONE
1367program_prefix=NONE
1368program_suffix=NONE
1369program_transform_name=s,x,x,
1370silent=
1371site=
1372srcdir=
1373verbose=
1374x_includes=NONE
1375x_libraries=NONE
1376
1377# Installation directory options.
1378# These are left unexpanded so users can "make install exec_prefix=/foo"
1379# and all the variables that are supposed to be based on exec_prefix
1380# by default will actually change.
1381# Use braces instead of parens because sh, perl, etc. also accept them.
1382# (The list follows the same order as the GNU Coding Standards.)
1383bindir='${exec_prefix}/bin'
1384sbindir='${exec_prefix}/sbin'
1385libexecdir='${exec_prefix}/libexec'
1386datarootdir='${prefix}/share'
1387datadir='${datarootdir}'
1388sysconfdir='${prefix}/etc'
1389sharedstatedir='${prefix}/com'
1390localstatedir='${prefix}/var'
1391includedir='${prefix}/include'
1392oldincludedir='/usr/include'
1393docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1394infodir='${datarootdir}/info'
1395htmldir='${docdir}'
1396dvidir='${docdir}'
1397pdfdir='${docdir}'
1398psdir='${docdir}'
1399libdir='${exec_prefix}/lib'
1400localedir='${datarootdir}/locale'
1401mandir='${datarootdir}/man'
1402
1403ac_prev=
1404ac_dashdash=
1405for ac_option
1406do
1407  # If the previous option needs an argument, assign it.
1408  if test -n "$ac_prev"; then
1409    eval $ac_prev=\$ac_option
1410    ac_prev=
1411    continue
1412  fi
1413
1414  case $ac_option in
1415  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1416  *=)   ac_optarg= ;;
1417  *)    ac_optarg=yes ;;
1418  esac
1419
1420  # Accept the important Cygnus configure options, so we can diagnose typos.
1421
1422  case $ac_dashdash$ac_option in
1423  --)
1424    ac_dashdash=yes ;;
1425
1426  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1427    ac_prev=bindir ;;
1428  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1429    bindir=$ac_optarg ;;
1430
1431  -build | --build | --buil | --bui | --bu)
1432    ac_prev=build_alias ;;
1433  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1434    build_alias=$ac_optarg ;;
1435
1436  -cache-file | --cache-file | --cache-fil | --cache-fi \
1437  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1438    ac_prev=cache_file ;;
1439  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1440  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1441    cache_file=$ac_optarg ;;
1442
1443  --config-cache | -C)
1444    cache_file=config.cache ;;
1445
1446  -datadir | --datadir | --datadi | --datad)
1447    ac_prev=datadir ;;
1448  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1449    datadir=$ac_optarg ;;
1450
1451  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1452  | --dataroo | --dataro | --datar)
1453    ac_prev=datarootdir ;;
1454  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1455  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1456    datarootdir=$ac_optarg ;;
1457
1458  -disable-* | --disable-*)
1459    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1460    # Reject names that are not valid shell variable names.
1461    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1462      as_fn_error $? "invalid feature name: $ac_useropt"
1463    ac_useropt_orig=$ac_useropt
1464    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1465    case $ac_user_opts in
1466      *"
1467"enable_$ac_useropt"
1468"*) ;;
1469      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1470	 ac_unrecognized_sep=', ';;
1471    esac
1472    eval enable_$ac_useropt=no ;;
1473
1474  -docdir | --docdir | --docdi | --doc | --do)
1475    ac_prev=docdir ;;
1476  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1477    docdir=$ac_optarg ;;
1478
1479  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1480    ac_prev=dvidir ;;
1481  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1482    dvidir=$ac_optarg ;;
1483
1484  -enable-* | --enable-*)
1485    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1486    # Reject names that are not valid shell variable names.
1487    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1488      as_fn_error $? "invalid feature name: $ac_useropt"
1489    ac_useropt_orig=$ac_useropt
1490    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1491    case $ac_user_opts in
1492      *"
1493"enable_$ac_useropt"
1494"*) ;;
1495      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1496	 ac_unrecognized_sep=', ';;
1497    esac
1498    eval enable_$ac_useropt=\$ac_optarg ;;
1499
1500  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1501  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1502  | --exec | --exe | --ex)
1503    ac_prev=exec_prefix ;;
1504  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1505  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1506  | --exec=* | --exe=* | --ex=*)
1507    exec_prefix=$ac_optarg ;;
1508
1509  -gas | --gas | --ga | --g)
1510    # Obsolete; use --with-gas.
1511    with_gas=yes ;;
1512
1513  -help | --help | --hel | --he | -h)
1514    ac_init_help=long ;;
1515  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1516    ac_init_help=recursive ;;
1517  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1518    ac_init_help=short ;;
1519
1520  -host | --host | --hos | --ho)
1521    ac_prev=host_alias ;;
1522  -host=* | --host=* | --hos=* | --ho=*)
1523    host_alias=$ac_optarg ;;
1524
1525  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1526    ac_prev=htmldir ;;
1527  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1528  | --ht=*)
1529    htmldir=$ac_optarg ;;
1530
1531  -includedir | --includedir | --includedi | --included | --include \
1532  | --includ | --inclu | --incl | --inc)
1533    ac_prev=includedir ;;
1534  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1535  | --includ=* | --inclu=* | --incl=* | --inc=*)
1536    includedir=$ac_optarg ;;
1537
1538  -infodir | --infodir | --infodi | --infod | --info | --inf)
1539    ac_prev=infodir ;;
1540  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1541    infodir=$ac_optarg ;;
1542
1543  -libdir | --libdir | --libdi | --libd)
1544    ac_prev=libdir ;;
1545  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1546    libdir=$ac_optarg ;;
1547
1548  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1549  | --libexe | --libex | --libe)
1550    ac_prev=libexecdir ;;
1551  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1552  | --libexe=* | --libex=* | --libe=*)
1553    libexecdir=$ac_optarg ;;
1554
1555  -localedir | --localedir | --localedi | --localed | --locale)
1556    ac_prev=localedir ;;
1557  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1558    localedir=$ac_optarg ;;
1559
1560  -localstatedir | --localstatedir | --localstatedi | --localstated \
1561  | --localstate | --localstat | --localsta | --localst | --locals)
1562    ac_prev=localstatedir ;;
1563  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1564  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1565    localstatedir=$ac_optarg ;;
1566
1567  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1568    ac_prev=mandir ;;
1569  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1570    mandir=$ac_optarg ;;
1571
1572  -nfp | --nfp | --nf)
1573    # Obsolete; use --without-fp.
1574    with_fp=no ;;
1575
1576  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1577  | --no-cr | --no-c | -n)
1578    no_create=yes ;;
1579
1580  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1581  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1582    no_recursion=yes ;;
1583
1584  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1585  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1586  | --oldin | --oldi | --old | --ol | --o)
1587    ac_prev=oldincludedir ;;
1588  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1589  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1590  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1591    oldincludedir=$ac_optarg ;;
1592
1593  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1594    ac_prev=prefix ;;
1595  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1596    prefix=$ac_optarg ;;
1597
1598  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1599  | --program-pre | --program-pr | --program-p)
1600    ac_prev=program_prefix ;;
1601  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1602  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1603    program_prefix=$ac_optarg ;;
1604
1605  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1606  | --program-suf | --program-su | --program-s)
1607    ac_prev=program_suffix ;;
1608  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1609  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1610    program_suffix=$ac_optarg ;;
1611
1612  -program-transform-name | --program-transform-name \
1613  | --program-transform-nam | --program-transform-na \
1614  | --program-transform-n | --program-transform- \
1615  | --program-transform | --program-transfor \
1616  | --program-transfo | --program-transf \
1617  | --program-trans | --program-tran \
1618  | --progr-tra | --program-tr | --program-t)
1619    ac_prev=program_transform_name ;;
1620  -program-transform-name=* | --program-transform-name=* \
1621  | --program-transform-nam=* | --program-transform-na=* \
1622  | --program-transform-n=* | --program-transform-=* \
1623  | --program-transform=* | --program-transfor=* \
1624  | --program-transfo=* | --program-transf=* \
1625  | --program-trans=* | --program-tran=* \
1626  | --progr-tra=* | --program-tr=* | --program-t=*)
1627    program_transform_name=$ac_optarg ;;
1628
1629  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1630    ac_prev=pdfdir ;;
1631  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1632    pdfdir=$ac_optarg ;;
1633
1634  -psdir | --psdir | --psdi | --psd | --ps)
1635    ac_prev=psdir ;;
1636  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1637    psdir=$ac_optarg ;;
1638
1639  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1640  | -silent | --silent | --silen | --sile | --sil)
1641    silent=yes ;;
1642
1643  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1644    ac_prev=sbindir ;;
1645  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1646  | --sbi=* | --sb=*)
1647    sbindir=$ac_optarg ;;
1648
1649  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1650  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1651  | --sharedst | --shareds | --shared | --share | --shar \
1652  | --sha | --sh)
1653    ac_prev=sharedstatedir ;;
1654  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1655  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1656  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1657  | --sha=* | --sh=*)
1658    sharedstatedir=$ac_optarg ;;
1659
1660  -site | --site | --sit)
1661    ac_prev=site ;;
1662  -site=* | --site=* | --sit=*)
1663    site=$ac_optarg ;;
1664
1665  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1666    ac_prev=srcdir ;;
1667  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1668    srcdir=$ac_optarg ;;
1669
1670  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1671  | --syscon | --sysco | --sysc | --sys | --sy)
1672    ac_prev=sysconfdir ;;
1673  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1674  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1675    sysconfdir=$ac_optarg ;;
1676
1677  -target | --target | --targe | --targ | --tar | --ta | --t)
1678    ac_prev=target_alias ;;
1679  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1680    target_alias=$ac_optarg ;;
1681
1682  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1683    verbose=yes ;;
1684
1685  -version | --version | --versio | --versi | --vers | -V)
1686    ac_init_version=: ;;
1687
1688  -with-* | --with-*)
1689    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1690    # Reject names that are not valid shell variable names.
1691    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692      as_fn_error $? "invalid package name: $ac_useropt"
1693    ac_useropt_orig=$ac_useropt
1694    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695    case $ac_user_opts in
1696      *"
1697"with_$ac_useropt"
1698"*) ;;
1699      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1700	 ac_unrecognized_sep=', ';;
1701    esac
1702    eval with_$ac_useropt=\$ac_optarg ;;
1703
1704  -without-* | --without-*)
1705    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1706    # Reject names that are not valid shell variable names.
1707    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708      as_fn_error $? "invalid package name: $ac_useropt"
1709    ac_useropt_orig=$ac_useropt
1710    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711    case $ac_user_opts in
1712      *"
1713"with_$ac_useropt"
1714"*) ;;
1715      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1716	 ac_unrecognized_sep=', ';;
1717    esac
1718    eval with_$ac_useropt=no ;;
1719
1720  --x)
1721    # Obsolete; use --with-x.
1722    with_x=yes ;;
1723
1724  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1725  | --x-incl | --x-inc | --x-in | --x-i)
1726    ac_prev=x_includes ;;
1727  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1728  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1729    x_includes=$ac_optarg ;;
1730
1731  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1732  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1733    ac_prev=x_libraries ;;
1734  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1735  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1736    x_libraries=$ac_optarg ;;
1737
1738  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1739Try \`$0 --help' for more information"
1740    ;;
1741
1742  *=*)
1743    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1744    # Reject names that are not valid shell variable names.
1745    case $ac_envvar in #(
1746      '' | [0-9]* | *[!_$as_cr_alnum]* )
1747      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1748    esac
1749    eval $ac_envvar=\$ac_optarg
1750    export $ac_envvar ;;
1751
1752  *)
1753    # FIXME: should be removed in autoconf 3.0.
1754    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1755    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1756      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1757    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1758    ;;
1759
1760  esac
1761done
1762
1763if test -n "$ac_prev"; then
1764  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1765  as_fn_error $? "missing argument to $ac_option"
1766fi
1767
1768if test -n "$ac_unrecognized_opts"; then
1769  case $enable_option_checking in
1770    no) ;;
1771    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1772    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1773  esac
1774fi
1775
1776# Check all directory arguments for consistency.
1777for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1778		datadir sysconfdir sharedstatedir localstatedir includedir \
1779		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1780		libdir localedir mandir
1781do
1782  eval ac_val=\$$ac_var
1783  # Remove trailing slashes.
1784  case $ac_val in
1785    */ )
1786      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1787      eval $ac_var=\$ac_val;;
1788  esac
1789  # Be sure to have absolute directory names.
1790  case $ac_val in
1791    [\\/$]* | ?:[\\/]* )  continue;;
1792    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1793  esac
1794  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1795done
1796
1797# There might be people who depend on the old broken behavior: `$host'
1798# used to hold the argument of --host etc.
1799# FIXME: To remove some day.
1800build=$build_alias
1801host=$host_alias
1802target=$target_alias
1803
1804# FIXME: To remove some day.
1805if test "x$host_alias" != x; then
1806  if test "x$build_alias" = x; then
1807    cross_compiling=maybe
1808  elif test "x$build_alias" != "x$host_alias"; then
1809    cross_compiling=yes
1810  fi
1811fi
1812
1813ac_tool_prefix=
1814test -n "$host_alias" && ac_tool_prefix=$host_alias-
1815
1816test "$silent" = yes && exec 6>/dev/null
1817
1818
1819ac_pwd=`pwd` && test -n "$ac_pwd" &&
1820ac_ls_di=`ls -di .` &&
1821ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1822  as_fn_error $? "working directory cannot be determined"
1823test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1824  as_fn_error $? "pwd does not report name of working directory"
1825
1826
1827# Find the source files, if location was not specified.
1828if test -z "$srcdir"; then
1829  ac_srcdir_defaulted=yes
1830  # Try the directory containing this script, then the parent directory.
1831  ac_confdir=`$as_dirname -- "$as_myself" ||
1832$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1833	 X"$as_myself" : 'X\(//\)[^/]' \| \
1834	 X"$as_myself" : 'X\(//\)$' \| \
1835	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1836$as_echo X"$as_myself" |
1837    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)[^/].*/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)$/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\).*/{
1850	    s//\1/
1851	    q
1852	  }
1853	  s/.*/./; q'`
1854  srcdir=$ac_confdir
1855  if test ! -r "$srcdir/$ac_unique_file"; then
1856    srcdir=..
1857  fi
1858else
1859  ac_srcdir_defaulted=no
1860fi
1861if test ! -r "$srcdir/$ac_unique_file"; then
1862  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1863  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1864fi
1865ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1866ac_abs_confdir=`(
1867	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1868	pwd)`
1869# When building in place, set srcdir=.
1870if test "$ac_abs_confdir" = "$ac_pwd"; then
1871  srcdir=.
1872fi
1873# Remove unnecessary trailing slashes from srcdir.
1874# Double slashes in file names in object file debugging info
1875# mess up M-x gdb in Emacs.
1876case $srcdir in
1877*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1878esac
1879for ac_var in $ac_precious_vars; do
1880  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_env_${ac_var}_value=\$${ac_var}
1882  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1884done
1885
1886#
1887# Report the --help message.
1888#
1889if test "$ac_init_help" = "long"; then
1890  # Omit some internal or obsolete options to make the list less imposing.
1891  # This message is too long to be a string in the A/UX 3.1 sh.
1892  cat <<_ACEOF
1893\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1894
1895Usage: $0 [OPTION]... [VAR=VALUE]...
1896
1897To assign environment variables (e.g., CC, CFLAGS...), specify them as
1898VAR=VALUE.  See below for descriptions of some of the useful variables.
1899
1900Defaults for the options are specified in brackets.
1901
1902Configuration:
1903  -h, --help              display this help and exit
1904      --help=short        display options specific to this package
1905      --help=recursive    display the short help of all the included packages
1906  -V, --version           display version information and exit
1907  -q, --quiet, --silent   do not print \`checking ...' messages
1908      --cache-file=FILE   cache test results in FILE [disabled]
1909  -C, --config-cache      alias for \`--cache-file=config.cache'
1910  -n, --no-create         do not create output files
1911      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1912
1913Installation directories:
1914  --prefix=PREFIX         install architecture-independent files in PREFIX
1915                          [$ac_default_prefix]
1916  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1917                          [PREFIX]
1918
1919By default, \`make install' will install all the files in
1920\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1921an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1922for instance \`--prefix=\$HOME'.
1923
1924For better control, use the options below.
1925
1926Fine tuning of the installation directories:
1927  --bindir=DIR            user executables [EPREFIX/bin]
1928  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1929  --libexecdir=DIR        program executables [EPREFIX/libexec]
1930  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1931  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1932  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1933  --libdir=DIR            object code libraries [EPREFIX/lib]
1934  --includedir=DIR        C header files [PREFIX/include]
1935  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1936  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1937  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1938  --infodir=DIR           info documentation [DATAROOTDIR/info]
1939  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1940  --mandir=DIR            man documentation [DATAROOTDIR/man]
1941  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1942  --htmldir=DIR           html documentation [DOCDIR]
1943  --dvidir=DIR            dvi documentation [DOCDIR]
1944  --pdfdir=DIR            pdf documentation [DOCDIR]
1945  --psdir=DIR             ps documentation [DOCDIR]
1946_ACEOF
1947
1948  cat <<\_ACEOF
1949
1950X features:
1951  --x-includes=DIR    X include files are in DIR
1952  --x-libraries=DIR   X library files are in DIR
1953
1954System types:
1955  --build=BUILD     configure for building on BUILD [guessed]
1956  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1957  --target=TARGET   configure for building compilers for TARGET [HOST]
1958_ACEOF
1959fi
1960
1961if test -n "$ac_init_help"; then
1962  case $ac_init_help in
1963     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1964   esac
1965  cat <<\_ACEOF
1966
1967Optional Features:
1968  --disable-option-checking  ignore unrecognized --enable/--with options
1969  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1970  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1971  --enable-openjdk-only   suppress building custom source even if present
1972                          [disabled]
1973  --enable-debug          set the debug level to fastdebug (shorthand for
1974                          --with-debug-level=fastdebug) [disabled]
1975  --enable-headless-only  only build headless (no GUI) support [disabled]
1976  --enable-full-docs      build complete documentation [enabled if all tools
1977                          found]
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=1492975963
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" = xmacosx; then
16032    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16033  else
16034    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16035  fi
16036
16037  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16038    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16039  else
16040    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16041  fi
16042
16043
16044
16045
16046
16047
16048  # Also store the legacy naming of the cpu.
16049  # Ie i586 and amd64 instead of x86 and x86_64
16050  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16051  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16052    OPENJDK_TARGET_CPU_LEGACY="i586"
16053  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16054    # On all platforms except MacOSX replace x86_64 with amd64.
16055    OPENJDK_TARGET_CPU_LEGACY="amd64"
16056  fi
16057
16058
16059  # And the second legacy naming of the cpu.
16060  # Ie i386 and amd64 instead of x86 and x86_64.
16061  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16062  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16063    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16064  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16065    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16066  fi
16067
16068
16069  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16070  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16071  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16072  OPENJDK_TARGET_CPU_ISADIR=""
16073  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16074    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16075      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16076    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16077      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16078    fi
16079  fi
16080
16081
16082  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16083  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16084  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16085    # On linux only, we replace x86 with i386.
16086    OPENJDK_TARGET_CPU_OSARCH="i386"
16087  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16088    # On all platforms except macosx, we replace x86_64 with amd64.
16089    OPENJDK_TARGET_CPU_OSARCH="amd64"
16090  fi
16091
16092
16093  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16094  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16095    OPENJDK_TARGET_CPU_JLI="i386"
16096  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16097    # On all platforms except macosx, we replace x86_64 with amd64.
16098    OPENJDK_TARGET_CPU_JLI="amd64"
16099  fi
16100
16101  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16102      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16103  else
16104      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16105  fi
16106
16107
16108  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16109  # Macosx is osx and x86_64 is x64
16110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16111    OPENJDK_TARGET_OS_BUNDLE="osx"
16112  else
16113    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16114  fi
16115  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16116    OPENJDK_TARGET_CPU_BUNDLE="x64"
16117  else
16118    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16119  fi
16120  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16121
16122
16123  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16124    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16125    # unpack200.exe. This variable is used in
16126    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16127    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16128      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16129    fi
16130  fi
16131
16132  if test "x$COMPILE_TYPE" = "xcross"; then
16133    # FIXME: ... or should this include reduced builds..?
16134    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16135  else
16136    DEFINE_CROSS_COMPILE_ARCH=""
16137  fi
16138
16139
16140  # Convert openjdk platform names to hotspot names
16141
16142  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16143  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16144    HOTSPOT_TARGET_OS=bsd
16145  fi
16146
16147
16148  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16149  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16150    HOTSPOT_TARGET_OS_TYPE=posix
16151  fi
16152
16153
16154  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16155  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16156    HOTSPOT_TARGET_CPU=x86_32
16157  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16158    HOTSPOT_TARGET_CPU=sparc
16159  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16160    HOTSPOT_TARGET_CPU=ppc_64
16161  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16162    HOTSPOT_TARGET_CPU=ppc_64
16163  fi
16164
16165
16166  # This is identical with OPENJDK_*, but define anyway for consistency.
16167  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16168
16169
16170  # Setup HOTSPOT_TARGET_CPU_DEFINE
16171  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16172    HOTSPOT_TARGET_CPU_DEFINE=IA32
16173  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16174    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16175  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16176    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16177  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16178    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16179  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16180    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16181  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16182    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16183
16184  # The cpu defines below are for zero, we don't support them directly.
16185  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16186    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16187  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16188    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16189  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16190    HOTSPOT_TARGET_CPU_DEFINE=S390
16191  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16192    HOTSPOT_TARGET_CPU_DEFINE=S390
16193  elif test "x$OPENJDK_TARGET_CPU" != x; then
16194    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16195  fi
16196
16197
16198
16199
16200  # Also store the legacy naming of the cpu.
16201  # Ie i586 and amd64 instead of x86 and x86_64
16202  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16203  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16204    OPENJDK_BUILD_CPU_LEGACY="i586"
16205  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16206    # On all platforms except MacOSX replace x86_64 with amd64.
16207    OPENJDK_BUILD_CPU_LEGACY="amd64"
16208  fi
16209
16210
16211  # And the second legacy naming of the cpu.
16212  # Ie i386 and amd64 instead of x86 and x86_64.
16213  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16214  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16215    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16216  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16217    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16218  fi
16219
16220
16221  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16222  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16223  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16224  OPENJDK_BUILD_CPU_ISADIR=""
16225  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16226    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16227      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16228    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16229      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16230    fi
16231  fi
16232
16233
16234  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16235  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16236  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16237    # On linux only, we replace x86 with i386.
16238    OPENJDK_BUILD_CPU_OSARCH="i386"
16239  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16240    # On all platforms except macosx, we replace x86_64 with amd64.
16241    OPENJDK_BUILD_CPU_OSARCH="amd64"
16242  fi
16243
16244
16245  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16246  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16247    OPENJDK_BUILD_CPU_JLI="i386"
16248  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16249    # On all platforms except macosx, we replace x86_64 with amd64.
16250    OPENJDK_BUILD_CPU_JLI="amd64"
16251  fi
16252
16253  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16254      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16255  else
16256      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16257  fi
16258
16259
16260  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16261  # Macosx is osx and x86_64 is x64
16262  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16263    OPENJDK_BUILD_OS_BUNDLE="osx"
16264  else
16265    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16266  fi
16267  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16268    OPENJDK_BUILD_CPU_BUNDLE="x64"
16269  else
16270    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16271  fi
16272  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16273
16274
16275  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16276    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16277    # unpack200.exe. This variable is used in
16278    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16279    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16280      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16281    fi
16282  fi
16283
16284  if test "x$COMPILE_TYPE" = "xcross"; then
16285    # FIXME: ... or should this include reduced builds..?
16286    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16287  else
16288    DEFINE_CROSS_COMPILE_ARCH=""
16289  fi
16290
16291
16292  # Convert openjdk platform names to hotspot names
16293
16294  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16295  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16296    HOTSPOT_BUILD_OS=bsd
16297  fi
16298
16299
16300  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16301  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16302    HOTSPOT_BUILD_OS_TYPE=posix
16303  fi
16304
16305
16306  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16307  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16308    HOTSPOT_BUILD_CPU=x86_32
16309  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16310    HOTSPOT_BUILD_CPU=sparc
16311  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16312    HOTSPOT_BUILD_CPU=ppc_64
16313  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16314    HOTSPOT_BUILD_CPU=ppc_64
16315  fi
16316
16317
16318  # This is identical with OPENJDK_*, but define anyway for consistency.
16319  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16320
16321
16322  # Setup HOTSPOT_BUILD_CPU_DEFINE
16323  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16324    HOTSPOT_BUILD_CPU_DEFINE=IA32
16325  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16326    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16327  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16328    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16329  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16330    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16331  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16332    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16333  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16334    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16335
16336  # The cpu defines below are for zero, we don't support them directly.
16337  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16338    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16339  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16340    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16341  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16342    HOTSPOT_BUILD_CPU_DEFINE=S390
16343  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16344    HOTSPOT_BUILD_CPU_DEFINE=S390
16345  elif test "x$OPENJDK_BUILD_CPU" != x; then
16346    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16347  fi
16348
16349
16350
16351
16352
16353
16354# Continue setting up basic stuff. Most remaining code require fundamental tools.
16355
16356  # Save the current directory this script was started from
16357  CURDIR="$PWD"
16358
16359  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16360  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16361  # was not available at that time.
16362  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16363  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16364    ORIGINAL_PATH="$REWRITTEN_PATH"
16365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16366$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16367  fi
16368
16369  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16370    PATH_SEP=";"
16371
16372  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16373  if test $SRC_ROOT_LENGTH -gt 100; then
16374    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16375  fi
16376
16377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16379$as_echo_n "checking cygwin release... " >&6; }
16380    CYGWIN_VERSION=`$UNAME -r`
16381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16382$as_echo "$CYGWIN_VERSION" >&6; }
16383    WINDOWS_ENV_VENDOR='cygwin'
16384    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16385
16386    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16387    if test "x$CYGWIN_VERSION_OLD" != x; then
16388      { $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
16389$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;}
16390      as_fn_error $? "Cannot continue" "$LINENO" 5
16391    fi
16392    if test "x$CYGPATH" = x; then
16393      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16394    fi
16395    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16396$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16397    # The cmd output ends with Windows line endings (CR/LF)
16398    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16399    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16400    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16402$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16403    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16404    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16405    if test "x$test_cygdrive_prefix" = x; then
16406      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16407    fi
16408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16410$as_echo_n "checking msys release... " >&6; }
16411    MSYS_VERSION=`$UNAME -r`
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16413$as_echo "$MSYS_VERSION" >&6; }
16414
16415    WINDOWS_ENV_VENDOR='msys'
16416    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16417
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16419$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16420    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16421    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16422
16423  windows_path="$MSYS_ROOT_PATH"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    MSYS_ROOT_PATH="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    MSYS_ROOT_PATH="$unix_path"
16430  fi
16431
16432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16433$as_echo "$MSYS_ROOT_PATH" >&6; }
16434    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16435  else
16436    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16437  fi
16438
16439  # Test if windows or unix (cygwin/msys) find is first in path.
16440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16441$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16442  FIND_BINARY_OUTPUT=`find --version 2>&1`
16443  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16445$as_echo "unix style" >&6; }
16446  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16448$as_echo "Windows" >&6; }
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16450$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16451    { $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
16452$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16453    as_fn_error $? "Cannot continue" "$LINENO" 5
16454  else
16455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16456$as_echo "unknown" >&6; }
16457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16458$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16459  fi
16460
16461  else
16462    PATH_SEP=":"
16463  fi
16464
16465
16466  # We get the top-level directory from the supporting wrappers.
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16468$as_echo_n "checking for top-level directory... " >&6; }
16469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16470$as_echo "$TOPDIR" >&6; }
16471
16472
16473  # Save the original version of TOPDIR for string comparisons
16474  ORIGINAL_TOPDIR="$TOPDIR"
16475
16476
16477  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16478
16479  # Only process if variable expands to non-empty
16480
16481  if test "x$CURDIR" != x; then
16482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16483
16484  # Input might be given as Windows format, start by converting to
16485  # unix format.
16486  path="$CURDIR"
16487  new_path=`$CYGPATH -u "$path"`
16488
16489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16492  # "foo.exe" is OK but "foo" is an error.
16493  #
16494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16495  # It is also a way to make sure we got the proper file name for the real test later on.
16496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16497  if test "x$test_shortpath" = x; then
16498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16499$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16500    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16501  fi
16502
16503  # Call helper function which possibly converts this using DOS-style short mode.
16504  # If so, the updated path is stored in $new_path.
16505
16506  input_path="$new_path"
16507  # Check if we need to convert this using DOS-style short mode. If the path
16508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16509  # take no chances and rewrite it.
16510  # Note: m4 eats our [], so we need to use [ and ] instead.
16511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16512  if test "x$has_forbidden_chars" != x; then
16513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16517      # Going to short mode and back again did indeed matter. Since short mode is
16518      # case insensitive, let's make it lowercase to improve readability.
16519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16520      # Now convert it back to Unix-style (cygpath)
16521      input_path=`$CYGPATH -u "$shortmode_path"`
16522      new_path="$input_path"
16523    fi
16524  fi
16525
16526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16527  if test "x$test_cygdrive_prefix" = x; then
16528    # As a simple fix, exclude /usr/bin since it's not a real path.
16529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16531      # a path prefixed by /cygdrive for fixpath to work.
16532      new_path="$CYGWIN_ROOT_PATH$input_path"
16533    fi
16534  fi
16535
16536
16537  if test "x$path" != "x$new_path"; then
16538    CURDIR="$new_path"
16539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16540$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16541  fi
16542
16543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16544
16545  path="$CURDIR"
16546  has_colon=`$ECHO $path | $GREP ^.:`
16547  new_path="$path"
16548  if test "x$has_colon" = x; then
16549    # Not in mixed or Windows style, start by that.
16550    new_path=`cmd //c echo $path`
16551  fi
16552
16553
16554  input_path="$new_path"
16555  # Check if we need to convert this using DOS-style short mode. If the path
16556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16557  # take no chances and rewrite it.
16558  # Note: m4 eats our [], so we need to use [ and ] instead.
16559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16560  if test "x$has_forbidden_chars" != x; then
16561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16563  fi
16564
16565
16566  windows_path="$new_path"
16567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16568    unix_path=`$CYGPATH -u "$windows_path"`
16569    new_path="$unix_path"
16570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16572    new_path="$unix_path"
16573  fi
16574
16575  if test "x$path" != "x$new_path"; then
16576    CURDIR="$new_path"
16577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16578$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16579  fi
16580
16581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16583
16584    else
16585      # We're on a unix platform. Hooray! :)
16586      path="$CURDIR"
16587      has_space=`$ECHO "$path" | $GREP " "`
16588      if test "x$has_space" != x; then
16589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16590$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16592      fi
16593
16594      # Use eval to expand a potential ~
16595      eval path="$path"
16596      if test ! -f "$path" && test ! -d "$path"; then
16597        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16598      fi
16599
16600      if test -d "$path"; then
16601        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16602      else
16603        dir="`$DIRNAME "$path"`"
16604        base="`$BASENAME "$path"`"
16605        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16606      fi
16607    fi
16608  fi
16609
16610
16611  # Only process if variable expands to non-empty
16612
16613  if test "x$TOPDIR" != x; then
16614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16615
16616  # Input might be given as Windows format, start by converting to
16617  # unix format.
16618  path="$TOPDIR"
16619  new_path=`$CYGPATH -u "$path"`
16620
16621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16624  # "foo.exe" is OK but "foo" is an error.
16625  #
16626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16627  # It is also a way to make sure we got the proper file name for the real test later on.
16628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16629  if test "x$test_shortpath" = x; then
16630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16631$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16632    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16633  fi
16634
16635  # Call helper function which possibly converts this using DOS-style short mode.
16636  # If so, the updated path is stored in $new_path.
16637
16638  input_path="$new_path"
16639  # Check if we need to convert this using DOS-style short mode. If the path
16640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16641  # take no chances and rewrite it.
16642  # Note: m4 eats our [], so we need to use [ and ] instead.
16643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16644  if test "x$has_forbidden_chars" != x; then
16645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16649      # Going to short mode and back again did indeed matter. Since short mode is
16650      # case insensitive, let's make it lowercase to improve readability.
16651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16652      # Now convert it back to Unix-style (cygpath)
16653      input_path=`$CYGPATH -u "$shortmode_path"`
16654      new_path="$input_path"
16655    fi
16656  fi
16657
16658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16659  if test "x$test_cygdrive_prefix" = x; then
16660    # As a simple fix, exclude /usr/bin since it's not a real path.
16661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16663      # a path prefixed by /cygdrive for fixpath to work.
16664      new_path="$CYGWIN_ROOT_PATH$input_path"
16665    fi
16666  fi
16667
16668
16669  if test "x$path" != "x$new_path"; then
16670    TOPDIR="$new_path"
16671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16672$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16673  fi
16674
16675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16676
16677  path="$TOPDIR"
16678  has_colon=`$ECHO $path | $GREP ^.:`
16679  new_path="$path"
16680  if test "x$has_colon" = x; then
16681    # Not in mixed or Windows style, start by that.
16682    new_path=`cmd //c echo $path`
16683  fi
16684
16685
16686  input_path="$new_path"
16687  # Check if we need to convert this using DOS-style short mode. If the path
16688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16689  # take no chances and rewrite it.
16690  # Note: m4 eats our [], so we need to use [ and ] instead.
16691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16692  if test "x$has_forbidden_chars" != x; then
16693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16695  fi
16696
16697
16698  windows_path="$new_path"
16699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700    unix_path=`$CYGPATH -u "$windows_path"`
16701    new_path="$unix_path"
16702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16704    new_path="$unix_path"
16705  fi
16706
16707  if test "x$path" != "x$new_path"; then
16708    TOPDIR="$new_path"
16709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16710$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16711  fi
16712
16713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16715
16716    else
16717      # We're on a unix platform. Hooray! :)
16718      path="$TOPDIR"
16719      has_space=`$ECHO "$path" | $GREP " "`
16720      if test "x$has_space" != x; then
16721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16722$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16724      fi
16725
16726      # Use eval to expand a potential ~
16727      eval path="$path"
16728      if test ! -f "$path" && test ! -d "$path"; then
16729        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16730      fi
16731
16732      if test -d "$path"; then
16733        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16734      else
16735        dir="`$DIRNAME "$path"`"
16736        base="`$BASENAME "$path"`"
16737        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16738      fi
16739    fi
16740  fi
16741
16742  # SRC_ROOT is a traditional alias for TOPDIR.
16743  SRC_ROOT=$TOPDIR
16744
16745  # Calculate a canonical version of TOPDIR for string comparisons
16746  CANONICAL_TOPDIR=$TOPDIR
16747
16748  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16749    # Follow a chain of symbolic links. Use readlink
16750    # where it exists, else fall back to horribly
16751    # complicated shell code.
16752    if test "x$READLINK_TESTED" != yes; then
16753      # On MacOSX there is a readlink tool with a different
16754      # purpose than the GNU readlink tool. Check the found readlink.
16755      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16756      if test "x$ISGNU" = x; then
16757        # A readlink that we do not know how to use.
16758        # Are there other non-GNU readlinks out there?
16759        READLINK_TESTED=yes
16760        READLINK=
16761      fi
16762    fi
16763
16764    if test "x$READLINK" != x; then
16765      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16766    else
16767      # Save the current directory for restoring afterwards
16768      STARTDIR=$PWD
16769      COUNTER=0
16770      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16771      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16772      cd $sym_link_dir
16773      # Use -P flag to resolve symlinks in directories.
16774      cd `$THEPWDCMD -P`
16775      sym_link_dir=`$THEPWDCMD -P`
16776      # Resolve file symlinks
16777      while test $COUNTER -lt 20; do
16778        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16779        if test "x$ISLINK" == x; then
16780          # This is not a symbolic link! We are done!
16781          break
16782        fi
16783        # Again resolve directory symlinks since the target of the just found
16784        # link could be in a different directory
16785        cd `$DIRNAME $ISLINK`
16786        sym_link_dir=`$THEPWDCMD -P`
16787        sym_link_file=`$BASENAME $ISLINK`
16788        let COUNTER=COUNTER+1
16789      done
16790      cd $STARTDIR
16791      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16792    fi
16793  fi
16794
16795
16796
16797  # Locate the directory of this script.
16798  AUTOCONF_DIR=$TOPDIR/common/autoconf
16799
16800  # Setup username (for use in adhoc version strings etc)
16801  # Outer [ ] to quote m4.
16802   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16803
16804
16805
16806# Check if it's a pure open build or if custom sources are to be used.
16807
16808  # Check whether --enable-openjdk-only was given.
16809if test "${enable_openjdk_only+set}" = set; then :
16810  enableval=$enable_openjdk_only;
16811else
16812  enable_openjdk_only="no"
16813fi
16814
16815
16816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16817$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16819$as_echo "$enable_openjdk_only" >&6; }
16820  if test "x$enable_openjdk_only" = "xyes"; then
16821    SUPPRESS_CUSTOM_EXTENSIONS="true"
16822  elif test "x$enable_openjdk_only" = "xno"; then
16823    SUPPRESS_CUSTOM_EXTENSIONS="false"
16824  else
16825    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16826  fi
16827
16828  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16829  # the IncludeCustomExtension macro.
16830
16831
16832# Check whether --with-custom-make-dir was given.
16833if test "${with_custom_make_dir+set}" = set; then :
16834  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
16835$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16836fi
16837
16838
16839
16840
16841# These are needed to be able to create a configuration name (and thus the output directory)
16842
16843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16844$as_echo_n "checking which variant of the JDK to build... " >&6; }
16845
16846# Check whether --with-jdk-variant was given.
16847if test "${with_jdk_variant+set}" = set; then :
16848  withval=$with_jdk_variant;
16849fi
16850
16851
16852  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16853    JDK_VARIANT="normal"
16854  else
16855    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16856  fi
16857
16858
16859
16860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16861$as_echo "$JDK_VARIANT" >&6; }
16862
16863
16864  DEBUG_LEVEL="release"
16865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16866$as_echo_n "checking which debug level to use... " >&6; }
16867  # Check whether --enable-debug was given.
16868if test "${enable_debug+set}" = set; then :
16869  enableval=$enable_debug;
16870        ENABLE_DEBUG="${enableval}"
16871        DEBUG_LEVEL="fastdebug"
16872
16873else
16874  ENABLE_DEBUG="no"
16875fi
16876
16877
16878
16879# Check whether --with-debug-level was given.
16880if test "${with_debug_level+set}" = set; then :
16881  withval=$with_debug_level;
16882        DEBUG_LEVEL="${withval}"
16883        if test "x$ENABLE_DEBUG" = xyes; then
16884          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16885        fi
16886
16887fi
16888
16889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16890$as_echo "$DEBUG_LEVEL" >&6; }
16891
16892  if test "x$DEBUG_LEVEL" != xrelease && \
16893      test "x$DEBUG_LEVEL" != xoptimized && \
16894      test "x$DEBUG_LEVEL" != xfastdebug && \
16895      test "x$DEBUG_LEVEL" != xslowdebug; then
16896    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16897  fi
16898
16899  # Translate DEBUG_LEVEL to debug level used by Hotspot
16900  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16901  if test "x$DEBUG_LEVEL" = xrelease; then
16902    HOTSPOT_DEBUG_LEVEL="product"
16903  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16904    HOTSPOT_DEBUG_LEVEL="debug"
16905  fi
16906
16907  if test "x$DEBUG_LEVEL" = xoptimized; then
16908    # The debug level 'optimized' is a little special because it is currently only
16909    # applicable to the HotSpot build where it means to build a completely
16910    # optimized version of the VM without any debugging code (like for the
16911    # 'release' debug level which is called 'product' in the HotSpot build) but
16912    # with the exception that it can contain additional code which is otherwise
16913    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16914    # test new and/or experimental features which are not intended for customer
16915    # shipment. Because these new features need to be tested and benchmarked in
16916    # real world scenarios, we want to build the containing JDK at the 'release'
16917    # debug level.
16918    DEBUG_LEVEL="release"
16919  fi
16920
16921
16922
16923
16924
16925
16926# Check whether --with-jvm-variants was given.
16927if test "${with_jvm_variants+set}" = set; then :
16928  withval=$with_jvm_variants;
16929fi
16930
16931
16932
16933
16934# Check whether --with-cpu-port was given.
16935if test "${with_cpu_port+set}" = set; then :
16936  withval=$with_cpu_port;
16937fi
16938
16939
16940  if test "x$with_cpu_port" != x; then
16941    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16942      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16943    fi
16944    if test "x$with_cpu_port" != xarm64 && \
16945        test "x$with_cpu_port" != xaarch64; then
16946      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16947    fi
16948    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16949  fi
16950
16951
16952  if test "x$with_jvm_variants" = x; then
16953    with_jvm_variants="server"
16954  fi
16955  JVM_VARIANTS_OPT="$with_jvm_variants"
16956
16957  # Has the user listed more than one variant?
16958  # Additional [] needed to keep m4 from mangling shell constructs.
16959  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16960    BUILDING_MULTIPLE_JVM_VARIANTS=true
16961  else
16962    BUILDING_MULTIPLE_JVM_VARIANTS=false
16963  fi
16964  # Replace the commas with AND for use in the build directory name.
16965  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16966
16967  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16968$as_echo_n "checking which variants of the JVM to build... " >&6; }
16969  # JVM_VARIANTS is a space-separated list.
16970  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16971  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16973$as_echo "$JVM_VARIANTS" >&6; }
16974
16975  # Check that the selected variants are valid
16976
16977  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16978  # Notice that the original variant failes on SLES 10 and 11
16979  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16980  STACK=${JVM_VARIANTS// /$'\n'}
16981  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16982  if test "x$INVALID_VARIANTS" != x; then
16983    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16984$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16985    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16986  fi
16987
16988  # All "special" variants share the same output directory ("server")
16989  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16990  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16991  STACK=${JVM_VARIANTS// /$'\n'}
16992  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16993  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16994    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16995  fi
16996
16997  # The "main" variant is the one used by other libs to link against during the
16998  # build.
16999  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17000    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17001    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17002      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17003        JVM_VARIANT_MAIN="$variant"
17004        break
17005      fi
17006    done
17007  else
17008    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17009  fi
17010
17011
17012
17013
17014
17015  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17016    # zero behaves as a platform and rewrites these values. This is really weird. :(
17017    # We are guaranteed that we do not build any other variants when building zero.
17018    HOTSPOT_TARGET_CPU=zero
17019    HOTSPOT_TARGET_CPU_ARCH=zero
17020  fi
17021
17022
17023# With basic setup done, call the custom early hook.
17024
17025
17026# Check if we have devkits, extra paths or sysroot set.
17027
17028
17029# Check whether --with-devkit was given.
17030if test "${with_devkit+set}" = set; then :
17031  withval=$with_devkit;
17032
17033  # Only process if variable expands to non-empty
17034
17035  if test "x$with_devkit" != x; then
17036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17037
17038  # Input might be given as Windows format, start by converting to
17039  # unix format.
17040  path="$with_devkit"
17041  new_path=`$CYGPATH -u "$path"`
17042
17043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17046  # "foo.exe" is OK but "foo" is an error.
17047  #
17048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17049  # It is also a way to make sure we got the proper file name for the real test later on.
17050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17051  if test "x$test_shortpath" = x; then
17052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17053$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17054    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17055  fi
17056
17057  # Call helper function which possibly converts this using DOS-style short mode.
17058  # If so, the updated path is stored in $new_path.
17059
17060  input_path="$new_path"
17061  # Check if we need to convert this using DOS-style short mode. If the path
17062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17063  # take no chances and rewrite it.
17064  # Note: m4 eats our [], so we need to use [ and ] instead.
17065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17066  if test "x$has_forbidden_chars" != x; then
17067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17071      # Going to short mode and back again did indeed matter. Since short mode is
17072      # case insensitive, let's make it lowercase to improve readability.
17073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17074      # Now convert it back to Unix-style (cygpath)
17075      input_path=`$CYGPATH -u "$shortmode_path"`
17076      new_path="$input_path"
17077    fi
17078  fi
17079
17080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17081  if test "x$test_cygdrive_prefix" = x; then
17082    # As a simple fix, exclude /usr/bin since it's not a real path.
17083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17085      # a path prefixed by /cygdrive for fixpath to work.
17086      new_path="$CYGWIN_ROOT_PATH$input_path"
17087    fi
17088  fi
17089
17090
17091  if test "x$path" != "x$new_path"; then
17092    with_devkit="$new_path"
17093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17094$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17095  fi
17096
17097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17098
17099  path="$with_devkit"
17100  has_colon=`$ECHO $path | $GREP ^.:`
17101  new_path="$path"
17102  if test "x$has_colon" = x; then
17103    # Not in mixed or Windows style, start by that.
17104    new_path=`cmd //c echo $path`
17105  fi
17106
17107
17108  input_path="$new_path"
17109  # Check if we need to convert this using DOS-style short mode. If the path
17110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17111  # take no chances and rewrite it.
17112  # Note: m4 eats our [], so we need to use [ and ] instead.
17113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17114  if test "x$has_forbidden_chars" != x; then
17115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17117  fi
17118
17119
17120  windows_path="$new_path"
17121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17122    unix_path=`$CYGPATH -u "$windows_path"`
17123    new_path="$unix_path"
17124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17126    new_path="$unix_path"
17127  fi
17128
17129  if test "x$path" != "x$new_path"; then
17130    with_devkit="$new_path"
17131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17132$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17133  fi
17134
17135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17137
17138    else
17139      # We're on a unix platform. Hooray! :)
17140      path="$with_devkit"
17141      has_space=`$ECHO "$path" | $GREP " "`
17142      if test "x$has_space" != x; then
17143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17144$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17146      fi
17147
17148      # Use eval to expand a potential ~
17149      eval path="$path"
17150      if test ! -f "$path" && test ! -d "$path"; then
17151        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17152      fi
17153
17154      if test -d "$path"; then
17155        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17156      else
17157        dir="`$DIRNAME "$path"`"
17158        base="`$BASENAME "$path"`"
17159        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17160      fi
17161    fi
17162  fi
17163
17164        DEVKIT_ROOT="$with_devkit"
17165        # Check for a meta data info file in the root of the devkit
17166        if test -f "$DEVKIT_ROOT/devkit.info"; then
17167          . $DEVKIT_ROOT/devkit.info
17168          # This potentially sets the following:
17169          # A descriptive name of the devkit
17170
17171  if test "x$DEVKIT_NAME" = x; then
17172    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17173  fi
17174
17175          # Corresponds to --with-extra-path
17176
17177  if test "x$DEVKIT_EXTRA_PATH" = x; then
17178    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17179  fi
17180
17181          # Corresponds to --with-toolchain-path
17182
17183  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17184    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17185  fi
17186
17187          # Corresponds to --with-sysroot
17188
17189  if test "x$DEVKIT_SYSROOT" = x; then
17190    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17191  fi
17192
17193
17194          # Identifies the Visual Studio version in the devkit
17195
17196  if test "x$DEVKIT_VS_VERSION" = x; then
17197    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17198  fi
17199
17200          # The Visual Studio include environment variable
17201
17202  if test "x$DEVKIT_VS_INCLUDE" = x; then
17203    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17204  fi
17205
17206          # The Visual Studio lib environment variable
17207
17208  if test "x$DEVKIT_VS_LIB" = x; then
17209    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17210  fi
17211
17212          # Corresponds to --with-msvcr-dll
17213
17214  if test "x$DEVKIT_MSVCR_DLL" = x; then
17215    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17216  fi
17217
17218          # Corresponds to --with-msvcp-dll
17219
17220  if test "x$DEVKIT_MSVCP_DLL" = x; then
17221    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17222  fi
17223
17224        fi
17225
17226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17227$as_echo_n "checking for devkit... " >&6; }
17228        if test "x$DEVKIT_NAME" != x; then
17229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17230$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17231        else
17232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17233$as_echo "$DEVKIT_ROOT" >&6; }
17234        fi
17235
17236
17237  if test "x$DEVKIT_EXTRA_PATH" != x; then
17238    if test "x$EXTRA_PATH" = x; then
17239      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17240    else
17241      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17242    fi
17243  fi
17244
17245
17246        # Fallback default of just /bin if DEVKIT_PATH is not defined
17247        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17248          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17249        fi
17250
17251  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17252    if test "x$TOOLCHAIN_PATH" = x; then
17253      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17254    else
17255      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17256    fi
17257  fi
17258
17259
17260        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17261        # places for backwards compatiblity.
17262        if test "x$DEVKIT_SYSROOT" != x; then
17263          SYSROOT="$DEVKIT_SYSROOT"
17264        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17265          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17266        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17267          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17268        fi
17269
17270
17271fi
17272
17273
17274  # You can force the sysroot if the sysroot encoded into the compiler tools
17275  # is not correct.
17276
17277# Check whether --with-sys-root was given.
17278if test "${with_sys_root+set}" = set; then :
17279  withval=$with_sys_root; SYSROOT=$with_sys_root
17280
17281fi
17282
17283
17284
17285# Check whether --with-sysroot was given.
17286if test "${with_sysroot+set}" = set; then :
17287  withval=$with_sysroot; SYSROOT=$with_sysroot
17288
17289fi
17290
17291
17292
17293# Check whether --with-tools-dir was given.
17294if test "${with_tools_dir+set}" = set; then :
17295  withval=$with_tools_dir;
17296  if test "x$with_tools_dir" != x; then
17297    if test "x$TOOLCHAIN_PATH" = x; then
17298      TOOLCHAIN_PATH="$with_tools_dir"
17299    else
17300      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17301    fi
17302  fi
17303
17304
17305fi
17306
17307
17308
17309# Check whether --with-toolchain-path was given.
17310if test "${with_toolchain_path+set}" = set; then :
17311  withval=$with_toolchain_path;
17312  if test "x$with_toolchain_path" != x; then
17313    if test "x$TOOLCHAIN_PATH" = x; then
17314      TOOLCHAIN_PATH="$with_toolchain_path"
17315    else
17316      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17317    fi
17318  fi
17319
17320
17321fi
17322
17323
17324
17325# Check whether --with-extra-path was given.
17326if test "${with_extra_path+set}" = set; then :
17327  withval=$with_extra_path;
17328  if test "x$with_extra_path" != x; then
17329    if test "x$EXTRA_PATH" = x; then
17330      EXTRA_PATH="$with_extra_path"
17331    else
17332      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17333    fi
17334  fi
17335
17336
17337fi
17338
17339
17340  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17341    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17342    # If not, detect if Xcode is installed by running xcodebuild -version
17343    # if no Xcode installed, xcodebuild exits with 1
17344    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17345    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17346      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17347      # fall back on the stub binary in /usr/bin/xcodebuild
17348      # Extract the first word of "xcodebuild", so it can be a program name with args.
17349set dummy xcodebuild; ac_word=$2
17350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17351$as_echo_n "checking for $ac_word... " >&6; }
17352if ${ac_cv_path_XCODEBUILD+:} false; then :
17353  $as_echo_n "(cached) " >&6
17354else
17355  case $XCODEBUILD in
17356  [\\/]* | ?:[\\/]*)
17357  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17358  ;;
17359  *)
17360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17361for as_dir in $TOOLCHAIN_PATH
17362do
17363  IFS=$as_save_IFS
17364  test -z "$as_dir" && as_dir=.
17365    for ac_exec_ext in '' $ac_executable_extensions; do
17366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17367    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17369    break 2
17370  fi
17371done
17372  done
17373IFS=$as_save_IFS
17374
17375  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17376  ;;
17377esac
17378fi
17379XCODEBUILD=$ac_cv_path_XCODEBUILD
17380if test -n "$XCODEBUILD"; then
17381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17382$as_echo "$XCODEBUILD" >&6; }
17383else
17384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17385$as_echo "no" >&6; }
17386fi
17387
17388
17389    else
17390      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17391      # when only the command line tools are installed there are no SDKs, so headers
17392      # are copied into the system frameworks
17393      XCODEBUILD=
17394
17395    fi
17396
17397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17398$as_echo_n "checking for sdk name... " >&6; }
17399
17400# Check whether --with-sdk-name was given.
17401if test "${with_sdk_name+set}" = set; then :
17402  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17403
17404fi
17405
17406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17407$as_echo "$SDKNAME" >&6; }
17408
17409    # if toolchain path is specified then don't rely on system headers, they may not compile
17410    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17411    test -z "$TOOLCHAIN_PATH" && \
17412      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17413
17414    if test -z "$SYSROOT"; then
17415      if test -n "$XCODEBUILD"; then
17416        # if we don't have system headers, use default SDK name (last resort)
17417        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17418          SDKNAME=${SDKNAME:-macosx}
17419        fi
17420
17421        if test -n "$SDKNAME"; then
17422          # Call xcodebuild to determine SYSROOT
17423          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17424        fi
17425      else
17426        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17427          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
17428        fi
17429      fi
17430    else
17431      # warn user if --with-sdk-name was also set
17432      if test -n "$with_sdk_name"; then
17433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17434$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17435      fi
17436    fi
17437
17438    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17439      # If no system framework headers, then SYSROOT must be set, or we won't build
17440      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
17441    fi
17442
17443    # Perform a basic sanity test
17444    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17445      if test -z "$SYSROOT"; then
17446        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
17447      else
17448        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17449      fi
17450    fi
17451
17452    # set SDKROOT too, Xcode tools will pick it up
17453    SDKROOT="$SYSROOT"
17454
17455  fi
17456
17457  # Prepend the extra path to the global path
17458
17459  if test "x$EXTRA_PATH" != x; then
17460    if test "x$PATH" = x; then
17461      PATH="$EXTRA_PATH"
17462    else
17463      PATH="$EXTRA_PATH:$PATH"
17464    fi
17465  fi
17466
17467
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17469$as_echo_n "checking for sysroot... " >&6; }
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17471$as_echo "$SYSROOT" >&6; }
17472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17473$as_echo_n "checking for toolchain path... " >&6; }
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17475$as_echo "$TOOLCHAIN_PATH" >&6; }
17476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17477$as_echo_n "checking for extra path... " >&6; }
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17479$as_echo "$EXTRA_PATH" >&6; }
17480
17481
17482# To properly create a configuration name, we need to have the OpenJDK target
17483# and options (variants and debug level) parsed.
17484
17485
17486
17487# Check whether --with-conf-name was given.
17488if test "${with_conf_name+set}" = set; then :
17489  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17490fi
17491
17492
17493  # Test from where we are running configure, in or outside of src root.
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17495$as_echo_n "checking where to store configuration... " >&6; }
17496  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17497      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17498      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17499    # We are running configure from the src root.
17500    # Create a default ./build/target-variant-debuglevel output root.
17501    if test "x${CONF_NAME}" = x; then
17502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17503$as_echo "in default location" >&6; }
17504      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17505    else
17506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17507$as_echo "in build directory with custom name" >&6; }
17508    fi
17509    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17510    $MKDIR -p "$OUTPUT_ROOT"
17511    if test ! -d "$OUTPUT_ROOT"; then
17512      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17513    fi
17514  else
17515    # We are running configure from outside of the src dir.
17516    # Then use the current directory as output dir!
17517    # If configuration is situated in normal build directory, just use the build
17518    # directory name as configuration name, otherwise use the complete path.
17519    if test "x${CONF_NAME}" = x; then
17520      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17521    fi
17522    OUTPUT_ROOT="$CURDIR"
17523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17524$as_echo "in current directory" >&6; }
17525
17526    # WARNING: This might be a bad thing to do. You need to be sure you want to
17527    # have a configuration in this directory. Do some sanity checks!
17528
17529    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17530      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17531      # other files
17532      files_present=`$LS $OUTPUT_ROOT`
17533      # Configure has already touched config.log and confdefs.h in the current dir when this check
17534      # is performed.
17535      filtered_files=`$ECHO "$files_present" \
17536          | $SED -e 's/config.log//g' \
17537              -e 's/configure.log//g' \
17538              -e 's/confdefs.h//g' \
17539              -e 's/ //g' \
17540          | $TR -d '\n'`
17541      if test "x$filtered_files" != x; then
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17543$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17545$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17546        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17547$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17548        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17549$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17550        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17551$as_echo "$as_me: seriously mess up just about everything." >&6;}
17552        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17553$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17554        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17555$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17556        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17557      fi
17558    fi
17559  fi
17560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17561$as_echo_n "checking what configuration name to use... " >&6; }
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17563$as_echo "$CONF_NAME" >&6; }
17564
17565
17566  # Only process if variable expands to non-empty
17567
17568  if test "x$OUTPUT_ROOT" != x; then
17569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17570
17571  # Input might be given as Windows format, start by converting to
17572  # unix format.
17573  path="$OUTPUT_ROOT"
17574  new_path=`$CYGPATH -u "$path"`
17575
17576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17579  # "foo.exe" is OK but "foo" is an error.
17580  #
17581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17582  # It is also a way to make sure we got the proper file name for the real test later on.
17583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17584  if test "x$test_shortpath" = x; then
17585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17586$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17587    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17588  fi
17589
17590  # Call helper function which possibly converts this using DOS-style short mode.
17591  # If so, the updated path is stored in $new_path.
17592
17593  input_path="$new_path"
17594  # Check if we need to convert this using DOS-style short mode. If the path
17595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17596  # take no chances and rewrite it.
17597  # Note: m4 eats our [], so we need to use [ and ] instead.
17598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17599  if test "x$has_forbidden_chars" != x; then
17600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17604      # Going to short mode and back again did indeed matter. Since short mode is
17605      # case insensitive, let's make it lowercase to improve readability.
17606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17607      # Now convert it back to Unix-style (cygpath)
17608      input_path=`$CYGPATH -u "$shortmode_path"`
17609      new_path="$input_path"
17610    fi
17611  fi
17612
17613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17614  if test "x$test_cygdrive_prefix" = x; then
17615    # As a simple fix, exclude /usr/bin since it's not a real path.
17616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17618      # a path prefixed by /cygdrive for fixpath to work.
17619      new_path="$CYGWIN_ROOT_PATH$input_path"
17620    fi
17621  fi
17622
17623
17624  if test "x$path" != "x$new_path"; then
17625    OUTPUT_ROOT="$new_path"
17626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17627$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17628  fi
17629
17630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17631
17632  path="$OUTPUT_ROOT"
17633  has_colon=`$ECHO $path | $GREP ^.:`
17634  new_path="$path"
17635  if test "x$has_colon" = x; then
17636    # Not in mixed or Windows style, start by that.
17637    new_path=`cmd //c echo $path`
17638  fi
17639
17640
17641  input_path="$new_path"
17642  # Check if we need to convert this using DOS-style short mode. If the path
17643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17644  # take no chances and rewrite it.
17645  # Note: m4 eats our [], so we need to use [ and ] instead.
17646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17647  if test "x$has_forbidden_chars" != x; then
17648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17650  fi
17651
17652
17653  windows_path="$new_path"
17654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17655    unix_path=`$CYGPATH -u "$windows_path"`
17656    new_path="$unix_path"
17657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17659    new_path="$unix_path"
17660  fi
17661
17662  if test "x$path" != "x$new_path"; then
17663    OUTPUT_ROOT="$new_path"
17664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17665$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17666  fi
17667
17668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17670
17671    else
17672      # We're on a unix platform. Hooray! :)
17673      path="$OUTPUT_ROOT"
17674      has_space=`$ECHO "$path" | $GREP " "`
17675      if test "x$has_space" != x; then
17676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17677$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17679      fi
17680
17681      # Use eval to expand a potential ~
17682      eval path="$path"
17683      if test ! -f "$path" && test ! -d "$path"; then
17684        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17685      fi
17686
17687      if test -d "$path"; then
17688        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17689      else
17690        dir="`$DIRNAME "$path"`"
17691        base="`$BASENAME "$path"`"
17692        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17693      fi
17694    fi
17695  fi
17696
17697
17698  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17699  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17700
17701  SPEC="$OUTPUT_ROOT/spec.gmk"
17702
17703
17704
17705
17706
17707  # The spec.gmk file contains all variables for the make system.
17708  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17709
17710  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17711  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17712
17713  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17714  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17715
17716  # The compare.sh is used to compare the build output to other builds.
17717  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17718
17719  # The generated Makefile knows where the spec.gmk is and where the source is.
17720  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17721  # which will look for generated configurations
17722  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17723
17724
17725
17726# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17727
17728  for ac_prog in apt-get yum brew port pkgutil pkgadd
17729do
17730  # Extract the first word of "$ac_prog", so it can be a program name with args.
17731set dummy $ac_prog; ac_word=$2
17732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17733$as_echo_n "checking for $ac_word... " >&6; }
17734if ${ac_cv_prog_PKGHANDLER+:} false; then :
17735  $as_echo_n "(cached) " >&6
17736else
17737  if test -n "$PKGHANDLER"; then
17738  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17739else
17740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17741for as_dir in $PATH
17742do
17743  IFS=$as_save_IFS
17744  test -z "$as_dir" && as_dir=.
17745    for ac_exec_ext in '' $ac_executable_extensions; do
17746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17747    ac_cv_prog_PKGHANDLER="$ac_prog"
17748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17749    break 2
17750  fi
17751done
17752  done
17753IFS=$as_save_IFS
17754
17755fi
17756fi
17757PKGHANDLER=$ac_cv_prog_PKGHANDLER
17758if test -n "$PKGHANDLER"; then
17759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17760$as_echo "$PKGHANDLER" >&6; }
17761else
17762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17763$as_echo "no" >&6; }
17764fi
17765
17766
17767  test -n "$PKGHANDLER" && break
17768done
17769
17770
17771
17772# Setup tools that requires more complex handling, or that is not needed by the configure script.
17773
17774
17775
17776  # Publish this variable in the help.
17777
17778
17779  if [ -z "${MAKE+x}" ]; then
17780    # The variable is not set by user, try to locate tool using the code snippet
17781
17782    # Try our hardest to locate a correct version of GNU make
17783    for ac_prog in gmake
17784do
17785  # Extract the first word of "$ac_prog", so it can be a program name with args.
17786set dummy $ac_prog; ac_word=$2
17787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17788$as_echo_n "checking for $ac_word... " >&6; }
17789if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17790  $as_echo_n "(cached) " >&6
17791else
17792  case $CHECK_GMAKE in
17793  [\\/]* | ?:[\\/]*)
17794  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17795  ;;
17796  *)
17797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17798for as_dir in $PATH
17799do
17800  IFS=$as_save_IFS
17801  test -z "$as_dir" && as_dir=.
17802    for ac_exec_ext in '' $ac_executable_extensions; do
17803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17804    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17806    break 2
17807  fi
17808done
17809  done
17810IFS=$as_save_IFS
17811
17812  ;;
17813esac
17814fi
17815CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17816if test -n "$CHECK_GMAKE"; then
17817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17818$as_echo "$CHECK_GMAKE" >&6; }
17819else
17820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17821$as_echo "no" >&6; }
17822fi
17823
17824
17825  test -n "$CHECK_GMAKE" && break
17826done
17827
17828
17829  MAKE_CANDIDATE=""$CHECK_GMAKE""
17830  DESCRIPTION="gmake in PATH"
17831
17832  # On Cygwin, we require a newer version of make than on other platforms
17833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17834    MAKE_VERSION_EXPR="-e 4\."
17835    MAKE_REQUIRED_VERSION="4.0"
17836   else
17837    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17838    MAKE_REQUIRED_VERSION="3.81"
17839  fi
17840
17841  if test "x$MAKE_CANDIDATE" != x; then
17842    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17843$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17844    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17845    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17846    if test "x$IS_GNU_MAKE" = x; then
17847      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17848$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17849    else
17850      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17851      if test "x$IS_MODERN_MAKE" = x; then
17852        { $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
17853$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;}
17854      else
17855        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17856          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17857            MAKE_EXPECTED_ENV='cygwin'
17858          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17859            MAKE_EXPECTED_ENV='msys'
17860          else
17861            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17862          fi
17863          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17864          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17865        else
17866          # Not relevant for non-Windows
17867          IS_MAKE_CORRECT_ENV=true
17868        fi
17869        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17870          { $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
17871$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;}
17872        else
17873          FOUND_MAKE=$MAKE_CANDIDATE
17874
17875  # Only process if variable expands to non-empty
17876
17877  if test "x$FOUND_MAKE" != x; then
17878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879
17880  # First separate the path from the arguments. This will split at the first
17881  # space.
17882  complete="$FOUND_MAKE"
17883  path="${complete%% *}"
17884  tmp="$complete EOL"
17885  arguments="${tmp#* }"
17886
17887  # Input might be given as Windows format, start by converting to
17888  # unix format.
17889  new_path=`$CYGPATH -u "$path"`
17890
17891  # Now try to locate executable using which
17892  new_path=`$WHICH "$new_path" 2> /dev/null`
17893  # bat and cmd files are not always considered executable in cygwin causing which
17894  # to not find them
17895  if test "x$new_path" = x \
17896      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17897      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17898    new_path=`$CYGPATH -u "$path"`
17899  fi
17900  if test "x$new_path" = x; then
17901    # Oops. Which didn't find the executable.
17902    # The splitting of arguments from the executable at a space might have been incorrect,
17903    # since paths with space are more likely in Windows. Give it another try with the whole
17904    # argument.
17905    path="$complete"
17906    arguments="EOL"
17907    new_path=`$CYGPATH -u "$path"`
17908    new_path=`$WHICH "$new_path" 2> /dev/null`
17909    # bat and cmd files are not always considered executable in cygwin causing which
17910    # to not find them
17911    if test "x$new_path" = x \
17912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17914      new_path=`$CYGPATH -u "$path"`
17915    fi
17916    if test "x$new_path" = x; then
17917      # It's still not found. Now this is an unrecoverable error.
17918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17920      has_space=`$ECHO "$complete" | $GREP " "`
17921      if test "x$has_space" != x; then
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17924      fi
17925      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17926    fi
17927  fi
17928
17929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17932  # "foo.exe" is OK but "foo" is an error.
17933  #
17934  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17935  # It is also a way to make sure we got the proper file name for the real test later on.
17936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17937  if test "x$test_shortpath" = x; then
17938    # Short path failed, file does not exist as specified.
17939    # Try adding .exe or .cmd
17940    if test -f "${new_path}.exe"; then
17941      input_to_shortpath="${new_path}.exe"
17942    elif test -f "${new_path}.cmd"; then
17943      input_to_shortpath="${new_path}.cmd"
17944    else
17945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17946$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17947      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17948$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17949      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17950    fi
17951  else
17952    input_to_shortpath="$new_path"
17953  fi
17954
17955  # Call helper function which possibly converts this using DOS-style short mode.
17956  # If so, the updated path is stored in $new_path.
17957  new_path="$input_to_shortpath"
17958
17959  input_path="$input_to_shortpath"
17960  # Check if we need to convert this using DOS-style short mode. If the path
17961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17962  # take no chances and rewrite it.
17963  # Note: m4 eats our [], so we need to use [ and ] instead.
17964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17965  if test "x$has_forbidden_chars" != x; then
17966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17970      # Going to short mode and back again did indeed matter. Since short mode is
17971      # case insensitive, let's make it lowercase to improve readability.
17972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17973      # Now convert it back to Unix-style (cygpath)
17974      input_path=`$CYGPATH -u "$shortmode_path"`
17975      new_path="$input_path"
17976    fi
17977  fi
17978
17979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17980  if test "x$test_cygdrive_prefix" = x; then
17981    # As a simple fix, exclude /usr/bin since it's not a real path.
17982    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17984      # a path prefixed by /cygdrive for fixpath to work.
17985      new_path="$CYGWIN_ROOT_PATH$input_path"
17986    fi
17987  fi
17988
17989  # remove trailing .exe if any
17990  new_path="${new_path/%.exe/}"
17991
17992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993
17994  # First separate the path from the arguments. This will split at the first
17995  # space.
17996  complete="$FOUND_MAKE"
17997  path="${complete%% *}"
17998  tmp="$complete EOL"
17999  arguments="${tmp#* }"
18000
18001  # Input might be given as Windows format, start by converting to
18002  # unix format.
18003  new_path="$path"
18004
18005  windows_path="$new_path"
18006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18007    unix_path=`$CYGPATH -u "$windows_path"`
18008    new_path="$unix_path"
18009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18011    new_path="$unix_path"
18012  fi
18013
18014
18015  # Now try to locate executable using which
18016  new_path=`$WHICH "$new_path" 2> /dev/null`
18017
18018  if test "x$new_path" = x; then
18019    # Oops. Which didn't find the executable.
18020    # The splitting of arguments from the executable at a space might have been incorrect,
18021    # since paths with space are more likely in Windows. Give it another try with the whole
18022    # argument.
18023    path="$complete"
18024    arguments="EOL"
18025    new_path="$path"
18026
18027  windows_path="$new_path"
18028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18029    unix_path=`$CYGPATH -u "$windows_path"`
18030    new_path="$unix_path"
18031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18033    new_path="$unix_path"
18034  fi
18035
18036
18037    new_path=`$WHICH "$new_path" 2> /dev/null`
18038    # bat and cmd files are not always considered executable in MSYS causing which
18039    # to not find them
18040    if test "x$new_path" = x \
18041        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18042        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18043      new_path="$path"
18044
18045  windows_path="$new_path"
18046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18047    unix_path=`$CYGPATH -u "$windows_path"`
18048    new_path="$unix_path"
18049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18051    new_path="$unix_path"
18052  fi
18053
18054    fi
18055
18056    if test "x$new_path" = x; then
18057      # It's still not found. Now this is an unrecoverable error.
18058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18060      has_space=`$ECHO "$complete" | $GREP " "`
18061      if test "x$has_space" != x; then
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18064      fi
18065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18066    fi
18067  fi
18068
18069  # Now new_path has a complete unix path to the binary
18070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18071    # Keep paths in /bin as-is, but remove trailing .exe if any
18072    new_path="${new_path/%.exe/}"
18073    # Do not save /bin paths to all_fixpath_prefixes!
18074  else
18075    # Not in mixed or Windows style, start by that.
18076    new_path=`cmd //c echo $new_path`
18077
18078  input_path="$new_path"
18079  # Check if we need to convert this using DOS-style short mode. If the path
18080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18081  # take no chances and rewrite it.
18082  # Note: m4 eats our [], so we need to use [ and ] instead.
18083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18084  if test "x$has_forbidden_chars" != x; then
18085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18087  fi
18088
18089    # Output is in $new_path
18090
18091  windows_path="$new_path"
18092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18093    unix_path=`$CYGPATH -u "$windows_path"`
18094    new_path="$unix_path"
18095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18097    new_path="$unix_path"
18098  fi
18099
18100    # remove trailing .exe if any
18101    new_path="${new_path/%.exe/}"
18102
18103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18105  fi
18106
18107    else
18108      # We're on a unix platform. Hooray! :)
18109      # First separate the path from the arguments. This will split at the first
18110      # space.
18111      complete="$FOUND_MAKE"
18112      path="${complete%% *}"
18113      tmp="$complete EOL"
18114      arguments="${tmp#* }"
18115
18116      # Cannot rely on the command "which" here since it doesn't always work.
18117      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18118      if test -z "$is_absolute_path"; then
18119        # Path to executable is not absolute. Find it.
18120        IFS_save="$IFS"
18121        IFS=:
18122        for p in $PATH; do
18123          if test -f "$p/$path" && test -x "$p/$path"; then
18124            new_path="$p/$path"
18125            break
18126          fi
18127        done
18128        IFS="$IFS_save"
18129      else
18130        # This is an absolute path, we can use it without further modifications.
18131        new_path="$path"
18132      fi
18133
18134      if test "x$new_path" = x; then
18135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18137        has_space=`$ECHO "$complete" | $GREP " "`
18138        if test "x$has_space" != x; then
18139          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18141        fi
18142        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18143      fi
18144    fi
18145
18146    # Now join together the path and the arguments once again
18147    if test "x$arguments" != xEOL; then
18148      new_complete="$new_path ${arguments% *}"
18149    else
18150      new_complete="$new_path"
18151    fi
18152
18153    if test "x$complete" != "x$new_complete"; then
18154      FOUND_MAKE="$new_complete"
18155      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18156$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18157    fi
18158  fi
18159
18160        fi
18161      fi
18162    fi
18163  fi
18164
18165
18166    if test "x$FOUND_MAKE" = x; then
18167      for ac_prog in make
18168do
18169  # Extract the first word of "$ac_prog", so it can be a program name with args.
18170set dummy $ac_prog; ac_word=$2
18171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18172$as_echo_n "checking for $ac_word... " >&6; }
18173if ${ac_cv_path_CHECK_MAKE+:} false; then :
18174  $as_echo_n "(cached) " >&6
18175else
18176  case $CHECK_MAKE in
18177  [\\/]* | ?:[\\/]*)
18178  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18179  ;;
18180  *)
18181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18182for as_dir in $PATH
18183do
18184  IFS=$as_save_IFS
18185  test -z "$as_dir" && as_dir=.
18186    for ac_exec_ext in '' $ac_executable_extensions; do
18187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18188    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18190    break 2
18191  fi
18192done
18193  done
18194IFS=$as_save_IFS
18195
18196  ;;
18197esac
18198fi
18199CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18200if test -n "$CHECK_MAKE"; then
18201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18202$as_echo "$CHECK_MAKE" >&6; }
18203else
18204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18205$as_echo "no" >&6; }
18206fi
18207
18208
18209  test -n "$CHECK_MAKE" && break
18210done
18211
18212
18213  MAKE_CANDIDATE=""$CHECK_MAKE""
18214  DESCRIPTION="make in PATH"
18215
18216  # On Cygwin, we require a newer version of make than on other platforms
18217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18218    MAKE_VERSION_EXPR="-e 4\."
18219    MAKE_REQUIRED_VERSION="4.0"
18220   else
18221    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18222    MAKE_REQUIRED_VERSION="3.81"
18223  fi
18224
18225  if test "x$MAKE_CANDIDATE" != x; then
18226    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18227$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18228    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18229    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18230    if test "x$IS_GNU_MAKE" = x; then
18231      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18232$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18233    else
18234      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18235      if test "x$IS_MODERN_MAKE" = x; then
18236        { $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
18237$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;}
18238      else
18239        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18240          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18241            MAKE_EXPECTED_ENV='cygwin'
18242          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18243            MAKE_EXPECTED_ENV='msys'
18244          else
18245            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18246          fi
18247          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18248          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18249        else
18250          # Not relevant for non-Windows
18251          IS_MAKE_CORRECT_ENV=true
18252        fi
18253        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18254          { $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
18255$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;}
18256        else
18257          FOUND_MAKE=$MAKE_CANDIDATE
18258
18259  # Only process if variable expands to non-empty
18260
18261  if test "x$FOUND_MAKE" != x; then
18262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18263
18264  # First separate the path from the arguments. This will split at the first
18265  # space.
18266  complete="$FOUND_MAKE"
18267  path="${complete%% *}"
18268  tmp="$complete EOL"
18269  arguments="${tmp#* }"
18270
18271  # Input might be given as Windows format, start by converting to
18272  # unix format.
18273  new_path=`$CYGPATH -u "$path"`
18274
18275  # Now try to locate executable using which
18276  new_path=`$WHICH "$new_path" 2> /dev/null`
18277  # bat and cmd files are not always considered executable in cygwin causing which
18278  # to not find them
18279  if test "x$new_path" = x \
18280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18282    new_path=`$CYGPATH -u "$path"`
18283  fi
18284  if test "x$new_path" = x; then
18285    # Oops. Which didn't find the executable.
18286    # The splitting of arguments from the executable at a space might have been incorrect,
18287    # since paths with space are more likely in Windows. Give it another try with the whole
18288    # argument.
18289    path="$complete"
18290    arguments="EOL"
18291    new_path=`$CYGPATH -u "$path"`
18292    new_path=`$WHICH "$new_path" 2> /dev/null`
18293    # bat and cmd files are not always considered executable in cygwin causing which
18294    # to not find them
18295    if test "x$new_path" = x \
18296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18298      new_path=`$CYGPATH -u "$path"`
18299    fi
18300    if test "x$new_path" = x; then
18301      # It's still not found. Now this is an unrecoverable error.
18302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18304      has_space=`$ECHO "$complete" | $GREP " "`
18305      if test "x$has_space" != x; then
18306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18308      fi
18309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18310    fi
18311  fi
18312
18313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18316  # "foo.exe" is OK but "foo" is an error.
18317  #
18318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18319  # It is also a way to make sure we got the proper file name for the real test later on.
18320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18321  if test "x$test_shortpath" = x; then
18322    # Short path failed, file does not exist as specified.
18323    # Try adding .exe or .cmd
18324    if test -f "${new_path}.exe"; then
18325      input_to_shortpath="${new_path}.exe"
18326    elif test -f "${new_path}.cmd"; then
18327      input_to_shortpath="${new_path}.cmd"
18328    else
18329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18334    fi
18335  else
18336    input_to_shortpath="$new_path"
18337  fi
18338
18339  # Call helper function which possibly converts this using DOS-style short mode.
18340  # If so, the updated path is stored in $new_path.
18341  new_path="$input_to_shortpath"
18342
18343  input_path="$input_to_shortpath"
18344  # Check if we need to convert this using DOS-style short mode. If the path
18345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18346  # take no chances and rewrite it.
18347  # Note: m4 eats our [], so we need to use [ and ] instead.
18348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18349  if test "x$has_forbidden_chars" != x; then
18350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18354      # Going to short mode and back again did indeed matter. Since short mode is
18355      # case insensitive, let's make it lowercase to improve readability.
18356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18357      # Now convert it back to Unix-style (cygpath)
18358      input_path=`$CYGPATH -u "$shortmode_path"`
18359      new_path="$input_path"
18360    fi
18361  fi
18362
18363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18364  if test "x$test_cygdrive_prefix" = x; then
18365    # As a simple fix, exclude /usr/bin since it's not a real path.
18366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18368      # a path prefixed by /cygdrive for fixpath to work.
18369      new_path="$CYGWIN_ROOT_PATH$input_path"
18370    fi
18371  fi
18372
18373  # remove trailing .exe if any
18374  new_path="${new_path/%.exe/}"
18375
18376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18377
18378  # First separate the path from the arguments. This will split at the first
18379  # space.
18380  complete="$FOUND_MAKE"
18381  path="${complete%% *}"
18382  tmp="$complete EOL"
18383  arguments="${tmp#* }"
18384
18385  # Input might be given as Windows format, start by converting to
18386  # unix format.
18387  new_path="$path"
18388
18389  windows_path="$new_path"
18390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18391    unix_path=`$CYGPATH -u "$windows_path"`
18392    new_path="$unix_path"
18393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18395    new_path="$unix_path"
18396  fi
18397
18398
18399  # Now try to locate executable using which
18400  new_path=`$WHICH "$new_path" 2> /dev/null`
18401
18402  if test "x$new_path" = x; then
18403    # Oops. Which didn't find the executable.
18404    # The splitting of arguments from the executable at a space might have been incorrect,
18405    # since paths with space are more likely in Windows. Give it another try with the whole
18406    # argument.
18407    path="$complete"
18408    arguments="EOL"
18409    new_path="$path"
18410
18411  windows_path="$new_path"
18412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413    unix_path=`$CYGPATH -u "$windows_path"`
18414    new_path="$unix_path"
18415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18417    new_path="$unix_path"
18418  fi
18419
18420
18421    new_path=`$WHICH "$new_path" 2> /dev/null`
18422    # bat and cmd files are not always considered executable in MSYS causing which
18423    # to not find them
18424    if test "x$new_path" = x \
18425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18427      new_path="$path"
18428
18429  windows_path="$new_path"
18430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18431    unix_path=`$CYGPATH -u "$windows_path"`
18432    new_path="$unix_path"
18433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18435    new_path="$unix_path"
18436  fi
18437
18438    fi
18439
18440    if test "x$new_path" = x; then
18441      # It's still not found. Now this is an unrecoverable error.
18442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18444      has_space=`$ECHO "$complete" | $GREP " "`
18445      if test "x$has_space" != x; then
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18448      fi
18449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18450    fi
18451  fi
18452
18453  # Now new_path has a complete unix path to the binary
18454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18455    # Keep paths in /bin as-is, but remove trailing .exe if any
18456    new_path="${new_path/%.exe/}"
18457    # Do not save /bin paths to all_fixpath_prefixes!
18458  else
18459    # Not in mixed or Windows style, start by that.
18460    new_path=`cmd //c echo $new_path`
18461
18462  input_path="$new_path"
18463  # Check if we need to convert this using DOS-style short mode. If the path
18464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18465  # take no chances and rewrite it.
18466  # Note: m4 eats our [], so we need to use [ and ] instead.
18467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18468  if test "x$has_forbidden_chars" != x; then
18469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18471  fi
18472
18473    # Output is in $new_path
18474
18475  windows_path="$new_path"
18476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18477    unix_path=`$CYGPATH -u "$windows_path"`
18478    new_path="$unix_path"
18479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18481    new_path="$unix_path"
18482  fi
18483
18484    # remove trailing .exe if any
18485    new_path="${new_path/%.exe/}"
18486
18487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18489  fi
18490
18491    else
18492      # We're on a unix platform. Hooray! :)
18493      # First separate the path from the arguments. This will split at the first
18494      # space.
18495      complete="$FOUND_MAKE"
18496      path="${complete%% *}"
18497      tmp="$complete EOL"
18498      arguments="${tmp#* }"
18499
18500      # Cannot rely on the command "which" here since it doesn't always work.
18501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18502      if test -z "$is_absolute_path"; then
18503        # Path to executable is not absolute. Find it.
18504        IFS_save="$IFS"
18505        IFS=:
18506        for p in $PATH; do
18507          if test -f "$p/$path" && test -x "$p/$path"; then
18508            new_path="$p/$path"
18509            break
18510          fi
18511        done
18512        IFS="$IFS_save"
18513      else
18514        # This is an absolute path, we can use it without further modifications.
18515        new_path="$path"
18516      fi
18517
18518      if test "x$new_path" = x; then
18519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18521        has_space=`$ECHO "$complete" | $GREP " "`
18522        if test "x$has_space" != x; then
18523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18525        fi
18526        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18527      fi
18528    fi
18529
18530    # Now join together the path and the arguments once again
18531    if test "x$arguments" != xEOL; then
18532      new_complete="$new_path ${arguments% *}"
18533    else
18534      new_complete="$new_path"
18535    fi
18536
18537    if test "x$complete" != "x$new_complete"; then
18538      FOUND_MAKE="$new_complete"
18539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18540$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18541    fi
18542  fi
18543
18544        fi
18545      fi
18546    fi
18547  fi
18548
18549    fi
18550
18551    if test "x$FOUND_MAKE" = x; then
18552      if test "x$TOOLCHAIN_PATH" != x; then
18553        # We have a toolchain path, check that as well before giving up.
18554        OLD_PATH=$PATH
18555        PATH=$TOOLCHAIN_PATH:$PATH
18556        for ac_prog in gmake
18557do
18558  # Extract the first word of "$ac_prog", so it can be a program name with args.
18559set dummy $ac_prog; ac_word=$2
18560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18561$as_echo_n "checking for $ac_word... " >&6; }
18562if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18563  $as_echo_n "(cached) " >&6
18564else
18565  case $CHECK_TOOLSDIR_GMAKE in
18566  [\\/]* | ?:[\\/]*)
18567  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18568  ;;
18569  *)
18570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18571for as_dir in $PATH
18572do
18573  IFS=$as_save_IFS
18574  test -z "$as_dir" && as_dir=.
18575    for ac_exec_ext in '' $ac_executable_extensions; do
18576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18577    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18579    break 2
18580  fi
18581done
18582  done
18583IFS=$as_save_IFS
18584
18585  ;;
18586esac
18587fi
18588CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18589if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18591$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18592else
18593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18594$as_echo "no" >&6; }
18595fi
18596
18597
18598  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18599done
18600
18601
18602  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18603  DESCRIPTION="gmake in tools-dir"
18604
18605  # On Cygwin, we require a newer version of make than on other platforms
18606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18607    MAKE_VERSION_EXPR="-e 4\."
18608    MAKE_REQUIRED_VERSION="4.0"
18609   else
18610    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18611    MAKE_REQUIRED_VERSION="3.81"
18612  fi
18613
18614  if test "x$MAKE_CANDIDATE" != x; then
18615    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18616$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18617    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18618    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18619    if test "x$IS_GNU_MAKE" = x; then
18620      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18621$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18622    else
18623      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18624      if test "x$IS_MODERN_MAKE" = x; then
18625        { $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
18626$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;}
18627      else
18628        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18629          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18630            MAKE_EXPECTED_ENV='cygwin'
18631          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18632            MAKE_EXPECTED_ENV='msys'
18633          else
18634            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18635          fi
18636          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18637          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18638        else
18639          # Not relevant for non-Windows
18640          IS_MAKE_CORRECT_ENV=true
18641        fi
18642        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18643          { $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
18644$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;}
18645        else
18646          FOUND_MAKE=$MAKE_CANDIDATE
18647
18648  # Only process if variable expands to non-empty
18649
18650  if test "x$FOUND_MAKE" != x; then
18651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18652
18653  # First separate the path from the arguments. This will split at the first
18654  # space.
18655  complete="$FOUND_MAKE"
18656  path="${complete%% *}"
18657  tmp="$complete EOL"
18658  arguments="${tmp#* }"
18659
18660  # Input might be given as Windows format, start by converting to
18661  # unix format.
18662  new_path=`$CYGPATH -u "$path"`
18663
18664  # Now try to locate executable using which
18665  new_path=`$WHICH "$new_path" 2> /dev/null`
18666  # bat and cmd files are not always considered executable in cygwin causing which
18667  # to not find them
18668  if test "x$new_path" = x \
18669      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18670      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18671    new_path=`$CYGPATH -u "$path"`
18672  fi
18673  if test "x$new_path" = x; then
18674    # Oops. Which didn't find the executable.
18675    # The splitting of arguments from the executable at a space might have been incorrect,
18676    # since paths with space are more likely in Windows. Give it another try with the whole
18677    # argument.
18678    path="$complete"
18679    arguments="EOL"
18680    new_path=`$CYGPATH -u "$path"`
18681    new_path=`$WHICH "$new_path" 2> /dev/null`
18682    # bat and cmd files are not always considered executable in cygwin causing which
18683    # to not find them
18684    if test "x$new_path" = x \
18685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18687      new_path=`$CYGPATH -u "$path"`
18688    fi
18689    if test "x$new_path" = x; then
18690      # It's still not found. Now this is an unrecoverable error.
18691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18692$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18693      has_space=`$ECHO "$complete" | $GREP " "`
18694      if test "x$has_space" != x; then
18695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18697      fi
18698      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18699    fi
18700  fi
18701
18702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18705  # "foo.exe" is OK but "foo" is an error.
18706  #
18707  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18708  # It is also a way to make sure we got the proper file name for the real test later on.
18709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18710  if test "x$test_shortpath" = x; then
18711    # Short path failed, file does not exist as specified.
18712    # Try adding .exe or .cmd
18713    if test -f "${new_path}.exe"; then
18714      input_to_shortpath="${new_path}.exe"
18715    elif test -f "${new_path}.cmd"; then
18716      input_to_shortpath="${new_path}.cmd"
18717    else
18718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18720      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18721$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18723    fi
18724  else
18725    input_to_shortpath="$new_path"
18726  fi
18727
18728  # Call helper function which possibly converts this using DOS-style short mode.
18729  # If so, the updated path is stored in $new_path.
18730  new_path="$input_to_shortpath"
18731
18732  input_path="$input_to_shortpath"
18733  # Check if we need to convert this using DOS-style short mode. If the path
18734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18735  # take no chances and rewrite it.
18736  # Note: m4 eats our [], so we need to use [ and ] instead.
18737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18738  if test "x$has_forbidden_chars" != x; then
18739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18743      # Going to short mode and back again did indeed matter. Since short mode is
18744      # case insensitive, let's make it lowercase to improve readability.
18745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18746      # Now convert it back to Unix-style (cygpath)
18747      input_path=`$CYGPATH -u "$shortmode_path"`
18748      new_path="$input_path"
18749    fi
18750  fi
18751
18752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18753  if test "x$test_cygdrive_prefix" = x; then
18754    # As a simple fix, exclude /usr/bin since it's not a real path.
18755    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18757      # a path prefixed by /cygdrive for fixpath to work.
18758      new_path="$CYGWIN_ROOT_PATH$input_path"
18759    fi
18760  fi
18761
18762  # remove trailing .exe if any
18763  new_path="${new_path/%.exe/}"
18764
18765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18766
18767  # First separate the path from the arguments. This will split at the first
18768  # space.
18769  complete="$FOUND_MAKE"
18770  path="${complete%% *}"
18771  tmp="$complete EOL"
18772  arguments="${tmp#* }"
18773
18774  # Input might be given as Windows format, start by converting to
18775  # unix format.
18776  new_path="$path"
18777
18778  windows_path="$new_path"
18779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18780    unix_path=`$CYGPATH -u "$windows_path"`
18781    new_path="$unix_path"
18782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18784    new_path="$unix_path"
18785  fi
18786
18787
18788  # Now try to locate executable using which
18789  new_path=`$WHICH "$new_path" 2> /dev/null`
18790
18791  if test "x$new_path" = x; then
18792    # Oops. Which didn't find the executable.
18793    # The splitting of arguments from the executable at a space might have been incorrect,
18794    # since paths with space are more likely in Windows. Give it another try with the whole
18795    # argument.
18796    path="$complete"
18797    arguments="EOL"
18798    new_path="$path"
18799
18800  windows_path="$new_path"
18801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18802    unix_path=`$CYGPATH -u "$windows_path"`
18803    new_path="$unix_path"
18804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18806    new_path="$unix_path"
18807  fi
18808
18809
18810    new_path=`$WHICH "$new_path" 2> /dev/null`
18811    # bat and cmd files are not always considered executable in MSYS causing which
18812    # to not find them
18813    if test "x$new_path" = x \
18814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18816      new_path="$path"
18817
18818  windows_path="$new_path"
18819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18820    unix_path=`$CYGPATH -u "$windows_path"`
18821    new_path="$unix_path"
18822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18824    new_path="$unix_path"
18825  fi
18826
18827    fi
18828
18829    if test "x$new_path" = x; then
18830      # It's still not found. Now this is an unrecoverable error.
18831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18833      has_space=`$ECHO "$complete" | $GREP " "`
18834      if test "x$has_space" != x; then
18835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18837      fi
18838      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18839    fi
18840  fi
18841
18842  # Now new_path has a complete unix path to the binary
18843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18844    # Keep paths in /bin as-is, but remove trailing .exe if any
18845    new_path="${new_path/%.exe/}"
18846    # Do not save /bin paths to all_fixpath_prefixes!
18847  else
18848    # Not in mixed or Windows style, start by that.
18849    new_path=`cmd //c echo $new_path`
18850
18851  input_path="$new_path"
18852  # Check if we need to convert this using DOS-style short mode. If the path
18853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18854  # take no chances and rewrite it.
18855  # Note: m4 eats our [], so we need to use [ and ] instead.
18856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18857  if test "x$has_forbidden_chars" != x; then
18858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18860  fi
18861
18862    # Output is in $new_path
18863
18864  windows_path="$new_path"
18865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18866    unix_path=`$CYGPATH -u "$windows_path"`
18867    new_path="$unix_path"
18868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18870    new_path="$unix_path"
18871  fi
18872
18873    # remove trailing .exe if any
18874    new_path="${new_path/%.exe/}"
18875
18876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18878  fi
18879
18880    else
18881      # We're on a unix platform. Hooray! :)
18882      # First separate the path from the arguments. This will split at the first
18883      # space.
18884      complete="$FOUND_MAKE"
18885      path="${complete%% *}"
18886      tmp="$complete EOL"
18887      arguments="${tmp#* }"
18888
18889      # Cannot rely on the command "which" here since it doesn't always work.
18890      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18891      if test -z "$is_absolute_path"; then
18892        # Path to executable is not absolute. Find it.
18893        IFS_save="$IFS"
18894        IFS=:
18895        for p in $PATH; do
18896          if test -f "$p/$path" && test -x "$p/$path"; then
18897            new_path="$p/$path"
18898            break
18899          fi
18900        done
18901        IFS="$IFS_save"
18902      else
18903        # This is an absolute path, we can use it without further modifications.
18904        new_path="$path"
18905      fi
18906
18907      if test "x$new_path" = x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18909$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18910        has_space=`$ECHO "$complete" | $GREP " "`
18911        if test "x$has_space" != x; then
18912          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18914        fi
18915        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18916      fi
18917    fi
18918
18919    # Now join together the path and the arguments once again
18920    if test "x$arguments" != xEOL; then
18921      new_complete="$new_path ${arguments% *}"
18922    else
18923      new_complete="$new_path"
18924    fi
18925
18926    if test "x$complete" != "x$new_complete"; then
18927      FOUND_MAKE="$new_complete"
18928      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18929$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18930    fi
18931  fi
18932
18933        fi
18934      fi
18935    fi
18936  fi
18937
18938        if test "x$FOUND_MAKE" = x; then
18939          for ac_prog in make
18940do
18941  # Extract the first word of "$ac_prog", so it can be a program name with args.
18942set dummy $ac_prog; ac_word=$2
18943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18944$as_echo_n "checking for $ac_word... " >&6; }
18945if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18946  $as_echo_n "(cached) " >&6
18947else
18948  case $CHECK_TOOLSDIR_MAKE in
18949  [\\/]* | ?:[\\/]*)
18950  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18951  ;;
18952  *)
18953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18954for as_dir in $PATH
18955do
18956  IFS=$as_save_IFS
18957  test -z "$as_dir" && as_dir=.
18958    for ac_exec_ext in '' $ac_executable_extensions; do
18959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18960    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18962    break 2
18963  fi
18964done
18965  done
18966IFS=$as_save_IFS
18967
18968  ;;
18969esac
18970fi
18971CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18972if test -n "$CHECK_TOOLSDIR_MAKE"; then
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18974$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18975else
18976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18977$as_echo "no" >&6; }
18978fi
18979
18980
18981  test -n "$CHECK_TOOLSDIR_MAKE" && break
18982done
18983
18984
18985  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18986  DESCRIPTION="make in tools-dir"
18987
18988  # On Cygwin, we require a newer version of make than on other platforms
18989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18990    MAKE_VERSION_EXPR="-e 4\."
18991    MAKE_REQUIRED_VERSION="4.0"
18992   else
18993    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18994    MAKE_REQUIRED_VERSION="3.81"
18995  fi
18996
18997  if test "x$MAKE_CANDIDATE" != x; then
18998    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18999$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19000    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19001    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19002    if test "x$IS_GNU_MAKE" = x; then
19003      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19004$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19005    else
19006      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19007      if test "x$IS_MODERN_MAKE" = x; then
19008        { $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
19009$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;}
19010      else
19011        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19012          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19013            MAKE_EXPECTED_ENV='cygwin'
19014          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19015            MAKE_EXPECTED_ENV='msys'
19016          else
19017            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19018          fi
19019          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19020          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19021        else
19022          # Not relevant for non-Windows
19023          IS_MAKE_CORRECT_ENV=true
19024        fi
19025        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19026          { $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
19027$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;}
19028        else
19029          FOUND_MAKE=$MAKE_CANDIDATE
19030
19031  # Only process if variable expands to non-empty
19032
19033  if test "x$FOUND_MAKE" != x; then
19034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19035
19036  # First separate the path from the arguments. This will split at the first
19037  # space.
19038  complete="$FOUND_MAKE"
19039  path="${complete%% *}"
19040  tmp="$complete EOL"
19041  arguments="${tmp#* }"
19042
19043  # Input might be given as Windows format, start by converting to
19044  # unix format.
19045  new_path=`$CYGPATH -u "$path"`
19046
19047  # Now try to locate executable using which
19048  new_path=`$WHICH "$new_path" 2> /dev/null`
19049  # bat and cmd files are not always considered executable in cygwin causing which
19050  # to not find them
19051  if test "x$new_path" = x \
19052      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19053      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19054    new_path=`$CYGPATH -u "$path"`
19055  fi
19056  if test "x$new_path" = x; then
19057    # Oops. Which didn't find the executable.
19058    # The splitting of arguments from the executable at a space might have been incorrect,
19059    # since paths with space are more likely in Windows. Give it another try with the whole
19060    # argument.
19061    path="$complete"
19062    arguments="EOL"
19063    new_path=`$CYGPATH -u "$path"`
19064    new_path=`$WHICH "$new_path" 2> /dev/null`
19065    # bat and cmd files are not always considered executable in cygwin causing which
19066    # to not find them
19067    if test "x$new_path" = x \
19068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19070      new_path=`$CYGPATH -u "$path"`
19071    fi
19072    if test "x$new_path" = x; then
19073      # It's still not found. Now this is an unrecoverable error.
19074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19075$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19076      has_space=`$ECHO "$complete" | $GREP " "`
19077      if test "x$has_space" != x; then
19078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19080      fi
19081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19082    fi
19083  fi
19084
19085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19088  # "foo.exe" is OK but "foo" is an error.
19089  #
19090  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19091  # It is also a way to make sure we got the proper file name for the real test later on.
19092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19093  if test "x$test_shortpath" = x; then
19094    # Short path failed, file does not exist as specified.
19095    # Try adding .exe or .cmd
19096    if test -f "${new_path}.exe"; then
19097      input_to_shortpath="${new_path}.exe"
19098    elif test -f "${new_path}.cmd"; then
19099      input_to_shortpath="${new_path}.cmd"
19100    else
19101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19103      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19104$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19105      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19106    fi
19107  else
19108    input_to_shortpath="$new_path"
19109  fi
19110
19111  # Call helper function which possibly converts this using DOS-style short mode.
19112  # If so, the updated path is stored in $new_path.
19113  new_path="$input_to_shortpath"
19114
19115  input_path="$input_to_shortpath"
19116  # Check if we need to convert this using DOS-style short mode. If the path
19117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19118  # take no chances and rewrite it.
19119  # Note: m4 eats our [], so we need to use [ and ] instead.
19120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19121  if test "x$has_forbidden_chars" != x; then
19122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19126      # Going to short mode and back again did indeed matter. Since short mode is
19127      # case insensitive, let's make it lowercase to improve readability.
19128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19129      # Now convert it back to Unix-style (cygpath)
19130      input_path=`$CYGPATH -u "$shortmode_path"`
19131      new_path="$input_path"
19132    fi
19133  fi
19134
19135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19136  if test "x$test_cygdrive_prefix" = x; then
19137    # As a simple fix, exclude /usr/bin since it's not a real path.
19138    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19140      # a path prefixed by /cygdrive for fixpath to work.
19141      new_path="$CYGWIN_ROOT_PATH$input_path"
19142    fi
19143  fi
19144
19145  # remove trailing .exe if any
19146  new_path="${new_path/%.exe/}"
19147
19148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19149
19150  # First separate the path from the arguments. This will split at the first
19151  # space.
19152  complete="$FOUND_MAKE"
19153  path="${complete%% *}"
19154  tmp="$complete EOL"
19155  arguments="${tmp#* }"
19156
19157  # Input might be given as Windows format, start by converting to
19158  # unix format.
19159  new_path="$path"
19160
19161  windows_path="$new_path"
19162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19163    unix_path=`$CYGPATH -u "$windows_path"`
19164    new_path="$unix_path"
19165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19167    new_path="$unix_path"
19168  fi
19169
19170
19171  # Now try to locate executable using which
19172  new_path=`$WHICH "$new_path" 2> /dev/null`
19173
19174  if test "x$new_path" = x; then
19175    # Oops. Which didn't find the executable.
19176    # The splitting of arguments from the executable at a space might have been incorrect,
19177    # since paths with space are more likely in Windows. Give it another try with the whole
19178    # argument.
19179    path="$complete"
19180    arguments="EOL"
19181    new_path="$path"
19182
19183  windows_path="$new_path"
19184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19185    unix_path=`$CYGPATH -u "$windows_path"`
19186    new_path="$unix_path"
19187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19189    new_path="$unix_path"
19190  fi
19191
19192
19193    new_path=`$WHICH "$new_path" 2> /dev/null`
19194    # bat and cmd files are not always considered executable in MSYS causing which
19195    # to not find them
19196    if test "x$new_path" = x \
19197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19199      new_path="$path"
19200
19201  windows_path="$new_path"
19202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19203    unix_path=`$CYGPATH -u "$windows_path"`
19204    new_path="$unix_path"
19205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19207    new_path="$unix_path"
19208  fi
19209
19210    fi
19211
19212    if test "x$new_path" = x; then
19213      # It's still not found. Now this is an unrecoverable error.
19214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19215$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19216      has_space=`$ECHO "$complete" | $GREP " "`
19217      if test "x$has_space" != x; then
19218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19220      fi
19221      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19222    fi
19223  fi
19224
19225  # Now new_path has a complete unix path to the binary
19226  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19227    # Keep paths in /bin as-is, but remove trailing .exe if any
19228    new_path="${new_path/%.exe/}"
19229    # Do not save /bin paths to all_fixpath_prefixes!
19230  else
19231    # Not in mixed or Windows style, start by that.
19232    new_path=`cmd //c echo $new_path`
19233
19234  input_path="$new_path"
19235  # Check if we need to convert this using DOS-style short mode. If the path
19236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19237  # take no chances and rewrite it.
19238  # Note: m4 eats our [], so we need to use [ and ] instead.
19239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19240  if test "x$has_forbidden_chars" != x; then
19241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19243  fi
19244
19245    # Output is in $new_path
19246
19247  windows_path="$new_path"
19248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19249    unix_path=`$CYGPATH -u "$windows_path"`
19250    new_path="$unix_path"
19251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19253    new_path="$unix_path"
19254  fi
19255
19256    # remove trailing .exe if any
19257    new_path="${new_path/%.exe/}"
19258
19259    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19260    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19261  fi
19262
19263    else
19264      # We're on a unix platform. Hooray! :)
19265      # First separate the path from the arguments. This will split at the first
19266      # space.
19267      complete="$FOUND_MAKE"
19268      path="${complete%% *}"
19269      tmp="$complete EOL"
19270      arguments="${tmp#* }"
19271
19272      # Cannot rely on the command "which" here since it doesn't always work.
19273      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19274      if test -z "$is_absolute_path"; then
19275        # Path to executable is not absolute. Find it.
19276        IFS_save="$IFS"
19277        IFS=:
19278        for p in $PATH; do
19279          if test -f "$p/$path" && test -x "$p/$path"; then
19280            new_path="$p/$path"
19281            break
19282          fi
19283        done
19284        IFS="$IFS_save"
19285      else
19286        # This is an absolute path, we can use it without further modifications.
19287        new_path="$path"
19288      fi
19289
19290      if test "x$new_path" = x; then
19291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19293        has_space=`$ECHO "$complete" | $GREP " "`
19294        if test "x$has_space" != x; then
19295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19297        fi
19298        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19299      fi
19300    fi
19301
19302    # Now join together the path and the arguments once again
19303    if test "x$arguments" != xEOL; then
19304      new_complete="$new_path ${arguments% *}"
19305    else
19306      new_complete="$new_path"
19307    fi
19308
19309    if test "x$complete" != "x$new_complete"; then
19310      FOUND_MAKE="$new_complete"
19311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19312$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19313    fi
19314  fi
19315
19316        fi
19317      fi
19318    fi
19319  fi
19320
19321        fi
19322        PATH=$OLD_PATH
19323      fi
19324    fi
19325
19326    if test "x$FOUND_MAKE" = x; then
19327      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
19328    fi
19329
19330  else
19331    # The variable is set, but is it from the command line or the environment?
19332
19333    # Try to remove the string !MAKE! from our list.
19334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19336      # If it failed, the variable was not from the command line. Ignore it,
19337      # but warn the user (except for BASH, which is always set by the calling BASH).
19338      if test "xMAKE" != xBASH; then
19339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19340$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19341      fi
19342      # Try to locate tool using the code snippet
19343
19344    # Try our hardest to locate a correct version of GNU make
19345    for ac_prog in gmake
19346do
19347  # Extract the first word of "$ac_prog", so it can be a program name with args.
19348set dummy $ac_prog; ac_word=$2
19349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19350$as_echo_n "checking for $ac_word... " >&6; }
19351if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19352  $as_echo_n "(cached) " >&6
19353else
19354  case $CHECK_GMAKE in
19355  [\\/]* | ?:[\\/]*)
19356  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19357  ;;
19358  *)
19359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19360for as_dir in $PATH
19361do
19362  IFS=$as_save_IFS
19363  test -z "$as_dir" && as_dir=.
19364    for ac_exec_ext in '' $ac_executable_extensions; do
19365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19366    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19368    break 2
19369  fi
19370done
19371  done
19372IFS=$as_save_IFS
19373
19374  ;;
19375esac
19376fi
19377CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19378if test -n "$CHECK_GMAKE"; then
19379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19380$as_echo "$CHECK_GMAKE" >&6; }
19381else
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19383$as_echo "no" >&6; }
19384fi
19385
19386
19387  test -n "$CHECK_GMAKE" && break
19388done
19389
19390
19391  MAKE_CANDIDATE=""$CHECK_GMAKE""
19392  DESCRIPTION="gmake in PATH"
19393
19394  # On Cygwin, we require a newer version of make than on other platforms
19395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19396    MAKE_VERSION_EXPR="-e 4\."
19397    MAKE_REQUIRED_VERSION="4.0"
19398   else
19399    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19400    MAKE_REQUIRED_VERSION="3.81"
19401  fi
19402
19403  if test "x$MAKE_CANDIDATE" != x; then
19404    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19405$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19406    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19407    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19408    if test "x$IS_GNU_MAKE" = x; then
19409      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19410$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19411    else
19412      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19413      if test "x$IS_MODERN_MAKE" = x; then
19414        { $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
19415$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;}
19416      else
19417        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19418          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19419            MAKE_EXPECTED_ENV='cygwin'
19420          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19421            MAKE_EXPECTED_ENV='msys'
19422          else
19423            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19424          fi
19425          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19426          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19427        else
19428          # Not relevant for non-Windows
19429          IS_MAKE_CORRECT_ENV=true
19430        fi
19431        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19432          { $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
19433$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;}
19434        else
19435          FOUND_MAKE=$MAKE_CANDIDATE
19436
19437  # Only process if variable expands to non-empty
19438
19439  if test "x$FOUND_MAKE" != x; then
19440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19441
19442  # First separate the path from the arguments. This will split at the first
19443  # space.
19444  complete="$FOUND_MAKE"
19445  path="${complete%% *}"
19446  tmp="$complete EOL"
19447  arguments="${tmp#* }"
19448
19449  # Input might be given as Windows format, start by converting to
19450  # unix format.
19451  new_path=`$CYGPATH -u "$path"`
19452
19453  # Now try to locate executable using which
19454  new_path=`$WHICH "$new_path" 2> /dev/null`
19455  # bat and cmd files are not always considered executable in cygwin causing which
19456  # to not find them
19457  if test "x$new_path" = x \
19458      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19459      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19460    new_path=`$CYGPATH -u "$path"`
19461  fi
19462  if test "x$new_path" = x; then
19463    # Oops. Which didn't find the executable.
19464    # The splitting of arguments from the executable at a space might have been incorrect,
19465    # since paths with space are more likely in Windows. Give it another try with the whole
19466    # argument.
19467    path="$complete"
19468    arguments="EOL"
19469    new_path=`$CYGPATH -u "$path"`
19470    new_path=`$WHICH "$new_path" 2> /dev/null`
19471    # bat and cmd files are not always considered executable in cygwin causing which
19472    # to not find them
19473    if test "x$new_path" = x \
19474        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19475        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19476      new_path=`$CYGPATH -u "$path"`
19477    fi
19478    if test "x$new_path" = x; then
19479      # It's still not found. Now this is an unrecoverable error.
19480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19482      has_space=`$ECHO "$complete" | $GREP " "`
19483      if test "x$has_space" != x; then
19484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19486      fi
19487      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19488    fi
19489  fi
19490
19491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19494  # "foo.exe" is OK but "foo" is an error.
19495  #
19496  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19497  # It is also a way to make sure we got the proper file name for the real test later on.
19498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19499  if test "x$test_shortpath" = x; then
19500    # Short path failed, file does not exist as specified.
19501    # Try adding .exe or .cmd
19502    if test -f "${new_path}.exe"; then
19503      input_to_shortpath="${new_path}.exe"
19504    elif test -f "${new_path}.cmd"; then
19505      input_to_shortpath="${new_path}.cmd"
19506    else
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19509      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19510$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19511      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19512    fi
19513  else
19514    input_to_shortpath="$new_path"
19515  fi
19516
19517  # Call helper function which possibly converts this using DOS-style short mode.
19518  # If so, the updated path is stored in $new_path.
19519  new_path="$input_to_shortpath"
19520
19521  input_path="$input_to_shortpath"
19522  # Check if we need to convert this using DOS-style short mode. If the path
19523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19524  # take no chances and rewrite it.
19525  # Note: m4 eats our [], so we need to use [ and ] instead.
19526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19527  if test "x$has_forbidden_chars" != x; then
19528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19532      # Going to short mode and back again did indeed matter. Since short mode is
19533      # case insensitive, let's make it lowercase to improve readability.
19534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19535      # Now convert it back to Unix-style (cygpath)
19536      input_path=`$CYGPATH -u "$shortmode_path"`
19537      new_path="$input_path"
19538    fi
19539  fi
19540
19541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19542  if test "x$test_cygdrive_prefix" = x; then
19543    # As a simple fix, exclude /usr/bin since it's not a real path.
19544    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19546      # a path prefixed by /cygdrive for fixpath to work.
19547      new_path="$CYGWIN_ROOT_PATH$input_path"
19548    fi
19549  fi
19550
19551  # remove trailing .exe if any
19552  new_path="${new_path/%.exe/}"
19553
19554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555
19556  # First separate the path from the arguments. This will split at the first
19557  # space.
19558  complete="$FOUND_MAKE"
19559  path="${complete%% *}"
19560  tmp="$complete EOL"
19561  arguments="${tmp#* }"
19562
19563  # Input might be given as Windows format, start by converting to
19564  # unix format.
19565  new_path="$path"
19566
19567  windows_path="$new_path"
19568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19569    unix_path=`$CYGPATH -u "$windows_path"`
19570    new_path="$unix_path"
19571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19573    new_path="$unix_path"
19574  fi
19575
19576
19577  # Now try to locate executable using which
19578  new_path=`$WHICH "$new_path" 2> /dev/null`
19579
19580  if test "x$new_path" = x; then
19581    # Oops. Which didn't find the executable.
19582    # The splitting of arguments from the executable at a space might have been incorrect,
19583    # since paths with space are more likely in Windows. Give it another try with the whole
19584    # argument.
19585    path="$complete"
19586    arguments="EOL"
19587    new_path="$path"
19588
19589  windows_path="$new_path"
19590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19591    unix_path=`$CYGPATH -u "$windows_path"`
19592    new_path="$unix_path"
19593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19595    new_path="$unix_path"
19596  fi
19597
19598
19599    new_path=`$WHICH "$new_path" 2> /dev/null`
19600    # bat and cmd files are not always considered executable in MSYS causing which
19601    # to not find them
19602    if test "x$new_path" = x \
19603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19605      new_path="$path"
19606
19607  windows_path="$new_path"
19608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19609    unix_path=`$CYGPATH -u "$windows_path"`
19610    new_path="$unix_path"
19611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19613    new_path="$unix_path"
19614  fi
19615
19616    fi
19617
19618    if test "x$new_path" = x; then
19619      # It's still not found. Now this is an unrecoverable error.
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19621$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19622      has_space=`$ECHO "$complete" | $GREP " "`
19623      if test "x$has_space" != x; then
19624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19626      fi
19627      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19628    fi
19629  fi
19630
19631  # Now new_path has a complete unix path to the binary
19632  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19633    # Keep paths in /bin as-is, but remove trailing .exe if any
19634    new_path="${new_path/%.exe/}"
19635    # Do not save /bin paths to all_fixpath_prefixes!
19636  else
19637    # Not in mixed or Windows style, start by that.
19638    new_path=`cmd //c echo $new_path`
19639
19640  input_path="$new_path"
19641  # Check if we need to convert this using DOS-style short mode. If the path
19642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19643  # take no chances and rewrite it.
19644  # Note: m4 eats our [], so we need to use [ and ] instead.
19645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19646  if test "x$has_forbidden_chars" != x; then
19647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19649  fi
19650
19651    # Output is in $new_path
19652
19653  windows_path="$new_path"
19654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19655    unix_path=`$CYGPATH -u "$windows_path"`
19656    new_path="$unix_path"
19657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19659    new_path="$unix_path"
19660  fi
19661
19662    # remove trailing .exe if any
19663    new_path="${new_path/%.exe/}"
19664
19665    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19666    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19667  fi
19668
19669    else
19670      # We're on a unix platform. Hooray! :)
19671      # First separate the path from the arguments. This will split at the first
19672      # space.
19673      complete="$FOUND_MAKE"
19674      path="${complete%% *}"
19675      tmp="$complete EOL"
19676      arguments="${tmp#* }"
19677
19678      # Cannot rely on the command "which" here since it doesn't always work.
19679      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19680      if test -z "$is_absolute_path"; then
19681        # Path to executable is not absolute. Find it.
19682        IFS_save="$IFS"
19683        IFS=:
19684        for p in $PATH; do
19685          if test -f "$p/$path" && test -x "$p/$path"; then
19686            new_path="$p/$path"
19687            break
19688          fi
19689        done
19690        IFS="$IFS_save"
19691      else
19692        # This is an absolute path, we can use it without further modifications.
19693        new_path="$path"
19694      fi
19695
19696      if test "x$new_path" = x; then
19697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19699        has_space=`$ECHO "$complete" | $GREP " "`
19700        if test "x$has_space" != x; then
19701          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19702$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19703        fi
19704        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19705      fi
19706    fi
19707
19708    # Now join together the path and the arguments once again
19709    if test "x$arguments" != xEOL; then
19710      new_complete="$new_path ${arguments% *}"
19711    else
19712      new_complete="$new_path"
19713    fi
19714
19715    if test "x$complete" != "x$new_complete"; then
19716      FOUND_MAKE="$new_complete"
19717      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19718$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19719    fi
19720  fi
19721
19722        fi
19723      fi
19724    fi
19725  fi
19726
19727
19728    if test "x$FOUND_MAKE" = x; then
19729      for ac_prog in make
19730do
19731  # Extract the first word of "$ac_prog", so it can be a program name with args.
19732set dummy $ac_prog; ac_word=$2
19733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19734$as_echo_n "checking for $ac_word... " >&6; }
19735if ${ac_cv_path_CHECK_MAKE+:} false; then :
19736  $as_echo_n "(cached) " >&6
19737else
19738  case $CHECK_MAKE in
19739  [\\/]* | ?:[\\/]*)
19740  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19741  ;;
19742  *)
19743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19744for as_dir in $PATH
19745do
19746  IFS=$as_save_IFS
19747  test -z "$as_dir" && as_dir=.
19748    for ac_exec_ext in '' $ac_executable_extensions; do
19749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19750    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19752    break 2
19753  fi
19754done
19755  done
19756IFS=$as_save_IFS
19757
19758  ;;
19759esac
19760fi
19761CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19762if test -n "$CHECK_MAKE"; then
19763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19764$as_echo "$CHECK_MAKE" >&6; }
19765else
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19767$as_echo "no" >&6; }
19768fi
19769
19770
19771  test -n "$CHECK_MAKE" && break
19772done
19773
19774
19775  MAKE_CANDIDATE=""$CHECK_MAKE""
19776  DESCRIPTION="make in PATH"
19777
19778  # On Cygwin, we require a newer version of make than on other platforms
19779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19780    MAKE_VERSION_EXPR="-e 4\."
19781    MAKE_REQUIRED_VERSION="4.0"
19782   else
19783    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19784    MAKE_REQUIRED_VERSION="3.81"
19785  fi
19786
19787  if test "x$MAKE_CANDIDATE" != x; then
19788    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19789$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19790    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19791    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19792    if test "x$IS_GNU_MAKE" = x; then
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19794$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19795    else
19796      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19797      if test "x$IS_MODERN_MAKE" = x; then
19798        { $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
19799$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;}
19800      else
19801        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19802          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19803            MAKE_EXPECTED_ENV='cygwin'
19804          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19805            MAKE_EXPECTED_ENV='msys'
19806          else
19807            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19808          fi
19809          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19810          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19811        else
19812          # Not relevant for non-Windows
19813          IS_MAKE_CORRECT_ENV=true
19814        fi
19815        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19816          { $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
19817$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;}
19818        else
19819          FOUND_MAKE=$MAKE_CANDIDATE
19820
19821  # Only process if variable expands to non-empty
19822
19823  if test "x$FOUND_MAKE" != x; then
19824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19825
19826  # First separate the path from the arguments. This will split at the first
19827  # space.
19828  complete="$FOUND_MAKE"
19829  path="${complete%% *}"
19830  tmp="$complete EOL"
19831  arguments="${tmp#* }"
19832
19833  # Input might be given as Windows format, start by converting to
19834  # unix format.
19835  new_path=`$CYGPATH -u "$path"`
19836
19837  # Now try to locate executable using which
19838  new_path=`$WHICH "$new_path" 2> /dev/null`
19839  # bat and cmd files are not always considered executable in cygwin causing which
19840  # to not find them
19841  if test "x$new_path" = x \
19842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19844    new_path=`$CYGPATH -u "$path"`
19845  fi
19846  if test "x$new_path" = x; then
19847    # Oops. Which didn't find the executable.
19848    # The splitting of arguments from the executable at a space might have been incorrect,
19849    # since paths with space are more likely in Windows. Give it another try with the whole
19850    # argument.
19851    path="$complete"
19852    arguments="EOL"
19853    new_path=`$CYGPATH -u "$path"`
19854    new_path=`$WHICH "$new_path" 2> /dev/null`
19855    # bat and cmd files are not always considered executable in cygwin causing which
19856    # to not find them
19857    if test "x$new_path" = x \
19858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19860      new_path=`$CYGPATH -u "$path"`
19861    fi
19862    if test "x$new_path" = x; then
19863      # It's still not found. Now this is an unrecoverable error.
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19866      has_space=`$ECHO "$complete" | $GREP " "`
19867      if test "x$has_space" != x; then
19868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19870      fi
19871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19872    fi
19873  fi
19874
19875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19878  # "foo.exe" is OK but "foo" is an error.
19879  #
19880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19881  # It is also a way to make sure we got the proper file name for the real test later on.
19882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19883  if test "x$test_shortpath" = x; then
19884    # Short path failed, file does not exist as specified.
19885    # Try adding .exe or .cmd
19886    if test -f "${new_path}.exe"; then
19887      input_to_shortpath="${new_path}.exe"
19888    elif test -f "${new_path}.cmd"; then
19889      input_to_shortpath="${new_path}.cmd"
19890    else
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19896    fi
19897  else
19898    input_to_shortpath="$new_path"
19899  fi
19900
19901  # Call helper function which possibly converts this using DOS-style short mode.
19902  # If so, the updated path is stored in $new_path.
19903  new_path="$input_to_shortpath"
19904
19905  input_path="$input_to_shortpath"
19906  # Check if we need to convert this using DOS-style short mode. If the path
19907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19908  # take no chances and rewrite it.
19909  # Note: m4 eats our [], so we need to use [ and ] instead.
19910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19911  if test "x$has_forbidden_chars" != x; then
19912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19916      # Going to short mode and back again did indeed matter. Since short mode is
19917      # case insensitive, let's make it lowercase to improve readability.
19918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19919      # Now convert it back to Unix-style (cygpath)
19920      input_path=`$CYGPATH -u "$shortmode_path"`
19921      new_path="$input_path"
19922    fi
19923  fi
19924
19925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19926  if test "x$test_cygdrive_prefix" = x; then
19927    # As a simple fix, exclude /usr/bin since it's not a real path.
19928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19930      # a path prefixed by /cygdrive for fixpath to work.
19931      new_path="$CYGWIN_ROOT_PATH$input_path"
19932    fi
19933  fi
19934
19935  # remove trailing .exe if any
19936  new_path="${new_path/%.exe/}"
19937
19938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19939
19940  # First separate the path from the arguments. This will split at the first
19941  # space.
19942  complete="$FOUND_MAKE"
19943  path="${complete%% *}"
19944  tmp="$complete EOL"
19945  arguments="${tmp#* }"
19946
19947  # Input might be given as Windows format, start by converting to
19948  # unix format.
19949  new_path="$path"
19950
19951  windows_path="$new_path"
19952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19953    unix_path=`$CYGPATH -u "$windows_path"`
19954    new_path="$unix_path"
19955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19957    new_path="$unix_path"
19958  fi
19959
19960
19961  # Now try to locate executable using which
19962  new_path=`$WHICH "$new_path" 2> /dev/null`
19963
19964  if test "x$new_path" = x; then
19965    # Oops. Which didn't find the executable.
19966    # The splitting of arguments from the executable at a space might have been incorrect,
19967    # since paths with space are more likely in Windows. Give it another try with the whole
19968    # argument.
19969    path="$complete"
19970    arguments="EOL"
19971    new_path="$path"
19972
19973  windows_path="$new_path"
19974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975    unix_path=`$CYGPATH -u "$windows_path"`
19976    new_path="$unix_path"
19977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19979    new_path="$unix_path"
19980  fi
19981
19982
19983    new_path=`$WHICH "$new_path" 2> /dev/null`
19984    # bat and cmd files are not always considered executable in MSYS causing which
19985    # to not find them
19986    if test "x$new_path" = x \
19987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19989      new_path="$path"
19990
19991  windows_path="$new_path"
19992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19993    unix_path=`$CYGPATH -u "$windows_path"`
19994    new_path="$unix_path"
19995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19997    new_path="$unix_path"
19998  fi
19999
20000    fi
20001
20002    if test "x$new_path" = x; then
20003      # It's still not found. Now this is an unrecoverable error.
20004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20006      has_space=`$ECHO "$complete" | $GREP " "`
20007      if test "x$has_space" != x; then
20008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20010      fi
20011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20012    fi
20013  fi
20014
20015  # Now new_path has a complete unix path to the binary
20016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20017    # Keep paths in /bin as-is, but remove trailing .exe if any
20018    new_path="${new_path/%.exe/}"
20019    # Do not save /bin paths to all_fixpath_prefixes!
20020  else
20021    # Not in mixed or Windows style, start by that.
20022    new_path=`cmd //c echo $new_path`
20023
20024  input_path="$new_path"
20025  # Check if we need to convert this using DOS-style short mode. If the path
20026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20027  # take no chances and rewrite it.
20028  # Note: m4 eats our [], so we need to use [ and ] instead.
20029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20030  if test "x$has_forbidden_chars" != x; then
20031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20033  fi
20034
20035    # Output is in $new_path
20036
20037  windows_path="$new_path"
20038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20039    unix_path=`$CYGPATH -u "$windows_path"`
20040    new_path="$unix_path"
20041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20043    new_path="$unix_path"
20044  fi
20045
20046    # remove trailing .exe if any
20047    new_path="${new_path/%.exe/}"
20048
20049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20051  fi
20052
20053    else
20054      # We're on a unix platform. Hooray! :)
20055      # First separate the path from the arguments. This will split at the first
20056      # space.
20057      complete="$FOUND_MAKE"
20058      path="${complete%% *}"
20059      tmp="$complete EOL"
20060      arguments="${tmp#* }"
20061
20062      # Cannot rely on the command "which" here since it doesn't always work.
20063      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20064      if test -z "$is_absolute_path"; then
20065        # Path to executable is not absolute. Find it.
20066        IFS_save="$IFS"
20067        IFS=:
20068        for p in $PATH; do
20069          if test -f "$p/$path" && test -x "$p/$path"; then
20070            new_path="$p/$path"
20071            break
20072          fi
20073        done
20074        IFS="$IFS_save"
20075      else
20076        # This is an absolute path, we can use it without further modifications.
20077        new_path="$path"
20078      fi
20079
20080      if test "x$new_path" = x; then
20081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20083        has_space=`$ECHO "$complete" | $GREP " "`
20084        if test "x$has_space" != x; then
20085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20087        fi
20088        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20089      fi
20090    fi
20091
20092    # Now join together the path and the arguments once again
20093    if test "x$arguments" != xEOL; then
20094      new_complete="$new_path ${arguments% *}"
20095    else
20096      new_complete="$new_path"
20097    fi
20098
20099    if test "x$complete" != "x$new_complete"; then
20100      FOUND_MAKE="$new_complete"
20101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20102$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20103    fi
20104  fi
20105
20106        fi
20107      fi
20108    fi
20109  fi
20110
20111    fi
20112
20113    if test "x$FOUND_MAKE" = x; then
20114      if test "x$TOOLCHAIN_PATH" != x; then
20115        # We have a toolchain path, check that as well before giving up.
20116        OLD_PATH=$PATH
20117        PATH=$TOOLCHAIN_PATH:$PATH
20118        for ac_prog in gmake
20119do
20120  # Extract the first word of "$ac_prog", so it can be a program name with args.
20121set dummy $ac_prog; ac_word=$2
20122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20123$as_echo_n "checking for $ac_word... " >&6; }
20124if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20125  $as_echo_n "(cached) " >&6
20126else
20127  case $CHECK_TOOLSDIR_GMAKE in
20128  [\\/]* | ?:[\\/]*)
20129  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20130  ;;
20131  *)
20132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20133for as_dir in $PATH
20134do
20135  IFS=$as_save_IFS
20136  test -z "$as_dir" && as_dir=.
20137    for ac_exec_ext in '' $ac_executable_extensions; do
20138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20139    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20141    break 2
20142  fi
20143done
20144  done
20145IFS=$as_save_IFS
20146
20147  ;;
20148esac
20149fi
20150CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20151if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20153$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20154else
20155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20156$as_echo "no" >&6; }
20157fi
20158
20159
20160  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20161done
20162
20163
20164  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20165  DESCRIPTION="gmake in tools-dir"
20166
20167  # On Cygwin, we require a newer version of make than on other platforms
20168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20169    MAKE_VERSION_EXPR="-e 4\."
20170    MAKE_REQUIRED_VERSION="4.0"
20171   else
20172    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20173    MAKE_REQUIRED_VERSION="3.81"
20174  fi
20175
20176  if test "x$MAKE_CANDIDATE" != x; then
20177    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20178$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20179    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20180    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20181    if test "x$IS_GNU_MAKE" = x; then
20182      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20183$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20184    else
20185      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20186      if test "x$IS_MODERN_MAKE" = x; then
20187        { $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
20188$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;}
20189      else
20190        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20191          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20192            MAKE_EXPECTED_ENV='cygwin'
20193          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20194            MAKE_EXPECTED_ENV='msys'
20195          else
20196            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20197          fi
20198          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20199          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20200        else
20201          # Not relevant for non-Windows
20202          IS_MAKE_CORRECT_ENV=true
20203        fi
20204        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20205          { $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
20206$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;}
20207        else
20208          FOUND_MAKE=$MAKE_CANDIDATE
20209
20210  # Only process if variable expands to non-empty
20211
20212  if test "x$FOUND_MAKE" != x; then
20213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20214
20215  # First separate the path from the arguments. This will split at the first
20216  # space.
20217  complete="$FOUND_MAKE"
20218  path="${complete%% *}"
20219  tmp="$complete EOL"
20220  arguments="${tmp#* }"
20221
20222  # Input might be given as Windows format, start by converting to
20223  # unix format.
20224  new_path=`$CYGPATH -u "$path"`
20225
20226  # Now try to locate executable using which
20227  new_path=`$WHICH "$new_path" 2> /dev/null`
20228  # bat and cmd files are not always considered executable in cygwin causing which
20229  # to not find them
20230  if test "x$new_path" = x \
20231      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20232      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20233    new_path=`$CYGPATH -u "$path"`
20234  fi
20235  if test "x$new_path" = x; then
20236    # Oops. Which didn't find the executable.
20237    # The splitting of arguments from the executable at a space might have been incorrect,
20238    # since paths with space are more likely in Windows. Give it another try with the whole
20239    # argument.
20240    path="$complete"
20241    arguments="EOL"
20242    new_path=`$CYGPATH -u "$path"`
20243    new_path=`$WHICH "$new_path" 2> /dev/null`
20244    # bat and cmd files are not always considered executable in cygwin causing which
20245    # to not find them
20246    if test "x$new_path" = x \
20247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20249      new_path=`$CYGPATH -u "$path"`
20250    fi
20251    if test "x$new_path" = x; then
20252      # It's still not found. Now this is an unrecoverable error.
20253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20255      has_space=`$ECHO "$complete" | $GREP " "`
20256      if test "x$has_space" != x; then
20257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20259      fi
20260      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20261    fi
20262  fi
20263
20264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20267  # "foo.exe" is OK but "foo" is an error.
20268  #
20269  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20270  # It is also a way to make sure we got the proper file name for the real test later on.
20271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20272  if test "x$test_shortpath" = x; then
20273    # Short path failed, file does not exist as specified.
20274    # Try adding .exe or .cmd
20275    if test -f "${new_path}.exe"; then
20276      input_to_shortpath="${new_path}.exe"
20277    elif test -f "${new_path}.cmd"; then
20278      input_to_shortpath="${new_path}.cmd"
20279    else
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20282      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20283$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20285    fi
20286  else
20287    input_to_shortpath="$new_path"
20288  fi
20289
20290  # Call helper function which possibly converts this using DOS-style short mode.
20291  # If so, the updated path is stored in $new_path.
20292  new_path="$input_to_shortpath"
20293
20294  input_path="$input_to_shortpath"
20295  # Check if we need to convert this using DOS-style short mode. If the path
20296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20297  # take no chances and rewrite it.
20298  # Note: m4 eats our [], so we need to use [ and ] instead.
20299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20300  if test "x$has_forbidden_chars" != x; then
20301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20305      # Going to short mode and back again did indeed matter. Since short mode is
20306      # case insensitive, let's make it lowercase to improve readability.
20307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20308      # Now convert it back to Unix-style (cygpath)
20309      input_path=`$CYGPATH -u "$shortmode_path"`
20310      new_path="$input_path"
20311    fi
20312  fi
20313
20314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20315  if test "x$test_cygdrive_prefix" = x; then
20316    # As a simple fix, exclude /usr/bin since it's not a real path.
20317    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20319      # a path prefixed by /cygdrive for fixpath to work.
20320      new_path="$CYGWIN_ROOT_PATH$input_path"
20321    fi
20322  fi
20323
20324  # remove trailing .exe if any
20325  new_path="${new_path/%.exe/}"
20326
20327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328
20329  # First separate the path from the arguments. This will split at the first
20330  # space.
20331  complete="$FOUND_MAKE"
20332  path="${complete%% *}"
20333  tmp="$complete EOL"
20334  arguments="${tmp#* }"
20335
20336  # Input might be given as Windows format, start by converting to
20337  # unix format.
20338  new_path="$path"
20339
20340  windows_path="$new_path"
20341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20342    unix_path=`$CYGPATH -u "$windows_path"`
20343    new_path="$unix_path"
20344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20346    new_path="$unix_path"
20347  fi
20348
20349
20350  # Now try to locate executable using which
20351  new_path=`$WHICH "$new_path" 2> /dev/null`
20352
20353  if test "x$new_path" = x; then
20354    # Oops. Which didn't find the executable.
20355    # The splitting of arguments from the executable at a space might have been incorrect,
20356    # since paths with space are more likely in Windows. Give it another try with the whole
20357    # argument.
20358    path="$complete"
20359    arguments="EOL"
20360    new_path="$path"
20361
20362  windows_path="$new_path"
20363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20364    unix_path=`$CYGPATH -u "$windows_path"`
20365    new_path="$unix_path"
20366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20368    new_path="$unix_path"
20369  fi
20370
20371
20372    new_path=`$WHICH "$new_path" 2> /dev/null`
20373    # bat and cmd files are not always considered executable in MSYS causing which
20374    # to not find them
20375    if test "x$new_path" = x \
20376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20378      new_path="$path"
20379
20380  windows_path="$new_path"
20381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20382    unix_path=`$CYGPATH -u "$windows_path"`
20383    new_path="$unix_path"
20384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20386    new_path="$unix_path"
20387  fi
20388
20389    fi
20390
20391    if test "x$new_path" = x; then
20392      # It's still not found. Now this is an unrecoverable error.
20393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20395      has_space=`$ECHO "$complete" | $GREP " "`
20396      if test "x$has_space" != x; then
20397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20399      fi
20400      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20401    fi
20402  fi
20403
20404  # Now new_path has a complete unix path to the binary
20405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20406    # Keep paths in /bin as-is, but remove trailing .exe if any
20407    new_path="${new_path/%.exe/}"
20408    # Do not save /bin paths to all_fixpath_prefixes!
20409  else
20410    # Not in mixed or Windows style, start by that.
20411    new_path=`cmd //c echo $new_path`
20412
20413  input_path="$new_path"
20414  # Check if we need to convert this using DOS-style short mode. If the path
20415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20416  # take no chances and rewrite it.
20417  # Note: m4 eats our [], so we need to use [ and ] instead.
20418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20419  if test "x$has_forbidden_chars" != x; then
20420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20422  fi
20423
20424    # Output is in $new_path
20425
20426  windows_path="$new_path"
20427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20428    unix_path=`$CYGPATH -u "$windows_path"`
20429    new_path="$unix_path"
20430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20432    new_path="$unix_path"
20433  fi
20434
20435    # remove trailing .exe if any
20436    new_path="${new_path/%.exe/}"
20437
20438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20440  fi
20441
20442    else
20443      # We're on a unix platform. Hooray! :)
20444      # First separate the path from the arguments. This will split at the first
20445      # space.
20446      complete="$FOUND_MAKE"
20447      path="${complete%% *}"
20448      tmp="$complete EOL"
20449      arguments="${tmp#* }"
20450
20451      # Cannot rely on the command "which" here since it doesn't always work.
20452      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20453      if test -z "$is_absolute_path"; then
20454        # Path to executable is not absolute. Find it.
20455        IFS_save="$IFS"
20456        IFS=:
20457        for p in $PATH; do
20458          if test -f "$p/$path" && test -x "$p/$path"; then
20459            new_path="$p/$path"
20460            break
20461          fi
20462        done
20463        IFS="$IFS_save"
20464      else
20465        # This is an absolute path, we can use it without further modifications.
20466        new_path="$path"
20467      fi
20468
20469      if test "x$new_path" = x; then
20470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20471$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20472        has_space=`$ECHO "$complete" | $GREP " "`
20473        if test "x$has_space" != x; then
20474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20476        fi
20477        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20478      fi
20479    fi
20480
20481    # Now join together the path and the arguments once again
20482    if test "x$arguments" != xEOL; then
20483      new_complete="$new_path ${arguments% *}"
20484    else
20485      new_complete="$new_path"
20486    fi
20487
20488    if test "x$complete" != "x$new_complete"; then
20489      FOUND_MAKE="$new_complete"
20490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20491$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20492    fi
20493  fi
20494
20495        fi
20496      fi
20497    fi
20498  fi
20499
20500        if test "x$FOUND_MAKE" = x; then
20501          for ac_prog in make
20502do
20503  # Extract the first word of "$ac_prog", so it can be a program name with args.
20504set dummy $ac_prog; ac_word=$2
20505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20506$as_echo_n "checking for $ac_word... " >&6; }
20507if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20508  $as_echo_n "(cached) " >&6
20509else
20510  case $CHECK_TOOLSDIR_MAKE in
20511  [\\/]* | ?:[\\/]*)
20512  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20513  ;;
20514  *)
20515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20516for as_dir in $PATH
20517do
20518  IFS=$as_save_IFS
20519  test -z "$as_dir" && as_dir=.
20520    for ac_exec_ext in '' $ac_executable_extensions; do
20521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20522    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20524    break 2
20525  fi
20526done
20527  done
20528IFS=$as_save_IFS
20529
20530  ;;
20531esac
20532fi
20533CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20534if test -n "$CHECK_TOOLSDIR_MAKE"; then
20535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20536$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20537else
20538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20539$as_echo "no" >&6; }
20540fi
20541
20542
20543  test -n "$CHECK_TOOLSDIR_MAKE" && break
20544done
20545
20546
20547  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20548  DESCRIPTION="make in tools-dir"
20549
20550  # On Cygwin, we require a newer version of make than on other platforms
20551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20552    MAKE_VERSION_EXPR="-e 4\."
20553    MAKE_REQUIRED_VERSION="4.0"
20554   else
20555    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20556    MAKE_REQUIRED_VERSION="3.81"
20557  fi
20558
20559  if test "x$MAKE_CANDIDATE" != x; then
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20561$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20562    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20563    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20564    if test "x$IS_GNU_MAKE" = x; then
20565      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20566$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20567    else
20568      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20569      if test "x$IS_MODERN_MAKE" = x; then
20570        { $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
20571$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;}
20572      else
20573        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20574          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20575            MAKE_EXPECTED_ENV='cygwin'
20576          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20577            MAKE_EXPECTED_ENV='msys'
20578          else
20579            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20580          fi
20581          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20582          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20583        else
20584          # Not relevant for non-Windows
20585          IS_MAKE_CORRECT_ENV=true
20586        fi
20587        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20588          { $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
20589$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;}
20590        else
20591          FOUND_MAKE=$MAKE_CANDIDATE
20592
20593  # Only process if variable expands to non-empty
20594
20595  if test "x$FOUND_MAKE" != x; then
20596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20597
20598  # First separate the path from the arguments. This will split at the first
20599  # space.
20600  complete="$FOUND_MAKE"
20601  path="${complete%% *}"
20602  tmp="$complete EOL"
20603  arguments="${tmp#* }"
20604
20605  # Input might be given as Windows format, start by converting to
20606  # unix format.
20607  new_path=`$CYGPATH -u "$path"`
20608
20609  # Now try to locate executable using which
20610  new_path=`$WHICH "$new_path" 2> /dev/null`
20611  # bat and cmd files are not always considered executable in cygwin causing which
20612  # to not find them
20613  if test "x$new_path" = x \
20614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20616    new_path=`$CYGPATH -u "$path"`
20617  fi
20618  if test "x$new_path" = x; then
20619    # Oops. Which didn't find the executable.
20620    # The splitting of arguments from the executable at a space might have been incorrect,
20621    # since paths with space are more likely in Windows. Give it another try with the whole
20622    # argument.
20623    path="$complete"
20624    arguments="EOL"
20625    new_path=`$CYGPATH -u "$path"`
20626    new_path=`$WHICH "$new_path" 2> /dev/null`
20627    # bat and cmd files are not always considered executable in cygwin causing which
20628    # to not find them
20629    if test "x$new_path" = x \
20630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20632      new_path=`$CYGPATH -u "$path"`
20633    fi
20634    if test "x$new_path" = x; then
20635      # It's still not found. Now this is an unrecoverable error.
20636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20638      has_space=`$ECHO "$complete" | $GREP " "`
20639      if test "x$has_space" != x; then
20640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20642      fi
20643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20644    fi
20645  fi
20646
20647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20650  # "foo.exe" is OK but "foo" is an error.
20651  #
20652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20653  # It is also a way to make sure we got the proper file name for the real test later on.
20654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20655  if test "x$test_shortpath" = x; then
20656    # Short path failed, file does not exist as specified.
20657    # Try adding .exe or .cmd
20658    if test -f "${new_path}.exe"; then
20659      input_to_shortpath="${new_path}.exe"
20660    elif test -f "${new_path}.cmd"; then
20661      input_to_shortpath="${new_path}.cmd"
20662    else
20663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20668    fi
20669  else
20670    input_to_shortpath="$new_path"
20671  fi
20672
20673  # Call helper function which possibly converts this using DOS-style short mode.
20674  # If so, the updated path is stored in $new_path.
20675  new_path="$input_to_shortpath"
20676
20677  input_path="$input_to_shortpath"
20678  # Check if we need to convert this using DOS-style short mode. If the path
20679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20680  # take no chances and rewrite it.
20681  # Note: m4 eats our [], so we need to use [ and ] instead.
20682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20683  if test "x$has_forbidden_chars" != x; then
20684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20688      # Going to short mode and back again did indeed matter. Since short mode is
20689      # case insensitive, let's make it lowercase to improve readability.
20690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20691      # Now convert it back to Unix-style (cygpath)
20692      input_path=`$CYGPATH -u "$shortmode_path"`
20693      new_path="$input_path"
20694    fi
20695  fi
20696
20697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20698  if test "x$test_cygdrive_prefix" = x; then
20699    # As a simple fix, exclude /usr/bin since it's not a real path.
20700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20702      # a path prefixed by /cygdrive for fixpath to work.
20703      new_path="$CYGWIN_ROOT_PATH$input_path"
20704    fi
20705  fi
20706
20707  # remove trailing .exe if any
20708  new_path="${new_path/%.exe/}"
20709
20710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20711
20712  # First separate the path from the arguments. This will split at the first
20713  # space.
20714  complete="$FOUND_MAKE"
20715  path="${complete%% *}"
20716  tmp="$complete EOL"
20717  arguments="${tmp#* }"
20718
20719  # Input might be given as Windows format, start by converting to
20720  # unix format.
20721  new_path="$path"
20722
20723  windows_path="$new_path"
20724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20725    unix_path=`$CYGPATH -u "$windows_path"`
20726    new_path="$unix_path"
20727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20729    new_path="$unix_path"
20730  fi
20731
20732
20733  # Now try to locate executable using which
20734  new_path=`$WHICH "$new_path" 2> /dev/null`
20735
20736  if test "x$new_path" = x; then
20737    # Oops. Which didn't find the executable.
20738    # The splitting of arguments from the executable at a space might have been incorrect,
20739    # since paths with space are more likely in Windows. Give it another try with the whole
20740    # argument.
20741    path="$complete"
20742    arguments="EOL"
20743    new_path="$path"
20744
20745  windows_path="$new_path"
20746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20747    unix_path=`$CYGPATH -u "$windows_path"`
20748    new_path="$unix_path"
20749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20751    new_path="$unix_path"
20752  fi
20753
20754
20755    new_path=`$WHICH "$new_path" 2> /dev/null`
20756    # bat and cmd files are not always considered executable in MSYS causing which
20757    # to not find them
20758    if test "x$new_path" = x \
20759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20761      new_path="$path"
20762
20763  windows_path="$new_path"
20764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20765    unix_path=`$CYGPATH -u "$windows_path"`
20766    new_path="$unix_path"
20767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20769    new_path="$unix_path"
20770  fi
20771
20772    fi
20773
20774    if test "x$new_path" = x; then
20775      # It's still not found. Now this is an unrecoverable error.
20776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20777$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20778      has_space=`$ECHO "$complete" | $GREP " "`
20779      if test "x$has_space" != x; then
20780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20782      fi
20783      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20784    fi
20785  fi
20786
20787  # Now new_path has a complete unix path to the binary
20788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20789    # Keep paths in /bin as-is, but remove trailing .exe if any
20790    new_path="${new_path/%.exe/}"
20791    # Do not save /bin paths to all_fixpath_prefixes!
20792  else
20793    # Not in mixed or Windows style, start by that.
20794    new_path=`cmd //c echo $new_path`
20795
20796  input_path="$new_path"
20797  # Check if we need to convert this using DOS-style short mode. If the path
20798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20799  # take no chances and rewrite it.
20800  # Note: m4 eats our [], so we need to use [ and ] instead.
20801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20802  if test "x$has_forbidden_chars" != x; then
20803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20805  fi
20806
20807    # Output is in $new_path
20808
20809  windows_path="$new_path"
20810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20811    unix_path=`$CYGPATH -u "$windows_path"`
20812    new_path="$unix_path"
20813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20815    new_path="$unix_path"
20816  fi
20817
20818    # remove trailing .exe if any
20819    new_path="${new_path/%.exe/}"
20820
20821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20823  fi
20824
20825    else
20826      # We're on a unix platform. Hooray! :)
20827      # First separate the path from the arguments. This will split at the first
20828      # space.
20829      complete="$FOUND_MAKE"
20830      path="${complete%% *}"
20831      tmp="$complete EOL"
20832      arguments="${tmp#* }"
20833
20834      # Cannot rely on the command "which" here since it doesn't always work.
20835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20836      if test -z "$is_absolute_path"; then
20837        # Path to executable is not absolute. Find it.
20838        IFS_save="$IFS"
20839        IFS=:
20840        for p in $PATH; do
20841          if test -f "$p/$path" && test -x "$p/$path"; then
20842            new_path="$p/$path"
20843            break
20844          fi
20845        done
20846        IFS="$IFS_save"
20847      else
20848        # This is an absolute path, we can use it without further modifications.
20849        new_path="$path"
20850      fi
20851
20852      if test "x$new_path" = x; then
20853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20854$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20855        has_space=`$ECHO "$complete" | $GREP " "`
20856        if test "x$has_space" != x; then
20857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20859        fi
20860        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20861      fi
20862    fi
20863
20864    # Now join together the path and the arguments once again
20865    if test "x$arguments" != xEOL; then
20866      new_complete="$new_path ${arguments% *}"
20867    else
20868      new_complete="$new_path"
20869    fi
20870
20871    if test "x$complete" != "x$new_complete"; then
20872      FOUND_MAKE="$new_complete"
20873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20874$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20875    fi
20876  fi
20877
20878        fi
20879      fi
20880    fi
20881  fi
20882
20883        fi
20884        PATH=$OLD_PATH
20885      fi
20886    fi
20887
20888    if test "x$FOUND_MAKE" = x; then
20889      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
20890    fi
20891
20892    else
20893      # If it succeeded, then it was overridden by the user. We will use it
20894      # for the tool.
20895
20896      # First remove it from the list of overridden variables, so we can test
20897      # for unknown variables in the end.
20898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20899
20900      # Check if we try to supply an empty value
20901      if test "x$MAKE" = x; then
20902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20903$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20905$as_echo_n "checking for MAKE... " >&6; }
20906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20907$as_echo "disabled" >&6; }
20908      else
20909        # Check if the provided tool contains a complete path.
20910        tool_specified="$MAKE"
20911        tool_basename="${tool_specified##*/}"
20912        if test "x$tool_basename" = "x$tool_specified"; then
20913          # A command without a complete path is provided, search $PATH.
20914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20915$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20916          # Extract the first word of "$tool_basename", so it can be a program name with args.
20917set dummy $tool_basename; ac_word=$2
20918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20919$as_echo_n "checking for $ac_word... " >&6; }
20920if ${ac_cv_path_MAKE+:} false; then :
20921  $as_echo_n "(cached) " >&6
20922else
20923  case $MAKE in
20924  [\\/]* | ?:[\\/]*)
20925  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20926  ;;
20927  *)
20928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20929for as_dir in $PATH
20930do
20931  IFS=$as_save_IFS
20932  test -z "$as_dir" && as_dir=.
20933    for ac_exec_ext in '' $ac_executable_extensions; do
20934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20935    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20937    break 2
20938  fi
20939done
20940  done
20941IFS=$as_save_IFS
20942
20943  ;;
20944esac
20945fi
20946MAKE=$ac_cv_path_MAKE
20947if test -n "$MAKE"; then
20948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20949$as_echo "$MAKE" >&6; }
20950else
20951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20952$as_echo "no" >&6; }
20953fi
20954
20955
20956          if test "x$MAKE" = x; then
20957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20958          fi
20959        else
20960          # Otherwise we believe it is a complete path. Use it as it is.
20961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20962$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20964$as_echo_n "checking for MAKE... " >&6; }
20965          if test ! -x "$tool_specified"; then
20966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20967$as_echo "not found" >&6; }
20968            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20969          fi
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20971$as_echo "$tool_specified" >&6; }
20972        fi
20973      fi
20974    fi
20975
20976    # If MAKE was set by user, verify the version
20977
20978  MAKE_CANDIDATE=""$MAKE""
20979  DESCRIPTION="user supplied MAKE=$MAKE"
20980
20981  # On Cygwin, we require a newer version of make than on other platforms
20982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20983    MAKE_VERSION_EXPR="-e 4\."
20984    MAKE_REQUIRED_VERSION="4.0"
20985   else
20986    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20987    MAKE_REQUIRED_VERSION="3.81"
20988  fi
20989
20990  if test "x$MAKE_CANDIDATE" != x; then
20991    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20992$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20993    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20994    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20995    if test "x$IS_GNU_MAKE" = x; then
20996      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20997$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20998    else
20999      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21000      if test "x$IS_MODERN_MAKE" = x; then
21001        { $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
21002$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;}
21003      else
21004        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21005          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21006            MAKE_EXPECTED_ENV='cygwin'
21007          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21008            MAKE_EXPECTED_ENV='msys'
21009          else
21010            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21011          fi
21012          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21013          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21014        else
21015          # Not relevant for non-Windows
21016          IS_MAKE_CORRECT_ENV=true
21017        fi
21018        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21019          { $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
21020$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;}
21021        else
21022          FOUND_MAKE=$MAKE_CANDIDATE
21023
21024  # Only process if variable expands to non-empty
21025
21026  if test "x$FOUND_MAKE" != x; then
21027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21028
21029  # First separate the path from the arguments. This will split at the first
21030  # space.
21031  complete="$FOUND_MAKE"
21032  path="${complete%% *}"
21033  tmp="$complete EOL"
21034  arguments="${tmp#* }"
21035
21036  # Input might be given as Windows format, start by converting to
21037  # unix format.
21038  new_path=`$CYGPATH -u "$path"`
21039
21040  # Now try to locate executable using which
21041  new_path=`$WHICH "$new_path" 2> /dev/null`
21042  # bat and cmd files are not always considered executable in cygwin causing which
21043  # to not find them
21044  if test "x$new_path" = x \
21045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21047    new_path=`$CYGPATH -u "$path"`
21048  fi
21049  if test "x$new_path" = x; then
21050    # Oops. Which didn't find the executable.
21051    # The splitting of arguments from the executable at a space might have been incorrect,
21052    # since paths with space are more likely in Windows. Give it another try with the whole
21053    # argument.
21054    path="$complete"
21055    arguments="EOL"
21056    new_path=`$CYGPATH -u "$path"`
21057    new_path=`$WHICH "$new_path" 2> /dev/null`
21058    # bat and cmd files are not always considered executable in cygwin causing which
21059    # to not find them
21060    if test "x$new_path" = x \
21061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21063      new_path=`$CYGPATH -u "$path"`
21064    fi
21065    if test "x$new_path" = x; then
21066      # It's still not found. Now this is an unrecoverable error.
21067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21068$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21069      has_space=`$ECHO "$complete" | $GREP " "`
21070      if test "x$has_space" != x; then
21071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21073      fi
21074      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21075    fi
21076  fi
21077
21078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21081  # "foo.exe" is OK but "foo" is an error.
21082  #
21083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21084  # It is also a way to make sure we got the proper file name for the real test later on.
21085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21086  if test "x$test_shortpath" = x; then
21087    # Short path failed, file does not exist as specified.
21088    # Try adding .exe or .cmd
21089    if test -f "${new_path}.exe"; then
21090      input_to_shortpath="${new_path}.exe"
21091    elif test -f "${new_path}.cmd"; then
21092      input_to_shortpath="${new_path}.cmd"
21093    else
21094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21098      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21099    fi
21100  else
21101    input_to_shortpath="$new_path"
21102  fi
21103
21104  # Call helper function which possibly converts this using DOS-style short mode.
21105  # If so, the updated path is stored in $new_path.
21106  new_path="$input_to_shortpath"
21107
21108  input_path="$input_to_shortpath"
21109  # Check if we need to convert this using DOS-style short mode. If the path
21110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21111  # take no chances and rewrite it.
21112  # Note: m4 eats our [], so we need to use [ and ] instead.
21113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21114  if test "x$has_forbidden_chars" != x; then
21115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21119      # Going to short mode and back again did indeed matter. Since short mode is
21120      # case insensitive, let's make it lowercase to improve readability.
21121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21122      # Now convert it back to Unix-style (cygpath)
21123      input_path=`$CYGPATH -u "$shortmode_path"`
21124      new_path="$input_path"
21125    fi
21126  fi
21127
21128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21129  if test "x$test_cygdrive_prefix" = x; then
21130    # As a simple fix, exclude /usr/bin since it's not a real path.
21131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21133      # a path prefixed by /cygdrive for fixpath to work.
21134      new_path="$CYGWIN_ROOT_PATH$input_path"
21135    fi
21136  fi
21137
21138  # remove trailing .exe if any
21139  new_path="${new_path/%.exe/}"
21140
21141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21142
21143  # First separate the path from the arguments. This will split at the first
21144  # space.
21145  complete="$FOUND_MAKE"
21146  path="${complete%% *}"
21147  tmp="$complete EOL"
21148  arguments="${tmp#* }"
21149
21150  # Input might be given as Windows format, start by converting to
21151  # unix format.
21152  new_path="$path"
21153
21154  windows_path="$new_path"
21155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21156    unix_path=`$CYGPATH -u "$windows_path"`
21157    new_path="$unix_path"
21158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21160    new_path="$unix_path"
21161  fi
21162
21163
21164  # Now try to locate executable using which
21165  new_path=`$WHICH "$new_path" 2> /dev/null`
21166
21167  if test "x$new_path" = x; then
21168    # Oops. Which didn't find the executable.
21169    # The splitting of arguments from the executable at a space might have been incorrect,
21170    # since paths with space are more likely in Windows. Give it another try with the whole
21171    # argument.
21172    path="$complete"
21173    arguments="EOL"
21174    new_path="$path"
21175
21176  windows_path="$new_path"
21177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21178    unix_path=`$CYGPATH -u "$windows_path"`
21179    new_path="$unix_path"
21180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21182    new_path="$unix_path"
21183  fi
21184
21185
21186    new_path=`$WHICH "$new_path" 2> /dev/null`
21187    # bat and cmd files are not always considered executable in MSYS causing which
21188    # to not find them
21189    if test "x$new_path" = x \
21190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21192      new_path="$path"
21193
21194  windows_path="$new_path"
21195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21196    unix_path=`$CYGPATH -u "$windows_path"`
21197    new_path="$unix_path"
21198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21200    new_path="$unix_path"
21201  fi
21202
21203    fi
21204
21205    if test "x$new_path" = x; then
21206      # It's still not found. Now this is an unrecoverable error.
21207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21209      has_space=`$ECHO "$complete" | $GREP " "`
21210      if test "x$has_space" != x; then
21211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21213      fi
21214      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21215    fi
21216  fi
21217
21218  # Now new_path has a complete unix path to the binary
21219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21220    # Keep paths in /bin as-is, but remove trailing .exe if any
21221    new_path="${new_path/%.exe/}"
21222    # Do not save /bin paths to all_fixpath_prefixes!
21223  else
21224    # Not in mixed or Windows style, start by that.
21225    new_path=`cmd //c echo $new_path`
21226
21227  input_path="$new_path"
21228  # Check if we need to convert this using DOS-style short mode. If the path
21229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21230  # take no chances and rewrite it.
21231  # Note: m4 eats our [], so we need to use [ and ] instead.
21232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21233  if test "x$has_forbidden_chars" != x; then
21234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21236  fi
21237
21238    # Output is in $new_path
21239
21240  windows_path="$new_path"
21241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21242    unix_path=`$CYGPATH -u "$windows_path"`
21243    new_path="$unix_path"
21244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21246    new_path="$unix_path"
21247  fi
21248
21249    # remove trailing .exe if any
21250    new_path="${new_path/%.exe/}"
21251
21252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21254  fi
21255
21256    else
21257      # We're on a unix platform. Hooray! :)
21258      # First separate the path from the arguments. This will split at the first
21259      # space.
21260      complete="$FOUND_MAKE"
21261      path="${complete%% *}"
21262      tmp="$complete EOL"
21263      arguments="${tmp#* }"
21264
21265      # Cannot rely on the command "which" here since it doesn't always work.
21266      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21267      if test -z "$is_absolute_path"; then
21268        # Path to executable is not absolute. Find it.
21269        IFS_save="$IFS"
21270        IFS=:
21271        for p in $PATH; do
21272          if test -f "$p/$path" && test -x "$p/$path"; then
21273            new_path="$p/$path"
21274            break
21275          fi
21276        done
21277        IFS="$IFS_save"
21278      else
21279        # This is an absolute path, we can use it without further modifications.
21280        new_path="$path"
21281      fi
21282
21283      if test "x$new_path" = x; then
21284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21286        has_space=`$ECHO "$complete" | $GREP " "`
21287        if test "x$has_space" != x; then
21288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21290        fi
21291        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21292      fi
21293    fi
21294
21295    # Now join together the path and the arguments once again
21296    if test "x$arguments" != xEOL; then
21297      new_complete="$new_path ${arguments% *}"
21298    else
21299      new_complete="$new_path"
21300    fi
21301
21302    if test "x$complete" != "x$new_complete"; then
21303      FOUND_MAKE="$new_complete"
21304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21305$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21306    fi
21307  fi
21308
21309        fi
21310      fi
21311    fi
21312  fi
21313
21314    if test "x$FOUND_MAKE" = x; then
21315      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21316    fi
21317
21318  fi
21319
21320
21321  MAKE=$FOUND_MAKE
21322
21323  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21324$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21325
21326
21327  # Check if make supports the output sync option and if so, setup using it.
21328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21329$as_echo_n "checking if make --output-sync is supported... " >&6; }
21330  if $MAKE --version -O > /dev/null 2>&1; then
21331    OUTPUT_SYNC_SUPPORTED=true
21332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21333$as_echo "yes" >&6; }
21334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21335$as_echo_n "checking for output-sync value... " >&6; }
21336
21337# Check whether --with-output-sync was given.
21338if test "${with_output_sync+set}" = set; then :
21339  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21340fi
21341
21342    if test "x$OUTPUT_SYNC" = "x"; then
21343      OUTPUT_SYNC=none
21344    fi
21345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21346$as_echo "$OUTPUT_SYNC" >&6; }
21347    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21348      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21349    fi
21350  else
21351    OUTPUT_SYNC_SUPPORTED=false
21352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21353$as_echo "no" >&6; }
21354  fi
21355
21356
21357
21358
21359
21360
21361  # Test if find supports -delete
21362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21363$as_echo_n "checking if find supports -delete... " >&6; }
21364  FIND_DELETE="-delete"
21365
21366  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21367
21368  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21369
21370  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21371  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21372    # No, it does not.
21373    $RM $DELETEDIR/TestIfFindSupportsDelete
21374    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21375      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21376      FIND_DELETE="-print | $XARGS $RM"
21377    else
21378      FIND_DELETE="-exec $RM \{\} \+"
21379    fi
21380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21381$as_echo "no" >&6; }
21382  else
21383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21384$as_echo "yes" >&6; }
21385  fi
21386  $RMDIR $DELETEDIR
21387
21388
21389
21390  # Test which kind of tar was found
21391  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21392    TAR_TYPE="gnu"
21393  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21394    TAR_TYPE="bsd"
21395  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21396    TAR_TYPE="bsd"
21397  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21398    TAR_TYPE="solaris"
21399  fi
21400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21401$as_echo_n "checking what type of tar was found... " >&6; }
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21403$as_echo "$TAR_TYPE" >&6; }
21404
21405  TAR_CREATE_FILE_PARAM=""
21406
21407  if test "x$TAR_TYPE" = "xgnu"; then
21408    TAR_INCLUDE_PARAM="T"
21409    TAR_SUPPORTS_TRANSFORM="true"
21410    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21411      # When using gnu tar for Solaris targets, need to use compatibility mode
21412      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21413    fi
21414  else
21415    TAR_INCLUDE_PARAM="I"
21416    TAR_SUPPORTS_TRANSFORM="false"
21417  fi
21418
21419
21420
21421
21422
21423
21424  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21425  # This is a problem for the grep resident on AIX.
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21427$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21428  # Multiple subsequent spaces..
21429  STACK_SPACES='aaa   bbb   ccc'
21430  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21431  # patterns in it.
21432  STACK_LIST=${STACK_SPACES// /$'\n'}
21433  NEEDLE_SPACES='ccc bbb aaa'
21434  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21435  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21436  if test "x$RESULT" == "x"; then
21437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21438$as_echo "yes" >&6; }
21439  else
21440    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21441      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21442    fi
21443    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21444  fi
21445
21446
21447  # These tools might not be installed by default,
21448  # need hint on how to install them.
21449
21450
21451
21452  # Publish this variable in the help.
21453
21454
21455  if [ -z "${UNZIP+x}" ]; then
21456    # The variable is not set by user, try to locate tool using the code snippet
21457    for ac_prog in unzip
21458do
21459  # Extract the first word of "$ac_prog", so it can be a program name with args.
21460set dummy $ac_prog; ac_word=$2
21461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21462$as_echo_n "checking for $ac_word... " >&6; }
21463if ${ac_cv_path_UNZIP+:} false; then :
21464  $as_echo_n "(cached) " >&6
21465else
21466  case $UNZIP in
21467  [\\/]* | ?:[\\/]*)
21468  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21469  ;;
21470  *)
21471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21472for as_dir in $PATH
21473do
21474  IFS=$as_save_IFS
21475  test -z "$as_dir" && as_dir=.
21476    for ac_exec_ext in '' $ac_executable_extensions; do
21477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21478    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21480    break 2
21481  fi
21482done
21483  done
21484IFS=$as_save_IFS
21485
21486  ;;
21487esac
21488fi
21489UNZIP=$ac_cv_path_UNZIP
21490if test -n "$UNZIP"; then
21491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21492$as_echo "$UNZIP" >&6; }
21493else
21494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21495$as_echo "no" >&6; }
21496fi
21497
21498
21499  test -n "$UNZIP" && break
21500done
21501
21502  else
21503    # The variable is set, but is it from the command line or the environment?
21504
21505    # Try to remove the string !UNZIP! from our list.
21506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21508      # If it failed, the variable was not from the command line. Ignore it,
21509      # but warn the user (except for BASH, which is always set by the calling BASH).
21510      if test "xUNZIP" != xBASH; then
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21512$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21513      fi
21514      # Try to locate tool using the code snippet
21515      for ac_prog in unzip
21516do
21517  # Extract the first word of "$ac_prog", so it can be a program name with args.
21518set dummy $ac_prog; ac_word=$2
21519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21520$as_echo_n "checking for $ac_word... " >&6; }
21521if ${ac_cv_path_UNZIP+:} false; then :
21522  $as_echo_n "(cached) " >&6
21523else
21524  case $UNZIP in
21525  [\\/]* | ?:[\\/]*)
21526  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21527  ;;
21528  *)
21529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21530for as_dir in $PATH
21531do
21532  IFS=$as_save_IFS
21533  test -z "$as_dir" && as_dir=.
21534    for ac_exec_ext in '' $ac_executable_extensions; do
21535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21536    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21538    break 2
21539  fi
21540done
21541  done
21542IFS=$as_save_IFS
21543
21544  ;;
21545esac
21546fi
21547UNZIP=$ac_cv_path_UNZIP
21548if test -n "$UNZIP"; then
21549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21550$as_echo "$UNZIP" >&6; }
21551else
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21553$as_echo "no" >&6; }
21554fi
21555
21556
21557  test -n "$UNZIP" && break
21558done
21559
21560    else
21561      # If it succeeded, then it was overridden by the user. We will use it
21562      # for the tool.
21563
21564      # First remove it from the list of overridden variables, so we can test
21565      # for unknown variables in the end.
21566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21567
21568      # Check if we try to supply an empty value
21569      if test "x$UNZIP" = x; then
21570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21571$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21573$as_echo_n "checking for UNZIP... " >&6; }
21574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21575$as_echo "disabled" >&6; }
21576      else
21577        # Check if the provided tool contains a complete path.
21578        tool_specified="$UNZIP"
21579        tool_basename="${tool_specified##*/}"
21580        if test "x$tool_basename" = "x$tool_specified"; then
21581          # A command without a complete path is provided, search $PATH.
21582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21583$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21584          # Extract the first word of "$tool_basename", so it can be a program name with args.
21585set dummy $tool_basename; ac_word=$2
21586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21587$as_echo_n "checking for $ac_word... " >&6; }
21588if ${ac_cv_path_UNZIP+:} false; then :
21589  $as_echo_n "(cached) " >&6
21590else
21591  case $UNZIP in
21592  [\\/]* | ?:[\\/]*)
21593  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21594  ;;
21595  *)
21596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21597for as_dir in $PATH
21598do
21599  IFS=$as_save_IFS
21600  test -z "$as_dir" && as_dir=.
21601    for ac_exec_ext in '' $ac_executable_extensions; do
21602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21603    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21605    break 2
21606  fi
21607done
21608  done
21609IFS=$as_save_IFS
21610
21611  ;;
21612esac
21613fi
21614UNZIP=$ac_cv_path_UNZIP
21615if test -n "$UNZIP"; then
21616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21617$as_echo "$UNZIP" >&6; }
21618else
21619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21620$as_echo "no" >&6; }
21621fi
21622
21623
21624          if test "x$UNZIP" = x; then
21625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21626          fi
21627        else
21628          # Otherwise we believe it is a complete path. Use it as it is.
21629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21630$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21632$as_echo_n "checking for UNZIP... " >&6; }
21633          if test ! -x "$tool_specified"; then
21634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21635$as_echo "not found" >&6; }
21636            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21637          fi
21638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21639$as_echo "$tool_specified" >&6; }
21640        fi
21641      fi
21642    fi
21643
21644  fi
21645
21646
21647
21648  if test "x$UNZIP" = x; then
21649    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21650  fi
21651
21652
21653  # Since zip uses "ZIP" as a environment variable for passing options, we need
21654  # to name our variable differently, hence ZIPEXE.
21655
21656
21657
21658  # Publish this variable in the help.
21659
21660
21661  if [ -z "${ZIPEXE+x}" ]; then
21662    # The variable is not set by user, try to locate tool using the code snippet
21663    for ac_prog in zip
21664do
21665  # Extract the first word of "$ac_prog", so it can be a program name with args.
21666set dummy $ac_prog; ac_word=$2
21667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21668$as_echo_n "checking for $ac_word... " >&6; }
21669if ${ac_cv_path_ZIPEXE+:} false; then :
21670  $as_echo_n "(cached) " >&6
21671else
21672  case $ZIPEXE in
21673  [\\/]* | ?:[\\/]*)
21674  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21675  ;;
21676  *)
21677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21678for as_dir in $PATH
21679do
21680  IFS=$as_save_IFS
21681  test -z "$as_dir" && as_dir=.
21682    for ac_exec_ext in '' $ac_executable_extensions; do
21683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21684    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21686    break 2
21687  fi
21688done
21689  done
21690IFS=$as_save_IFS
21691
21692  ;;
21693esac
21694fi
21695ZIPEXE=$ac_cv_path_ZIPEXE
21696if test -n "$ZIPEXE"; then
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21698$as_echo "$ZIPEXE" >&6; }
21699else
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21701$as_echo "no" >&6; }
21702fi
21703
21704
21705  test -n "$ZIPEXE" && break
21706done
21707
21708  else
21709    # The variable is set, but is it from the command line or the environment?
21710
21711    # Try to remove the string !ZIPEXE! from our list.
21712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21714      # If it failed, the variable was not from the command line. Ignore it,
21715      # but warn the user (except for BASH, which is always set by the calling BASH).
21716      if test "xZIPEXE" != xBASH; then
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21718$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21719      fi
21720      # Try to locate tool using the code snippet
21721      for ac_prog in zip
21722do
21723  # Extract the first word of "$ac_prog", so it can be a program name with args.
21724set dummy $ac_prog; ac_word=$2
21725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21726$as_echo_n "checking for $ac_word... " >&6; }
21727if ${ac_cv_path_ZIPEXE+:} false; then :
21728  $as_echo_n "(cached) " >&6
21729else
21730  case $ZIPEXE in
21731  [\\/]* | ?:[\\/]*)
21732  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21733  ;;
21734  *)
21735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21736for as_dir in $PATH
21737do
21738  IFS=$as_save_IFS
21739  test -z "$as_dir" && as_dir=.
21740    for ac_exec_ext in '' $ac_executable_extensions; do
21741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21742    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21744    break 2
21745  fi
21746done
21747  done
21748IFS=$as_save_IFS
21749
21750  ;;
21751esac
21752fi
21753ZIPEXE=$ac_cv_path_ZIPEXE
21754if test -n "$ZIPEXE"; then
21755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21756$as_echo "$ZIPEXE" >&6; }
21757else
21758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21759$as_echo "no" >&6; }
21760fi
21761
21762
21763  test -n "$ZIPEXE" && break
21764done
21765
21766    else
21767      # If it succeeded, then it was overridden by the user. We will use it
21768      # for the tool.
21769
21770      # First remove it from the list of overridden variables, so we can test
21771      # for unknown variables in the end.
21772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21773
21774      # Check if we try to supply an empty value
21775      if test "x$ZIPEXE" = x; then
21776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21777$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21779$as_echo_n "checking for ZIPEXE... " >&6; }
21780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21781$as_echo "disabled" >&6; }
21782      else
21783        # Check if the provided tool contains a complete path.
21784        tool_specified="$ZIPEXE"
21785        tool_basename="${tool_specified##*/}"
21786        if test "x$tool_basename" = "x$tool_specified"; then
21787          # A command without a complete path is provided, search $PATH.
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21789$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21790          # Extract the first word of "$tool_basename", so it can be a program name with args.
21791set dummy $tool_basename; ac_word=$2
21792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21793$as_echo_n "checking for $ac_word... " >&6; }
21794if ${ac_cv_path_ZIPEXE+:} false; then :
21795  $as_echo_n "(cached) " >&6
21796else
21797  case $ZIPEXE in
21798  [\\/]* | ?:[\\/]*)
21799  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21800  ;;
21801  *)
21802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21803for as_dir in $PATH
21804do
21805  IFS=$as_save_IFS
21806  test -z "$as_dir" && as_dir=.
21807    for ac_exec_ext in '' $ac_executable_extensions; do
21808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21809    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21811    break 2
21812  fi
21813done
21814  done
21815IFS=$as_save_IFS
21816
21817  ;;
21818esac
21819fi
21820ZIPEXE=$ac_cv_path_ZIPEXE
21821if test -n "$ZIPEXE"; then
21822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21823$as_echo "$ZIPEXE" >&6; }
21824else
21825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21826$as_echo "no" >&6; }
21827fi
21828
21829
21830          if test "x$ZIPEXE" = x; then
21831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21832          fi
21833        else
21834          # Otherwise we believe it is a complete path. Use it as it is.
21835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21836$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21838$as_echo_n "checking for ZIPEXE... " >&6; }
21839          if test ! -x "$tool_specified"; then
21840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21841$as_echo "not found" >&6; }
21842            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21843          fi
21844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21845$as_echo "$tool_specified" >&6; }
21846        fi
21847      fi
21848    fi
21849
21850  fi
21851
21852
21853
21854  if test "x$ZIPEXE" = x; then
21855    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21856  fi
21857
21858
21859
21860  # Non-required basic tools
21861
21862
21863
21864  # Publish this variable in the help.
21865
21866
21867  if [ -z "${LDD+x}" ]; then
21868    # The variable is not set by user, try to locate tool using the code snippet
21869    for ac_prog in ldd
21870do
21871  # Extract the first word of "$ac_prog", so it can be a program name with args.
21872set dummy $ac_prog; ac_word=$2
21873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21874$as_echo_n "checking for $ac_word... " >&6; }
21875if ${ac_cv_path_LDD+:} false; then :
21876  $as_echo_n "(cached) " >&6
21877else
21878  case $LDD in
21879  [\\/]* | ?:[\\/]*)
21880  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21881  ;;
21882  *)
21883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21884for as_dir in $PATH
21885do
21886  IFS=$as_save_IFS
21887  test -z "$as_dir" && as_dir=.
21888    for ac_exec_ext in '' $ac_executable_extensions; do
21889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21890    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21892    break 2
21893  fi
21894done
21895  done
21896IFS=$as_save_IFS
21897
21898  ;;
21899esac
21900fi
21901LDD=$ac_cv_path_LDD
21902if test -n "$LDD"; then
21903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21904$as_echo "$LDD" >&6; }
21905else
21906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21907$as_echo "no" >&6; }
21908fi
21909
21910
21911  test -n "$LDD" && break
21912done
21913
21914  else
21915    # The variable is set, but is it from the command line or the environment?
21916
21917    # Try to remove the string !LDD! from our list.
21918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21920      # If it failed, the variable was not from the command line. Ignore it,
21921      # but warn the user (except for BASH, which is always set by the calling BASH).
21922      if test "xLDD" != xBASH; then
21923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21924$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21925      fi
21926      # Try to locate tool using the code snippet
21927      for ac_prog in ldd
21928do
21929  # Extract the first word of "$ac_prog", so it can be a program name with args.
21930set dummy $ac_prog; ac_word=$2
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21932$as_echo_n "checking for $ac_word... " >&6; }
21933if ${ac_cv_path_LDD+:} false; then :
21934  $as_echo_n "(cached) " >&6
21935else
21936  case $LDD in
21937  [\\/]* | ?:[\\/]*)
21938  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21939  ;;
21940  *)
21941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21942for as_dir in $PATH
21943do
21944  IFS=$as_save_IFS
21945  test -z "$as_dir" && as_dir=.
21946    for ac_exec_ext in '' $ac_executable_extensions; do
21947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21948    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21950    break 2
21951  fi
21952done
21953  done
21954IFS=$as_save_IFS
21955
21956  ;;
21957esac
21958fi
21959LDD=$ac_cv_path_LDD
21960if test -n "$LDD"; then
21961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21962$as_echo "$LDD" >&6; }
21963else
21964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21965$as_echo "no" >&6; }
21966fi
21967
21968
21969  test -n "$LDD" && break
21970done
21971
21972    else
21973      # If it succeeded, then it was overridden by the user. We will use it
21974      # for the tool.
21975
21976      # First remove it from the list of overridden variables, so we can test
21977      # for unknown variables in the end.
21978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21979
21980      # Check if we try to supply an empty value
21981      if test "x$LDD" = x; then
21982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21983$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21985$as_echo_n "checking for LDD... " >&6; }
21986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21987$as_echo "disabled" >&6; }
21988      else
21989        # Check if the provided tool contains a complete path.
21990        tool_specified="$LDD"
21991        tool_basename="${tool_specified##*/}"
21992        if test "x$tool_basename" = "x$tool_specified"; then
21993          # A command without a complete path is provided, search $PATH.
21994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21995$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21996          # Extract the first word of "$tool_basename", so it can be a program name with args.
21997set dummy $tool_basename; ac_word=$2
21998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21999$as_echo_n "checking for $ac_word... " >&6; }
22000if ${ac_cv_path_LDD+:} false; then :
22001  $as_echo_n "(cached) " >&6
22002else
22003  case $LDD in
22004  [\\/]* | ?:[\\/]*)
22005  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22006  ;;
22007  *)
22008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22009for as_dir in $PATH
22010do
22011  IFS=$as_save_IFS
22012  test -z "$as_dir" && as_dir=.
22013    for ac_exec_ext in '' $ac_executable_extensions; do
22014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22015    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22017    break 2
22018  fi
22019done
22020  done
22021IFS=$as_save_IFS
22022
22023  ;;
22024esac
22025fi
22026LDD=$ac_cv_path_LDD
22027if test -n "$LDD"; then
22028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22029$as_echo "$LDD" >&6; }
22030else
22031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22032$as_echo "no" >&6; }
22033fi
22034
22035
22036          if test "x$LDD" = x; then
22037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22038          fi
22039        else
22040          # Otherwise we believe it is a complete path. Use it as it is.
22041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22042$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22044$as_echo_n "checking for LDD... " >&6; }
22045          if test ! -x "$tool_specified"; then
22046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22047$as_echo "not found" >&6; }
22048            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22049          fi
22050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22051$as_echo "$tool_specified" >&6; }
22052        fi
22053      fi
22054    fi
22055
22056  fi
22057
22058
22059  if test "x$LDD" = "x"; then
22060    # List shared lib dependencies is used for
22061    # debug output and checking for forbidden dependencies.
22062    # We can build without it.
22063    LDD="true"
22064  fi
22065
22066
22067  # Publish this variable in the help.
22068
22069
22070  if [ -z "${OTOOL+x}" ]; then
22071    # The variable is not set by user, try to locate tool using the code snippet
22072    for ac_prog in otool
22073do
22074  # Extract the first word of "$ac_prog", so it can be a program name with args.
22075set dummy $ac_prog; ac_word=$2
22076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22077$as_echo_n "checking for $ac_word... " >&6; }
22078if ${ac_cv_path_OTOOL+:} false; then :
22079  $as_echo_n "(cached) " >&6
22080else
22081  case $OTOOL in
22082  [\\/]* | ?:[\\/]*)
22083  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22084  ;;
22085  *)
22086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22087for as_dir in $PATH
22088do
22089  IFS=$as_save_IFS
22090  test -z "$as_dir" && as_dir=.
22091    for ac_exec_ext in '' $ac_executable_extensions; do
22092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22093    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22095    break 2
22096  fi
22097done
22098  done
22099IFS=$as_save_IFS
22100
22101  ;;
22102esac
22103fi
22104OTOOL=$ac_cv_path_OTOOL
22105if test -n "$OTOOL"; then
22106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22107$as_echo "$OTOOL" >&6; }
22108else
22109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22110$as_echo "no" >&6; }
22111fi
22112
22113
22114  test -n "$OTOOL" && break
22115done
22116
22117  else
22118    # The variable is set, but is it from the command line or the environment?
22119
22120    # Try to remove the string !OTOOL! from our list.
22121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22123      # If it failed, the variable was not from the command line. Ignore it,
22124      # but warn the user (except for BASH, which is always set by the calling BASH).
22125      if test "xOTOOL" != xBASH; then
22126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22127$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22128      fi
22129      # Try to locate tool using the code snippet
22130      for ac_prog in otool
22131do
22132  # Extract the first word of "$ac_prog", so it can be a program name with args.
22133set dummy $ac_prog; ac_word=$2
22134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22135$as_echo_n "checking for $ac_word... " >&6; }
22136if ${ac_cv_path_OTOOL+:} false; then :
22137  $as_echo_n "(cached) " >&6
22138else
22139  case $OTOOL in
22140  [\\/]* | ?:[\\/]*)
22141  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22142  ;;
22143  *)
22144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22145for as_dir in $PATH
22146do
22147  IFS=$as_save_IFS
22148  test -z "$as_dir" && as_dir=.
22149    for ac_exec_ext in '' $ac_executable_extensions; do
22150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22151    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22153    break 2
22154  fi
22155done
22156  done
22157IFS=$as_save_IFS
22158
22159  ;;
22160esac
22161fi
22162OTOOL=$ac_cv_path_OTOOL
22163if test -n "$OTOOL"; then
22164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22165$as_echo "$OTOOL" >&6; }
22166else
22167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22168$as_echo "no" >&6; }
22169fi
22170
22171
22172  test -n "$OTOOL" && break
22173done
22174
22175    else
22176      # If it succeeded, then it was overridden by the user. We will use it
22177      # for the tool.
22178
22179      # First remove it from the list of overridden variables, so we can test
22180      # for unknown variables in the end.
22181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22182
22183      # Check if we try to supply an empty value
22184      if test "x$OTOOL" = x; then
22185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22186$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22188$as_echo_n "checking for OTOOL... " >&6; }
22189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22190$as_echo "disabled" >&6; }
22191      else
22192        # Check if the provided tool contains a complete path.
22193        tool_specified="$OTOOL"
22194        tool_basename="${tool_specified##*/}"
22195        if test "x$tool_basename" = "x$tool_specified"; then
22196          # A command without a complete path is provided, search $PATH.
22197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22198$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22199          # Extract the first word of "$tool_basename", so it can be a program name with args.
22200set dummy $tool_basename; ac_word=$2
22201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22202$as_echo_n "checking for $ac_word... " >&6; }
22203if ${ac_cv_path_OTOOL+:} false; then :
22204  $as_echo_n "(cached) " >&6
22205else
22206  case $OTOOL in
22207  [\\/]* | ?:[\\/]*)
22208  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22209  ;;
22210  *)
22211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22212for as_dir in $PATH
22213do
22214  IFS=$as_save_IFS
22215  test -z "$as_dir" && as_dir=.
22216    for ac_exec_ext in '' $ac_executable_extensions; do
22217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22218    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22220    break 2
22221  fi
22222done
22223  done
22224IFS=$as_save_IFS
22225
22226  ;;
22227esac
22228fi
22229OTOOL=$ac_cv_path_OTOOL
22230if test -n "$OTOOL"; then
22231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22232$as_echo "$OTOOL" >&6; }
22233else
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22235$as_echo "no" >&6; }
22236fi
22237
22238
22239          if test "x$OTOOL" = x; then
22240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22241          fi
22242        else
22243          # Otherwise we believe it is a complete path. Use it as it is.
22244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22245$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22247$as_echo_n "checking for OTOOL... " >&6; }
22248          if test ! -x "$tool_specified"; then
22249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22250$as_echo "not found" >&6; }
22251            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22252          fi
22253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22254$as_echo "$tool_specified" >&6; }
22255        fi
22256      fi
22257    fi
22258
22259  fi
22260
22261
22262  if test "x$OTOOL" = "x"; then
22263    OTOOL="true"
22264  fi
22265
22266
22267  # Publish this variable in the help.
22268
22269
22270  if [ -z "${READELF+x}" ]; then
22271    # The variable is not set by user, try to locate tool using the code snippet
22272    for ac_prog in greadelf readelf
22273do
22274  # Extract the first word of "$ac_prog", so it can be a program name with args.
22275set dummy $ac_prog; ac_word=$2
22276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22277$as_echo_n "checking for $ac_word... " >&6; }
22278if ${ac_cv_path_READELF+:} false; then :
22279  $as_echo_n "(cached) " >&6
22280else
22281  case $READELF in
22282  [\\/]* | ?:[\\/]*)
22283  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22284  ;;
22285  *)
22286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22287for as_dir in $PATH
22288do
22289  IFS=$as_save_IFS
22290  test -z "$as_dir" && as_dir=.
22291    for ac_exec_ext in '' $ac_executable_extensions; do
22292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22293    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22295    break 2
22296  fi
22297done
22298  done
22299IFS=$as_save_IFS
22300
22301  ;;
22302esac
22303fi
22304READELF=$ac_cv_path_READELF
22305if test -n "$READELF"; then
22306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22307$as_echo "$READELF" >&6; }
22308else
22309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22310$as_echo "no" >&6; }
22311fi
22312
22313
22314  test -n "$READELF" && break
22315done
22316
22317  else
22318    # The variable is set, but is it from the command line or the environment?
22319
22320    # Try to remove the string !READELF! from our list.
22321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22323      # If it failed, the variable was not from the command line. Ignore it,
22324      # but warn the user (except for BASH, which is always set by the calling BASH).
22325      if test "xREADELF" != xBASH; then
22326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22327$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22328      fi
22329      # Try to locate tool using the code snippet
22330      for ac_prog in greadelf readelf
22331do
22332  # Extract the first word of "$ac_prog", so it can be a program name with args.
22333set dummy $ac_prog; ac_word=$2
22334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22335$as_echo_n "checking for $ac_word... " >&6; }
22336if ${ac_cv_path_READELF+:} false; then :
22337  $as_echo_n "(cached) " >&6
22338else
22339  case $READELF in
22340  [\\/]* | ?:[\\/]*)
22341  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22342  ;;
22343  *)
22344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22345for as_dir in $PATH
22346do
22347  IFS=$as_save_IFS
22348  test -z "$as_dir" && as_dir=.
22349    for ac_exec_ext in '' $ac_executable_extensions; do
22350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22351    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22353    break 2
22354  fi
22355done
22356  done
22357IFS=$as_save_IFS
22358
22359  ;;
22360esac
22361fi
22362READELF=$ac_cv_path_READELF
22363if test -n "$READELF"; then
22364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22365$as_echo "$READELF" >&6; }
22366else
22367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22368$as_echo "no" >&6; }
22369fi
22370
22371
22372  test -n "$READELF" && break
22373done
22374
22375    else
22376      # If it succeeded, then it was overridden by the user. We will use it
22377      # for the tool.
22378
22379      # First remove it from the list of overridden variables, so we can test
22380      # for unknown variables in the end.
22381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22382
22383      # Check if we try to supply an empty value
22384      if test "x$READELF" = x; then
22385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22386$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22388$as_echo_n "checking for READELF... " >&6; }
22389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22390$as_echo "disabled" >&6; }
22391      else
22392        # Check if the provided tool contains a complete path.
22393        tool_specified="$READELF"
22394        tool_basename="${tool_specified##*/}"
22395        if test "x$tool_basename" = "x$tool_specified"; then
22396          # A command without a complete path is provided, search $PATH.
22397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22398$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22399          # Extract the first word of "$tool_basename", so it can be a program name with args.
22400set dummy $tool_basename; ac_word=$2
22401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22402$as_echo_n "checking for $ac_word... " >&6; }
22403if ${ac_cv_path_READELF+:} false; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  case $READELF in
22407  [\\/]* | ?:[\\/]*)
22408  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22409  ;;
22410  *)
22411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22412for as_dir in $PATH
22413do
22414  IFS=$as_save_IFS
22415  test -z "$as_dir" && as_dir=.
22416    for ac_exec_ext in '' $ac_executable_extensions; do
22417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22418    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420    break 2
22421  fi
22422done
22423  done
22424IFS=$as_save_IFS
22425
22426  ;;
22427esac
22428fi
22429READELF=$ac_cv_path_READELF
22430if test -n "$READELF"; then
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22432$as_echo "$READELF" >&6; }
22433else
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22435$as_echo "no" >&6; }
22436fi
22437
22438
22439          if test "x$READELF" = x; then
22440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22441          fi
22442        else
22443          # Otherwise we believe it is a complete path. Use it as it is.
22444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22445$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22447$as_echo_n "checking for READELF... " >&6; }
22448          if test ! -x "$tool_specified"; then
22449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22450$as_echo "not found" >&6; }
22451            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22452          fi
22453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22454$as_echo "$tool_specified" >&6; }
22455        fi
22456      fi
22457    fi
22458
22459  fi
22460
22461
22462
22463
22464  # Publish this variable in the help.
22465
22466
22467  if [ -z "${DOT+x}" ]; then
22468    # The variable is not set by user, try to locate tool using the code snippet
22469    for ac_prog in dot
22470do
22471  # Extract the first word of "$ac_prog", so it can be a program name with args.
22472set dummy $ac_prog; ac_word=$2
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22474$as_echo_n "checking for $ac_word... " >&6; }
22475if ${ac_cv_path_DOT+:} false; then :
22476  $as_echo_n "(cached) " >&6
22477else
22478  case $DOT in
22479  [\\/]* | ?:[\\/]*)
22480  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22481  ;;
22482  *)
22483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22484for as_dir in $PATH
22485do
22486  IFS=$as_save_IFS
22487  test -z "$as_dir" && as_dir=.
22488    for ac_exec_ext in '' $ac_executable_extensions; do
22489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22490    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22492    break 2
22493  fi
22494done
22495  done
22496IFS=$as_save_IFS
22497
22498  ;;
22499esac
22500fi
22501DOT=$ac_cv_path_DOT
22502if test -n "$DOT"; then
22503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22504$as_echo "$DOT" >&6; }
22505else
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507$as_echo "no" >&6; }
22508fi
22509
22510
22511  test -n "$DOT" && break
22512done
22513
22514  else
22515    # The variable is set, but is it from the command line or the environment?
22516
22517    # Try to remove the string !DOT! from our list.
22518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22520      # If it failed, the variable was not from the command line. Ignore it,
22521      # but warn the user (except for BASH, which is always set by the calling BASH).
22522      if test "xDOT" != xBASH; then
22523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22524$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22525      fi
22526      # Try to locate tool using the code snippet
22527      for ac_prog in dot
22528do
22529  # Extract the first word of "$ac_prog", so it can be a program name with args.
22530set dummy $ac_prog; ac_word=$2
22531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22532$as_echo_n "checking for $ac_word... " >&6; }
22533if ${ac_cv_path_DOT+:} false; then :
22534  $as_echo_n "(cached) " >&6
22535else
22536  case $DOT in
22537  [\\/]* | ?:[\\/]*)
22538  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22539  ;;
22540  *)
22541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22542for as_dir in $PATH
22543do
22544  IFS=$as_save_IFS
22545  test -z "$as_dir" && as_dir=.
22546    for ac_exec_ext in '' $ac_executable_extensions; do
22547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22548    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22550    break 2
22551  fi
22552done
22553  done
22554IFS=$as_save_IFS
22555
22556  ;;
22557esac
22558fi
22559DOT=$ac_cv_path_DOT
22560if test -n "$DOT"; then
22561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22562$as_echo "$DOT" >&6; }
22563else
22564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22565$as_echo "no" >&6; }
22566fi
22567
22568
22569  test -n "$DOT" && break
22570done
22571
22572    else
22573      # If it succeeded, then it was overridden by the user. We will use it
22574      # for the tool.
22575
22576      # First remove it from the list of overridden variables, so we can test
22577      # for unknown variables in the end.
22578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22579
22580      # Check if we try to supply an empty value
22581      if test "x$DOT" = x; then
22582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22583$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22585$as_echo_n "checking for DOT... " >&6; }
22586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22587$as_echo "disabled" >&6; }
22588      else
22589        # Check if the provided tool contains a complete path.
22590        tool_specified="$DOT"
22591        tool_basename="${tool_specified##*/}"
22592        if test "x$tool_basename" = "x$tool_specified"; then
22593          # A command without a complete path is provided, search $PATH.
22594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22595$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22596          # Extract the first word of "$tool_basename", so it can be a program name with args.
22597set dummy $tool_basename; ac_word=$2
22598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22599$as_echo_n "checking for $ac_word... " >&6; }
22600if ${ac_cv_path_DOT+:} false; then :
22601  $as_echo_n "(cached) " >&6
22602else
22603  case $DOT in
22604  [\\/]* | ?:[\\/]*)
22605  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22606  ;;
22607  *)
22608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613    for ac_exec_ext in '' $ac_executable_extensions; do
22614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22615    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620  done
22621IFS=$as_save_IFS
22622
22623  ;;
22624esac
22625fi
22626DOT=$ac_cv_path_DOT
22627if test -n "$DOT"; then
22628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22629$as_echo "$DOT" >&6; }
22630else
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22632$as_echo "no" >&6; }
22633fi
22634
22635
22636          if test "x$DOT" = x; then
22637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22638          fi
22639        else
22640          # Otherwise we believe it is a complete path. Use it as it is.
22641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22642$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22644$as_echo_n "checking for DOT... " >&6; }
22645          if test ! -x "$tool_specified"; then
22646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22647$as_echo "not found" >&6; }
22648            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22649          fi
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22651$as_echo "$tool_specified" >&6; }
22652        fi
22653      fi
22654    fi
22655
22656  fi
22657
22658
22659
22660
22661  # Publish this variable in the help.
22662
22663
22664  if [ -z "${HG+x}" ]; then
22665    # The variable is not set by user, try to locate tool using the code snippet
22666    for ac_prog in hg
22667do
22668  # Extract the first word of "$ac_prog", so it can be a program name with args.
22669set dummy $ac_prog; ac_word=$2
22670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22671$as_echo_n "checking for $ac_word... " >&6; }
22672if ${ac_cv_path_HG+:} false; then :
22673  $as_echo_n "(cached) " >&6
22674else
22675  case $HG in
22676  [\\/]* | ?:[\\/]*)
22677  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22678  ;;
22679  *)
22680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22681for as_dir in $PATH
22682do
22683  IFS=$as_save_IFS
22684  test -z "$as_dir" && as_dir=.
22685    for ac_exec_ext in '' $ac_executable_extensions; do
22686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22687    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22689    break 2
22690  fi
22691done
22692  done
22693IFS=$as_save_IFS
22694
22695  ;;
22696esac
22697fi
22698HG=$ac_cv_path_HG
22699if test -n "$HG"; then
22700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22701$as_echo "$HG" >&6; }
22702else
22703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22704$as_echo "no" >&6; }
22705fi
22706
22707
22708  test -n "$HG" && break
22709done
22710
22711  else
22712    # The variable is set, but is it from the command line or the environment?
22713
22714    # Try to remove the string !HG! from our list.
22715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22717      # If it failed, the variable was not from the command line. Ignore it,
22718      # but warn the user (except for BASH, which is always set by the calling BASH).
22719      if test "xHG" != xBASH; then
22720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22721$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22722      fi
22723      # Try to locate tool using the code snippet
22724      for ac_prog in hg
22725do
22726  # Extract the first word of "$ac_prog", so it can be a program name with args.
22727set dummy $ac_prog; ac_word=$2
22728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22729$as_echo_n "checking for $ac_word... " >&6; }
22730if ${ac_cv_path_HG+:} false; then :
22731  $as_echo_n "(cached) " >&6
22732else
22733  case $HG in
22734  [\\/]* | ?:[\\/]*)
22735  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22736  ;;
22737  *)
22738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22739for as_dir in $PATH
22740do
22741  IFS=$as_save_IFS
22742  test -z "$as_dir" && as_dir=.
22743    for ac_exec_ext in '' $ac_executable_extensions; do
22744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22745    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22747    break 2
22748  fi
22749done
22750  done
22751IFS=$as_save_IFS
22752
22753  ;;
22754esac
22755fi
22756HG=$ac_cv_path_HG
22757if test -n "$HG"; then
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22759$as_echo "$HG" >&6; }
22760else
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22762$as_echo "no" >&6; }
22763fi
22764
22765
22766  test -n "$HG" && break
22767done
22768
22769    else
22770      # If it succeeded, then it was overridden by the user. We will use it
22771      # for the tool.
22772
22773      # First remove it from the list of overridden variables, so we can test
22774      # for unknown variables in the end.
22775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22776
22777      # Check if we try to supply an empty value
22778      if test "x$HG" = x; then
22779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22780$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22782$as_echo_n "checking for HG... " >&6; }
22783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22784$as_echo "disabled" >&6; }
22785      else
22786        # Check if the provided tool contains a complete path.
22787        tool_specified="$HG"
22788        tool_basename="${tool_specified##*/}"
22789        if test "x$tool_basename" = "x$tool_specified"; then
22790          # A command without a complete path is provided, search $PATH.
22791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22792$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22793          # Extract the first word of "$tool_basename", so it can be a program name with args.
22794set dummy $tool_basename; ac_word=$2
22795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22796$as_echo_n "checking for $ac_word... " >&6; }
22797if ${ac_cv_path_HG+:} false; then :
22798  $as_echo_n "(cached) " >&6
22799else
22800  case $HG in
22801  [\\/]* | ?:[\\/]*)
22802  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22803  ;;
22804  *)
22805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22806for as_dir in $PATH
22807do
22808  IFS=$as_save_IFS
22809  test -z "$as_dir" && as_dir=.
22810    for ac_exec_ext in '' $ac_executable_extensions; do
22811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22812    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22814    break 2
22815  fi
22816done
22817  done
22818IFS=$as_save_IFS
22819
22820  ;;
22821esac
22822fi
22823HG=$ac_cv_path_HG
22824if test -n "$HG"; then
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22826$as_echo "$HG" >&6; }
22827else
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22829$as_echo "no" >&6; }
22830fi
22831
22832
22833          if test "x$HG" = x; then
22834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22835          fi
22836        else
22837          # Otherwise we believe it is a complete path. Use it as it is.
22838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22839$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22841$as_echo_n "checking for HG... " >&6; }
22842          if test ! -x "$tool_specified"; then
22843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22844$as_echo "not found" >&6; }
22845            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22846          fi
22847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22848$as_echo "$tool_specified" >&6; }
22849        fi
22850      fi
22851    fi
22852
22853  fi
22854
22855
22856
22857
22858  # Publish this variable in the help.
22859
22860
22861  if [ -z "${STAT+x}" ]; then
22862    # The variable is not set by user, try to locate tool using the code snippet
22863    for ac_prog in stat
22864do
22865  # Extract the first word of "$ac_prog", so it can be a program name with args.
22866set dummy $ac_prog; ac_word=$2
22867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22868$as_echo_n "checking for $ac_word... " >&6; }
22869if ${ac_cv_path_STAT+:} false; then :
22870  $as_echo_n "(cached) " >&6
22871else
22872  case $STAT in
22873  [\\/]* | ?:[\\/]*)
22874  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22875  ;;
22876  *)
22877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22878for as_dir in $PATH
22879do
22880  IFS=$as_save_IFS
22881  test -z "$as_dir" && as_dir=.
22882    for ac_exec_ext in '' $ac_executable_extensions; do
22883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22884    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22886    break 2
22887  fi
22888done
22889  done
22890IFS=$as_save_IFS
22891
22892  ;;
22893esac
22894fi
22895STAT=$ac_cv_path_STAT
22896if test -n "$STAT"; then
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22898$as_echo "$STAT" >&6; }
22899else
22900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22901$as_echo "no" >&6; }
22902fi
22903
22904
22905  test -n "$STAT" && break
22906done
22907
22908  else
22909    # The variable is set, but is it from the command line or the environment?
22910
22911    # Try to remove the string !STAT! from our list.
22912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22914      # If it failed, the variable was not from the command line. Ignore it,
22915      # but warn the user (except for BASH, which is always set by the calling BASH).
22916      if test "xSTAT" != xBASH; then
22917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22918$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22919      fi
22920      # Try to locate tool using the code snippet
22921      for ac_prog in stat
22922do
22923  # Extract the first word of "$ac_prog", so it can be a program name with args.
22924set dummy $ac_prog; ac_word=$2
22925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22926$as_echo_n "checking for $ac_word... " >&6; }
22927if ${ac_cv_path_STAT+:} false; then :
22928  $as_echo_n "(cached) " >&6
22929else
22930  case $STAT in
22931  [\\/]* | ?:[\\/]*)
22932  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22933  ;;
22934  *)
22935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22936for as_dir in $PATH
22937do
22938  IFS=$as_save_IFS
22939  test -z "$as_dir" && as_dir=.
22940    for ac_exec_ext in '' $ac_executable_extensions; do
22941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22942    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22944    break 2
22945  fi
22946done
22947  done
22948IFS=$as_save_IFS
22949
22950  ;;
22951esac
22952fi
22953STAT=$ac_cv_path_STAT
22954if test -n "$STAT"; then
22955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22956$as_echo "$STAT" >&6; }
22957else
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22959$as_echo "no" >&6; }
22960fi
22961
22962
22963  test -n "$STAT" && break
22964done
22965
22966    else
22967      # If it succeeded, then it was overridden by the user. We will use it
22968      # for the tool.
22969
22970      # First remove it from the list of overridden variables, so we can test
22971      # for unknown variables in the end.
22972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22973
22974      # Check if we try to supply an empty value
22975      if test "x$STAT" = x; then
22976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22977$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22979$as_echo_n "checking for STAT... " >&6; }
22980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22981$as_echo "disabled" >&6; }
22982      else
22983        # Check if the provided tool contains a complete path.
22984        tool_specified="$STAT"
22985        tool_basename="${tool_specified##*/}"
22986        if test "x$tool_basename" = "x$tool_specified"; then
22987          # A command without a complete path is provided, search $PATH.
22988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22989$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22990          # Extract the first word of "$tool_basename", so it can be a program name with args.
22991set dummy $tool_basename; ac_word=$2
22992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22993$as_echo_n "checking for $ac_word... " >&6; }
22994if ${ac_cv_path_STAT+:} false; then :
22995  $as_echo_n "(cached) " >&6
22996else
22997  case $STAT in
22998  [\\/]* | ?:[\\/]*)
22999  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23000  ;;
23001  *)
23002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23003for as_dir in $PATH
23004do
23005  IFS=$as_save_IFS
23006  test -z "$as_dir" && as_dir=.
23007    for ac_exec_ext in '' $ac_executable_extensions; do
23008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23009    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23011    break 2
23012  fi
23013done
23014  done
23015IFS=$as_save_IFS
23016
23017  ;;
23018esac
23019fi
23020STAT=$ac_cv_path_STAT
23021if test -n "$STAT"; then
23022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23023$as_echo "$STAT" >&6; }
23024else
23025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23026$as_echo "no" >&6; }
23027fi
23028
23029
23030          if test "x$STAT" = x; then
23031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23032          fi
23033        else
23034          # Otherwise we believe it is a complete path. Use it as it is.
23035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23036$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23038$as_echo_n "checking for STAT... " >&6; }
23039          if test ! -x "$tool_specified"; then
23040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23041$as_echo "not found" >&6; }
23042            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23043          fi
23044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23045$as_echo "$tool_specified" >&6; }
23046        fi
23047      fi
23048    fi
23049
23050  fi
23051
23052
23053
23054
23055  # Publish this variable in the help.
23056
23057
23058  if [ -z "${TIME+x}" ]; then
23059    # The variable is not set by user, try to locate tool using the code snippet
23060    for ac_prog in time
23061do
23062  # Extract the first word of "$ac_prog", so it can be a program name with args.
23063set dummy $ac_prog; ac_word=$2
23064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23065$as_echo_n "checking for $ac_word... " >&6; }
23066if ${ac_cv_path_TIME+:} false; then :
23067  $as_echo_n "(cached) " >&6
23068else
23069  case $TIME in
23070  [\\/]* | ?:[\\/]*)
23071  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23072  ;;
23073  *)
23074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23075for as_dir in $PATH
23076do
23077  IFS=$as_save_IFS
23078  test -z "$as_dir" && as_dir=.
23079    for ac_exec_ext in '' $ac_executable_extensions; do
23080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23081    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23083    break 2
23084  fi
23085done
23086  done
23087IFS=$as_save_IFS
23088
23089  ;;
23090esac
23091fi
23092TIME=$ac_cv_path_TIME
23093if test -n "$TIME"; then
23094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23095$as_echo "$TIME" >&6; }
23096else
23097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23098$as_echo "no" >&6; }
23099fi
23100
23101
23102  test -n "$TIME" && break
23103done
23104
23105  else
23106    # The variable is set, but is it from the command line or the environment?
23107
23108    # Try to remove the string !TIME! from our list.
23109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23111      # If it failed, the variable was not from the command line. Ignore it,
23112      # but warn the user (except for BASH, which is always set by the calling BASH).
23113      if test "xTIME" != xBASH; then
23114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23115$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23116      fi
23117      # Try to locate tool using the code snippet
23118      for ac_prog in time
23119do
23120  # Extract the first word of "$ac_prog", so it can be a program name with args.
23121set dummy $ac_prog; ac_word=$2
23122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23123$as_echo_n "checking for $ac_word... " >&6; }
23124if ${ac_cv_path_TIME+:} false; then :
23125  $as_echo_n "(cached) " >&6
23126else
23127  case $TIME in
23128  [\\/]* | ?:[\\/]*)
23129  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23130  ;;
23131  *)
23132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23133for as_dir in $PATH
23134do
23135  IFS=$as_save_IFS
23136  test -z "$as_dir" && as_dir=.
23137    for ac_exec_ext in '' $ac_executable_extensions; do
23138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23139    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23141    break 2
23142  fi
23143done
23144  done
23145IFS=$as_save_IFS
23146
23147  ;;
23148esac
23149fi
23150TIME=$ac_cv_path_TIME
23151if test -n "$TIME"; then
23152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23153$as_echo "$TIME" >&6; }
23154else
23155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23156$as_echo "no" >&6; }
23157fi
23158
23159
23160  test -n "$TIME" && break
23161done
23162
23163    else
23164      # If it succeeded, then it was overridden by the user. We will use it
23165      # for the tool.
23166
23167      # First remove it from the list of overridden variables, so we can test
23168      # for unknown variables in the end.
23169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23170
23171      # Check if we try to supply an empty value
23172      if test "x$TIME" = x; then
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23174$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23176$as_echo_n "checking for TIME... " >&6; }
23177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23178$as_echo "disabled" >&6; }
23179      else
23180        # Check if the provided tool contains a complete path.
23181        tool_specified="$TIME"
23182        tool_basename="${tool_specified##*/}"
23183        if test "x$tool_basename" = "x$tool_specified"; then
23184          # A command without a complete path is provided, search $PATH.
23185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23186$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23187          # Extract the first word of "$tool_basename", so it can be a program name with args.
23188set dummy $tool_basename; ac_word=$2
23189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23190$as_echo_n "checking for $ac_word... " >&6; }
23191if ${ac_cv_path_TIME+:} false; then :
23192  $as_echo_n "(cached) " >&6
23193else
23194  case $TIME in
23195  [\\/]* | ?:[\\/]*)
23196  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23197  ;;
23198  *)
23199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23200for as_dir in $PATH
23201do
23202  IFS=$as_save_IFS
23203  test -z "$as_dir" && as_dir=.
23204    for ac_exec_ext in '' $ac_executable_extensions; do
23205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23206    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23208    break 2
23209  fi
23210done
23211  done
23212IFS=$as_save_IFS
23213
23214  ;;
23215esac
23216fi
23217TIME=$ac_cv_path_TIME
23218if test -n "$TIME"; then
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23220$as_echo "$TIME" >&6; }
23221else
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23223$as_echo "no" >&6; }
23224fi
23225
23226
23227          if test "x$TIME" = x; then
23228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23229          fi
23230        else
23231          # Otherwise we believe it is a complete path. Use it as it is.
23232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23233$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23235$as_echo_n "checking for TIME... " >&6; }
23236          if test ! -x "$tool_specified"; then
23237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23238$as_echo "not found" >&6; }
23239            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23240          fi
23241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23242$as_echo "$tool_specified" >&6; }
23243        fi
23244      fi
23245    fi
23246
23247  fi
23248
23249
23250  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23251  # be in the user path.
23252
23253
23254  # Publish this variable in the help.
23255
23256
23257  if [ -z "${DTRACE+x}" ]; then
23258    # The variable is not set by user, try to locate tool using the code snippet
23259    for ac_prog in dtrace
23260do
23261  # Extract the first word of "$ac_prog", so it can be a program name with args.
23262set dummy $ac_prog; ac_word=$2
23263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23264$as_echo_n "checking for $ac_word... " >&6; }
23265if ${ac_cv_path_DTRACE+:} false; then :
23266  $as_echo_n "(cached) " >&6
23267else
23268  case $DTRACE in
23269  [\\/]* | ?:[\\/]*)
23270  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23271  ;;
23272  *)
23273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23274as_dummy="$PATH:/usr/sbin"
23275for as_dir in $as_dummy
23276do
23277  IFS=$as_save_IFS
23278  test -z "$as_dir" && as_dir=.
23279    for ac_exec_ext in '' $ac_executable_extensions; do
23280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23281    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23283    break 2
23284  fi
23285done
23286  done
23287IFS=$as_save_IFS
23288
23289  ;;
23290esac
23291fi
23292DTRACE=$ac_cv_path_DTRACE
23293if test -n "$DTRACE"; then
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23295$as_echo "$DTRACE" >&6; }
23296else
23297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23298$as_echo "no" >&6; }
23299fi
23300
23301
23302  test -n "$DTRACE" && break
23303done
23304
23305  else
23306    # The variable is set, but is it from the command line or the environment?
23307
23308    # Try to remove the string !DTRACE! from our list.
23309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23311      # If it failed, the variable was not from the command line. Ignore it,
23312      # but warn the user (except for BASH, which is always set by the calling BASH).
23313      if test "xDTRACE" != xBASH; then
23314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23315$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23316      fi
23317      # Try to locate tool using the code snippet
23318      for ac_prog in dtrace
23319do
23320  # Extract the first word of "$ac_prog", so it can be a program name with args.
23321set dummy $ac_prog; ac_word=$2
23322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23323$as_echo_n "checking for $ac_word... " >&6; }
23324if ${ac_cv_path_DTRACE+:} false; then :
23325  $as_echo_n "(cached) " >&6
23326else
23327  case $DTRACE in
23328  [\\/]* | ?:[\\/]*)
23329  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23330  ;;
23331  *)
23332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23333as_dummy="$PATH:/usr/sbin"
23334for as_dir in $as_dummy
23335do
23336  IFS=$as_save_IFS
23337  test -z "$as_dir" && as_dir=.
23338    for ac_exec_ext in '' $ac_executable_extensions; do
23339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23340    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23342    break 2
23343  fi
23344done
23345  done
23346IFS=$as_save_IFS
23347
23348  ;;
23349esac
23350fi
23351DTRACE=$ac_cv_path_DTRACE
23352if test -n "$DTRACE"; then
23353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23354$as_echo "$DTRACE" >&6; }
23355else
23356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23357$as_echo "no" >&6; }
23358fi
23359
23360
23361  test -n "$DTRACE" && break
23362done
23363
23364    else
23365      # If it succeeded, then it was overridden by the user. We will use it
23366      # for the tool.
23367
23368      # First remove it from the list of overridden variables, so we can test
23369      # for unknown variables in the end.
23370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23371
23372      # Check if we try to supply an empty value
23373      if test "x$DTRACE" = x; then
23374        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23375$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23376        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23377$as_echo_n "checking for DTRACE... " >&6; }
23378        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23379$as_echo "disabled" >&6; }
23380      else
23381        # Check if the provided tool contains a complete path.
23382        tool_specified="$DTRACE"
23383        tool_basename="${tool_specified##*/}"
23384        if test "x$tool_basename" = "x$tool_specified"; then
23385          # A command without a complete path is provided, search $PATH.
23386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23387$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23388          # Extract the first word of "$tool_basename", so it can be a program name with args.
23389set dummy $tool_basename; ac_word=$2
23390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23391$as_echo_n "checking for $ac_word... " >&6; }
23392if ${ac_cv_path_DTRACE+:} false; then :
23393  $as_echo_n "(cached) " >&6
23394else
23395  case $DTRACE in
23396  [\\/]* | ?:[\\/]*)
23397  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23398  ;;
23399  *)
23400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23401for as_dir in $PATH
23402do
23403  IFS=$as_save_IFS
23404  test -z "$as_dir" && as_dir=.
23405    for ac_exec_ext in '' $ac_executable_extensions; do
23406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23407    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23409    break 2
23410  fi
23411done
23412  done
23413IFS=$as_save_IFS
23414
23415  ;;
23416esac
23417fi
23418DTRACE=$ac_cv_path_DTRACE
23419if test -n "$DTRACE"; then
23420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23421$as_echo "$DTRACE" >&6; }
23422else
23423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23424$as_echo "no" >&6; }
23425fi
23426
23427
23428          if test "x$DTRACE" = x; then
23429            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23430          fi
23431        else
23432          # Otherwise we believe it is a complete path. Use it as it is.
23433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23434$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23435          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23436$as_echo_n "checking for DTRACE... " >&6; }
23437          if test ! -x "$tool_specified"; then
23438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23439$as_echo "not found" >&6; }
23440            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23441          fi
23442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23443$as_echo "$tool_specified" >&6; }
23444        fi
23445      fi
23446    fi
23447
23448  fi
23449
23450
23451
23452
23453  # Publish this variable in the help.
23454
23455
23456  if [ -z "${PATCH+x}" ]; then
23457    # The variable is not set by user, try to locate tool using the code snippet
23458    for ac_prog in gpatch patch
23459do
23460  # Extract the first word of "$ac_prog", so it can be a program name with args.
23461set dummy $ac_prog; ac_word=$2
23462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23463$as_echo_n "checking for $ac_word... " >&6; }
23464if ${ac_cv_path_PATCH+:} false; then :
23465  $as_echo_n "(cached) " >&6
23466else
23467  case $PATCH in
23468  [\\/]* | ?:[\\/]*)
23469  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23470  ;;
23471  *)
23472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23473for as_dir in $PATH
23474do
23475  IFS=$as_save_IFS
23476  test -z "$as_dir" && as_dir=.
23477    for ac_exec_ext in '' $ac_executable_extensions; do
23478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23479    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23481    break 2
23482  fi
23483done
23484  done
23485IFS=$as_save_IFS
23486
23487  ;;
23488esac
23489fi
23490PATCH=$ac_cv_path_PATCH
23491if test -n "$PATCH"; then
23492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23493$as_echo "$PATCH" >&6; }
23494else
23495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23496$as_echo "no" >&6; }
23497fi
23498
23499
23500  test -n "$PATCH" && break
23501done
23502
23503  else
23504    # The variable is set, but is it from the command line or the environment?
23505
23506    # Try to remove the string !PATCH! from our list.
23507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23509      # If it failed, the variable was not from the command line. Ignore it,
23510      # but warn the user (except for BASH, which is always set by the calling BASH).
23511      if test "xPATCH" != xBASH; then
23512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23513$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23514      fi
23515      # Try to locate tool using the code snippet
23516      for ac_prog in gpatch patch
23517do
23518  # Extract the first word of "$ac_prog", so it can be a program name with args.
23519set dummy $ac_prog; ac_word=$2
23520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23521$as_echo_n "checking for $ac_word... " >&6; }
23522if ${ac_cv_path_PATCH+:} false; then :
23523  $as_echo_n "(cached) " >&6
23524else
23525  case $PATCH in
23526  [\\/]* | ?:[\\/]*)
23527  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23528  ;;
23529  *)
23530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23531for as_dir in $PATH
23532do
23533  IFS=$as_save_IFS
23534  test -z "$as_dir" && as_dir=.
23535    for ac_exec_ext in '' $ac_executable_extensions; do
23536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23537    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23539    break 2
23540  fi
23541done
23542  done
23543IFS=$as_save_IFS
23544
23545  ;;
23546esac
23547fi
23548PATCH=$ac_cv_path_PATCH
23549if test -n "$PATCH"; then
23550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23551$as_echo "$PATCH" >&6; }
23552else
23553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23554$as_echo "no" >&6; }
23555fi
23556
23557
23558  test -n "$PATCH" && break
23559done
23560
23561    else
23562      # If it succeeded, then it was overridden by the user. We will use it
23563      # for the tool.
23564
23565      # First remove it from the list of overridden variables, so we can test
23566      # for unknown variables in the end.
23567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23568
23569      # Check if we try to supply an empty value
23570      if test "x$PATCH" = x; then
23571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23572$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23574$as_echo_n "checking for PATCH... " >&6; }
23575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23576$as_echo "disabled" >&6; }
23577      else
23578        # Check if the provided tool contains a complete path.
23579        tool_specified="$PATCH"
23580        tool_basename="${tool_specified##*/}"
23581        if test "x$tool_basename" = "x$tool_specified"; then
23582          # A command without a complete path is provided, search $PATH.
23583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23584$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23585          # Extract the first word of "$tool_basename", so it can be a program name with args.
23586set dummy $tool_basename; ac_word=$2
23587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23588$as_echo_n "checking for $ac_word... " >&6; }
23589if ${ac_cv_path_PATCH+:} false; then :
23590  $as_echo_n "(cached) " >&6
23591else
23592  case $PATCH in
23593  [\\/]* | ?:[\\/]*)
23594  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23595  ;;
23596  *)
23597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23598for as_dir in $PATH
23599do
23600  IFS=$as_save_IFS
23601  test -z "$as_dir" && as_dir=.
23602    for ac_exec_ext in '' $ac_executable_extensions; do
23603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23604    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23606    break 2
23607  fi
23608done
23609  done
23610IFS=$as_save_IFS
23611
23612  ;;
23613esac
23614fi
23615PATCH=$ac_cv_path_PATCH
23616if test -n "$PATCH"; then
23617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23618$as_echo "$PATCH" >&6; }
23619else
23620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23621$as_echo "no" >&6; }
23622fi
23623
23624
23625          if test "x$PATCH" = x; then
23626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23627          fi
23628        else
23629          # Otherwise we believe it is a complete path. Use it as it is.
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23631$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23633$as_echo_n "checking for PATCH... " >&6; }
23634          if test ! -x "$tool_specified"; then
23635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23636$as_echo "not found" >&6; }
23637            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23638          fi
23639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23640$as_echo "$tool_specified" >&6; }
23641        fi
23642      fi
23643    fi
23644
23645  fi
23646
23647
23648  # Check if it's GNU time
23649  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23650  if test "x$IS_GNU_TIME" != x; then
23651    IS_GNU_TIME=yes
23652  else
23653    IS_GNU_TIME=no
23654  fi
23655
23656
23657  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23658
23659
23660
23661  # Publish this variable in the help.
23662
23663
23664  if [ -z "${DSYMUTIL+x}" ]; then
23665    # The variable is not set by user, try to locate tool using the code snippet
23666    for ac_prog in dsymutil
23667do
23668  # Extract the first word of "$ac_prog", so it can be a program name with args.
23669set dummy $ac_prog; ac_word=$2
23670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23671$as_echo_n "checking for $ac_word... " >&6; }
23672if ${ac_cv_path_DSYMUTIL+:} false; then :
23673  $as_echo_n "(cached) " >&6
23674else
23675  case $DSYMUTIL in
23676  [\\/]* | ?:[\\/]*)
23677  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23678  ;;
23679  *)
23680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23681for as_dir in $PATH
23682do
23683  IFS=$as_save_IFS
23684  test -z "$as_dir" && as_dir=.
23685    for ac_exec_ext in '' $ac_executable_extensions; do
23686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23687    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23689    break 2
23690  fi
23691done
23692  done
23693IFS=$as_save_IFS
23694
23695  ;;
23696esac
23697fi
23698DSYMUTIL=$ac_cv_path_DSYMUTIL
23699if test -n "$DSYMUTIL"; then
23700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23701$as_echo "$DSYMUTIL" >&6; }
23702else
23703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23704$as_echo "no" >&6; }
23705fi
23706
23707
23708  test -n "$DSYMUTIL" && break
23709done
23710
23711  else
23712    # The variable is set, but is it from the command line or the environment?
23713
23714    # Try to remove the string !DSYMUTIL! from our list.
23715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23717      # If it failed, the variable was not from the command line. Ignore it,
23718      # but warn the user (except for BASH, which is always set by the calling BASH).
23719      if test "xDSYMUTIL" != xBASH; then
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23721$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23722      fi
23723      # Try to locate tool using the code snippet
23724      for ac_prog in dsymutil
23725do
23726  # Extract the first word of "$ac_prog", so it can be a program name with args.
23727set dummy $ac_prog; ac_word=$2
23728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23729$as_echo_n "checking for $ac_word... " >&6; }
23730if ${ac_cv_path_DSYMUTIL+:} false; then :
23731  $as_echo_n "(cached) " >&6
23732else
23733  case $DSYMUTIL in
23734  [\\/]* | ?:[\\/]*)
23735  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23736  ;;
23737  *)
23738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23739for as_dir in $PATH
23740do
23741  IFS=$as_save_IFS
23742  test -z "$as_dir" && as_dir=.
23743    for ac_exec_ext in '' $ac_executable_extensions; do
23744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23745    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23747    break 2
23748  fi
23749done
23750  done
23751IFS=$as_save_IFS
23752
23753  ;;
23754esac
23755fi
23756DSYMUTIL=$ac_cv_path_DSYMUTIL
23757if test -n "$DSYMUTIL"; then
23758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23759$as_echo "$DSYMUTIL" >&6; }
23760else
23761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762$as_echo "no" >&6; }
23763fi
23764
23765
23766  test -n "$DSYMUTIL" && break
23767done
23768
23769    else
23770      # If it succeeded, then it was overridden by the user. We will use it
23771      # for the tool.
23772
23773      # First remove it from the list of overridden variables, so we can test
23774      # for unknown variables in the end.
23775      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23776
23777      # Check if we try to supply an empty value
23778      if test "x$DSYMUTIL" = x; then
23779        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23780$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23782$as_echo_n "checking for DSYMUTIL... " >&6; }
23783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23784$as_echo "disabled" >&6; }
23785      else
23786        # Check if the provided tool contains a complete path.
23787        tool_specified="$DSYMUTIL"
23788        tool_basename="${tool_specified##*/}"
23789        if test "x$tool_basename" = "x$tool_specified"; then
23790          # A command without a complete path is provided, search $PATH.
23791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23792$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23793          # Extract the first word of "$tool_basename", so it can be a program name with args.
23794set dummy $tool_basename; ac_word=$2
23795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23796$as_echo_n "checking for $ac_word... " >&6; }
23797if ${ac_cv_path_DSYMUTIL+:} false; then :
23798  $as_echo_n "(cached) " >&6
23799else
23800  case $DSYMUTIL in
23801  [\\/]* | ?:[\\/]*)
23802  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23803  ;;
23804  *)
23805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23806for as_dir in $PATH
23807do
23808  IFS=$as_save_IFS
23809  test -z "$as_dir" && as_dir=.
23810    for ac_exec_ext in '' $ac_executable_extensions; do
23811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23812    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23814    break 2
23815  fi
23816done
23817  done
23818IFS=$as_save_IFS
23819
23820  ;;
23821esac
23822fi
23823DSYMUTIL=$ac_cv_path_DSYMUTIL
23824if test -n "$DSYMUTIL"; then
23825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23826$as_echo "$DSYMUTIL" >&6; }
23827else
23828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23829$as_echo "no" >&6; }
23830fi
23831
23832
23833          if test "x$DSYMUTIL" = x; then
23834            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23835          fi
23836        else
23837          # Otherwise we believe it is a complete path. Use it as it is.
23838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23839$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23840          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23841$as_echo_n "checking for DSYMUTIL... " >&6; }
23842          if test ! -x "$tool_specified"; then
23843            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23844$as_echo "not found" >&6; }
23845            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23846          fi
23847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23848$as_echo "$tool_specified" >&6; }
23849        fi
23850      fi
23851    fi
23852
23853  fi
23854
23855
23856
23857  if test "x$DSYMUTIL" = x; then
23858    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23859  fi
23860
23861
23862
23863
23864
23865  # Publish this variable in the help.
23866
23867
23868  if [ -z "${XATTR+x}" ]; then
23869    # The variable is not set by user, try to locate tool using the code snippet
23870    for ac_prog in xattr
23871do
23872  # Extract the first word of "$ac_prog", so it can be a program name with args.
23873set dummy $ac_prog; ac_word=$2
23874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23875$as_echo_n "checking for $ac_word... " >&6; }
23876if ${ac_cv_path_XATTR+:} false; then :
23877  $as_echo_n "(cached) " >&6
23878else
23879  case $XATTR in
23880  [\\/]* | ?:[\\/]*)
23881  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23882  ;;
23883  *)
23884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23885for as_dir in $PATH
23886do
23887  IFS=$as_save_IFS
23888  test -z "$as_dir" && as_dir=.
23889    for ac_exec_ext in '' $ac_executable_extensions; do
23890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23891    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23893    break 2
23894  fi
23895done
23896  done
23897IFS=$as_save_IFS
23898
23899  ;;
23900esac
23901fi
23902XATTR=$ac_cv_path_XATTR
23903if test -n "$XATTR"; then
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23905$as_echo "$XATTR" >&6; }
23906else
23907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23908$as_echo "no" >&6; }
23909fi
23910
23911
23912  test -n "$XATTR" && break
23913done
23914
23915  else
23916    # The variable is set, but is it from the command line or the environment?
23917
23918    # Try to remove the string !XATTR! from our list.
23919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23921      # If it failed, the variable was not from the command line. Ignore it,
23922      # but warn the user (except for BASH, which is always set by the calling BASH).
23923      if test "xXATTR" != xBASH; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23925$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23926      fi
23927      # Try to locate tool using the code snippet
23928      for ac_prog in xattr
23929do
23930  # Extract the first word of "$ac_prog", so it can be a program name with args.
23931set dummy $ac_prog; ac_word=$2
23932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23933$as_echo_n "checking for $ac_word... " >&6; }
23934if ${ac_cv_path_XATTR+:} false; then :
23935  $as_echo_n "(cached) " >&6
23936else
23937  case $XATTR in
23938  [\\/]* | ?:[\\/]*)
23939  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23940  ;;
23941  *)
23942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23943for as_dir in $PATH
23944do
23945  IFS=$as_save_IFS
23946  test -z "$as_dir" && as_dir=.
23947    for ac_exec_ext in '' $ac_executable_extensions; do
23948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23949    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23951    break 2
23952  fi
23953done
23954  done
23955IFS=$as_save_IFS
23956
23957  ;;
23958esac
23959fi
23960XATTR=$ac_cv_path_XATTR
23961if test -n "$XATTR"; then
23962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23963$as_echo "$XATTR" >&6; }
23964else
23965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23966$as_echo "no" >&6; }
23967fi
23968
23969
23970  test -n "$XATTR" && break
23971done
23972
23973    else
23974      # If it succeeded, then it was overridden by the user. We will use it
23975      # for the tool.
23976
23977      # First remove it from the list of overridden variables, so we can test
23978      # for unknown variables in the end.
23979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23980
23981      # Check if we try to supply an empty value
23982      if test "x$XATTR" = x; then
23983        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23984$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23986$as_echo_n "checking for XATTR... " >&6; }
23987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23988$as_echo "disabled" >&6; }
23989      else
23990        # Check if the provided tool contains a complete path.
23991        tool_specified="$XATTR"
23992        tool_basename="${tool_specified##*/}"
23993        if test "x$tool_basename" = "x$tool_specified"; then
23994          # A command without a complete path is provided, search $PATH.
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23996$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23997          # Extract the first word of "$tool_basename", so it can be a program name with args.
23998set dummy $tool_basename; ac_word=$2
23999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24000$as_echo_n "checking for $ac_word... " >&6; }
24001if ${ac_cv_path_XATTR+:} false; then :
24002  $as_echo_n "(cached) " >&6
24003else
24004  case $XATTR in
24005  [\\/]* | ?:[\\/]*)
24006  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24007  ;;
24008  *)
24009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24010for as_dir in $PATH
24011do
24012  IFS=$as_save_IFS
24013  test -z "$as_dir" && as_dir=.
24014    for ac_exec_ext in '' $ac_executable_extensions; do
24015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24016    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24018    break 2
24019  fi
24020done
24021  done
24022IFS=$as_save_IFS
24023
24024  ;;
24025esac
24026fi
24027XATTR=$ac_cv_path_XATTR
24028if test -n "$XATTR"; then
24029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24030$as_echo "$XATTR" >&6; }
24031else
24032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24033$as_echo "no" >&6; }
24034fi
24035
24036
24037          if test "x$XATTR" = x; then
24038            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24039          fi
24040        else
24041          # Otherwise we believe it is a complete path. Use it as it is.
24042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24043$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24045$as_echo_n "checking for XATTR... " >&6; }
24046          if test ! -x "$tool_specified"; then
24047            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24048$as_echo "not found" >&6; }
24049            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24050          fi
24051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24052$as_echo "$tool_specified" >&6; }
24053        fi
24054      fi
24055    fi
24056
24057  fi
24058
24059
24060
24061  if test "x$XATTR" = x; then
24062    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24063  fi
24064
24065
24066
24067
24068  # Publish this variable in the help.
24069
24070
24071  if [ -z "${CODESIGN+x}" ]; then
24072    # The variable is not set by user, try to locate tool using the code snippet
24073    for ac_prog in codesign
24074do
24075  # Extract the first word of "$ac_prog", so it can be a program name with args.
24076set dummy $ac_prog; ac_word=$2
24077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24078$as_echo_n "checking for $ac_word... " >&6; }
24079if ${ac_cv_path_CODESIGN+:} false; then :
24080  $as_echo_n "(cached) " >&6
24081else
24082  case $CODESIGN in
24083  [\\/]* | ?:[\\/]*)
24084  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24085  ;;
24086  *)
24087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24088for as_dir in $PATH
24089do
24090  IFS=$as_save_IFS
24091  test -z "$as_dir" && as_dir=.
24092    for ac_exec_ext in '' $ac_executable_extensions; do
24093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24094    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24096    break 2
24097  fi
24098done
24099  done
24100IFS=$as_save_IFS
24101
24102  ;;
24103esac
24104fi
24105CODESIGN=$ac_cv_path_CODESIGN
24106if test -n "$CODESIGN"; then
24107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24108$as_echo "$CODESIGN" >&6; }
24109else
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24111$as_echo "no" >&6; }
24112fi
24113
24114
24115  test -n "$CODESIGN" && break
24116done
24117
24118  else
24119    # The variable is set, but is it from the command line or the environment?
24120
24121    # Try to remove the string !CODESIGN! from our list.
24122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24124      # If it failed, the variable was not from the command line. Ignore it,
24125      # but warn the user (except for BASH, which is always set by the calling BASH).
24126      if test "xCODESIGN" != xBASH; then
24127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24128$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24129      fi
24130      # Try to locate tool using the code snippet
24131      for ac_prog in codesign
24132do
24133  # Extract the first word of "$ac_prog", so it can be a program name with args.
24134set dummy $ac_prog; ac_word=$2
24135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24136$as_echo_n "checking for $ac_word... " >&6; }
24137if ${ac_cv_path_CODESIGN+:} false; then :
24138  $as_echo_n "(cached) " >&6
24139else
24140  case $CODESIGN in
24141  [\\/]* | ?:[\\/]*)
24142  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24143  ;;
24144  *)
24145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24146for as_dir in $PATH
24147do
24148  IFS=$as_save_IFS
24149  test -z "$as_dir" && as_dir=.
24150    for ac_exec_ext in '' $ac_executable_extensions; do
24151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24152    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24154    break 2
24155  fi
24156done
24157  done
24158IFS=$as_save_IFS
24159
24160  ;;
24161esac
24162fi
24163CODESIGN=$ac_cv_path_CODESIGN
24164if test -n "$CODESIGN"; then
24165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24166$as_echo "$CODESIGN" >&6; }
24167else
24168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24169$as_echo "no" >&6; }
24170fi
24171
24172
24173  test -n "$CODESIGN" && break
24174done
24175
24176    else
24177      # If it succeeded, then it was overridden by the user. We will use it
24178      # for the tool.
24179
24180      # First remove it from the list of overridden variables, so we can test
24181      # for unknown variables in the end.
24182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24183
24184      # Check if we try to supply an empty value
24185      if test "x$CODESIGN" = x; then
24186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24187$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24189$as_echo_n "checking for CODESIGN... " >&6; }
24190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24191$as_echo "disabled" >&6; }
24192      else
24193        # Check if the provided tool contains a complete path.
24194        tool_specified="$CODESIGN"
24195        tool_basename="${tool_specified##*/}"
24196        if test "x$tool_basename" = "x$tool_specified"; then
24197          # A command without a complete path is provided, search $PATH.
24198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24199$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24200          # Extract the first word of "$tool_basename", so it can be a program name with args.
24201set dummy $tool_basename; ac_word=$2
24202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24203$as_echo_n "checking for $ac_word... " >&6; }
24204if ${ac_cv_path_CODESIGN+:} false; then :
24205  $as_echo_n "(cached) " >&6
24206else
24207  case $CODESIGN in
24208  [\\/]* | ?:[\\/]*)
24209  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24210  ;;
24211  *)
24212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24213for as_dir in $PATH
24214do
24215  IFS=$as_save_IFS
24216  test -z "$as_dir" && as_dir=.
24217    for ac_exec_ext in '' $ac_executable_extensions; do
24218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24219    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24221    break 2
24222  fi
24223done
24224  done
24225IFS=$as_save_IFS
24226
24227  ;;
24228esac
24229fi
24230CODESIGN=$ac_cv_path_CODESIGN
24231if test -n "$CODESIGN"; then
24232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24233$as_echo "$CODESIGN" >&6; }
24234else
24235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24236$as_echo "no" >&6; }
24237fi
24238
24239
24240          if test "x$CODESIGN" = x; then
24241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24242          fi
24243        else
24244          # Otherwise we believe it is a complete path. Use it as it is.
24245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24246$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24248$as_echo_n "checking for CODESIGN... " >&6; }
24249          if test ! -x "$tool_specified"; then
24250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24251$as_echo "not found" >&6; }
24252            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24253          fi
24254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24255$as_echo "$tool_specified" >&6; }
24256        fi
24257      fi
24258    fi
24259
24260  fi
24261
24262
24263    if test "x$CODESIGN" != "x"; then
24264      # Verify that the openjdk_codesign certificate is present
24265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24266$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24267      $RM codesign-testfile
24268      $TOUCH codesign-testfile
24269      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24270      $RM codesign-testfile
24271      if test "x$CODESIGN" = x; then
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24273$as_echo "no" >&6; }
24274      else
24275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24276$as_echo "yes" >&6; }
24277      fi
24278    fi
24279
24280
24281
24282  # Publish this variable in the help.
24283
24284
24285  if [ -z "${SETFILE+x}" ]; then
24286    # The variable is not set by user, try to locate tool using the code snippet
24287    for ac_prog in SetFile
24288do
24289  # Extract the first word of "$ac_prog", so it can be a program name with args.
24290set dummy $ac_prog; ac_word=$2
24291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24292$as_echo_n "checking for $ac_word... " >&6; }
24293if ${ac_cv_path_SETFILE+:} false; then :
24294  $as_echo_n "(cached) " >&6
24295else
24296  case $SETFILE in
24297  [\\/]* | ?:[\\/]*)
24298  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24299  ;;
24300  *)
24301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24302for as_dir in $PATH
24303do
24304  IFS=$as_save_IFS
24305  test -z "$as_dir" && as_dir=.
24306    for ac_exec_ext in '' $ac_executable_extensions; do
24307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24308    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24310    break 2
24311  fi
24312done
24313  done
24314IFS=$as_save_IFS
24315
24316  ;;
24317esac
24318fi
24319SETFILE=$ac_cv_path_SETFILE
24320if test -n "$SETFILE"; then
24321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24322$as_echo "$SETFILE" >&6; }
24323else
24324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24325$as_echo "no" >&6; }
24326fi
24327
24328
24329  test -n "$SETFILE" && break
24330done
24331
24332  else
24333    # The variable is set, but is it from the command line or the environment?
24334
24335    # Try to remove the string !SETFILE! from our list.
24336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24338      # If it failed, the variable was not from the command line. Ignore it,
24339      # but warn the user (except for BASH, which is always set by the calling BASH).
24340      if test "xSETFILE" != xBASH; then
24341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24342$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24343      fi
24344      # Try to locate tool using the code snippet
24345      for ac_prog in SetFile
24346do
24347  # Extract the first word of "$ac_prog", so it can be a program name with args.
24348set dummy $ac_prog; ac_word=$2
24349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24350$as_echo_n "checking for $ac_word... " >&6; }
24351if ${ac_cv_path_SETFILE+:} false; then :
24352  $as_echo_n "(cached) " >&6
24353else
24354  case $SETFILE in
24355  [\\/]* | ?:[\\/]*)
24356  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24357  ;;
24358  *)
24359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24360for as_dir in $PATH
24361do
24362  IFS=$as_save_IFS
24363  test -z "$as_dir" && as_dir=.
24364    for ac_exec_ext in '' $ac_executable_extensions; do
24365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24366    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24368    break 2
24369  fi
24370done
24371  done
24372IFS=$as_save_IFS
24373
24374  ;;
24375esac
24376fi
24377SETFILE=$ac_cv_path_SETFILE
24378if test -n "$SETFILE"; then
24379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24380$as_echo "$SETFILE" >&6; }
24381else
24382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24383$as_echo "no" >&6; }
24384fi
24385
24386
24387  test -n "$SETFILE" && break
24388done
24389
24390    else
24391      # If it succeeded, then it was overridden by the user. We will use it
24392      # for the tool.
24393
24394      # First remove it from the list of overridden variables, so we can test
24395      # for unknown variables in the end.
24396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24397
24398      # Check if we try to supply an empty value
24399      if test "x$SETFILE" = x; then
24400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24401$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24403$as_echo_n "checking for SETFILE... " >&6; }
24404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24405$as_echo "disabled" >&6; }
24406      else
24407        # Check if the provided tool contains a complete path.
24408        tool_specified="$SETFILE"
24409        tool_basename="${tool_specified##*/}"
24410        if test "x$tool_basename" = "x$tool_specified"; then
24411          # A command without a complete path is provided, search $PATH.
24412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24413$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24414          # Extract the first word of "$tool_basename", so it can be a program name with args.
24415set dummy $tool_basename; ac_word=$2
24416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24417$as_echo_n "checking for $ac_word... " >&6; }
24418if ${ac_cv_path_SETFILE+:} false; then :
24419  $as_echo_n "(cached) " >&6
24420else
24421  case $SETFILE in
24422  [\\/]* | ?:[\\/]*)
24423  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24424  ;;
24425  *)
24426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24427for as_dir in $PATH
24428do
24429  IFS=$as_save_IFS
24430  test -z "$as_dir" && as_dir=.
24431    for ac_exec_ext in '' $ac_executable_extensions; do
24432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24433    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24435    break 2
24436  fi
24437done
24438  done
24439IFS=$as_save_IFS
24440
24441  ;;
24442esac
24443fi
24444SETFILE=$ac_cv_path_SETFILE
24445if test -n "$SETFILE"; then
24446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24447$as_echo "$SETFILE" >&6; }
24448else
24449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24450$as_echo "no" >&6; }
24451fi
24452
24453
24454          if test "x$SETFILE" = x; then
24455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24456          fi
24457        else
24458          # Otherwise we believe it is a complete path. Use it as it is.
24459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24460$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24462$as_echo_n "checking for SETFILE... " >&6; }
24463          if test ! -x "$tool_specified"; then
24464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24465$as_echo "not found" >&6; }
24466            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24467          fi
24468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24469$as_echo "$tool_specified" >&6; }
24470        fi
24471      fi
24472    fi
24473
24474  fi
24475
24476
24477
24478  if test "x$SETFILE" = x; then
24479    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24480  fi
24481
24482
24483  fi
24484
24485
24486  # Check bash version
24487  # Extra [ ] to stop m4 mangling
24488   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24490$as_echo_n "checking bash version... " >&6; }
24491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24492$as_echo "$BASH_VER" >&6; }
24493
24494  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24495  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24496  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24497    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24498  fi
24499
24500  # Test if bash supports pipefail.
24501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24502$as_echo_n "checking if bash supports pipefail... " >&6; }
24503  if ${BASH} -c 'set -o pipefail'; then
24504    BASH_ARGS="$BASH_ARGS -o pipefail"
24505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24506$as_echo "yes" >&6; }
24507  else
24508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24509$as_echo "no" >&6; }
24510  fi
24511
24512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24513$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24514  if ${BASH} -e -c 'true'; then
24515    BASH_ARGS="$BASH_ARGS -e"
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24517$as_echo "yes" >&6; }
24518  else
24519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24520$as_echo "no" >&6; }
24521  fi
24522
24523
24524
24525
24526# Check if pkg-config is available.
24527
24528
24529if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24530	if test -n "$ac_tool_prefix"; then
24531  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24532set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24534$as_echo_n "checking for $ac_word... " >&6; }
24535if ${ac_cv_path_PKG_CONFIG+:} false; then :
24536  $as_echo_n "(cached) " >&6
24537else
24538  case $PKG_CONFIG in
24539  [\\/]* | ?:[\\/]*)
24540  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24541  ;;
24542  *)
24543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24544for as_dir in $PATH
24545do
24546  IFS=$as_save_IFS
24547  test -z "$as_dir" && as_dir=.
24548    for ac_exec_ext in '' $ac_executable_extensions; do
24549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24550    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24552    break 2
24553  fi
24554done
24555  done
24556IFS=$as_save_IFS
24557
24558  ;;
24559esac
24560fi
24561PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24562if test -n "$PKG_CONFIG"; then
24563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24564$as_echo "$PKG_CONFIG" >&6; }
24565else
24566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24567$as_echo "no" >&6; }
24568fi
24569
24570
24571fi
24572if test -z "$ac_cv_path_PKG_CONFIG"; then
24573  ac_pt_PKG_CONFIG=$PKG_CONFIG
24574  # Extract the first word of "pkg-config", so it can be a program name with args.
24575set dummy pkg-config; ac_word=$2
24576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24577$as_echo_n "checking for $ac_word... " >&6; }
24578if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24579  $as_echo_n "(cached) " >&6
24580else
24581  case $ac_pt_PKG_CONFIG in
24582  [\\/]* | ?:[\\/]*)
24583  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24584  ;;
24585  *)
24586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24587for as_dir in $PATH
24588do
24589  IFS=$as_save_IFS
24590  test -z "$as_dir" && as_dir=.
24591    for ac_exec_ext in '' $ac_executable_extensions; do
24592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24593    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24595    break 2
24596  fi
24597done
24598  done
24599IFS=$as_save_IFS
24600
24601  ;;
24602esac
24603fi
24604ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24605if test -n "$ac_pt_PKG_CONFIG"; then
24606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24607$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24608else
24609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24610$as_echo "no" >&6; }
24611fi
24612
24613  if test "x$ac_pt_PKG_CONFIG" = x; then
24614    PKG_CONFIG=""
24615  else
24616    case $cross_compiling:$ac_tool_warned in
24617yes:)
24618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24620ac_tool_warned=yes ;;
24621esac
24622    PKG_CONFIG=$ac_pt_PKG_CONFIG
24623  fi
24624else
24625  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24626fi
24627
24628fi
24629if test -n "$PKG_CONFIG"; then
24630	_pkg_min_version=0.9.0
24631	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24632$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24633	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24634		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24635$as_echo "yes" >&6; }
24636	else
24637		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24638$as_echo "no" >&6; }
24639		PKG_CONFIG=""
24640	fi
24641
24642fi
24643
24644# After basic tools have been setup, we can check build os specific details.
24645
24646  ###############################################################################
24647
24648  # Note that this is the build platform OS version!
24649
24650  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24651  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24652  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24653  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24654
24655
24656
24657
24658
24659# Misc basic settings
24660
24661
24662# Check whether --with-default-make-target was given.
24663if test "${with_default_make_target+set}" = set; then :
24664  withval=$with_default_make_target;
24665fi
24666
24667  if test "x$with_default_make_target" = "x" \
24668      || test "x$with_default_make_target" = "xyes"; then
24669    DEFAULT_MAKE_TARGET="exploded-image"
24670  elif test "x$with_default_make_target" = "xno"; then
24671    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24672  else
24673    DEFAULT_MAKE_TARGET="$with_default_make_target"
24674  fi
24675
24676
24677
24678
24679###############################################################################
24680#
24681# Determine OpenJDK variants, options and version numbers.
24682#
24683###############################################################################
24684
24685# We need build & target for this.
24686
24687  # Should we build a JDK without a graphical UI?
24688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24689$as_echo_n "checking headless only... " >&6; }
24690  # Check whether --enable-headless-only was given.
24691if test "${enable_headless_only+set}" = set; then :
24692  enableval=$enable_headless_only;
24693fi
24694
24695
24696  if test "x$enable_headless_only" = "xyes"; then
24697    ENABLE_HEADLESS_ONLY="true"
24698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24699$as_echo "yes" >&6; }
24700  elif test "x$enable_headless_only" = "xno"; then
24701    ENABLE_HEADLESS_ONLY="false"
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24703$as_echo "no" >&6; }
24704  elif test "x$enable_headless_only" = "x"; then
24705    ENABLE_HEADLESS_ONLY="false"
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24707$as_echo "no" >&6; }
24708  else
24709    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24710  fi
24711
24712
24713
24714  # Should we build the complete docs, or just a lightweight version?
24715  # Check whether --enable-full-docs was given.
24716if test "${enable_full_docs+set}" = set; then :
24717  enableval=$enable_full_docs;
24718fi
24719
24720
24721  # Verify dependencies
24722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24723$as_echo_n "checking for graphviz dot... " >&6; }
24724  if test "x$DOT" != "x"; then
24725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24726$as_echo "yes" >&6; }
24727  else
24728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24729$as_echo "no, cannot generate full docs" >&6; }
24730    FULL_DOCS_DEP_MISSING=true
24731  fi
24732
24733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24734$as_echo_n "checking for pandoc... " >&6; }
24735  if test "x$PANDOC" != "x"; then
24736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24737$as_echo "yes" >&6; }
24738  else
24739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24740$as_echo "no, cannot generate full docs" >&6; }
24741    FULL_DOCS_DEP_MISSING=true
24742  fi
24743
24744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24745$as_echo_n "checking full docs... " >&6; }
24746  if test "x$enable_full_docs" = xyes; then
24747    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24749$as_echo "no, missing dependencies" >&6; }
24750
24751  # Print a helpful message on how to acquire the necessary build dependency.
24752  # dot is the help tag: freetype, cups, alsa etc
24753  MISSING_DEPENDENCY=dot
24754
24755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24756    cygwin_help $MISSING_DEPENDENCY
24757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24758    msys_help $MISSING_DEPENDENCY
24759  else
24760    PKGHANDLER_COMMAND=
24761
24762    case $PKGHANDLER in
24763      apt-get)
24764        apt_help     $MISSING_DEPENDENCY ;;
24765      yum)
24766        yum_help     $MISSING_DEPENDENCY ;;
24767      brew)
24768        brew_help    $MISSING_DEPENDENCY ;;
24769      port)
24770        port_help    $MISSING_DEPENDENCY ;;
24771      pkgutil)
24772        pkgutil_help $MISSING_DEPENDENCY ;;
24773      pkgadd)
24774        pkgadd_help  $MISSING_DEPENDENCY ;;
24775    esac
24776
24777    if test "x$PKGHANDLER_COMMAND" != x; then
24778      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24779    fi
24780  fi
24781
24782      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24783    else
24784      ENABLE_FULL_DOCS=true
24785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24786$as_echo "yes, forced" >&6; }
24787    fi
24788  elif test "x$enable_full_docs" = xno; then
24789    ENABLE_FULL_DOCS=false
24790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24791$as_echo "no, forced" >&6; }
24792  elif test "x$enable_full_docs" = x; then
24793    # Check for prerequisites
24794    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24795      ENABLE_FULL_DOCS=false
24796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24797$as_echo "no, missing dependencies" >&6; }
24798    else
24799      ENABLE_FULL_DOCS=true
24800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24801$as_echo "yes, dependencies present" >&6; }
24802    fi
24803  else
24804    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24805  fi
24806
24807
24808
24809  # Choose cacerts source file
24810
24811# Check whether --with-cacerts-file was given.
24812if test "${with_cacerts_file+set}" = set; then :
24813  withval=$with_cacerts_file;
24814fi
24815
24816  if test "x$with_cacerts_file" != x; then
24817    CACERTS_FILE=$with_cacerts_file
24818  fi
24819
24820
24821  # Enable or disable unlimited crypto
24822  # Check whether --enable-unlimited-crypto was given.
24823if test "${enable_unlimited_crypto+set}" = set; then :
24824  enableval=$enable_unlimited_crypto;
24825else
24826  enable_unlimited_crypto=yes
24827fi
24828
24829  if test "x$enable_unlimited_crypto" = "xyes"; then
24830    UNLIMITED_CRYPTO=true
24831  else
24832    UNLIMITED_CRYPTO=false
24833  fi
24834
24835
24836  # Should we build the serviceability agent (SA)?
24837  INCLUDE_SA=true
24838  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24839    INCLUDE_SA=false
24840  fi
24841  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24842    INCLUDE_SA=false
24843  fi
24844
24845
24846  # Compress jars
24847  COMPRESS_JARS=false
24848
24849
24850
24851  # Setup default copyright year. Mostly overridden when building close to a new year.
24852
24853# Check whether --with-copyright-year was given.
24854if test "${with_copyright_year+set}" = set; then :
24855  withval=$with_copyright_year;
24856fi
24857
24858  if test "x$with_copyright_year" = xyes; then
24859    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24860  elif test "x$with_copyright_year" != x; then
24861    COPYRIGHT_YEAR="$with_copyright_year"
24862  else
24863    COPYRIGHT_YEAR=`$DATE +'%Y'`
24864  fi
24865
24866
24867
24868  # Check whether --enable-keep-packaged-modules was given.
24869if test "${enable_keep_packaged_modules+set}" = set; then :
24870  enableval=$enable_keep_packaged_modules;
24871fi
24872
24873
24874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24875$as_echo_n "checking if packaged modules are kept... " >&6; }
24876  if test "x$enable_keep_packaged_modules" = "xyes"; then
24877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24878$as_echo "yes" >&6; }
24879    JLINK_KEEP_PACKAGED_MODULES=true
24880  elif test "x$enable_keep_packaged_modules" = "xno"; then
24881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24882$as_echo "no" >&6; }
24883    JLINK_KEEP_PACKAGED_MODULES=false
24884  elif test "x$enable_keep_packaged_modules" = "x"; then
24885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24886$as_echo "yes (default)" >&6; }
24887    JLINK_KEEP_PACKAGED_MODULES=true
24888  else
24889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24890$as_echo "error" >&6; }
24891    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24892  fi
24893
24894
24895
24896
24897  # Warn user that old version arguments are deprecated.
24898
24899
24900# Check whether --with-milestone was given.
24901if test "${with_milestone+set}" = set; then :
24902  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24903$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24904fi
24905
24906
24907
24908
24909# Check whether --with-update-version was given.
24910if test "${with_update_version+set}" = set; then :
24911  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24912$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24913fi
24914
24915
24916
24917
24918# Check whether --with-user-release-suffix was given.
24919if test "${with_user_release_suffix+set}" = set; then :
24920  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
24921$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24922fi
24923
24924
24925
24926
24927# Check whether --with-build-number was given.
24928if test "${with_build_number+set}" = set; then :
24929  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24930$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24931fi
24932
24933
24934
24935  # Source the version numbers file
24936  . $AUTOCONF_DIR/version-numbers
24937
24938  # Some non-version number information is set in that file
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948  # Override version from arguments
24949
24950  # If --with-version-string is set, process it first. It is possible to
24951  # override parts with more specific flags, since these are processed later.
24952
24953# Check whether --with-version-string was given.
24954if test "${with_version_string+set}" = set; then :
24955  withval=$with_version_string;
24956fi
24957
24958  if test "x$with_version_string" = xyes; then
24959    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24960  elif test "x$with_version_string" != x; then
24961    # Additional [] needed to keep m4 from mangling shell constructs.
24962    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24963      VERSION_MAJOR=${BASH_REMATCH[1]}
24964      VERSION_MINOR=${BASH_REMATCH[3]}
24965      VERSION_SECURITY=${BASH_REMATCH[5]}
24966      VERSION_PATCH=${BASH_REMATCH[7]}
24967      VERSION_PRE=${BASH_REMATCH[9]}
24968      version_plus_separator=${BASH_REMATCH[11]}
24969      VERSION_BUILD=${BASH_REMATCH[12]}
24970      VERSION_OPT=${BASH_REMATCH[14]}
24971      # Unspecified numerical fields are interpreted as 0.
24972      if test "x$VERSION_MINOR" = x; then
24973        VERSION_MINOR=0
24974      fi
24975      if test "x$VERSION_SECURITY" = x; then
24976        VERSION_SECURITY=0
24977      fi
24978      if test "x$VERSION_PATCH" = x; then
24979        VERSION_PATCH=0
24980      fi
24981      if test "x$version_plus_separator" != x \
24982          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24983        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24984      fi
24985      # Stop the version part process from setting default values.
24986      # We still allow them to explicitly override though.
24987      NO_DEFAULT_VERSION_PARTS=true
24988    else
24989      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24990    fi
24991  fi
24992
24993
24994# Check whether --with-version-pre was given.
24995if test "${with_version_pre+set}" = set; then :
24996  withval=$with_version_pre; with_version_pre_present=true
24997else
24998  with_version_pre_present=false
24999fi
25000
25001
25002  if test "x$with_version_pre_present" = xtrue; then
25003    if test "x$with_version_pre" = xyes; then
25004      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25005    elif test "x$with_version_pre" = xno; then
25006      # Interpret --without-* as empty string instead of the literal "no"
25007      VERSION_PRE=
25008    else
25009      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25010       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25011      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25013$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25014      fi
25015    fi
25016  else
25017    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25018      # Default is to use "internal" as pre
25019      VERSION_PRE="internal"
25020    fi
25021  fi
25022
25023
25024# Check whether --with-version-opt was given.
25025if test "${with_version_opt+set}" = set; then :
25026  withval=$with_version_opt; with_version_opt_present=true
25027else
25028  with_version_opt_present=false
25029fi
25030
25031
25032  if test "x$with_version_opt_present" = xtrue; then
25033    if test "x$with_version_opt" = xyes; then
25034      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25035    elif test "x$with_version_opt" = xno; then
25036      # Interpret --without-* as empty string instead of the literal "no"
25037      VERSION_OPT=
25038    else
25039      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25040       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25041      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25043$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25044      fi
25045    fi
25046  else
25047    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25048      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25049      # Outer [ ] to quote m4.
25050       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25051      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25052    fi
25053  fi
25054
25055
25056# Check whether --with-version-build was given.
25057if test "${with_version_build+set}" = set; then :
25058  withval=$with_version_build; with_version_build_present=true
25059else
25060  with_version_build_present=false
25061fi
25062
25063
25064  if test "x$with_version_build_present" = xtrue; then
25065    if test "x$with_version_build" = xyes; then
25066      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25067    elif test "x$with_version_build" = xno; then
25068      # Interpret --without-* as empty string instead of the literal "no"
25069      VERSION_BUILD=
25070    elif test "x$with_version_build" = x; then
25071      VERSION_BUILD=
25072    else
25073
25074  # Additional [] needed to keep m4 from mangling shell constructs.
25075  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25076    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25077  fi
25078  # Extract the version number without leading zeros.
25079  cleaned_value=${BASH_REMATCH[1]}
25080  if test "x$cleaned_value" = x; then
25081    # Special case for zero
25082    cleaned_value=${BASH_REMATCH[2]}
25083  fi
25084
25085  if test $cleaned_value -gt 255; then
25086    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25087  fi
25088  if test "x$cleaned_value" != "x$with_version_build"; then
25089    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25090$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25091  fi
25092  VERSION_BUILD=$cleaned_value
25093
25094    fi
25095  else
25096    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25097      # Default is to not have a build number.
25098      VERSION_BUILD=""
25099      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25100      VERSION_BUILD=0
25101    fi
25102  fi
25103
25104
25105# Check whether --with-version-major was given.
25106if test "${with_version_major+set}" = set; then :
25107  withval=$with_version_major; with_version_major_present=true
25108else
25109  with_version_major_present=false
25110fi
25111
25112
25113  if test "x$with_version_major_present" = xtrue; then
25114    if test "x$with_version_major" = xyes; then
25115      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25116    else
25117
25118  # Additional [] needed to keep m4 from mangling shell constructs.
25119  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25120    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25121  fi
25122  # Extract the version number without leading zeros.
25123  cleaned_value=${BASH_REMATCH[1]}
25124  if test "x$cleaned_value" = x; then
25125    # Special case for zero
25126    cleaned_value=${BASH_REMATCH[2]}
25127  fi
25128
25129  if test $cleaned_value -gt 255; then
25130    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25131  fi
25132  if test "x$cleaned_value" != "x$with_version_major"; then
25133    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25134$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25135  fi
25136  VERSION_MAJOR=$cleaned_value
25137
25138    fi
25139  else
25140    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25141      # Default is to get value from version-numbers
25142      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25143    fi
25144  fi
25145
25146
25147# Check whether --with-version-minor was given.
25148if test "${with_version_minor+set}" = set; then :
25149  withval=$with_version_minor; with_version_minor_present=true
25150else
25151  with_version_minor_present=false
25152fi
25153
25154
25155  if test "x$with_version_minor_present" = xtrue; then
25156    if test "x$with_version_minor" = xyes; then
25157      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25158    elif test "x$with_version_minor" = xno; then
25159      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25160      VERSION_MINOR=0
25161    elif test "x$with_version_minor" = x; then
25162      VERSION_MINOR=0
25163    else
25164
25165  # Additional [] needed to keep m4 from mangling shell constructs.
25166  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25167    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25168  fi
25169  # Extract the version number without leading zeros.
25170  cleaned_value=${BASH_REMATCH[1]}
25171  if test "x$cleaned_value" = x; then
25172    # Special case for zero
25173    cleaned_value=${BASH_REMATCH[2]}
25174  fi
25175
25176  if test $cleaned_value -gt 255; then
25177    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25178  fi
25179  if test "x$cleaned_value" != "x$with_version_minor"; then
25180    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25181$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25182  fi
25183  VERSION_MINOR=$cleaned_value
25184
25185    fi
25186  else
25187    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25188      # Default is 0, if unspecified
25189      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25190    fi
25191  fi
25192
25193
25194# Check whether --with-version-security was given.
25195if test "${with_version_security+set}" = set; then :
25196  withval=$with_version_security; with_version_security_present=true
25197else
25198  with_version_security_present=false
25199fi
25200
25201
25202  if test "x$with_version_security_present" = xtrue; then
25203    if test "x$with_version_security" = xyes; then
25204      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25205    elif test "x$with_version_security" = xno; then
25206      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25207      VERSION_SECURITY=0
25208    elif test "x$with_version_security" = x; then
25209      VERSION_SECURITY=0
25210    else
25211
25212  # Additional [] needed to keep m4 from mangling shell constructs.
25213  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25214    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25215  fi
25216  # Extract the version number without leading zeros.
25217  cleaned_value=${BASH_REMATCH[1]}
25218  if test "x$cleaned_value" = x; then
25219    # Special case for zero
25220    cleaned_value=${BASH_REMATCH[2]}
25221  fi
25222
25223  if test $cleaned_value -gt 255; then
25224    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25225  fi
25226  if test "x$cleaned_value" != "x$with_version_security"; then
25227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25228$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25229  fi
25230  VERSION_SECURITY=$cleaned_value
25231
25232    fi
25233  else
25234    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25235      # Default is 0, if unspecified
25236      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25237    fi
25238  fi
25239
25240
25241# Check whether --with-version-patch was given.
25242if test "${with_version_patch+set}" = set; then :
25243  withval=$with_version_patch; with_version_patch_present=true
25244else
25245  with_version_patch_present=false
25246fi
25247
25248
25249  if test "x$with_version_patch_present" = xtrue; then
25250    if test "x$with_version_patch" = xyes; then
25251      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25252    elif test "x$with_version_patch" = xno; then
25253      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25254      VERSION_PATCH=0
25255    elif test "x$with_version_patch" = x; then
25256      VERSION_PATCH=0
25257    else
25258
25259  # Additional [] needed to keep m4 from mangling shell constructs.
25260  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25261    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25262  fi
25263  # Extract the version number without leading zeros.
25264  cleaned_value=${BASH_REMATCH[1]}
25265  if test "x$cleaned_value" = x; then
25266    # Special case for zero
25267    cleaned_value=${BASH_REMATCH[2]}
25268  fi
25269
25270  if test $cleaned_value -gt 255; then
25271    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25272  fi
25273  if test "x$cleaned_value" != "x$with_version_patch"; then
25274    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25275$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25276  fi
25277  VERSION_PATCH=$cleaned_value
25278
25279    fi
25280  else
25281    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25282      # Default is 0, if unspecified
25283      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25284    fi
25285  fi
25286
25287  # Calculate derived version properties
25288
25289  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25290  if test "x$VERSION_PRE" = x; then
25291    VERSION_IS_GA=true
25292  else
25293    VERSION_IS_GA=false
25294  fi
25295
25296  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25297  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25298
25299  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25300  # Strip trailing zeroes from stripped_version_number
25301  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25302  VERSION_NUMBER=$stripped_version_number
25303
25304  # The complete version string, with additional build information
25305  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25306    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25307  else
25308    # If either build or opt is set, we need a + separator
25309    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25310  fi
25311
25312  # The short version string, just VERSION_NUMBER and PRE, if present.
25313  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25314
25315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25316$as_echo_n "checking for version string... " >&6; }
25317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25318$as_echo "$VERSION_STRING" >&6; }
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334###############################################################################
25335#
25336# Setup BootJDK, used to bootstrap the build.
25337#
25338###############################################################################
25339
25340
25341  BOOT_JDK_FOUND=no
25342
25343# Check whether --with-boot-jdk was given.
25344if test "${with_boot_jdk+set}" = set; then :
25345  withval=$with_boot_jdk;
25346fi
25347
25348
25349  # We look for the Boot JDK through various means, going from more certain to
25350  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25351  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25352  # must check if this is indeed valid; otherwise we'll continue looking.
25353
25354  # Test: Is bootjdk explicitly set by command line arguments?
25355
25356  if test "x$BOOT_JDK_FOUND" = xno; then
25357    # Now execute the test
25358
25359  if test "x$with_boot_jdk" != x; then
25360    BOOT_JDK=$with_boot_jdk
25361    BOOT_JDK_FOUND=maybe
25362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25363$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25364  fi
25365
25366
25367    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25368    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25369      # Do we have a bin/java?
25370      if test ! -x "$BOOT_JDK/bin/java"; then
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25373        BOOT_JDK_FOUND=no
25374      else
25375        # Do we have a bin/javac?
25376        if test ! -x "$BOOT_JDK/bin/javac"; then
25377          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25379          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25380$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25381          BOOT_JDK_FOUND=no
25382        else
25383          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25384          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25385
25386          # Extra M4 quote needed to protect [] in grep expression.
25387          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25388          if test "x$FOUND_CORRECT_VERSION" = x; then
25389            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25391            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25392$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25393            BOOT_JDK_FOUND=no
25394          else
25395            # We're done! :-)
25396            BOOT_JDK_FOUND=yes
25397
25398  # Only process if variable expands to non-empty
25399
25400  if test "x$BOOT_JDK" != x; then
25401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25402
25403  # Input might be given as Windows format, start by converting to
25404  # unix format.
25405  path="$BOOT_JDK"
25406  new_path=`$CYGPATH -u "$path"`
25407
25408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25411  # "foo.exe" is OK but "foo" is an error.
25412  #
25413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25414  # It is also a way to make sure we got the proper file name for the real test later on.
25415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25416  if test "x$test_shortpath" = x; then
25417    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25418$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25419    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25420  fi
25421
25422  # Call helper function which possibly converts this using DOS-style short mode.
25423  # If so, the updated path is stored in $new_path.
25424
25425  input_path="$new_path"
25426  # Check if we need to convert this using DOS-style short mode. If the path
25427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25428  # take no chances and rewrite it.
25429  # Note: m4 eats our [], so we need to use [ and ] instead.
25430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25431  if test "x$has_forbidden_chars" != x; then
25432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25436      # Going to short mode and back again did indeed matter. Since short mode is
25437      # case insensitive, let's make it lowercase to improve readability.
25438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25439      # Now convert it back to Unix-style (cygpath)
25440      input_path=`$CYGPATH -u "$shortmode_path"`
25441      new_path="$input_path"
25442    fi
25443  fi
25444
25445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25446  if test "x$test_cygdrive_prefix" = x; then
25447    # As a simple fix, exclude /usr/bin since it's not a real path.
25448    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25450      # a path prefixed by /cygdrive for fixpath to work.
25451      new_path="$CYGWIN_ROOT_PATH$input_path"
25452    fi
25453  fi
25454
25455
25456  if test "x$path" != "x$new_path"; then
25457    BOOT_JDK="$new_path"
25458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25460  fi
25461
25462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463
25464  path="$BOOT_JDK"
25465  has_colon=`$ECHO $path | $GREP ^.:`
25466  new_path="$path"
25467  if test "x$has_colon" = x; then
25468    # Not in mixed or Windows style, start by that.
25469    new_path=`cmd //c echo $path`
25470  fi
25471
25472
25473  input_path="$new_path"
25474  # Check if we need to convert this using DOS-style short mode. If the path
25475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25476  # take no chances and rewrite it.
25477  # Note: m4 eats our [], so we need to use [ and ] instead.
25478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25479  if test "x$has_forbidden_chars" != x; then
25480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25482  fi
25483
25484
25485  windows_path="$new_path"
25486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487    unix_path=`$CYGPATH -u "$windows_path"`
25488    new_path="$unix_path"
25489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491    new_path="$unix_path"
25492  fi
25493
25494  if test "x$path" != "x$new_path"; then
25495    BOOT_JDK="$new_path"
25496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25498  fi
25499
25500  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25501  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25502
25503    else
25504      # We're on a unix platform. Hooray! :)
25505      path="$BOOT_JDK"
25506      has_space=`$ECHO "$path" | $GREP " "`
25507      if test "x$has_space" != x; then
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25510        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25511      fi
25512
25513      # Use eval to expand a potential ~
25514      eval path="$path"
25515      if test ! -f "$path" && test ! -d "$path"; then
25516        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25517      fi
25518
25519      if test -d "$path"; then
25520        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25521      else
25522        dir="`$DIRNAME "$path"`"
25523        base="`$BASENAME "$path"`"
25524        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25525      fi
25526    fi
25527  fi
25528
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25530$as_echo_n "checking for Boot JDK... " >&6; }
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25532$as_echo "$BOOT_JDK" >&6; }
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25534$as_echo_n "checking Boot JDK version... " >&6; }
25535            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25537$as_echo "$BOOT_JDK_VERSION" >&6; }
25538          fi # end check jdk version
25539        fi # end check javac
25540      fi # end check java
25541    fi # end check boot jdk found
25542  fi
25543
25544  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25545    # Having specified an argument which is incorrect will produce an instant failure;
25546    # we should not go on looking
25547    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25548  fi
25549
25550  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25551
25552  if test "x$BOOT_JDK_FOUND" = xno; then
25553    # Now execute the test
25554
25555  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25556    # First check at user selected default
25557
25558  if test "x$BOOT_JDK_FOUND" = xno; then
25559    # Now execute the test
25560
25561  if test -x /usr/libexec/java_home; then
25562    BOOT_JDK=`/usr/libexec/java_home `
25563    BOOT_JDK_FOUND=maybe
25564    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25565$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25566  fi
25567
25568
25569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25571      # Do we have a bin/java?
25572      if test ! -x "$BOOT_JDK/bin/java"; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25575        BOOT_JDK_FOUND=no
25576      else
25577        # Do we have a bin/javac?
25578        if test ! -x "$BOOT_JDK/bin/javac"; then
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25583          BOOT_JDK_FOUND=no
25584        else
25585          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25586          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25587
25588          # Extra M4 quote needed to protect [] in grep expression.
25589          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25590          if test "x$FOUND_CORRECT_VERSION" = x; then
25591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25594$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25595            BOOT_JDK_FOUND=no
25596          else
25597            # We're done! :-)
25598            BOOT_JDK_FOUND=yes
25599
25600  # Only process if variable expands to non-empty
25601
25602  if test "x$BOOT_JDK" != x; then
25603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25604
25605  # Input might be given as Windows format, start by converting to
25606  # unix format.
25607  path="$BOOT_JDK"
25608  new_path=`$CYGPATH -u "$path"`
25609
25610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25613  # "foo.exe" is OK but "foo" is an error.
25614  #
25615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25616  # It is also a way to make sure we got the proper file name for the real test later on.
25617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25618  if test "x$test_shortpath" = x; then
25619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25622  fi
25623
25624  # Call helper function which possibly converts this using DOS-style short mode.
25625  # If so, the updated path is stored in $new_path.
25626
25627  input_path="$new_path"
25628  # Check if we need to convert this using DOS-style short mode. If the path
25629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25630  # take no chances and rewrite it.
25631  # Note: m4 eats our [], so we need to use [ and ] instead.
25632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25633  if test "x$has_forbidden_chars" != x; then
25634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25638      # Going to short mode and back again did indeed matter. Since short mode is
25639      # case insensitive, let's make it lowercase to improve readability.
25640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25641      # Now convert it back to Unix-style (cygpath)
25642      input_path=`$CYGPATH -u "$shortmode_path"`
25643      new_path="$input_path"
25644    fi
25645  fi
25646
25647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25648  if test "x$test_cygdrive_prefix" = x; then
25649    # As a simple fix, exclude /usr/bin since it's not a real path.
25650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25652      # a path prefixed by /cygdrive for fixpath to work.
25653      new_path="$CYGWIN_ROOT_PATH$input_path"
25654    fi
25655  fi
25656
25657
25658  if test "x$path" != "x$new_path"; then
25659    BOOT_JDK="$new_path"
25660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25662  fi
25663
25664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25665
25666  path="$BOOT_JDK"
25667  has_colon=`$ECHO $path | $GREP ^.:`
25668  new_path="$path"
25669  if test "x$has_colon" = x; then
25670    # Not in mixed or Windows style, start by that.
25671    new_path=`cmd //c echo $path`
25672  fi
25673
25674
25675  input_path="$new_path"
25676  # Check if we need to convert this using DOS-style short mode. If the path
25677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25678  # take no chances and rewrite it.
25679  # Note: m4 eats our [], so we need to use [ and ] instead.
25680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25681  if test "x$has_forbidden_chars" != x; then
25682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25684  fi
25685
25686
25687  windows_path="$new_path"
25688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25689    unix_path=`$CYGPATH -u "$windows_path"`
25690    new_path="$unix_path"
25691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25693    new_path="$unix_path"
25694  fi
25695
25696  if test "x$path" != "x$new_path"; then
25697    BOOT_JDK="$new_path"
25698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25700  fi
25701
25702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25704
25705    else
25706      # We're on a unix platform. Hooray! :)
25707      path="$BOOT_JDK"
25708      has_space=`$ECHO "$path" | $GREP " "`
25709      if test "x$has_space" != x; then
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25713      fi
25714
25715      # Use eval to expand a potential ~
25716      eval path="$path"
25717      if test ! -f "$path" && test ! -d "$path"; then
25718        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25719      fi
25720
25721      if test -d "$path"; then
25722        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25723      else
25724        dir="`$DIRNAME "$path"`"
25725        base="`$BASENAME "$path"`"
25726        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25727      fi
25728    fi
25729  fi
25730
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25732$as_echo_n "checking for Boot JDK... " >&6; }
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25734$as_echo "$BOOT_JDK" >&6; }
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25736$as_echo_n "checking Boot JDK version... " >&6; }
25737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25739$as_echo "$BOOT_JDK_VERSION" >&6; }
25740          fi # end check jdk version
25741        fi # end check javac
25742      fi # end check java
25743    fi # end check boot jdk found
25744  fi
25745
25746    # If that did not work out (e.g. too old), try explicit versions instead
25747
25748  if test "x$BOOT_JDK_FOUND" = xno; then
25749    # Now execute the test
25750
25751  if test -x /usr/libexec/java_home; then
25752    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25753    BOOT_JDK_FOUND=maybe
25754    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25755$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25756  fi
25757
25758
25759    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25760    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25761      # Do we have a bin/java?
25762      if test ! -x "$BOOT_JDK/bin/java"; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25765        BOOT_JDK_FOUND=no
25766      else
25767        # Do we have a bin/javac?
25768        if test ! -x "$BOOT_JDK/bin/javac"; then
25769          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25771          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25772$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25773          BOOT_JDK_FOUND=no
25774        else
25775          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25776          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25777
25778          # Extra M4 quote needed to protect [] in grep expression.
25779          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25780          if test "x$FOUND_CORRECT_VERSION" = x; then
25781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25783            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25784$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25785            BOOT_JDK_FOUND=no
25786          else
25787            # We're done! :-)
25788            BOOT_JDK_FOUND=yes
25789
25790  # Only process if variable expands to non-empty
25791
25792  if test "x$BOOT_JDK" != x; then
25793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25794
25795  # Input might be given as Windows format, start by converting to
25796  # unix format.
25797  path="$BOOT_JDK"
25798  new_path=`$CYGPATH -u "$path"`
25799
25800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25803  # "foo.exe" is OK but "foo" is an error.
25804  #
25805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25806  # It is also a way to make sure we got the proper file name for the real test later on.
25807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25808  if test "x$test_shortpath" = x; then
25809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25811    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25812  fi
25813
25814  # Call helper function which possibly converts this using DOS-style short mode.
25815  # If so, the updated path is stored in $new_path.
25816
25817  input_path="$new_path"
25818  # Check if we need to convert this using DOS-style short mode. If the path
25819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25820  # take no chances and rewrite it.
25821  # Note: m4 eats our [], so we need to use [ and ] instead.
25822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25823  if test "x$has_forbidden_chars" != x; then
25824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25828      # Going to short mode and back again did indeed matter. Since short mode is
25829      # case insensitive, let's make it lowercase to improve readability.
25830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25831      # Now convert it back to Unix-style (cygpath)
25832      input_path=`$CYGPATH -u "$shortmode_path"`
25833      new_path="$input_path"
25834    fi
25835  fi
25836
25837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25838  if test "x$test_cygdrive_prefix" = x; then
25839    # As a simple fix, exclude /usr/bin since it's not a real path.
25840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25842      # a path prefixed by /cygdrive for fixpath to work.
25843      new_path="$CYGWIN_ROOT_PATH$input_path"
25844    fi
25845  fi
25846
25847
25848  if test "x$path" != "x$new_path"; then
25849    BOOT_JDK="$new_path"
25850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25852  fi
25853
25854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25855
25856  path="$BOOT_JDK"
25857  has_colon=`$ECHO $path | $GREP ^.:`
25858  new_path="$path"
25859  if test "x$has_colon" = x; then
25860    # Not in mixed or Windows style, start by that.
25861    new_path=`cmd //c echo $path`
25862  fi
25863
25864
25865  input_path="$new_path"
25866  # Check if we need to convert this using DOS-style short mode. If the path
25867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25868  # take no chances and rewrite it.
25869  # Note: m4 eats our [], so we need to use [ and ] instead.
25870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25871  if test "x$has_forbidden_chars" != x; then
25872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25874  fi
25875
25876
25877  windows_path="$new_path"
25878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25879    unix_path=`$CYGPATH -u "$windows_path"`
25880    new_path="$unix_path"
25881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25883    new_path="$unix_path"
25884  fi
25885
25886  if test "x$path" != "x$new_path"; then
25887    BOOT_JDK="$new_path"
25888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25890  fi
25891
25892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25894
25895    else
25896      # We're on a unix platform. Hooray! :)
25897      path="$BOOT_JDK"
25898      has_space=`$ECHO "$path" | $GREP " "`
25899      if test "x$has_space" != x; then
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25902        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25903      fi
25904
25905      # Use eval to expand a potential ~
25906      eval path="$path"
25907      if test ! -f "$path" && test ! -d "$path"; then
25908        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25909      fi
25910
25911      if test -d "$path"; then
25912        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25913      else
25914        dir="`$DIRNAME "$path"`"
25915        base="`$BASENAME "$path"`"
25916        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25917      fi
25918    fi
25919  fi
25920
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25922$as_echo_n "checking for Boot JDK... " >&6; }
25923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25924$as_echo "$BOOT_JDK" >&6; }
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25926$as_echo_n "checking Boot JDK version... " >&6; }
25927            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25929$as_echo "$BOOT_JDK_VERSION" >&6; }
25930          fi # end check jdk version
25931        fi # end check javac
25932      fi # end check java
25933    fi # end check boot jdk found
25934  fi
25935
25936
25937  if test "x$BOOT_JDK_FOUND" = xno; then
25938    # Now execute the test
25939
25940  if test -x /usr/libexec/java_home; then
25941    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25942    BOOT_JDK_FOUND=maybe
25943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25944$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25945  fi
25946
25947
25948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25950      # Do we have a bin/java?
25951      if test ! -x "$BOOT_JDK/bin/java"; then
25952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25954        BOOT_JDK_FOUND=no
25955      else
25956        # Do we have a bin/javac?
25957        if test ! -x "$BOOT_JDK/bin/javac"; then
25958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25962          BOOT_JDK_FOUND=no
25963        else
25964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25966
25967          # Extra M4 quote needed to protect [] in grep expression.
25968          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25969          if test "x$FOUND_CORRECT_VERSION" = x; then
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25974            BOOT_JDK_FOUND=no
25975          else
25976            # We're done! :-)
25977            BOOT_JDK_FOUND=yes
25978
25979  # Only process if variable expands to non-empty
25980
25981  if test "x$BOOT_JDK" != x; then
25982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  path="$BOOT_JDK"
25987  new_path=`$CYGPATH -u "$path"`
25988
25989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992  # "foo.exe" is OK but "foo" is an error.
25993  #
25994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995  # It is also a way to make sure we got the proper file name for the real test later on.
25996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997  if test "x$test_shortpath" = x; then
25998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26001  fi
26002
26003  # Call helper function which possibly converts this using DOS-style short mode.
26004  # If so, the updated path is stored in $new_path.
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017      # Going to short mode and back again did indeed matter. Since short mode is
26018      # case insensitive, let's make it lowercase to improve readability.
26019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020      # Now convert it back to Unix-style (cygpath)
26021      input_path=`$CYGPATH -u "$shortmode_path"`
26022      new_path="$input_path"
26023    fi
26024  fi
26025
26026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027  if test "x$test_cygdrive_prefix" = x; then
26028    # As a simple fix, exclude /usr/bin since it's not a real path.
26029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031      # a path prefixed by /cygdrive for fixpath to work.
26032      new_path="$CYGWIN_ROOT_PATH$input_path"
26033    fi
26034  fi
26035
26036
26037  if test "x$path" != "x$new_path"; then
26038    BOOT_JDK="$new_path"
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26041  fi
26042
26043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044
26045  path="$BOOT_JDK"
26046  has_colon=`$ECHO $path | $GREP ^.:`
26047  new_path="$path"
26048  if test "x$has_colon" = x; then
26049    # Not in mixed or Windows style, start by that.
26050    new_path=`cmd //c echo $path`
26051  fi
26052
26053
26054  input_path="$new_path"
26055  # Check if we need to convert this using DOS-style short mode. If the path
26056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057  # take no chances and rewrite it.
26058  # Note: m4 eats our [], so we need to use [ and ] instead.
26059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060  if test "x$has_forbidden_chars" != x; then
26061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063  fi
26064
26065
26066  windows_path="$new_path"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    new_path="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    new_path="$unix_path"
26073  fi
26074
26075  if test "x$path" != "x$new_path"; then
26076    BOOT_JDK="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26079  fi
26080
26081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083
26084    else
26085      # We're on a unix platform. Hooray! :)
26086      path="$BOOT_JDK"
26087      has_space=`$ECHO "$path" | $GREP " "`
26088      if test "x$has_space" != x; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092      fi
26093
26094      # Use eval to expand a potential ~
26095      eval path="$path"
26096      if test ! -f "$path" && test ! -d "$path"; then
26097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26098      fi
26099
26100      if test -d "$path"; then
26101        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26102      else
26103        dir="`$DIRNAME "$path"`"
26104        base="`$BASENAME "$path"`"
26105        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26106      fi
26107    fi
26108  fi
26109
26110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26111$as_echo_n "checking for Boot JDK... " >&6; }
26112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26113$as_echo "$BOOT_JDK" >&6; }
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26115$as_echo_n "checking Boot JDK version... " >&6; }
26116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26118$as_echo "$BOOT_JDK_VERSION" >&6; }
26119          fi # end check jdk version
26120        fi # end check javac
26121      fi # end check java
26122    fi # end check boot jdk found
26123  fi
26124
26125
26126  if test "x$BOOT_JDK_FOUND" = xno; then
26127    # Now execute the test
26128
26129  if test -x /usr/libexec/java_home; then
26130    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26131    BOOT_JDK_FOUND=maybe
26132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26133$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26134  fi
26135
26136
26137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26139      # Do we have a bin/java?
26140      if test ! -x "$BOOT_JDK/bin/java"; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26143        BOOT_JDK_FOUND=no
26144      else
26145        # Do we have a bin/javac?
26146        if test ! -x "$BOOT_JDK/bin/javac"; then
26147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26151          BOOT_JDK_FOUND=no
26152        else
26153          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26154          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26155
26156          # Extra M4 quote needed to protect [] in grep expression.
26157          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26158          if test "x$FOUND_CORRECT_VERSION" = x; then
26159            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26161            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26162$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26163            BOOT_JDK_FOUND=no
26164          else
26165            # We're done! :-)
26166            BOOT_JDK_FOUND=yes
26167
26168  # Only process if variable expands to non-empty
26169
26170  if test "x$BOOT_JDK" != x; then
26171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26172
26173  # Input might be given as Windows format, start by converting to
26174  # unix format.
26175  path="$BOOT_JDK"
26176  new_path=`$CYGPATH -u "$path"`
26177
26178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26181  # "foo.exe" is OK but "foo" is an error.
26182  #
26183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26184  # It is also a way to make sure we got the proper file name for the real test later on.
26185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26186  if test "x$test_shortpath" = x; then
26187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26190  fi
26191
26192  # Call helper function which possibly converts this using DOS-style short mode.
26193  # If so, the updated path is stored in $new_path.
26194
26195  input_path="$new_path"
26196  # Check if we need to convert this using DOS-style short mode. If the path
26197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26198  # take no chances and rewrite it.
26199  # Note: m4 eats our [], so we need to use [ and ] instead.
26200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26201  if test "x$has_forbidden_chars" != x; then
26202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26206      # Going to short mode and back again did indeed matter. Since short mode is
26207      # case insensitive, let's make it lowercase to improve readability.
26208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26209      # Now convert it back to Unix-style (cygpath)
26210      input_path=`$CYGPATH -u "$shortmode_path"`
26211      new_path="$input_path"
26212    fi
26213  fi
26214
26215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26216  if test "x$test_cygdrive_prefix" = x; then
26217    # As a simple fix, exclude /usr/bin since it's not a real path.
26218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26220      # a path prefixed by /cygdrive for fixpath to work.
26221      new_path="$CYGWIN_ROOT_PATH$input_path"
26222    fi
26223  fi
26224
26225
26226  if test "x$path" != "x$new_path"; then
26227    BOOT_JDK="$new_path"
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26230  fi
26231
26232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26233
26234  path="$BOOT_JDK"
26235  has_colon=`$ECHO $path | $GREP ^.:`
26236  new_path="$path"
26237  if test "x$has_colon" = x; then
26238    # Not in mixed or Windows style, start by that.
26239    new_path=`cmd //c echo $path`
26240  fi
26241
26242
26243  input_path="$new_path"
26244  # Check if we need to convert this using DOS-style short mode. If the path
26245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26246  # take no chances and rewrite it.
26247  # Note: m4 eats our [], so we need to use [ and ] instead.
26248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26249  if test "x$has_forbidden_chars" != x; then
26250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26252  fi
26253
26254
26255  windows_path="$new_path"
26256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26257    unix_path=`$CYGPATH -u "$windows_path"`
26258    new_path="$unix_path"
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26261    new_path="$unix_path"
26262  fi
26263
26264  if test "x$path" != "x$new_path"; then
26265    BOOT_JDK="$new_path"
26266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26268  fi
26269
26270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26272
26273    else
26274      # We're on a unix platform. Hooray! :)
26275      path="$BOOT_JDK"
26276      has_space=`$ECHO "$path" | $GREP " "`
26277      if test "x$has_space" != x; then
26278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26281      fi
26282
26283      # Use eval to expand a potential ~
26284      eval path="$path"
26285      if test ! -f "$path" && test ! -d "$path"; then
26286        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26287      fi
26288
26289      if test -d "$path"; then
26290        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26291      else
26292        dir="`$DIRNAME "$path"`"
26293        base="`$BASENAME "$path"`"
26294        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26295      fi
26296    fi
26297  fi
26298
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26300$as_echo_n "checking for Boot JDK... " >&6; }
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26302$as_echo "$BOOT_JDK" >&6; }
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26304$as_echo_n "checking Boot JDK version... " >&6; }
26305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26307$as_echo "$BOOT_JDK_VERSION" >&6; }
26308          fi # end check jdk version
26309        fi # end check javac
26310      fi # end check java
26311    fi # end check boot jdk found
26312  fi
26313
26314  fi
26315
26316
26317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26319      # Do we have a bin/java?
26320      if test ! -x "$BOOT_JDK/bin/java"; then
26321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26323        BOOT_JDK_FOUND=no
26324      else
26325        # Do we have a bin/javac?
26326        if test ! -x "$BOOT_JDK/bin/javac"; then
26327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26331          BOOT_JDK_FOUND=no
26332        else
26333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26335
26336          # Extra M4 quote needed to protect [] in grep expression.
26337          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26338          if test "x$FOUND_CORRECT_VERSION" = x; then
26339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26343            BOOT_JDK_FOUND=no
26344          else
26345            # We're done! :-)
26346            BOOT_JDK_FOUND=yes
26347
26348  # Only process if variable expands to non-empty
26349
26350  if test "x$BOOT_JDK" != x; then
26351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26352
26353  # Input might be given as Windows format, start by converting to
26354  # unix format.
26355  path="$BOOT_JDK"
26356  new_path=`$CYGPATH -u "$path"`
26357
26358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26361  # "foo.exe" is OK but "foo" is an error.
26362  #
26363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26364  # It is also a way to make sure we got the proper file name for the real test later on.
26365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26366  if test "x$test_shortpath" = x; then
26367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26370  fi
26371
26372  # Call helper function which possibly converts this using DOS-style short mode.
26373  # If so, the updated path is stored in $new_path.
26374
26375  input_path="$new_path"
26376  # Check if we need to convert this using DOS-style short mode. If the path
26377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26378  # take no chances and rewrite it.
26379  # Note: m4 eats our [], so we need to use [ and ] instead.
26380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26381  if test "x$has_forbidden_chars" != x; then
26382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26386      # Going to short mode and back again did indeed matter. Since short mode is
26387      # case insensitive, let's make it lowercase to improve readability.
26388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26389      # Now convert it back to Unix-style (cygpath)
26390      input_path=`$CYGPATH -u "$shortmode_path"`
26391      new_path="$input_path"
26392    fi
26393  fi
26394
26395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26396  if test "x$test_cygdrive_prefix" = x; then
26397    # As a simple fix, exclude /usr/bin since it's not a real path.
26398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26400      # a path prefixed by /cygdrive for fixpath to work.
26401      new_path="$CYGWIN_ROOT_PATH$input_path"
26402    fi
26403  fi
26404
26405
26406  if test "x$path" != "x$new_path"; then
26407    BOOT_JDK="$new_path"
26408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26410  fi
26411
26412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26413
26414  path="$BOOT_JDK"
26415  has_colon=`$ECHO $path | $GREP ^.:`
26416  new_path="$path"
26417  if test "x$has_colon" = x; then
26418    # Not in mixed or Windows style, start by that.
26419    new_path=`cmd //c echo $path`
26420  fi
26421
26422
26423  input_path="$new_path"
26424  # Check if we need to convert this using DOS-style short mode. If the path
26425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26426  # take no chances and rewrite it.
26427  # Note: m4 eats our [], so we need to use [ and ] instead.
26428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26429  if test "x$has_forbidden_chars" != x; then
26430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26432  fi
26433
26434
26435  windows_path="$new_path"
26436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26437    unix_path=`$CYGPATH -u "$windows_path"`
26438    new_path="$unix_path"
26439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26441    new_path="$unix_path"
26442  fi
26443
26444  if test "x$path" != "x$new_path"; then
26445    BOOT_JDK="$new_path"
26446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26448  fi
26449
26450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26452
26453    else
26454      # We're on a unix platform. Hooray! :)
26455      path="$BOOT_JDK"
26456      has_space=`$ECHO "$path" | $GREP " "`
26457      if test "x$has_space" != x; then
26458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26461      fi
26462
26463      # Use eval to expand a potential ~
26464      eval path="$path"
26465      if test ! -f "$path" && test ! -d "$path"; then
26466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26467      fi
26468
26469      if test -d "$path"; then
26470        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26471      else
26472        dir="`$DIRNAME "$path"`"
26473        base="`$BASENAME "$path"`"
26474        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26475      fi
26476    fi
26477  fi
26478
26479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26480$as_echo_n "checking for Boot JDK... " >&6; }
26481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26482$as_echo "$BOOT_JDK" >&6; }
26483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26484$as_echo_n "checking Boot JDK version... " >&6; }
26485            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26487$as_echo "$BOOT_JDK_VERSION" >&6; }
26488          fi # end check jdk version
26489        fi # end check javac
26490      fi # end check java
26491    fi # end check boot jdk found
26492  fi
26493
26494
26495  # Test: Is $JAVA_HOME set?
26496
26497  if test "x$BOOT_JDK_FOUND" = xno; then
26498    # Now execute the test
26499
26500  if test "x$JAVA_HOME" != x; then
26501    JAVA_HOME_PROCESSED="$JAVA_HOME"
26502
26503  # Only process if variable expands to non-empty
26504
26505  if test "x$JAVA_HOME_PROCESSED" != x; then
26506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26507
26508  # Input might be given as Windows format, start by converting to
26509  # unix format.
26510  path="$JAVA_HOME_PROCESSED"
26511  new_path=`$CYGPATH -u "$path"`
26512
26513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26516  # "foo.exe" is OK but "foo" is an error.
26517  #
26518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26519  # It is also a way to make sure we got the proper file name for the real test later on.
26520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26521  if test "x$test_shortpath" = x; then
26522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26523$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26524    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26525  fi
26526
26527  # Call helper function which possibly converts this using DOS-style short mode.
26528  # If so, the updated path is stored in $new_path.
26529
26530  input_path="$new_path"
26531  # Check if we need to convert this using DOS-style short mode. If the path
26532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26533  # take no chances and rewrite it.
26534  # Note: m4 eats our [], so we need to use [ and ] instead.
26535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26536  if test "x$has_forbidden_chars" != x; then
26537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26541      # Going to short mode and back again did indeed matter. Since short mode is
26542      # case insensitive, let's make it lowercase to improve readability.
26543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26544      # Now convert it back to Unix-style (cygpath)
26545      input_path=`$CYGPATH -u "$shortmode_path"`
26546      new_path="$input_path"
26547    fi
26548  fi
26549
26550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26551  if test "x$test_cygdrive_prefix" = x; then
26552    # As a simple fix, exclude /usr/bin since it's not a real path.
26553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26555      # a path prefixed by /cygdrive for fixpath to work.
26556      new_path="$CYGWIN_ROOT_PATH$input_path"
26557    fi
26558  fi
26559
26560
26561  if test "x$path" != "x$new_path"; then
26562    JAVA_HOME_PROCESSED="$new_path"
26563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26564$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26565  fi
26566
26567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26568
26569  path="$JAVA_HOME_PROCESSED"
26570  has_colon=`$ECHO $path | $GREP ^.:`
26571  new_path="$path"
26572  if test "x$has_colon" = x; then
26573    # Not in mixed or Windows style, start by that.
26574    new_path=`cmd //c echo $path`
26575  fi
26576
26577
26578  input_path="$new_path"
26579  # Check if we need to convert this using DOS-style short mode. If the path
26580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26581  # take no chances and rewrite it.
26582  # Note: m4 eats our [], so we need to use [ and ] instead.
26583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26584  if test "x$has_forbidden_chars" != x; then
26585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26587  fi
26588
26589
26590  windows_path="$new_path"
26591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26592    unix_path=`$CYGPATH -u "$windows_path"`
26593    new_path="$unix_path"
26594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26596    new_path="$unix_path"
26597  fi
26598
26599  if test "x$path" != "x$new_path"; then
26600    JAVA_HOME_PROCESSED="$new_path"
26601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26602$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26603  fi
26604
26605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26607
26608    else
26609      # We're on a unix platform. Hooray! :)
26610      path="$JAVA_HOME_PROCESSED"
26611      has_space=`$ECHO "$path" | $GREP " "`
26612      if test "x$has_space" != x; then
26613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26614$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26616      fi
26617
26618      # Use eval to expand a potential ~
26619      eval path="$path"
26620      if test ! -f "$path" && test ! -d "$path"; then
26621        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26622      fi
26623
26624      if test -d "$path"; then
26625        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26626      else
26627        dir="`$DIRNAME "$path"`"
26628        base="`$BASENAME "$path"`"
26629        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26630      fi
26631    fi
26632  fi
26633
26634    if test ! -d "$JAVA_HOME_PROCESSED"; then
26635      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26636$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26637    else
26638      # Aha, the user has set a JAVA_HOME
26639      # let us use that as the Boot JDK.
26640      BOOT_JDK="$JAVA_HOME_PROCESSED"
26641      BOOT_JDK_FOUND=maybe
26642      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26643$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26644    fi
26645  fi
26646
26647
26648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26649    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26650      # Do we have a bin/java?
26651      if test ! -x "$BOOT_JDK/bin/java"; then
26652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26654        BOOT_JDK_FOUND=no
26655      else
26656        # Do we have a bin/javac?
26657        if test ! -x "$BOOT_JDK/bin/javac"; then
26658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26660          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26661$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26662          BOOT_JDK_FOUND=no
26663        else
26664          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26665          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26666
26667          # Extra M4 quote needed to protect [] in grep expression.
26668          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26669          if test "x$FOUND_CORRECT_VERSION" = x; then
26670            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26673$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26674            BOOT_JDK_FOUND=no
26675          else
26676            # We're done! :-)
26677            BOOT_JDK_FOUND=yes
26678
26679  # Only process if variable expands to non-empty
26680
26681  if test "x$BOOT_JDK" != x; then
26682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26683
26684  # Input might be given as Windows format, start by converting to
26685  # unix format.
26686  path="$BOOT_JDK"
26687  new_path=`$CYGPATH -u "$path"`
26688
26689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26692  # "foo.exe" is OK but "foo" is an error.
26693  #
26694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26695  # It is also a way to make sure we got the proper file name for the real test later on.
26696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26697  if test "x$test_shortpath" = x; then
26698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26701  fi
26702
26703  # Call helper function which possibly converts this using DOS-style short mode.
26704  # If so, the updated path is stored in $new_path.
26705
26706  input_path="$new_path"
26707  # Check if we need to convert this using DOS-style short mode. If the path
26708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26709  # take no chances and rewrite it.
26710  # Note: m4 eats our [], so we need to use [ and ] instead.
26711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26712  if test "x$has_forbidden_chars" != x; then
26713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26717      # Going to short mode and back again did indeed matter. Since short mode is
26718      # case insensitive, let's make it lowercase to improve readability.
26719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26720      # Now convert it back to Unix-style (cygpath)
26721      input_path=`$CYGPATH -u "$shortmode_path"`
26722      new_path="$input_path"
26723    fi
26724  fi
26725
26726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26727  if test "x$test_cygdrive_prefix" = x; then
26728    # As a simple fix, exclude /usr/bin since it's not a real path.
26729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26731      # a path prefixed by /cygdrive for fixpath to work.
26732      new_path="$CYGWIN_ROOT_PATH$input_path"
26733    fi
26734  fi
26735
26736
26737  if test "x$path" != "x$new_path"; then
26738    BOOT_JDK="$new_path"
26739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26741  fi
26742
26743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26744
26745  path="$BOOT_JDK"
26746  has_colon=`$ECHO $path | $GREP ^.:`
26747  new_path="$path"
26748  if test "x$has_colon" = x; then
26749    # Not in mixed or Windows style, start by that.
26750    new_path=`cmd //c echo $path`
26751  fi
26752
26753
26754  input_path="$new_path"
26755  # Check if we need to convert this using DOS-style short mode. If the path
26756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26757  # take no chances and rewrite it.
26758  # Note: m4 eats our [], so we need to use [ and ] instead.
26759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26760  if test "x$has_forbidden_chars" != x; then
26761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26763  fi
26764
26765
26766  windows_path="$new_path"
26767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26768    unix_path=`$CYGPATH -u "$windows_path"`
26769    new_path="$unix_path"
26770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26772    new_path="$unix_path"
26773  fi
26774
26775  if test "x$path" != "x$new_path"; then
26776    BOOT_JDK="$new_path"
26777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26779  fi
26780
26781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26783
26784    else
26785      # We're on a unix platform. Hooray! :)
26786      path="$BOOT_JDK"
26787      has_space=`$ECHO "$path" | $GREP " "`
26788      if test "x$has_space" != x; then
26789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26792      fi
26793
26794      # Use eval to expand a potential ~
26795      eval path="$path"
26796      if test ! -f "$path" && test ! -d "$path"; then
26797        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26798      fi
26799
26800      if test -d "$path"; then
26801        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26802      else
26803        dir="`$DIRNAME "$path"`"
26804        base="`$BASENAME "$path"`"
26805        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26806      fi
26807    fi
26808  fi
26809
26810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26811$as_echo_n "checking for Boot JDK... " >&6; }
26812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26813$as_echo "$BOOT_JDK" >&6; }
26814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26815$as_echo_n "checking Boot JDK version... " >&6; }
26816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26818$as_echo "$BOOT_JDK_VERSION" >&6; }
26819          fi # end check jdk version
26820        fi # end check javac
26821      fi # end check java
26822    fi # end check boot jdk found
26823  fi
26824
26825
26826  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26827
26828  if test "x$BOOT_JDK_FOUND" = xno; then
26829    # Now execute the test
26830
26831  # Extract the first word of "javac", so it can be a program name with args.
26832set dummy javac; ac_word=$2
26833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26834$as_echo_n "checking for $ac_word... " >&6; }
26835if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26836  $as_echo_n "(cached) " >&6
26837else
26838  case $JAVAC_CHECK in
26839  [\\/]* | ?:[\\/]*)
26840  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26841  ;;
26842  *)
26843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26844for as_dir in $PATH
26845do
26846  IFS=$as_save_IFS
26847  test -z "$as_dir" && as_dir=.
26848    for ac_exec_ext in '' $ac_executable_extensions; do
26849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26850    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26852    break 2
26853  fi
26854done
26855  done
26856IFS=$as_save_IFS
26857
26858  ;;
26859esac
26860fi
26861JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26862if test -n "$JAVAC_CHECK"; then
26863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26864$as_echo "$JAVAC_CHECK" >&6; }
26865else
26866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26867$as_echo "no" >&6; }
26868fi
26869
26870
26871  # Extract the first word of "java", so it can be a program name with args.
26872set dummy java; ac_word=$2
26873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26874$as_echo_n "checking for $ac_word... " >&6; }
26875if ${ac_cv_path_JAVA_CHECK+:} false; then :
26876  $as_echo_n "(cached) " >&6
26877else
26878  case $JAVA_CHECK in
26879  [\\/]* | ?:[\\/]*)
26880  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26881  ;;
26882  *)
26883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26884for as_dir in $PATH
26885do
26886  IFS=$as_save_IFS
26887  test -z "$as_dir" && as_dir=.
26888    for ac_exec_ext in '' $ac_executable_extensions; do
26889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26890    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26892    break 2
26893  fi
26894done
26895  done
26896IFS=$as_save_IFS
26897
26898  ;;
26899esac
26900fi
26901JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26902if test -n "$JAVA_CHECK"; then
26903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26904$as_echo "$JAVA_CHECK" >&6; }
26905else
26906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26907$as_echo "no" >&6; }
26908fi
26909
26910
26911  BINARY="$JAVAC_CHECK"
26912  if test "x$JAVAC_CHECK" = x; then
26913    BINARY="$JAVA_CHECK"
26914  fi
26915  if test "x$BINARY" != x; then
26916    # So there is a java(c) binary, it might be part of a JDK.
26917    # Lets find the JDK/JRE directory by following symbolic links.
26918    # Linux/GNU systems often have links from /usr/bin/java to
26919    # /etc/alternatives/java to the real JDK binary.
26920
26921  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26922    # Follow a chain of symbolic links. Use readlink
26923    # where it exists, else fall back to horribly
26924    # complicated shell code.
26925    if test "x$READLINK_TESTED" != yes; then
26926      # On MacOSX there is a readlink tool with a different
26927      # purpose than the GNU readlink tool. Check the found readlink.
26928      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26929      if test "x$ISGNU" = x; then
26930        # A readlink that we do not know how to use.
26931        # Are there other non-GNU readlinks out there?
26932        READLINK_TESTED=yes
26933        READLINK=
26934      fi
26935    fi
26936
26937    if test "x$READLINK" != x; then
26938      BINARY=`$READLINK -f $BINARY`
26939    else
26940      # Save the current directory for restoring afterwards
26941      STARTDIR=$PWD
26942      COUNTER=0
26943      sym_link_dir=`$DIRNAME $BINARY`
26944      sym_link_file=`$BASENAME $BINARY`
26945      cd $sym_link_dir
26946      # Use -P flag to resolve symlinks in directories.
26947      cd `$THEPWDCMD -P`
26948      sym_link_dir=`$THEPWDCMD -P`
26949      # Resolve file symlinks
26950      while test $COUNTER -lt 20; do
26951        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26952        if test "x$ISLINK" == x; then
26953          # This is not a symbolic link! We are done!
26954          break
26955        fi
26956        # Again resolve directory symlinks since the target of the just found
26957        # link could be in a different directory
26958        cd `$DIRNAME $ISLINK`
26959        sym_link_dir=`$THEPWDCMD -P`
26960        sym_link_file=`$BASENAME $ISLINK`
26961        let COUNTER=COUNTER+1
26962      done
26963      cd $STARTDIR
26964      BINARY=$sym_link_dir/$sym_link_file
26965    fi
26966  fi
26967
26968    BOOT_JDK=`dirname "$BINARY"`
26969    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26970    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26971      # Looks like we found ourselves an JDK
26972      BOOT_JDK_FOUND=maybe
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26974$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26975    fi
26976  fi
26977
26978
26979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26981      # Do we have a bin/java?
26982      if test ! -x "$BOOT_JDK/bin/java"; then
26983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26985        BOOT_JDK_FOUND=no
26986      else
26987        # Do we have a bin/javac?
26988        if test ! -x "$BOOT_JDK/bin/javac"; then
26989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26993          BOOT_JDK_FOUND=no
26994        else
26995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26997
26998          # Extra M4 quote needed to protect [] in grep expression.
26999          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27000          if test "x$FOUND_CORRECT_VERSION" = x; then
27001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27005            BOOT_JDK_FOUND=no
27006          else
27007            # We're done! :-)
27008            BOOT_JDK_FOUND=yes
27009
27010  # Only process if variable expands to non-empty
27011
27012  if test "x$BOOT_JDK" != x; then
27013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014
27015  # Input might be given as Windows format, start by converting to
27016  # unix format.
27017  path="$BOOT_JDK"
27018  new_path=`$CYGPATH -u "$path"`
27019
27020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27023  # "foo.exe" is OK but "foo" is an error.
27024  #
27025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27026  # It is also a way to make sure we got the proper file name for the real test later on.
27027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27028  if test "x$test_shortpath" = x; then
27029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27032  fi
27033
27034  # Call helper function which possibly converts this using DOS-style short mode.
27035  # If so, the updated path is stored in $new_path.
27036
27037  input_path="$new_path"
27038  # Check if we need to convert this using DOS-style short mode. If the path
27039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27040  # take no chances and rewrite it.
27041  # Note: m4 eats our [], so we need to use [ and ] instead.
27042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27043  if test "x$has_forbidden_chars" != x; then
27044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27048      # Going to short mode and back again did indeed matter. Since short mode is
27049      # case insensitive, let's make it lowercase to improve readability.
27050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27051      # Now convert it back to Unix-style (cygpath)
27052      input_path=`$CYGPATH -u "$shortmode_path"`
27053      new_path="$input_path"
27054    fi
27055  fi
27056
27057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27058  if test "x$test_cygdrive_prefix" = x; then
27059    # As a simple fix, exclude /usr/bin since it's not a real path.
27060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27062      # a path prefixed by /cygdrive for fixpath to work.
27063      new_path="$CYGWIN_ROOT_PATH$input_path"
27064    fi
27065  fi
27066
27067
27068  if test "x$path" != "x$new_path"; then
27069    BOOT_JDK="$new_path"
27070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27072  fi
27073
27074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27075
27076  path="$BOOT_JDK"
27077  has_colon=`$ECHO $path | $GREP ^.:`
27078  new_path="$path"
27079  if test "x$has_colon" = x; then
27080    # Not in mixed or Windows style, start by that.
27081    new_path=`cmd //c echo $path`
27082  fi
27083
27084
27085  input_path="$new_path"
27086  # Check if we need to convert this using DOS-style short mode. If the path
27087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27088  # take no chances and rewrite it.
27089  # Note: m4 eats our [], so we need to use [ and ] instead.
27090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27091  if test "x$has_forbidden_chars" != x; then
27092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27094  fi
27095
27096
27097  windows_path="$new_path"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    new_path="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    new_path="$unix_path"
27104  fi
27105
27106  if test "x$path" != "x$new_path"; then
27107    BOOT_JDK="$new_path"
27108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27110  fi
27111
27112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27114
27115    else
27116      # We're on a unix platform. Hooray! :)
27117      path="$BOOT_JDK"
27118      has_space=`$ECHO "$path" | $GREP " "`
27119      if test "x$has_space" != x; then
27120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27123      fi
27124
27125      # Use eval to expand a potential ~
27126      eval path="$path"
27127      if test ! -f "$path" && test ! -d "$path"; then
27128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27129      fi
27130
27131      if test -d "$path"; then
27132        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27133      else
27134        dir="`$DIRNAME "$path"`"
27135        base="`$BASENAME "$path"`"
27136        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27137      fi
27138    fi
27139  fi
27140
27141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27142$as_echo_n "checking for Boot JDK... " >&6; }
27143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27144$as_echo "$BOOT_JDK" >&6; }
27145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27146$as_echo_n "checking Boot JDK version... " >&6; }
27147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27149$as_echo "$BOOT_JDK_VERSION" >&6; }
27150          fi # end check jdk version
27151        fi # end check javac
27152      fi # end check java
27153    fi # end check boot jdk found
27154  fi
27155
27156
27157  # Test: Is there a JDK installed in default, well-known locations?
27158
27159  if test "x$BOOT_JDK_FOUND" = xno; then
27160    # Now execute the test
27161
27162  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27163
27164  if test "x$BOOT_JDK_FOUND" = xno; then
27165    # Now execute the test
27166
27167  if test "x$ProgramW6432" != x; then
27168    VIRTUAL_DIR="$ProgramW6432/Java"
27169
27170  windows_path="$VIRTUAL_DIR"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    VIRTUAL_DIR="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    VIRTUAL_DIR="$unix_path"
27177  fi
27178
27179
27180  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27181  BOOT_JDK_SUFFIX=""
27182  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27183  if test "x$ALL_JDKS_FOUND" != x; then
27184    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27185
27186  if test "x$BOOT_JDK_FOUND" = xno; then
27187    # Now execute the test
27188
27189        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27190        if test -d "$BOOT_JDK"; then
27191          BOOT_JDK_FOUND=maybe
27192          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27193$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27194        fi
27195
27196
27197    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27198    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27199      # Do we have a bin/java?
27200      if test ! -x "$BOOT_JDK/bin/java"; then
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27203        BOOT_JDK_FOUND=no
27204      else
27205        # Do we have a bin/javac?
27206        if test ! -x "$BOOT_JDK/bin/javac"; then
27207          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27209          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27210$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27211          BOOT_JDK_FOUND=no
27212        else
27213          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27214          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27215
27216          # Extra M4 quote needed to protect [] in grep expression.
27217          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27218          if test "x$FOUND_CORRECT_VERSION" = x; then
27219            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27221            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27222$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27223            BOOT_JDK_FOUND=no
27224          else
27225            # We're done! :-)
27226            BOOT_JDK_FOUND=yes
27227
27228  # Only process if variable expands to non-empty
27229
27230  if test "x$BOOT_JDK" != x; then
27231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27232
27233  # Input might be given as Windows format, start by converting to
27234  # unix format.
27235  path="$BOOT_JDK"
27236  new_path=`$CYGPATH -u "$path"`
27237
27238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27241  # "foo.exe" is OK but "foo" is an error.
27242  #
27243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27244  # It is also a way to make sure we got the proper file name for the real test later on.
27245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27246  if test "x$test_shortpath" = x; then
27247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27249    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27250  fi
27251
27252  # Call helper function which possibly converts this using DOS-style short mode.
27253  # If so, the updated path is stored in $new_path.
27254
27255  input_path="$new_path"
27256  # Check if we need to convert this using DOS-style short mode. If the path
27257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27258  # take no chances and rewrite it.
27259  # Note: m4 eats our [], so we need to use [ and ] instead.
27260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27261  if test "x$has_forbidden_chars" != x; then
27262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27266      # Going to short mode and back again did indeed matter. Since short mode is
27267      # case insensitive, let's make it lowercase to improve readability.
27268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27269      # Now convert it back to Unix-style (cygpath)
27270      input_path=`$CYGPATH -u "$shortmode_path"`
27271      new_path="$input_path"
27272    fi
27273  fi
27274
27275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27276  if test "x$test_cygdrive_prefix" = x; then
27277    # As a simple fix, exclude /usr/bin since it's not a real path.
27278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27280      # a path prefixed by /cygdrive for fixpath to work.
27281      new_path="$CYGWIN_ROOT_PATH$input_path"
27282    fi
27283  fi
27284
27285
27286  if test "x$path" != "x$new_path"; then
27287    BOOT_JDK="$new_path"
27288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27290  fi
27291
27292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27293
27294  path="$BOOT_JDK"
27295  has_colon=`$ECHO $path | $GREP ^.:`
27296  new_path="$path"
27297  if test "x$has_colon" = x; then
27298    # Not in mixed or Windows style, start by that.
27299    new_path=`cmd //c echo $path`
27300  fi
27301
27302
27303  input_path="$new_path"
27304  # Check if we need to convert this using DOS-style short mode. If the path
27305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27306  # take no chances and rewrite it.
27307  # Note: m4 eats our [], so we need to use [ and ] instead.
27308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27309  if test "x$has_forbidden_chars" != x; then
27310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27312  fi
27313
27314
27315  windows_path="$new_path"
27316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27317    unix_path=`$CYGPATH -u "$windows_path"`
27318    new_path="$unix_path"
27319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27321    new_path="$unix_path"
27322  fi
27323
27324  if test "x$path" != "x$new_path"; then
27325    BOOT_JDK="$new_path"
27326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27328  fi
27329
27330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27332
27333    else
27334      # We're on a unix platform. Hooray! :)
27335      path="$BOOT_JDK"
27336      has_space=`$ECHO "$path" | $GREP " "`
27337      if test "x$has_space" != x; then
27338        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27340        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27341      fi
27342
27343      # Use eval to expand a potential ~
27344      eval path="$path"
27345      if test ! -f "$path" && test ! -d "$path"; then
27346        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27347      fi
27348
27349      if test -d "$path"; then
27350        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27351      else
27352        dir="`$DIRNAME "$path"`"
27353        base="`$BASENAME "$path"`"
27354        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27355      fi
27356    fi
27357  fi
27358
27359            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27360$as_echo_n "checking for Boot JDK... " >&6; }
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27362$as_echo "$BOOT_JDK" >&6; }
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27364$as_echo_n "checking Boot JDK version... " >&6; }
27365            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27367$as_echo "$BOOT_JDK_VERSION" >&6; }
27368          fi # end check jdk version
27369        fi # end check javac
27370      fi # end check java
27371    fi # end check boot jdk found
27372  fi
27373
27374    done
27375  fi
27376
27377  fi
27378
27379
27380    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27381    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27382      # Do we have a bin/java?
27383      if test ! -x "$BOOT_JDK/bin/java"; then
27384        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27386        BOOT_JDK_FOUND=no
27387      else
27388        # Do we have a bin/javac?
27389        if test ! -x "$BOOT_JDK/bin/javac"; then
27390          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27392          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27393$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27394          BOOT_JDK_FOUND=no
27395        else
27396          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27397          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27398
27399          # Extra M4 quote needed to protect [] in grep expression.
27400          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27401          if test "x$FOUND_CORRECT_VERSION" = x; then
27402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27404            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27405$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27406            BOOT_JDK_FOUND=no
27407          else
27408            # We're done! :-)
27409            BOOT_JDK_FOUND=yes
27410
27411  # Only process if variable expands to non-empty
27412
27413  if test "x$BOOT_JDK" != x; then
27414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27415
27416  # Input might be given as Windows format, start by converting to
27417  # unix format.
27418  path="$BOOT_JDK"
27419  new_path=`$CYGPATH -u "$path"`
27420
27421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27424  # "foo.exe" is OK but "foo" is an error.
27425  #
27426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27427  # It is also a way to make sure we got the proper file name for the real test later on.
27428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27429  if test "x$test_shortpath" = x; then
27430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27431$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27432    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27433  fi
27434
27435  # Call helper function which possibly converts this using DOS-style short mode.
27436  # If so, the updated path is stored in $new_path.
27437
27438  input_path="$new_path"
27439  # Check if we need to convert this using DOS-style short mode. If the path
27440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27441  # take no chances and rewrite it.
27442  # Note: m4 eats our [], so we need to use [ and ] instead.
27443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27444  if test "x$has_forbidden_chars" != x; then
27445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27449      # Going to short mode and back again did indeed matter. Since short mode is
27450      # case insensitive, let's make it lowercase to improve readability.
27451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27452      # Now convert it back to Unix-style (cygpath)
27453      input_path=`$CYGPATH -u "$shortmode_path"`
27454      new_path="$input_path"
27455    fi
27456  fi
27457
27458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27459  if test "x$test_cygdrive_prefix" = x; then
27460    # As a simple fix, exclude /usr/bin since it's not a real path.
27461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27463      # a path prefixed by /cygdrive for fixpath to work.
27464      new_path="$CYGWIN_ROOT_PATH$input_path"
27465    fi
27466  fi
27467
27468
27469  if test "x$path" != "x$new_path"; then
27470    BOOT_JDK="$new_path"
27471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27473  fi
27474
27475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27476
27477  path="$BOOT_JDK"
27478  has_colon=`$ECHO $path | $GREP ^.:`
27479  new_path="$path"
27480  if test "x$has_colon" = x; then
27481    # Not in mixed or Windows style, start by that.
27482    new_path=`cmd //c echo $path`
27483  fi
27484
27485
27486  input_path="$new_path"
27487  # Check if we need to convert this using DOS-style short mode. If the path
27488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27489  # take no chances and rewrite it.
27490  # Note: m4 eats our [], so we need to use [ and ] instead.
27491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27492  if test "x$has_forbidden_chars" != x; then
27493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27495  fi
27496
27497
27498  windows_path="$new_path"
27499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500    unix_path=`$CYGPATH -u "$windows_path"`
27501    new_path="$unix_path"
27502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27504    new_path="$unix_path"
27505  fi
27506
27507  if test "x$path" != "x$new_path"; then
27508    BOOT_JDK="$new_path"
27509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27510$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27511  fi
27512
27513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27515
27516    else
27517      # We're on a unix platform. Hooray! :)
27518      path="$BOOT_JDK"
27519      has_space=`$ECHO "$path" | $GREP " "`
27520      if test "x$has_space" != x; then
27521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27522$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27524      fi
27525
27526      # Use eval to expand a potential ~
27527      eval path="$path"
27528      if test ! -f "$path" && test ! -d "$path"; then
27529        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27530      fi
27531
27532      if test -d "$path"; then
27533        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27534      else
27535        dir="`$DIRNAME "$path"`"
27536        base="`$BASENAME "$path"`"
27537        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27538      fi
27539    fi
27540  fi
27541
27542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27543$as_echo_n "checking for Boot JDK... " >&6; }
27544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27545$as_echo "$BOOT_JDK" >&6; }
27546            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27547$as_echo_n "checking Boot JDK version... " >&6; }
27548            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27550$as_echo "$BOOT_JDK_VERSION" >&6; }
27551          fi # end check jdk version
27552        fi # end check javac
27553      fi # end check java
27554    fi # end check boot jdk found
27555  fi
27556
27557
27558  if test "x$BOOT_JDK_FOUND" = xno; then
27559    # Now execute the test
27560
27561  if test "x$PROGRAMW6432" != x; then
27562    VIRTUAL_DIR="$PROGRAMW6432/Java"
27563
27564  windows_path="$VIRTUAL_DIR"
27565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27566    unix_path=`$CYGPATH -u "$windows_path"`
27567    VIRTUAL_DIR="$unix_path"
27568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27570    VIRTUAL_DIR="$unix_path"
27571  fi
27572
27573
27574  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27575  BOOT_JDK_SUFFIX=""
27576  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27577  if test "x$ALL_JDKS_FOUND" != x; then
27578    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27579
27580  if test "x$BOOT_JDK_FOUND" = xno; then
27581    # Now execute the test
27582
27583        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27584        if test -d "$BOOT_JDK"; then
27585          BOOT_JDK_FOUND=maybe
27586          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27587$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27588        fi
27589
27590
27591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27593      # Do we have a bin/java?
27594      if test ! -x "$BOOT_JDK/bin/java"; then
27595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27597        BOOT_JDK_FOUND=no
27598      else
27599        # Do we have a bin/javac?
27600        if test ! -x "$BOOT_JDK/bin/javac"; then
27601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27605          BOOT_JDK_FOUND=no
27606        else
27607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27609
27610          # Extra M4 quote needed to protect [] in grep expression.
27611          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27612          if test "x$FOUND_CORRECT_VERSION" = x; then
27613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27617            BOOT_JDK_FOUND=no
27618          else
27619            # We're done! :-)
27620            BOOT_JDK_FOUND=yes
27621
27622  # Only process if variable expands to non-empty
27623
27624  if test "x$BOOT_JDK" != x; then
27625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27626
27627  # Input might be given as Windows format, start by converting to
27628  # unix format.
27629  path="$BOOT_JDK"
27630  new_path=`$CYGPATH -u "$path"`
27631
27632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27635  # "foo.exe" is OK but "foo" is an error.
27636  #
27637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27638  # It is also a way to make sure we got the proper file name for the real test later on.
27639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27640  if test "x$test_shortpath" = x; then
27641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27644  fi
27645
27646  # Call helper function which possibly converts this using DOS-style short mode.
27647  # If so, the updated path is stored in $new_path.
27648
27649  input_path="$new_path"
27650  # Check if we need to convert this using DOS-style short mode. If the path
27651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27652  # take no chances and rewrite it.
27653  # Note: m4 eats our [], so we need to use [ and ] instead.
27654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27655  if test "x$has_forbidden_chars" != x; then
27656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27660      # Going to short mode and back again did indeed matter. Since short mode is
27661      # case insensitive, let's make it lowercase to improve readability.
27662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27663      # Now convert it back to Unix-style (cygpath)
27664      input_path=`$CYGPATH -u "$shortmode_path"`
27665      new_path="$input_path"
27666    fi
27667  fi
27668
27669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27670  if test "x$test_cygdrive_prefix" = x; then
27671    # As a simple fix, exclude /usr/bin since it's not a real path.
27672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27674      # a path prefixed by /cygdrive for fixpath to work.
27675      new_path="$CYGWIN_ROOT_PATH$input_path"
27676    fi
27677  fi
27678
27679
27680  if test "x$path" != "x$new_path"; then
27681    BOOT_JDK="$new_path"
27682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27684  fi
27685
27686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27687
27688  path="$BOOT_JDK"
27689  has_colon=`$ECHO $path | $GREP ^.:`
27690  new_path="$path"
27691  if test "x$has_colon" = x; then
27692    # Not in mixed or Windows style, start by that.
27693    new_path=`cmd //c echo $path`
27694  fi
27695
27696
27697  input_path="$new_path"
27698  # Check if we need to convert this using DOS-style short mode. If the path
27699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27700  # take no chances and rewrite it.
27701  # Note: m4 eats our [], so we need to use [ and ] instead.
27702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27703  if test "x$has_forbidden_chars" != x; then
27704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27706  fi
27707
27708
27709  windows_path="$new_path"
27710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27711    unix_path=`$CYGPATH -u "$windows_path"`
27712    new_path="$unix_path"
27713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27715    new_path="$unix_path"
27716  fi
27717
27718  if test "x$path" != "x$new_path"; then
27719    BOOT_JDK="$new_path"
27720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27722  fi
27723
27724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27726
27727    else
27728      # We're on a unix platform. Hooray! :)
27729      path="$BOOT_JDK"
27730      has_space=`$ECHO "$path" | $GREP " "`
27731      if test "x$has_space" != x; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27735      fi
27736
27737      # Use eval to expand a potential ~
27738      eval path="$path"
27739      if test ! -f "$path" && test ! -d "$path"; then
27740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27741      fi
27742
27743      if test -d "$path"; then
27744        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27745      else
27746        dir="`$DIRNAME "$path"`"
27747        base="`$BASENAME "$path"`"
27748        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27749      fi
27750    fi
27751  fi
27752
27753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27754$as_echo_n "checking for Boot JDK... " >&6; }
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27756$as_echo "$BOOT_JDK" >&6; }
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27758$as_echo_n "checking Boot JDK version... " >&6; }
27759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27761$as_echo "$BOOT_JDK_VERSION" >&6; }
27762          fi # end check jdk version
27763        fi # end check javac
27764      fi # end check java
27765    fi # end check boot jdk found
27766  fi
27767
27768    done
27769  fi
27770
27771  fi
27772
27773
27774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27776      # Do we have a bin/java?
27777      if test ! -x "$BOOT_JDK/bin/java"; then
27778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27780        BOOT_JDK_FOUND=no
27781      else
27782        # Do we have a bin/javac?
27783        if test ! -x "$BOOT_JDK/bin/javac"; then
27784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27788          BOOT_JDK_FOUND=no
27789        else
27790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27792
27793          # Extra M4 quote needed to protect [] in grep expression.
27794          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27795          if test "x$FOUND_CORRECT_VERSION" = x; then
27796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27800            BOOT_JDK_FOUND=no
27801          else
27802            # We're done! :-)
27803            BOOT_JDK_FOUND=yes
27804
27805  # Only process if variable expands to non-empty
27806
27807  if test "x$BOOT_JDK" != x; then
27808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27809
27810  # Input might be given as Windows format, start by converting to
27811  # unix format.
27812  path="$BOOT_JDK"
27813  new_path=`$CYGPATH -u "$path"`
27814
27815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27818  # "foo.exe" is OK but "foo" is an error.
27819  #
27820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27821  # It is also a way to make sure we got the proper file name for the real test later on.
27822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27823  if test "x$test_shortpath" = x; then
27824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27827  fi
27828
27829  # Call helper function which possibly converts this using DOS-style short mode.
27830  # If so, the updated path is stored in $new_path.
27831
27832  input_path="$new_path"
27833  # Check if we need to convert this using DOS-style short mode. If the path
27834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27835  # take no chances and rewrite it.
27836  # Note: m4 eats our [], so we need to use [ and ] instead.
27837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27838  if test "x$has_forbidden_chars" != x; then
27839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27843      # Going to short mode and back again did indeed matter. Since short mode is
27844      # case insensitive, let's make it lowercase to improve readability.
27845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27846      # Now convert it back to Unix-style (cygpath)
27847      input_path=`$CYGPATH -u "$shortmode_path"`
27848      new_path="$input_path"
27849    fi
27850  fi
27851
27852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27853  if test "x$test_cygdrive_prefix" = x; then
27854    # As a simple fix, exclude /usr/bin since it's not a real path.
27855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27857      # a path prefixed by /cygdrive for fixpath to work.
27858      new_path="$CYGWIN_ROOT_PATH$input_path"
27859    fi
27860  fi
27861
27862
27863  if test "x$path" != "x$new_path"; then
27864    BOOT_JDK="$new_path"
27865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27867  fi
27868
27869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27870
27871  path="$BOOT_JDK"
27872  has_colon=`$ECHO $path | $GREP ^.:`
27873  new_path="$path"
27874  if test "x$has_colon" = x; then
27875    # Not in mixed or Windows style, start by that.
27876    new_path=`cmd //c echo $path`
27877  fi
27878
27879
27880  input_path="$new_path"
27881  # Check if we need to convert this using DOS-style short mode. If the path
27882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27883  # take no chances and rewrite it.
27884  # Note: m4 eats our [], so we need to use [ and ] instead.
27885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27886  if test "x$has_forbidden_chars" != x; then
27887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27889  fi
27890
27891
27892  windows_path="$new_path"
27893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27894    unix_path=`$CYGPATH -u "$windows_path"`
27895    new_path="$unix_path"
27896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27898    new_path="$unix_path"
27899  fi
27900
27901  if test "x$path" != "x$new_path"; then
27902    BOOT_JDK="$new_path"
27903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27905  fi
27906
27907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27909
27910    else
27911      # We're on a unix platform. Hooray! :)
27912      path="$BOOT_JDK"
27913      has_space=`$ECHO "$path" | $GREP " "`
27914      if test "x$has_space" != x; then
27915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27918      fi
27919
27920      # Use eval to expand a potential ~
27921      eval path="$path"
27922      if test ! -f "$path" && test ! -d "$path"; then
27923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27924      fi
27925
27926      if test -d "$path"; then
27927        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27928      else
27929        dir="`$DIRNAME "$path"`"
27930        base="`$BASENAME "$path"`"
27931        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27932      fi
27933    fi
27934  fi
27935
27936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27937$as_echo_n "checking for Boot JDK... " >&6; }
27938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27939$as_echo "$BOOT_JDK" >&6; }
27940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27941$as_echo_n "checking Boot JDK version... " >&6; }
27942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27944$as_echo "$BOOT_JDK_VERSION" >&6; }
27945          fi # end check jdk version
27946        fi # end check javac
27947      fi # end check java
27948    fi # end check boot jdk found
27949  fi
27950
27951
27952  if test "x$BOOT_JDK_FOUND" = xno; then
27953    # Now execute the test
27954
27955  if test "x$PROGRAMFILES" != x; then
27956    VIRTUAL_DIR="$PROGRAMFILES/Java"
27957
27958  windows_path="$VIRTUAL_DIR"
27959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27960    unix_path=`$CYGPATH -u "$windows_path"`
27961    VIRTUAL_DIR="$unix_path"
27962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27964    VIRTUAL_DIR="$unix_path"
27965  fi
27966
27967
27968  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27969  BOOT_JDK_SUFFIX=""
27970  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27971  if test "x$ALL_JDKS_FOUND" != x; then
27972    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27973
27974  if test "x$BOOT_JDK_FOUND" = xno; then
27975    # Now execute the test
27976
27977        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27978        if test -d "$BOOT_JDK"; then
27979          BOOT_JDK_FOUND=maybe
27980          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27981$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27982        fi
27983
27984
27985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27987      # Do we have a bin/java?
27988      if test ! -x "$BOOT_JDK/bin/java"; then
27989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27991        BOOT_JDK_FOUND=no
27992      else
27993        # Do we have a bin/javac?
27994        if test ! -x "$BOOT_JDK/bin/javac"; then
27995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27999          BOOT_JDK_FOUND=no
28000        else
28001          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28002          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28003
28004          # Extra M4 quote needed to protect [] in grep expression.
28005          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28006          if test "x$FOUND_CORRECT_VERSION" = x; then
28007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28009            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28010$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28011            BOOT_JDK_FOUND=no
28012          else
28013            # We're done! :-)
28014            BOOT_JDK_FOUND=yes
28015
28016  # Only process if variable expands to non-empty
28017
28018  if test "x$BOOT_JDK" != x; then
28019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28020
28021  # Input might be given as Windows format, start by converting to
28022  # unix format.
28023  path="$BOOT_JDK"
28024  new_path=`$CYGPATH -u "$path"`
28025
28026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28029  # "foo.exe" is OK but "foo" is an error.
28030  #
28031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28032  # It is also a way to make sure we got the proper file name for the real test later on.
28033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28034  if test "x$test_shortpath" = x; then
28035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28038  fi
28039
28040  # Call helper function which possibly converts this using DOS-style short mode.
28041  # If so, the updated path is stored in $new_path.
28042
28043  input_path="$new_path"
28044  # Check if we need to convert this using DOS-style short mode. If the path
28045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28046  # take no chances and rewrite it.
28047  # Note: m4 eats our [], so we need to use [ and ] instead.
28048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28049  if test "x$has_forbidden_chars" != x; then
28050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28054      # Going to short mode and back again did indeed matter. Since short mode is
28055      # case insensitive, let's make it lowercase to improve readability.
28056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28057      # Now convert it back to Unix-style (cygpath)
28058      input_path=`$CYGPATH -u "$shortmode_path"`
28059      new_path="$input_path"
28060    fi
28061  fi
28062
28063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28064  if test "x$test_cygdrive_prefix" = x; then
28065    # As a simple fix, exclude /usr/bin since it's not a real path.
28066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28068      # a path prefixed by /cygdrive for fixpath to work.
28069      new_path="$CYGWIN_ROOT_PATH$input_path"
28070    fi
28071  fi
28072
28073
28074  if test "x$path" != "x$new_path"; then
28075    BOOT_JDK="$new_path"
28076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28078  fi
28079
28080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28081
28082  path="$BOOT_JDK"
28083  has_colon=`$ECHO $path | $GREP ^.:`
28084  new_path="$path"
28085  if test "x$has_colon" = x; then
28086    # Not in mixed or Windows style, start by that.
28087    new_path=`cmd //c echo $path`
28088  fi
28089
28090
28091  input_path="$new_path"
28092  # Check if we need to convert this using DOS-style short mode. If the path
28093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28094  # take no chances and rewrite it.
28095  # Note: m4 eats our [], so we need to use [ and ] instead.
28096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28097  if test "x$has_forbidden_chars" != x; then
28098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28100  fi
28101
28102
28103  windows_path="$new_path"
28104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28105    unix_path=`$CYGPATH -u "$windows_path"`
28106    new_path="$unix_path"
28107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28109    new_path="$unix_path"
28110  fi
28111
28112  if test "x$path" != "x$new_path"; then
28113    BOOT_JDK="$new_path"
28114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28116  fi
28117
28118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28120
28121    else
28122      # We're on a unix platform. Hooray! :)
28123      path="$BOOT_JDK"
28124      has_space=`$ECHO "$path" | $GREP " "`
28125      if test "x$has_space" != x; then
28126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28129      fi
28130
28131      # Use eval to expand a potential ~
28132      eval path="$path"
28133      if test ! -f "$path" && test ! -d "$path"; then
28134        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28135      fi
28136
28137      if test -d "$path"; then
28138        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28139      else
28140        dir="`$DIRNAME "$path"`"
28141        base="`$BASENAME "$path"`"
28142        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28143      fi
28144    fi
28145  fi
28146
28147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28148$as_echo_n "checking for Boot JDK... " >&6; }
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28150$as_echo "$BOOT_JDK" >&6; }
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28152$as_echo_n "checking Boot JDK version... " >&6; }
28153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28155$as_echo "$BOOT_JDK_VERSION" >&6; }
28156          fi # end check jdk version
28157        fi # end check javac
28158      fi # end check java
28159    fi # end check boot jdk found
28160  fi
28161
28162    done
28163  fi
28164
28165  fi
28166
28167
28168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28170      # Do we have a bin/java?
28171      if test ! -x "$BOOT_JDK/bin/java"; then
28172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28174        BOOT_JDK_FOUND=no
28175      else
28176        # Do we have a bin/javac?
28177        if test ! -x "$BOOT_JDK/bin/javac"; then
28178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28182          BOOT_JDK_FOUND=no
28183        else
28184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28186
28187          # Extra M4 quote needed to protect [] in grep expression.
28188          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28189          if test "x$FOUND_CORRECT_VERSION" = x; then
28190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28194            BOOT_JDK_FOUND=no
28195          else
28196            # We're done! :-)
28197            BOOT_JDK_FOUND=yes
28198
28199  # Only process if variable expands to non-empty
28200
28201  if test "x$BOOT_JDK" != x; then
28202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203
28204  # Input might be given as Windows format, start by converting to
28205  # unix format.
28206  path="$BOOT_JDK"
28207  new_path=`$CYGPATH -u "$path"`
28208
28209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28212  # "foo.exe" is OK but "foo" is an error.
28213  #
28214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28215  # It is also a way to make sure we got the proper file name for the real test later on.
28216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28217  if test "x$test_shortpath" = x; then
28218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28221  fi
28222
28223  # Call helper function which possibly converts this using DOS-style short mode.
28224  # If so, the updated path is stored in $new_path.
28225
28226  input_path="$new_path"
28227  # Check if we need to convert this using DOS-style short mode. If the path
28228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28229  # take no chances and rewrite it.
28230  # Note: m4 eats our [], so we need to use [ and ] instead.
28231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28232  if test "x$has_forbidden_chars" != x; then
28233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28237      # Going to short mode and back again did indeed matter. Since short mode is
28238      # case insensitive, let's make it lowercase to improve readability.
28239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28240      # Now convert it back to Unix-style (cygpath)
28241      input_path=`$CYGPATH -u "$shortmode_path"`
28242      new_path="$input_path"
28243    fi
28244  fi
28245
28246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28247  if test "x$test_cygdrive_prefix" = x; then
28248    # As a simple fix, exclude /usr/bin since it's not a real path.
28249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28251      # a path prefixed by /cygdrive for fixpath to work.
28252      new_path="$CYGWIN_ROOT_PATH$input_path"
28253    fi
28254  fi
28255
28256
28257  if test "x$path" != "x$new_path"; then
28258    BOOT_JDK="$new_path"
28259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28261  fi
28262
28263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28264
28265  path="$BOOT_JDK"
28266  has_colon=`$ECHO $path | $GREP ^.:`
28267  new_path="$path"
28268  if test "x$has_colon" = x; then
28269    # Not in mixed or Windows style, start by that.
28270    new_path=`cmd //c echo $path`
28271  fi
28272
28273
28274  input_path="$new_path"
28275  # Check if we need to convert this using DOS-style short mode. If the path
28276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28277  # take no chances and rewrite it.
28278  # Note: m4 eats our [], so we need to use [ and ] instead.
28279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28280  if test "x$has_forbidden_chars" != x; then
28281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28283  fi
28284
28285
28286  windows_path="$new_path"
28287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28288    unix_path=`$CYGPATH -u "$windows_path"`
28289    new_path="$unix_path"
28290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28292    new_path="$unix_path"
28293  fi
28294
28295  if test "x$path" != "x$new_path"; then
28296    BOOT_JDK="$new_path"
28297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28299  fi
28300
28301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28303
28304    else
28305      # We're on a unix platform. Hooray! :)
28306      path="$BOOT_JDK"
28307      has_space=`$ECHO "$path" | $GREP " "`
28308      if test "x$has_space" != x; then
28309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28312      fi
28313
28314      # Use eval to expand a potential ~
28315      eval path="$path"
28316      if test ! -f "$path" && test ! -d "$path"; then
28317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28318      fi
28319
28320      if test -d "$path"; then
28321        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28322      else
28323        dir="`$DIRNAME "$path"`"
28324        base="`$BASENAME "$path"`"
28325        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28326      fi
28327    fi
28328  fi
28329
28330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28331$as_echo_n "checking for Boot JDK... " >&6; }
28332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28333$as_echo "$BOOT_JDK" >&6; }
28334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28335$as_echo_n "checking Boot JDK version... " >&6; }
28336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28338$as_echo "$BOOT_JDK_VERSION" >&6; }
28339          fi # end check jdk version
28340        fi # end check javac
28341      fi # end check java
28342    fi # end check boot jdk found
28343  fi
28344
28345
28346  if test "x$BOOT_JDK_FOUND" = xno; then
28347    # Now execute the test
28348
28349  if test "x$ProgramFiles" != x; then
28350    VIRTUAL_DIR="$ProgramFiles/Java"
28351
28352  windows_path="$VIRTUAL_DIR"
28353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28354    unix_path=`$CYGPATH -u "$windows_path"`
28355    VIRTUAL_DIR="$unix_path"
28356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28358    VIRTUAL_DIR="$unix_path"
28359  fi
28360
28361
28362  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28363  BOOT_JDK_SUFFIX=""
28364  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28365  if test "x$ALL_JDKS_FOUND" != x; then
28366    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28367
28368  if test "x$BOOT_JDK_FOUND" = xno; then
28369    # Now execute the test
28370
28371        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28372        if test -d "$BOOT_JDK"; then
28373          BOOT_JDK_FOUND=maybe
28374          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28375$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28376        fi
28377
28378
28379    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28380    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28381      # Do we have a bin/java?
28382      if test ! -x "$BOOT_JDK/bin/java"; then
28383        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28385        BOOT_JDK_FOUND=no
28386      else
28387        # Do we have a bin/javac?
28388        if test ! -x "$BOOT_JDK/bin/javac"; then
28389          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28391          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28392$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28393          BOOT_JDK_FOUND=no
28394        else
28395          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28396          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28397
28398          # Extra M4 quote needed to protect [] in grep expression.
28399          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28400          if test "x$FOUND_CORRECT_VERSION" = x; then
28401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28403            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28404$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28405            BOOT_JDK_FOUND=no
28406          else
28407            # We're done! :-)
28408            BOOT_JDK_FOUND=yes
28409
28410  # Only process if variable expands to non-empty
28411
28412  if test "x$BOOT_JDK" != x; then
28413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28414
28415  # Input might be given as Windows format, start by converting to
28416  # unix format.
28417  path="$BOOT_JDK"
28418  new_path=`$CYGPATH -u "$path"`
28419
28420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28423  # "foo.exe" is OK but "foo" is an error.
28424  #
28425  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28426  # It is also a way to make sure we got the proper file name for the real test later on.
28427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28428  if test "x$test_shortpath" = x; then
28429    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28431    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28432  fi
28433
28434  # Call helper function which possibly converts this using DOS-style short mode.
28435  # If so, the updated path is stored in $new_path.
28436
28437  input_path="$new_path"
28438  # Check if we need to convert this using DOS-style short mode. If the path
28439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28440  # take no chances and rewrite it.
28441  # Note: m4 eats our [], so we need to use [ and ] instead.
28442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28443  if test "x$has_forbidden_chars" != x; then
28444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28445    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28446    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28447    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28448      # Going to short mode and back again did indeed matter. Since short mode is
28449      # case insensitive, let's make it lowercase to improve readability.
28450      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28451      # Now convert it back to Unix-style (cygpath)
28452      input_path=`$CYGPATH -u "$shortmode_path"`
28453      new_path="$input_path"
28454    fi
28455  fi
28456
28457  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28458  if test "x$test_cygdrive_prefix" = x; then
28459    # As a simple fix, exclude /usr/bin since it's not a real path.
28460    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28461      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28462      # a path prefixed by /cygdrive for fixpath to work.
28463      new_path="$CYGWIN_ROOT_PATH$input_path"
28464    fi
28465  fi
28466
28467
28468  if test "x$path" != "x$new_path"; then
28469    BOOT_JDK="$new_path"
28470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28472  fi
28473
28474    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28475
28476  path="$BOOT_JDK"
28477  has_colon=`$ECHO $path | $GREP ^.:`
28478  new_path="$path"
28479  if test "x$has_colon" = x; then
28480    # Not in mixed or Windows style, start by that.
28481    new_path=`cmd //c echo $path`
28482  fi
28483
28484
28485  input_path="$new_path"
28486  # Check if we need to convert this using DOS-style short mode. If the path
28487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28488  # take no chances and rewrite it.
28489  # Note: m4 eats our [], so we need to use [ and ] instead.
28490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28491  if test "x$has_forbidden_chars" != x; then
28492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28494  fi
28495
28496
28497  windows_path="$new_path"
28498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28499    unix_path=`$CYGPATH -u "$windows_path"`
28500    new_path="$unix_path"
28501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28503    new_path="$unix_path"
28504  fi
28505
28506  if test "x$path" != "x$new_path"; then
28507    BOOT_JDK="$new_path"
28508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28509$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28510  fi
28511
28512  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28513  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28514
28515    else
28516      # We're on a unix platform. Hooray! :)
28517      path="$BOOT_JDK"
28518      has_space=`$ECHO "$path" | $GREP " "`
28519      if test "x$has_space" != x; then
28520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28522        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28523      fi
28524
28525      # Use eval to expand a potential ~
28526      eval path="$path"
28527      if test ! -f "$path" && test ! -d "$path"; then
28528        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28529      fi
28530
28531      if test -d "$path"; then
28532        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28533      else
28534        dir="`$DIRNAME "$path"`"
28535        base="`$BASENAME "$path"`"
28536        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28537      fi
28538    fi
28539  fi
28540
28541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28542$as_echo_n "checking for Boot JDK... " >&6; }
28543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28544$as_echo "$BOOT_JDK" >&6; }
28545            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28546$as_echo_n "checking Boot JDK version... " >&6; }
28547            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28549$as_echo "$BOOT_JDK_VERSION" >&6; }
28550          fi # end check jdk version
28551        fi # end check javac
28552      fi # end check java
28553    fi # end check boot jdk found
28554  fi
28555
28556    done
28557  fi
28558
28559  fi
28560
28561
28562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28564      # Do we have a bin/java?
28565      if test ! -x "$BOOT_JDK/bin/java"; then
28566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28568        BOOT_JDK_FOUND=no
28569      else
28570        # Do we have a bin/javac?
28571        if test ! -x "$BOOT_JDK/bin/javac"; then
28572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28576          BOOT_JDK_FOUND=no
28577        else
28578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28580
28581          # Extra M4 quote needed to protect [] in grep expression.
28582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28583          if test "x$FOUND_CORRECT_VERSION" = x; then
28584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28588            BOOT_JDK_FOUND=no
28589          else
28590            # We're done! :-)
28591            BOOT_JDK_FOUND=yes
28592
28593  # Only process if variable expands to non-empty
28594
28595  if test "x$BOOT_JDK" != x; then
28596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28597
28598  # Input might be given as Windows format, start by converting to
28599  # unix format.
28600  path="$BOOT_JDK"
28601  new_path=`$CYGPATH -u "$path"`
28602
28603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28606  # "foo.exe" is OK but "foo" is an error.
28607  #
28608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28609  # It is also a way to make sure we got the proper file name for the real test later on.
28610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28611  if test "x$test_shortpath" = x; then
28612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28615  fi
28616
28617  # Call helper function which possibly converts this using DOS-style short mode.
28618  # If so, the updated path is stored in $new_path.
28619
28620  input_path="$new_path"
28621  # Check if we need to convert this using DOS-style short mode. If the path
28622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28623  # take no chances and rewrite it.
28624  # Note: m4 eats our [], so we need to use [ and ] instead.
28625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28626  if test "x$has_forbidden_chars" != x; then
28627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28631      # Going to short mode and back again did indeed matter. Since short mode is
28632      # case insensitive, let's make it lowercase to improve readability.
28633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28634      # Now convert it back to Unix-style (cygpath)
28635      input_path=`$CYGPATH -u "$shortmode_path"`
28636      new_path="$input_path"
28637    fi
28638  fi
28639
28640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28641  if test "x$test_cygdrive_prefix" = x; then
28642    # As a simple fix, exclude /usr/bin since it's not a real path.
28643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28645      # a path prefixed by /cygdrive for fixpath to work.
28646      new_path="$CYGWIN_ROOT_PATH$input_path"
28647    fi
28648  fi
28649
28650
28651  if test "x$path" != "x$new_path"; then
28652    BOOT_JDK="$new_path"
28653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28655  fi
28656
28657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28658
28659  path="$BOOT_JDK"
28660  has_colon=`$ECHO $path | $GREP ^.:`
28661  new_path="$path"
28662  if test "x$has_colon" = x; then
28663    # Not in mixed or Windows style, start by that.
28664    new_path=`cmd //c echo $path`
28665  fi
28666
28667
28668  input_path="$new_path"
28669  # Check if we need to convert this using DOS-style short mode. If the path
28670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28671  # take no chances and rewrite it.
28672  # Note: m4 eats our [], so we need to use [ and ] instead.
28673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28674  if test "x$has_forbidden_chars" != x; then
28675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28677  fi
28678
28679
28680  windows_path="$new_path"
28681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682    unix_path=`$CYGPATH -u "$windows_path"`
28683    new_path="$unix_path"
28684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28686    new_path="$unix_path"
28687  fi
28688
28689  if test "x$path" != "x$new_path"; then
28690    BOOT_JDK="$new_path"
28691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28693  fi
28694
28695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28697
28698    else
28699      # We're on a unix platform. Hooray! :)
28700      path="$BOOT_JDK"
28701      has_space=`$ECHO "$path" | $GREP " "`
28702      if test "x$has_space" != x; then
28703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28706      fi
28707
28708      # Use eval to expand a potential ~
28709      eval path="$path"
28710      if test ! -f "$path" && test ! -d "$path"; then
28711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28712      fi
28713
28714      if test -d "$path"; then
28715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28716      else
28717        dir="`$DIRNAME "$path"`"
28718        base="`$BASENAME "$path"`"
28719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28720      fi
28721    fi
28722  fi
28723
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28725$as_echo_n "checking for Boot JDK... " >&6; }
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28727$as_echo "$BOOT_JDK" >&6; }
28728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28729$as_echo_n "checking Boot JDK version... " >&6; }
28730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28732$as_echo "$BOOT_JDK_VERSION" >&6; }
28733          fi # end check jdk version
28734        fi # end check javac
28735      fi # end check java
28736    fi # end check boot jdk found
28737  fi
28738
28739
28740  if test "x$BOOT_JDK_FOUND" = xno; then
28741    # Now execute the test
28742
28743  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28744  BOOT_JDK_SUFFIX=""
28745  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28746  if test "x$ALL_JDKS_FOUND" != x; then
28747    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28748
28749  if test "x$BOOT_JDK_FOUND" = xno; then
28750    # Now execute the test
28751
28752        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28753        if test -d "$BOOT_JDK"; then
28754          BOOT_JDK_FOUND=maybe
28755          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28756$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28757        fi
28758
28759
28760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28762      # Do we have a bin/java?
28763      if test ! -x "$BOOT_JDK/bin/java"; then
28764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28766        BOOT_JDK_FOUND=no
28767      else
28768        # Do we have a bin/javac?
28769        if test ! -x "$BOOT_JDK/bin/javac"; then
28770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28774          BOOT_JDK_FOUND=no
28775        else
28776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28778
28779          # Extra M4 quote needed to protect [] in grep expression.
28780          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28781          if test "x$FOUND_CORRECT_VERSION" = x; then
28782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28786            BOOT_JDK_FOUND=no
28787          else
28788            # We're done! :-)
28789            BOOT_JDK_FOUND=yes
28790
28791  # Only process if variable expands to non-empty
28792
28793  if test "x$BOOT_JDK" != x; then
28794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28795
28796  # Input might be given as Windows format, start by converting to
28797  # unix format.
28798  path="$BOOT_JDK"
28799  new_path=`$CYGPATH -u "$path"`
28800
28801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28804  # "foo.exe" is OK but "foo" is an error.
28805  #
28806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28807  # It is also a way to make sure we got the proper file name for the real test later on.
28808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28809  if test "x$test_shortpath" = x; then
28810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28813  fi
28814
28815  # Call helper function which possibly converts this using DOS-style short mode.
28816  # If so, the updated path is stored in $new_path.
28817
28818  input_path="$new_path"
28819  # Check if we need to convert this using DOS-style short mode. If the path
28820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28821  # take no chances and rewrite it.
28822  # Note: m4 eats our [], so we need to use [ and ] instead.
28823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28824  if test "x$has_forbidden_chars" != x; then
28825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28829      # Going to short mode and back again did indeed matter. Since short mode is
28830      # case insensitive, let's make it lowercase to improve readability.
28831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28832      # Now convert it back to Unix-style (cygpath)
28833      input_path=`$CYGPATH -u "$shortmode_path"`
28834      new_path="$input_path"
28835    fi
28836  fi
28837
28838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28839  if test "x$test_cygdrive_prefix" = x; then
28840    # As a simple fix, exclude /usr/bin since it's not a real path.
28841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28843      # a path prefixed by /cygdrive for fixpath to work.
28844      new_path="$CYGWIN_ROOT_PATH$input_path"
28845    fi
28846  fi
28847
28848
28849  if test "x$path" != "x$new_path"; then
28850    BOOT_JDK="$new_path"
28851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28853  fi
28854
28855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28856
28857  path="$BOOT_JDK"
28858  has_colon=`$ECHO $path | $GREP ^.:`
28859  new_path="$path"
28860  if test "x$has_colon" = x; then
28861    # Not in mixed or Windows style, start by that.
28862    new_path=`cmd //c echo $path`
28863  fi
28864
28865
28866  input_path="$new_path"
28867  # Check if we need to convert this using DOS-style short mode. If the path
28868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28869  # take no chances and rewrite it.
28870  # Note: m4 eats our [], so we need to use [ and ] instead.
28871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28872  if test "x$has_forbidden_chars" != x; then
28873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28875  fi
28876
28877
28878  windows_path="$new_path"
28879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28880    unix_path=`$CYGPATH -u "$windows_path"`
28881    new_path="$unix_path"
28882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28884    new_path="$unix_path"
28885  fi
28886
28887  if test "x$path" != "x$new_path"; then
28888    BOOT_JDK="$new_path"
28889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28891  fi
28892
28893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28895
28896    else
28897      # We're on a unix platform. Hooray! :)
28898      path="$BOOT_JDK"
28899      has_space=`$ECHO "$path" | $GREP " "`
28900      if test "x$has_space" != x; then
28901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28904      fi
28905
28906      # Use eval to expand a potential ~
28907      eval path="$path"
28908      if test ! -f "$path" && test ! -d "$path"; then
28909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28910      fi
28911
28912      if test -d "$path"; then
28913        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28914      else
28915        dir="`$DIRNAME "$path"`"
28916        base="`$BASENAME "$path"`"
28917        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28918      fi
28919    fi
28920  fi
28921
28922            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28923$as_echo_n "checking for Boot JDK... " >&6; }
28924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28925$as_echo "$BOOT_JDK" >&6; }
28926            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28927$as_echo_n "checking Boot JDK version... " >&6; }
28928            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28930$as_echo "$BOOT_JDK_VERSION" >&6; }
28931          fi # end check jdk version
28932        fi # end check javac
28933      fi # end check java
28934    fi # end check boot jdk found
28935  fi
28936
28937    done
28938  fi
28939
28940
28941    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28942    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28943      # Do we have a bin/java?
28944      if test ! -x "$BOOT_JDK/bin/java"; then
28945        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28947        BOOT_JDK_FOUND=no
28948      else
28949        # Do we have a bin/javac?
28950        if test ! -x "$BOOT_JDK/bin/javac"; then
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28953          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28954$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28955          BOOT_JDK_FOUND=no
28956        else
28957          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28958          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28959
28960          # Extra M4 quote needed to protect [] in grep expression.
28961          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28962          if test "x$FOUND_CORRECT_VERSION" = x; then
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28965            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28966$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28967            BOOT_JDK_FOUND=no
28968          else
28969            # We're done! :-)
28970            BOOT_JDK_FOUND=yes
28971
28972  # Only process if variable expands to non-empty
28973
28974  if test "x$BOOT_JDK" != x; then
28975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28976
28977  # Input might be given as Windows format, start by converting to
28978  # unix format.
28979  path="$BOOT_JDK"
28980  new_path=`$CYGPATH -u "$path"`
28981
28982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28985  # "foo.exe" is OK but "foo" is an error.
28986  #
28987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28988  # It is also a way to make sure we got the proper file name for the real test later on.
28989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28990  if test "x$test_shortpath" = x; then
28991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28994  fi
28995
28996  # Call helper function which possibly converts this using DOS-style short mode.
28997  # If so, the updated path is stored in $new_path.
28998
28999  input_path="$new_path"
29000  # Check if we need to convert this using DOS-style short mode. If the path
29001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29002  # take no chances and rewrite it.
29003  # Note: m4 eats our [], so we need to use [ and ] instead.
29004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29005  if test "x$has_forbidden_chars" != x; then
29006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29010      # Going to short mode and back again did indeed matter. Since short mode is
29011      # case insensitive, let's make it lowercase to improve readability.
29012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29013      # Now convert it back to Unix-style (cygpath)
29014      input_path=`$CYGPATH -u "$shortmode_path"`
29015      new_path="$input_path"
29016    fi
29017  fi
29018
29019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29020  if test "x$test_cygdrive_prefix" = x; then
29021    # As a simple fix, exclude /usr/bin since it's not a real path.
29022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29024      # a path prefixed by /cygdrive for fixpath to work.
29025      new_path="$CYGWIN_ROOT_PATH$input_path"
29026    fi
29027  fi
29028
29029
29030  if test "x$path" != "x$new_path"; then
29031    BOOT_JDK="$new_path"
29032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29034  fi
29035
29036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29037
29038  path="$BOOT_JDK"
29039  has_colon=`$ECHO $path | $GREP ^.:`
29040  new_path="$path"
29041  if test "x$has_colon" = x; then
29042    # Not in mixed or Windows style, start by that.
29043    new_path=`cmd //c echo $path`
29044  fi
29045
29046
29047  input_path="$new_path"
29048  # Check if we need to convert this using DOS-style short mode. If the path
29049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29050  # take no chances and rewrite it.
29051  # Note: m4 eats our [], so we need to use [ and ] instead.
29052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29053  if test "x$has_forbidden_chars" != x; then
29054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29056  fi
29057
29058
29059  windows_path="$new_path"
29060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29061    unix_path=`$CYGPATH -u "$windows_path"`
29062    new_path="$unix_path"
29063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29065    new_path="$unix_path"
29066  fi
29067
29068  if test "x$path" != "x$new_path"; then
29069    BOOT_JDK="$new_path"
29070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29072  fi
29073
29074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29076
29077    else
29078      # We're on a unix platform. Hooray! :)
29079      path="$BOOT_JDK"
29080      has_space=`$ECHO "$path" | $GREP " "`
29081      if test "x$has_space" != x; then
29082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29085      fi
29086
29087      # Use eval to expand a potential ~
29088      eval path="$path"
29089      if test ! -f "$path" && test ! -d "$path"; then
29090        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29091      fi
29092
29093      if test -d "$path"; then
29094        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29095      else
29096        dir="`$DIRNAME "$path"`"
29097        base="`$BASENAME "$path"`"
29098        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29099      fi
29100    fi
29101  fi
29102
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29104$as_echo_n "checking for Boot JDK... " >&6; }
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29106$as_echo "$BOOT_JDK" >&6; }
29107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29108$as_echo_n "checking Boot JDK version... " >&6; }
29109            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29111$as_echo "$BOOT_JDK_VERSION" >&6; }
29112          fi # end check jdk version
29113        fi # end check javac
29114      fi # end check java
29115    fi # end check boot jdk found
29116  fi
29117
29118  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29119
29120  if test "x$BOOT_JDK_FOUND" = xno; then
29121    # Now execute the test
29122
29123  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29124  BOOT_JDK_SUFFIX="/Contents/Home"
29125  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29126  if test "x$ALL_JDKS_FOUND" != x; then
29127    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29128
29129  if test "x$BOOT_JDK_FOUND" = xno; then
29130    # Now execute the test
29131
29132        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29133        if test -d "$BOOT_JDK"; then
29134          BOOT_JDK_FOUND=maybe
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29136$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29137        fi
29138
29139
29140    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29141    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29142      # Do we have a bin/java?
29143      if test ! -x "$BOOT_JDK/bin/java"; then
29144        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29146        BOOT_JDK_FOUND=no
29147      else
29148        # Do we have a bin/javac?
29149        if test ! -x "$BOOT_JDK/bin/javac"; then
29150          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29152          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29153$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29154          BOOT_JDK_FOUND=no
29155        else
29156          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29157          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29158
29159          # Extra M4 quote needed to protect [] in grep expression.
29160          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29161          if test "x$FOUND_CORRECT_VERSION" = x; then
29162            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29164            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29165$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29166            BOOT_JDK_FOUND=no
29167          else
29168            # We're done! :-)
29169            BOOT_JDK_FOUND=yes
29170
29171  # Only process if variable expands to non-empty
29172
29173  if test "x$BOOT_JDK" != x; then
29174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29175
29176  # Input might be given as Windows format, start by converting to
29177  # unix format.
29178  path="$BOOT_JDK"
29179  new_path=`$CYGPATH -u "$path"`
29180
29181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29184  # "foo.exe" is OK but "foo" is an error.
29185  #
29186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29187  # It is also a way to make sure we got the proper file name for the real test later on.
29188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29189  if test "x$test_shortpath" = x; then
29190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29192    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29193  fi
29194
29195  # Call helper function which possibly converts this using DOS-style short mode.
29196  # If so, the updated path is stored in $new_path.
29197
29198  input_path="$new_path"
29199  # Check if we need to convert this using DOS-style short mode. If the path
29200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29201  # take no chances and rewrite it.
29202  # Note: m4 eats our [], so we need to use [ and ] instead.
29203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29204  if test "x$has_forbidden_chars" != x; then
29205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29209      # Going to short mode and back again did indeed matter. Since short mode is
29210      # case insensitive, let's make it lowercase to improve readability.
29211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29212      # Now convert it back to Unix-style (cygpath)
29213      input_path=`$CYGPATH -u "$shortmode_path"`
29214      new_path="$input_path"
29215    fi
29216  fi
29217
29218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29219  if test "x$test_cygdrive_prefix" = x; then
29220    # As a simple fix, exclude /usr/bin since it's not a real path.
29221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29223      # a path prefixed by /cygdrive for fixpath to work.
29224      new_path="$CYGWIN_ROOT_PATH$input_path"
29225    fi
29226  fi
29227
29228
29229  if test "x$path" != "x$new_path"; then
29230    BOOT_JDK="$new_path"
29231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29233  fi
29234
29235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29236
29237  path="$BOOT_JDK"
29238  has_colon=`$ECHO $path | $GREP ^.:`
29239  new_path="$path"
29240  if test "x$has_colon" = x; then
29241    # Not in mixed or Windows style, start by that.
29242    new_path=`cmd //c echo $path`
29243  fi
29244
29245
29246  input_path="$new_path"
29247  # Check if we need to convert this using DOS-style short mode. If the path
29248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29249  # take no chances and rewrite it.
29250  # Note: m4 eats our [], so we need to use [ and ] instead.
29251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29252  if test "x$has_forbidden_chars" != x; then
29253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29255  fi
29256
29257
29258  windows_path="$new_path"
29259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29260    unix_path=`$CYGPATH -u "$windows_path"`
29261    new_path="$unix_path"
29262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29264    new_path="$unix_path"
29265  fi
29266
29267  if test "x$path" != "x$new_path"; then
29268    BOOT_JDK="$new_path"
29269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29271  fi
29272
29273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29275
29276    else
29277      # We're on a unix platform. Hooray! :)
29278      path="$BOOT_JDK"
29279      has_space=`$ECHO "$path" | $GREP " "`
29280      if test "x$has_space" != x; then
29281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29284      fi
29285
29286      # Use eval to expand a potential ~
29287      eval path="$path"
29288      if test ! -f "$path" && test ! -d "$path"; then
29289        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29290      fi
29291
29292      if test -d "$path"; then
29293        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29294      else
29295        dir="`$DIRNAME "$path"`"
29296        base="`$BASENAME "$path"`"
29297        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29298      fi
29299    fi
29300  fi
29301
29302            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29303$as_echo_n "checking for Boot JDK... " >&6; }
29304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29305$as_echo "$BOOT_JDK" >&6; }
29306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29307$as_echo_n "checking Boot JDK version... " >&6; }
29308            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29310$as_echo "$BOOT_JDK_VERSION" >&6; }
29311          fi # end check jdk version
29312        fi # end check javac
29313      fi # end check java
29314    fi # end check boot jdk found
29315  fi
29316
29317    done
29318  fi
29319
29320
29321    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29322    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29323      # Do we have a bin/java?
29324      if test ! -x "$BOOT_JDK/bin/java"; then
29325        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29327        BOOT_JDK_FOUND=no
29328      else
29329        # Do we have a bin/javac?
29330        if test ! -x "$BOOT_JDK/bin/javac"; then
29331          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29333          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29334$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29335          BOOT_JDK_FOUND=no
29336        else
29337          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29338          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29339
29340          # Extra M4 quote needed to protect [] in grep expression.
29341          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29342          if test "x$FOUND_CORRECT_VERSION" = x; then
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29345            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29346$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29347            BOOT_JDK_FOUND=no
29348          else
29349            # We're done! :-)
29350            BOOT_JDK_FOUND=yes
29351
29352  # Only process if variable expands to non-empty
29353
29354  if test "x$BOOT_JDK" != x; then
29355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29356
29357  # Input might be given as Windows format, start by converting to
29358  # unix format.
29359  path="$BOOT_JDK"
29360  new_path=`$CYGPATH -u "$path"`
29361
29362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29365  # "foo.exe" is OK but "foo" is an error.
29366  #
29367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29368  # It is also a way to make sure we got the proper file name for the real test later on.
29369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29370  if test "x$test_shortpath" = x; then
29371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29374  fi
29375
29376  # Call helper function which possibly converts this using DOS-style short mode.
29377  # If so, the updated path is stored in $new_path.
29378
29379  input_path="$new_path"
29380  # Check if we need to convert this using DOS-style short mode. If the path
29381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29382  # take no chances and rewrite it.
29383  # Note: m4 eats our [], so we need to use [ and ] instead.
29384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29385  if test "x$has_forbidden_chars" != x; then
29386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29390      # Going to short mode and back again did indeed matter. Since short mode is
29391      # case insensitive, let's make it lowercase to improve readability.
29392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29393      # Now convert it back to Unix-style (cygpath)
29394      input_path=`$CYGPATH -u "$shortmode_path"`
29395      new_path="$input_path"
29396    fi
29397  fi
29398
29399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29400  if test "x$test_cygdrive_prefix" = x; then
29401    # As a simple fix, exclude /usr/bin since it's not a real path.
29402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29404      # a path prefixed by /cygdrive for fixpath to work.
29405      new_path="$CYGWIN_ROOT_PATH$input_path"
29406    fi
29407  fi
29408
29409
29410  if test "x$path" != "x$new_path"; then
29411    BOOT_JDK="$new_path"
29412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29414  fi
29415
29416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29417
29418  path="$BOOT_JDK"
29419  has_colon=`$ECHO $path | $GREP ^.:`
29420  new_path="$path"
29421  if test "x$has_colon" = x; then
29422    # Not in mixed or Windows style, start by that.
29423    new_path=`cmd //c echo $path`
29424  fi
29425
29426
29427  input_path="$new_path"
29428  # Check if we need to convert this using DOS-style short mode. If the path
29429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29430  # take no chances and rewrite it.
29431  # Note: m4 eats our [], so we need to use [ and ] instead.
29432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29433  if test "x$has_forbidden_chars" != x; then
29434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29436  fi
29437
29438
29439  windows_path="$new_path"
29440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29441    unix_path=`$CYGPATH -u "$windows_path"`
29442    new_path="$unix_path"
29443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29445    new_path="$unix_path"
29446  fi
29447
29448  if test "x$path" != "x$new_path"; then
29449    BOOT_JDK="$new_path"
29450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29452  fi
29453
29454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29456
29457    else
29458      # We're on a unix platform. Hooray! :)
29459      path="$BOOT_JDK"
29460      has_space=`$ECHO "$path" | $GREP " "`
29461      if test "x$has_space" != x; then
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29465      fi
29466
29467      # Use eval to expand a potential ~
29468      eval path="$path"
29469      if test ! -f "$path" && test ! -d "$path"; then
29470        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29471      fi
29472
29473      if test -d "$path"; then
29474        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29475      else
29476        dir="`$DIRNAME "$path"`"
29477        base="`$BASENAME "$path"`"
29478        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29479      fi
29480    fi
29481  fi
29482
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29484$as_echo_n "checking for Boot JDK... " >&6; }
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29486$as_echo "$BOOT_JDK" >&6; }
29487            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29488$as_echo_n "checking Boot JDK version... " >&6; }
29489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29491$as_echo "$BOOT_JDK_VERSION" >&6; }
29492          fi # end check jdk version
29493        fi # end check javac
29494      fi # end check java
29495    fi # end check boot jdk found
29496  fi
29497
29498
29499  if test "x$BOOT_JDK_FOUND" = xno; then
29500    # Now execute the test
29501
29502  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29503  BOOT_JDK_SUFFIX="/Contents/Home"
29504  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29505  if test "x$ALL_JDKS_FOUND" != x; then
29506    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29507
29508  if test "x$BOOT_JDK_FOUND" = xno; then
29509    # Now execute the test
29510
29511        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29512        if test -d "$BOOT_JDK"; then
29513          BOOT_JDK_FOUND=maybe
29514          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29515$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29516        fi
29517
29518
29519    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29520    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29521      # Do we have a bin/java?
29522      if test ! -x "$BOOT_JDK/bin/java"; then
29523        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29525        BOOT_JDK_FOUND=no
29526      else
29527        # Do we have a bin/javac?
29528        if test ! -x "$BOOT_JDK/bin/javac"; then
29529          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29531          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29532$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29533          BOOT_JDK_FOUND=no
29534        else
29535          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29536          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29537
29538          # Extra M4 quote needed to protect [] in grep expression.
29539          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29540          if test "x$FOUND_CORRECT_VERSION" = x; then
29541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29543            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29544$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29545            BOOT_JDK_FOUND=no
29546          else
29547            # We're done! :-)
29548            BOOT_JDK_FOUND=yes
29549
29550  # Only process if variable expands to non-empty
29551
29552  if test "x$BOOT_JDK" != x; then
29553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29554
29555  # Input might be given as Windows format, start by converting to
29556  # unix format.
29557  path="$BOOT_JDK"
29558  new_path=`$CYGPATH -u "$path"`
29559
29560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29563  # "foo.exe" is OK but "foo" is an error.
29564  #
29565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29566  # It is also a way to make sure we got the proper file name for the real test later on.
29567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29568  if test "x$test_shortpath" = x; then
29569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29570$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29571    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29572  fi
29573
29574  # Call helper function which possibly converts this using DOS-style short mode.
29575  # If so, the updated path is stored in $new_path.
29576
29577  input_path="$new_path"
29578  # Check if we need to convert this using DOS-style short mode. If the path
29579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29580  # take no chances and rewrite it.
29581  # Note: m4 eats our [], so we need to use [ and ] instead.
29582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29583  if test "x$has_forbidden_chars" != x; then
29584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29588      # Going to short mode and back again did indeed matter. Since short mode is
29589      # case insensitive, let's make it lowercase to improve readability.
29590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29591      # Now convert it back to Unix-style (cygpath)
29592      input_path=`$CYGPATH -u "$shortmode_path"`
29593      new_path="$input_path"
29594    fi
29595  fi
29596
29597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29598  if test "x$test_cygdrive_prefix" = x; then
29599    # As a simple fix, exclude /usr/bin since it's not a real path.
29600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29602      # a path prefixed by /cygdrive for fixpath to work.
29603      new_path="$CYGWIN_ROOT_PATH$input_path"
29604    fi
29605  fi
29606
29607
29608  if test "x$path" != "x$new_path"; then
29609    BOOT_JDK="$new_path"
29610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29611$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29612  fi
29613
29614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29615
29616  path="$BOOT_JDK"
29617  has_colon=`$ECHO $path | $GREP ^.:`
29618  new_path="$path"
29619  if test "x$has_colon" = x; then
29620    # Not in mixed or Windows style, start by that.
29621    new_path=`cmd //c echo $path`
29622  fi
29623
29624
29625  input_path="$new_path"
29626  # Check if we need to convert this using DOS-style short mode. If the path
29627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29628  # take no chances and rewrite it.
29629  # Note: m4 eats our [], so we need to use [ and ] instead.
29630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29631  if test "x$has_forbidden_chars" != x; then
29632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29634  fi
29635
29636
29637  windows_path="$new_path"
29638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29639    unix_path=`$CYGPATH -u "$windows_path"`
29640    new_path="$unix_path"
29641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29643    new_path="$unix_path"
29644  fi
29645
29646  if test "x$path" != "x$new_path"; then
29647    BOOT_JDK="$new_path"
29648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29650  fi
29651
29652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29654
29655    else
29656      # We're on a unix platform. Hooray! :)
29657      path="$BOOT_JDK"
29658      has_space=`$ECHO "$path" | $GREP " "`
29659      if test "x$has_space" != x; then
29660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29661$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29663      fi
29664
29665      # Use eval to expand a potential ~
29666      eval path="$path"
29667      if test ! -f "$path" && test ! -d "$path"; then
29668        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29669      fi
29670
29671      if test -d "$path"; then
29672        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29673      else
29674        dir="`$DIRNAME "$path"`"
29675        base="`$BASENAME "$path"`"
29676        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29677      fi
29678    fi
29679  fi
29680
29681            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29682$as_echo_n "checking for Boot JDK... " >&6; }
29683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29684$as_echo "$BOOT_JDK" >&6; }
29685            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29686$as_echo_n "checking Boot JDK version... " >&6; }
29687            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29689$as_echo "$BOOT_JDK_VERSION" >&6; }
29690          fi # end check jdk version
29691        fi # end check javac
29692      fi # end check java
29693    fi # end check boot jdk found
29694  fi
29695
29696    done
29697  fi
29698
29699
29700    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29701    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29702      # Do we have a bin/java?
29703      if test ! -x "$BOOT_JDK/bin/java"; then
29704        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29706        BOOT_JDK_FOUND=no
29707      else
29708        # Do we have a bin/javac?
29709        if test ! -x "$BOOT_JDK/bin/javac"; then
29710          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29712          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29713$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29714          BOOT_JDK_FOUND=no
29715        else
29716          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29717          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29718
29719          # Extra M4 quote needed to protect [] in grep expression.
29720          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29721          if test "x$FOUND_CORRECT_VERSION" = x; then
29722            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29724            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29725$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29726            BOOT_JDK_FOUND=no
29727          else
29728            # We're done! :-)
29729            BOOT_JDK_FOUND=yes
29730
29731  # Only process if variable expands to non-empty
29732
29733  if test "x$BOOT_JDK" != x; then
29734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29735
29736  # Input might be given as Windows format, start by converting to
29737  # unix format.
29738  path="$BOOT_JDK"
29739  new_path=`$CYGPATH -u "$path"`
29740
29741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29744  # "foo.exe" is OK but "foo" is an error.
29745  #
29746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29747  # It is also a way to make sure we got the proper file name for the real test later on.
29748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29749  if test "x$test_shortpath" = x; then
29750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29752    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29753  fi
29754
29755  # Call helper function which possibly converts this using DOS-style short mode.
29756  # If so, the updated path is stored in $new_path.
29757
29758  input_path="$new_path"
29759  # Check if we need to convert this using DOS-style short mode. If the path
29760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29761  # take no chances and rewrite it.
29762  # Note: m4 eats our [], so we need to use [ and ] instead.
29763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29764  if test "x$has_forbidden_chars" != x; then
29765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29769      # Going to short mode and back again did indeed matter. Since short mode is
29770      # case insensitive, let's make it lowercase to improve readability.
29771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29772      # Now convert it back to Unix-style (cygpath)
29773      input_path=`$CYGPATH -u "$shortmode_path"`
29774      new_path="$input_path"
29775    fi
29776  fi
29777
29778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29779  if test "x$test_cygdrive_prefix" = x; then
29780    # As a simple fix, exclude /usr/bin since it's not a real path.
29781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29783      # a path prefixed by /cygdrive for fixpath to work.
29784      new_path="$CYGWIN_ROOT_PATH$input_path"
29785    fi
29786  fi
29787
29788
29789  if test "x$path" != "x$new_path"; then
29790    BOOT_JDK="$new_path"
29791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29793  fi
29794
29795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29796
29797  path="$BOOT_JDK"
29798  has_colon=`$ECHO $path | $GREP ^.:`
29799  new_path="$path"
29800  if test "x$has_colon" = x; then
29801    # Not in mixed or Windows style, start by that.
29802    new_path=`cmd //c echo $path`
29803  fi
29804
29805
29806  input_path="$new_path"
29807  # Check if we need to convert this using DOS-style short mode. If the path
29808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29809  # take no chances and rewrite it.
29810  # Note: m4 eats our [], so we need to use [ and ] instead.
29811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29812  if test "x$has_forbidden_chars" != x; then
29813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29815  fi
29816
29817
29818  windows_path="$new_path"
29819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29820    unix_path=`$CYGPATH -u "$windows_path"`
29821    new_path="$unix_path"
29822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29824    new_path="$unix_path"
29825  fi
29826
29827  if test "x$path" != "x$new_path"; then
29828    BOOT_JDK="$new_path"
29829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29830$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29831  fi
29832
29833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29835
29836    else
29837      # We're on a unix platform. Hooray! :)
29838      path="$BOOT_JDK"
29839      has_space=`$ECHO "$path" | $GREP " "`
29840      if test "x$has_space" != x; then
29841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29844      fi
29845
29846      # Use eval to expand a potential ~
29847      eval path="$path"
29848      if test ! -f "$path" && test ! -d "$path"; then
29849        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29850      fi
29851
29852      if test -d "$path"; then
29853        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29854      else
29855        dir="`$DIRNAME "$path"`"
29856        base="`$BASENAME "$path"`"
29857        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29858      fi
29859    fi
29860  fi
29861
29862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29863$as_echo_n "checking for Boot JDK... " >&6; }
29864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29865$as_echo "$BOOT_JDK" >&6; }
29866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29867$as_echo_n "checking Boot JDK version... " >&6; }
29868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29870$as_echo "$BOOT_JDK_VERSION" >&6; }
29871          fi # end check jdk version
29872        fi # end check javac
29873      fi # end check java
29874    fi # end check boot jdk found
29875  fi
29876
29877  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29878
29879  if test "x$BOOT_JDK_FOUND" = xno; then
29880    # Now execute the test
29881
29882  BOOT_JDK_PREFIX="/usr/lib/jvm"
29883  BOOT_JDK_SUFFIX=""
29884  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29885  if test "x$ALL_JDKS_FOUND" != x; then
29886    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29887
29888  if test "x$BOOT_JDK_FOUND" = xno; then
29889    # Now execute the test
29890
29891        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29892        if test -d "$BOOT_JDK"; then
29893          BOOT_JDK_FOUND=maybe
29894          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29895$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29896        fi
29897
29898
29899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29901      # Do we have a bin/java?
29902      if test ! -x "$BOOT_JDK/bin/java"; then
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29905        BOOT_JDK_FOUND=no
29906      else
29907        # Do we have a bin/javac?
29908        if test ! -x "$BOOT_JDK/bin/javac"; then
29909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29913          BOOT_JDK_FOUND=no
29914        else
29915          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29916          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29917
29918          # Extra M4 quote needed to protect [] in grep expression.
29919          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29920          if test "x$FOUND_CORRECT_VERSION" = x; then
29921            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29923            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29924$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29925            BOOT_JDK_FOUND=no
29926          else
29927            # We're done! :-)
29928            BOOT_JDK_FOUND=yes
29929
29930  # Only process if variable expands to non-empty
29931
29932  if test "x$BOOT_JDK" != x; then
29933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29934
29935  # Input might be given as Windows format, start by converting to
29936  # unix format.
29937  path="$BOOT_JDK"
29938  new_path=`$CYGPATH -u "$path"`
29939
29940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29943  # "foo.exe" is OK but "foo" is an error.
29944  #
29945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29946  # It is also a way to make sure we got the proper file name for the real test later on.
29947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29948  if test "x$test_shortpath" = x; then
29949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29951    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29952  fi
29953
29954  # Call helper function which possibly converts this using DOS-style short mode.
29955  # If so, the updated path is stored in $new_path.
29956
29957  input_path="$new_path"
29958  # Check if we need to convert this using DOS-style short mode. If the path
29959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29960  # take no chances and rewrite it.
29961  # Note: m4 eats our [], so we need to use [ and ] instead.
29962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29963  if test "x$has_forbidden_chars" != x; then
29964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29968      # Going to short mode and back again did indeed matter. Since short mode is
29969      # case insensitive, let's make it lowercase to improve readability.
29970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29971      # Now convert it back to Unix-style (cygpath)
29972      input_path=`$CYGPATH -u "$shortmode_path"`
29973      new_path="$input_path"
29974    fi
29975  fi
29976
29977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29978  if test "x$test_cygdrive_prefix" = x; then
29979    # As a simple fix, exclude /usr/bin since it's not a real path.
29980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29982      # a path prefixed by /cygdrive for fixpath to work.
29983      new_path="$CYGWIN_ROOT_PATH$input_path"
29984    fi
29985  fi
29986
29987
29988  if test "x$path" != "x$new_path"; then
29989    BOOT_JDK="$new_path"
29990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29992  fi
29993
29994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29995
29996  path="$BOOT_JDK"
29997  has_colon=`$ECHO $path | $GREP ^.:`
29998  new_path="$path"
29999  if test "x$has_colon" = x; then
30000    # Not in mixed or Windows style, start by that.
30001    new_path=`cmd //c echo $path`
30002  fi
30003
30004
30005  input_path="$new_path"
30006  # Check if we need to convert this using DOS-style short mode. If the path
30007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30008  # take no chances and rewrite it.
30009  # Note: m4 eats our [], so we need to use [ and ] instead.
30010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30011  if test "x$has_forbidden_chars" != x; then
30012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30014  fi
30015
30016
30017  windows_path="$new_path"
30018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30019    unix_path=`$CYGPATH -u "$windows_path"`
30020    new_path="$unix_path"
30021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30023    new_path="$unix_path"
30024  fi
30025
30026  if test "x$path" != "x$new_path"; then
30027    BOOT_JDK="$new_path"
30028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30030  fi
30031
30032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30034
30035    else
30036      # We're on a unix platform. Hooray! :)
30037      path="$BOOT_JDK"
30038      has_space=`$ECHO "$path" | $GREP " "`
30039      if test "x$has_space" != x; then
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30043      fi
30044
30045      # Use eval to expand a potential ~
30046      eval path="$path"
30047      if test ! -f "$path" && test ! -d "$path"; then
30048        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30049      fi
30050
30051      if test -d "$path"; then
30052        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30053      else
30054        dir="`$DIRNAME "$path"`"
30055        base="`$BASENAME "$path"`"
30056        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30057      fi
30058    fi
30059  fi
30060
30061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30062$as_echo_n "checking for Boot JDK... " >&6; }
30063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30064$as_echo "$BOOT_JDK" >&6; }
30065            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30066$as_echo_n "checking Boot JDK version... " >&6; }
30067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30069$as_echo "$BOOT_JDK_VERSION" >&6; }
30070          fi # end check jdk version
30071        fi # end check javac
30072      fi # end check java
30073    fi # end check boot jdk found
30074  fi
30075
30076    done
30077  fi
30078
30079
30080    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30081    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30082      # Do we have a bin/java?
30083      if test ! -x "$BOOT_JDK/bin/java"; then
30084        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30086        BOOT_JDK_FOUND=no
30087      else
30088        # Do we have a bin/javac?
30089        if test ! -x "$BOOT_JDK/bin/javac"; then
30090          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30092          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30093$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30094          BOOT_JDK_FOUND=no
30095        else
30096          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30097          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30098
30099          # Extra M4 quote needed to protect [] in grep expression.
30100          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30101          if test "x$FOUND_CORRECT_VERSION" = x; then
30102            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30104            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30105$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30106            BOOT_JDK_FOUND=no
30107          else
30108            # We're done! :-)
30109            BOOT_JDK_FOUND=yes
30110
30111  # Only process if variable expands to non-empty
30112
30113  if test "x$BOOT_JDK" != x; then
30114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30115
30116  # Input might be given as Windows format, start by converting to
30117  # unix format.
30118  path="$BOOT_JDK"
30119  new_path=`$CYGPATH -u "$path"`
30120
30121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30124  # "foo.exe" is OK but "foo" is an error.
30125  #
30126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30127  # It is also a way to make sure we got the proper file name for the real test later on.
30128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30129  if test "x$test_shortpath" = x; then
30130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30133  fi
30134
30135  # Call helper function which possibly converts this using DOS-style short mode.
30136  # If so, the updated path is stored in $new_path.
30137
30138  input_path="$new_path"
30139  # Check if we need to convert this using DOS-style short mode. If the path
30140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30141  # take no chances and rewrite it.
30142  # Note: m4 eats our [], so we need to use [ and ] instead.
30143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30144  if test "x$has_forbidden_chars" != x; then
30145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30149      # Going to short mode and back again did indeed matter. Since short mode is
30150      # case insensitive, let's make it lowercase to improve readability.
30151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30152      # Now convert it back to Unix-style (cygpath)
30153      input_path=`$CYGPATH -u "$shortmode_path"`
30154      new_path="$input_path"
30155    fi
30156  fi
30157
30158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30159  if test "x$test_cygdrive_prefix" = x; then
30160    # As a simple fix, exclude /usr/bin since it's not a real path.
30161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30163      # a path prefixed by /cygdrive for fixpath to work.
30164      new_path="$CYGWIN_ROOT_PATH$input_path"
30165    fi
30166  fi
30167
30168
30169  if test "x$path" != "x$new_path"; then
30170    BOOT_JDK="$new_path"
30171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30173  fi
30174
30175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30176
30177  path="$BOOT_JDK"
30178  has_colon=`$ECHO $path | $GREP ^.:`
30179  new_path="$path"
30180  if test "x$has_colon" = x; then
30181    # Not in mixed or Windows style, start by that.
30182    new_path=`cmd //c echo $path`
30183  fi
30184
30185
30186  input_path="$new_path"
30187  # Check if we need to convert this using DOS-style short mode. If the path
30188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30189  # take no chances and rewrite it.
30190  # Note: m4 eats our [], so we need to use [ and ] instead.
30191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30192  if test "x$has_forbidden_chars" != x; then
30193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30195  fi
30196
30197
30198  windows_path="$new_path"
30199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30200    unix_path=`$CYGPATH -u "$windows_path"`
30201    new_path="$unix_path"
30202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30204    new_path="$unix_path"
30205  fi
30206
30207  if test "x$path" != "x$new_path"; then
30208    BOOT_JDK="$new_path"
30209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30211  fi
30212
30213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30215
30216    else
30217      # We're on a unix platform. Hooray! :)
30218      path="$BOOT_JDK"
30219      has_space=`$ECHO "$path" | $GREP " "`
30220      if test "x$has_space" != x; then
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30224      fi
30225
30226      # Use eval to expand a potential ~
30227      eval path="$path"
30228      if test ! -f "$path" && test ! -d "$path"; then
30229        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30230      fi
30231
30232      if test -d "$path"; then
30233        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30234      else
30235        dir="`$DIRNAME "$path"`"
30236        base="`$BASENAME "$path"`"
30237        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30238      fi
30239    fi
30240  fi
30241
30242            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30243$as_echo_n "checking for Boot JDK... " >&6; }
30244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30245$as_echo "$BOOT_JDK" >&6; }
30246            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30247$as_echo_n "checking Boot JDK version... " >&6; }
30248            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30250$as_echo "$BOOT_JDK_VERSION" >&6; }
30251          fi # end check jdk version
30252        fi # end check javac
30253      fi # end check java
30254    fi # end check boot jdk found
30255  fi
30256
30257  fi
30258
30259
30260    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30261    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30262      # Do we have a bin/java?
30263      if test ! -x "$BOOT_JDK/bin/java"; then
30264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30266        BOOT_JDK_FOUND=no
30267      else
30268        # Do we have a bin/javac?
30269        if test ! -x "$BOOT_JDK/bin/javac"; then
30270          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30272          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30273$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30274          BOOT_JDK_FOUND=no
30275        else
30276          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30277          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30278
30279          # Extra M4 quote needed to protect [] in grep expression.
30280          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30281          if test "x$FOUND_CORRECT_VERSION" = x; then
30282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30284            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30285$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30286            BOOT_JDK_FOUND=no
30287          else
30288            # We're done! :-)
30289            BOOT_JDK_FOUND=yes
30290
30291  # Only process if variable expands to non-empty
30292
30293  if test "x$BOOT_JDK" != x; then
30294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30295
30296  # Input might be given as Windows format, start by converting to
30297  # unix format.
30298  path="$BOOT_JDK"
30299  new_path=`$CYGPATH -u "$path"`
30300
30301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30304  # "foo.exe" is OK but "foo" is an error.
30305  #
30306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30307  # It is also a way to make sure we got the proper file name for the real test later on.
30308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30309  if test "x$test_shortpath" = x; then
30310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30312    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30313  fi
30314
30315  # Call helper function which possibly converts this using DOS-style short mode.
30316  # If so, the updated path is stored in $new_path.
30317
30318  input_path="$new_path"
30319  # Check if we need to convert this using DOS-style short mode. If the path
30320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30321  # take no chances and rewrite it.
30322  # Note: m4 eats our [], so we need to use [ and ] instead.
30323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30324  if test "x$has_forbidden_chars" != x; then
30325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30329      # Going to short mode and back again did indeed matter. Since short mode is
30330      # case insensitive, let's make it lowercase to improve readability.
30331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30332      # Now convert it back to Unix-style (cygpath)
30333      input_path=`$CYGPATH -u "$shortmode_path"`
30334      new_path="$input_path"
30335    fi
30336  fi
30337
30338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30339  if test "x$test_cygdrive_prefix" = x; then
30340    # As a simple fix, exclude /usr/bin since it's not a real path.
30341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30343      # a path prefixed by /cygdrive for fixpath to work.
30344      new_path="$CYGWIN_ROOT_PATH$input_path"
30345    fi
30346  fi
30347
30348
30349  if test "x$path" != "x$new_path"; then
30350    BOOT_JDK="$new_path"
30351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30353  fi
30354
30355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30356
30357  path="$BOOT_JDK"
30358  has_colon=`$ECHO $path | $GREP ^.:`
30359  new_path="$path"
30360  if test "x$has_colon" = x; then
30361    # Not in mixed or Windows style, start by that.
30362    new_path=`cmd //c echo $path`
30363  fi
30364
30365
30366  input_path="$new_path"
30367  # Check if we need to convert this using DOS-style short mode. If the path
30368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30369  # take no chances and rewrite it.
30370  # Note: m4 eats our [], so we need to use [ and ] instead.
30371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30372  if test "x$has_forbidden_chars" != x; then
30373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30375  fi
30376
30377
30378  windows_path="$new_path"
30379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30380    unix_path=`$CYGPATH -u "$windows_path"`
30381    new_path="$unix_path"
30382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30384    new_path="$unix_path"
30385  fi
30386
30387  if test "x$path" != "x$new_path"; then
30388    BOOT_JDK="$new_path"
30389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30391  fi
30392
30393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30395
30396    else
30397      # We're on a unix platform. Hooray! :)
30398      path="$BOOT_JDK"
30399      has_space=`$ECHO "$path" | $GREP " "`
30400      if test "x$has_space" != x; then
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30404      fi
30405
30406      # Use eval to expand a potential ~
30407      eval path="$path"
30408      if test ! -f "$path" && test ! -d "$path"; then
30409        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30410      fi
30411
30412      if test -d "$path"; then
30413        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30414      else
30415        dir="`$DIRNAME "$path"`"
30416        base="`$BASENAME "$path"`"
30417        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30418      fi
30419    fi
30420  fi
30421
30422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30423$as_echo_n "checking for Boot JDK... " >&6; }
30424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30425$as_echo "$BOOT_JDK" >&6; }
30426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30427$as_echo_n "checking Boot JDK version... " >&6; }
30428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30430$as_echo "$BOOT_JDK_VERSION" >&6; }
30431          fi # end check jdk version
30432        fi # end check javac
30433      fi # end check java
30434    fi # end check boot jdk found
30435  fi
30436
30437
30438  # If we haven't found anything yet, we've truly lost. Give up.
30439  if test "x$BOOT_JDK_FOUND" = xno; then
30440
30441  # Print a helpful message on how to acquire the necessary build dependency.
30442  # openjdk is the help tag: freetype, cups, alsa etc
30443  MISSING_DEPENDENCY=openjdk
30444
30445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30446    cygwin_help $MISSING_DEPENDENCY
30447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30448    msys_help $MISSING_DEPENDENCY
30449  else
30450    PKGHANDLER_COMMAND=
30451
30452    case $PKGHANDLER in
30453      apt-get)
30454        apt_help     $MISSING_DEPENDENCY ;;
30455      yum)
30456        yum_help     $MISSING_DEPENDENCY ;;
30457      brew)
30458        brew_help    $MISSING_DEPENDENCY ;;
30459      port)
30460        port_help    $MISSING_DEPENDENCY ;;
30461      pkgutil)
30462        pkgutil_help $MISSING_DEPENDENCY ;;
30463      pkgadd)
30464        pkgadd_help  $MISSING_DEPENDENCY ;;
30465    esac
30466
30467    if test "x$PKGHANDLER_COMMAND" != x; then
30468      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30469    fi
30470  fi
30471
30472    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30473$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30474    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30475$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30476    as_fn_error $? "Cannot continue" "$LINENO" 5
30477  fi
30478
30479
30480
30481  # Setup tools from the Boot JDK.
30482
30483  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30484
30485  # Publish this variable in the help.
30486
30487
30488  if [ -z "${JAVA+x}" ]; then
30489    # The variable is not set by user, try to locate tool using the code snippet
30490
30491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30492$as_echo_n "checking for java in Boot JDK... " >&6; }
30493      JAVA=$BOOT_JDK/bin/java
30494      if test ! -x $JAVA; then
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30496$as_echo "not found" >&6; }
30497        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30499        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30500      fi
30501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30502$as_echo "ok" >&6; }
30503
30504
30505  else
30506    # The variable is set, but is it from the command line or the environment?
30507
30508    # Try to remove the string !JAVA! from our list.
30509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30511      # If it failed, the variable was not from the command line. Ignore it,
30512      # but warn the user (except for BASH, which is always set by the calling BASH).
30513      if test "xJAVA" != xBASH; then
30514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30515$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30516      fi
30517      # Try to locate tool using the code snippet
30518
30519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30520$as_echo_n "checking for java in Boot JDK... " >&6; }
30521      JAVA=$BOOT_JDK/bin/java
30522      if test ! -x $JAVA; then
30523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30524$as_echo "not found" >&6; }
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30526$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30527        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30528      fi
30529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30530$as_echo "ok" >&6; }
30531
30532
30533    else
30534      # If it succeeded, then it was overridden by the user. We will use it
30535      # for the tool.
30536
30537      # First remove it from the list of overridden variables, so we can test
30538      # for unknown variables in the end.
30539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30540
30541      # Check if we try to supply an empty value
30542      if test "x$JAVA" = x; then
30543        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30544$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30546$as_echo_n "checking for JAVA... " >&6; }
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30548$as_echo "disabled" >&6; }
30549      else
30550        # Check if the provided tool contains a complete path.
30551        tool_specified="$JAVA"
30552        tool_basename="${tool_specified##*/}"
30553        if test "x$tool_basename" = "x$tool_specified"; then
30554          # A command without a complete path is provided, search $PATH.
30555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30556$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30557          # Extract the first word of "$tool_basename", so it can be a program name with args.
30558set dummy $tool_basename; ac_word=$2
30559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30560$as_echo_n "checking for $ac_word... " >&6; }
30561if ${ac_cv_path_JAVA+:} false; then :
30562  $as_echo_n "(cached) " >&6
30563else
30564  case $JAVA in
30565  [\\/]* | ?:[\\/]*)
30566  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30567  ;;
30568  *)
30569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30570for as_dir in $PATH
30571do
30572  IFS=$as_save_IFS
30573  test -z "$as_dir" && as_dir=.
30574    for ac_exec_ext in '' $ac_executable_extensions; do
30575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30576    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30578    break 2
30579  fi
30580done
30581  done
30582IFS=$as_save_IFS
30583
30584  ;;
30585esac
30586fi
30587JAVA=$ac_cv_path_JAVA
30588if test -n "$JAVA"; then
30589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30590$as_echo "$JAVA" >&6; }
30591else
30592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30593$as_echo "no" >&6; }
30594fi
30595
30596
30597          if test "x$JAVA" = x; then
30598            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30599          fi
30600        else
30601          # Otherwise we believe it is a complete path. Use it as it is.
30602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30603$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30604          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30605$as_echo_n "checking for JAVA... " >&6; }
30606          if test ! -x "$tool_specified"; then
30607            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30608$as_echo "not found" >&6; }
30609            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30610          fi
30611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30612$as_echo "$tool_specified" >&6; }
30613        fi
30614      fi
30615    fi
30616
30617  fi
30618
30619
30620
30621  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30622
30623  # Publish this variable in the help.
30624
30625
30626  if [ -z "${JAVAC+x}" ]; then
30627    # The variable is not set by user, try to locate tool using the code snippet
30628
30629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30630$as_echo_n "checking for javac in Boot JDK... " >&6; }
30631      JAVAC=$BOOT_JDK/bin/javac
30632      if test ! -x $JAVAC; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30634$as_echo "not found" >&6; }
30635        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30636$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30637        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30638      fi
30639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30640$as_echo "ok" >&6; }
30641
30642
30643  else
30644    # The variable is set, but is it from the command line or the environment?
30645
30646    # Try to remove the string !JAVAC! from our list.
30647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30649      # If it failed, the variable was not from the command line. Ignore it,
30650      # but warn the user (except for BASH, which is always set by the calling BASH).
30651      if test "xJAVAC" != xBASH; then
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30653$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30654      fi
30655      # Try to locate tool using the code snippet
30656
30657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30658$as_echo_n "checking for javac in Boot JDK... " >&6; }
30659      JAVAC=$BOOT_JDK/bin/javac
30660      if test ! -x $JAVAC; then
30661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30662$as_echo "not found" >&6; }
30663        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30664$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30665        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30666      fi
30667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30668$as_echo "ok" >&6; }
30669
30670
30671    else
30672      # If it succeeded, then it was overridden by the user. We will use it
30673      # for the tool.
30674
30675      # First remove it from the list of overridden variables, so we can test
30676      # for unknown variables in the end.
30677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30678
30679      # Check if we try to supply an empty value
30680      if test "x$JAVAC" = x; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30682$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30684$as_echo_n "checking for JAVAC... " >&6; }
30685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30686$as_echo "disabled" >&6; }
30687      else
30688        # Check if the provided tool contains a complete path.
30689        tool_specified="$JAVAC"
30690        tool_basename="${tool_specified##*/}"
30691        if test "x$tool_basename" = "x$tool_specified"; then
30692          # A command without a complete path is provided, search $PATH.
30693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30694$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30695          # Extract the first word of "$tool_basename", so it can be a program name with args.
30696set dummy $tool_basename; ac_word=$2
30697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30698$as_echo_n "checking for $ac_word... " >&6; }
30699if ${ac_cv_path_JAVAC+:} false; then :
30700  $as_echo_n "(cached) " >&6
30701else
30702  case $JAVAC in
30703  [\\/]* | ?:[\\/]*)
30704  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30705  ;;
30706  *)
30707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30708for as_dir in $PATH
30709do
30710  IFS=$as_save_IFS
30711  test -z "$as_dir" && as_dir=.
30712    for ac_exec_ext in '' $ac_executable_extensions; do
30713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30714    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30716    break 2
30717  fi
30718done
30719  done
30720IFS=$as_save_IFS
30721
30722  ;;
30723esac
30724fi
30725JAVAC=$ac_cv_path_JAVAC
30726if test -n "$JAVAC"; then
30727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30728$as_echo "$JAVAC" >&6; }
30729else
30730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30731$as_echo "no" >&6; }
30732fi
30733
30734
30735          if test "x$JAVAC" = x; then
30736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30737          fi
30738        else
30739          # Otherwise we believe it is a complete path. Use it as it is.
30740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30741$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30743$as_echo_n "checking for JAVAC... " >&6; }
30744          if test ! -x "$tool_specified"; then
30745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30746$as_echo "not found" >&6; }
30747            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30748          fi
30749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30750$as_echo "$tool_specified" >&6; }
30751        fi
30752      fi
30753    fi
30754
30755  fi
30756
30757
30758
30759  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30760
30761  # Publish this variable in the help.
30762
30763
30764  if [ -z "${JAVAH+x}" ]; then
30765    # The variable is not set by user, try to locate tool using the code snippet
30766
30767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30768$as_echo_n "checking for javah in Boot JDK... " >&6; }
30769      JAVAH=$BOOT_JDK/bin/javah
30770      if test ! -x $JAVAH; then
30771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30772$as_echo "not found" >&6; }
30773        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30774$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30775        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30776      fi
30777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30778$as_echo "ok" >&6; }
30779
30780
30781  else
30782    # The variable is set, but is it from the command line or the environment?
30783
30784    # Try to remove the string !JAVAH! from our list.
30785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30787      # If it failed, the variable was not from the command line. Ignore it,
30788      # but warn the user (except for BASH, which is always set by the calling BASH).
30789      if test "xJAVAH" != xBASH; then
30790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30791$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30792      fi
30793      # Try to locate tool using the code snippet
30794
30795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30796$as_echo_n "checking for javah in Boot JDK... " >&6; }
30797      JAVAH=$BOOT_JDK/bin/javah
30798      if test ! -x $JAVAH; then
30799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30800$as_echo "not found" >&6; }
30801        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30802$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30803        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30804      fi
30805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30806$as_echo "ok" >&6; }
30807
30808
30809    else
30810      # If it succeeded, then it was overridden by the user. We will use it
30811      # for the tool.
30812
30813      # First remove it from the list of overridden variables, so we can test
30814      # for unknown variables in the end.
30815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30816
30817      # Check if we try to supply an empty value
30818      if test "x$JAVAH" = x; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30820$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30822$as_echo_n "checking for JAVAH... " >&6; }
30823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30824$as_echo "disabled" >&6; }
30825      else
30826        # Check if the provided tool contains a complete path.
30827        tool_specified="$JAVAH"
30828        tool_basename="${tool_specified##*/}"
30829        if test "x$tool_basename" = "x$tool_specified"; then
30830          # A command without a complete path is provided, search $PATH.
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30832$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30833          # Extract the first word of "$tool_basename", so it can be a program name with args.
30834set dummy $tool_basename; ac_word=$2
30835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30836$as_echo_n "checking for $ac_word... " >&6; }
30837if ${ac_cv_path_JAVAH+:} false; then :
30838  $as_echo_n "(cached) " >&6
30839else
30840  case $JAVAH in
30841  [\\/]* | ?:[\\/]*)
30842  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30843  ;;
30844  *)
30845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30846for as_dir in $PATH
30847do
30848  IFS=$as_save_IFS
30849  test -z "$as_dir" && as_dir=.
30850    for ac_exec_ext in '' $ac_executable_extensions; do
30851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30852    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30854    break 2
30855  fi
30856done
30857  done
30858IFS=$as_save_IFS
30859
30860  ;;
30861esac
30862fi
30863JAVAH=$ac_cv_path_JAVAH
30864if test -n "$JAVAH"; then
30865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30866$as_echo "$JAVAH" >&6; }
30867else
30868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30869$as_echo "no" >&6; }
30870fi
30871
30872
30873          if test "x$JAVAH" = x; then
30874            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30875          fi
30876        else
30877          # Otherwise we believe it is a complete path. Use it as it is.
30878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30879$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30881$as_echo_n "checking for JAVAH... " >&6; }
30882          if test ! -x "$tool_specified"; then
30883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30884$as_echo "not found" >&6; }
30885            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30886          fi
30887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30888$as_echo "$tool_specified" >&6; }
30889        fi
30890      fi
30891    fi
30892
30893  fi
30894
30895
30896
30897  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30898
30899  # Publish this variable in the help.
30900
30901
30902  if [ -z "${JAR+x}" ]; then
30903    # The variable is not set by user, try to locate tool using the code snippet
30904
30905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30906$as_echo_n "checking for jar in Boot JDK... " >&6; }
30907      JAR=$BOOT_JDK/bin/jar
30908      if test ! -x $JAR; then
30909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30910$as_echo "not found" >&6; }
30911        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30912$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30913        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30914      fi
30915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30916$as_echo "ok" >&6; }
30917
30918
30919  else
30920    # The variable is set, but is it from the command line or the environment?
30921
30922    # Try to remove the string !JAR! from our list.
30923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30925      # If it failed, the variable was not from the command line. Ignore it,
30926      # but warn the user (except for BASH, which is always set by the calling BASH).
30927      if test "xJAR" != xBASH; then
30928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30929$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30930      fi
30931      # Try to locate tool using the code snippet
30932
30933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30934$as_echo_n "checking for jar in Boot JDK... " >&6; }
30935      JAR=$BOOT_JDK/bin/jar
30936      if test ! -x $JAR; then
30937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30938$as_echo "not found" >&6; }
30939        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30940$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30941        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30942      fi
30943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30944$as_echo "ok" >&6; }
30945
30946
30947    else
30948      # If it succeeded, then it was overridden by the user. We will use it
30949      # for the tool.
30950
30951      # First remove it from the list of overridden variables, so we can test
30952      # for unknown variables in the end.
30953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30954
30955      # Check if we try to supply an empty value
30956      if test "x$JAR" = x; then
30957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30958$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30960$as_echo_n "checking for JAR... " >&6; }
30961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30962$as_echo "disabled" >&6; }
30963      else
30964        # Check if the provided tool contains a complete path.
30965        tool_specified="$JAR"
30966        tool_basename="${tool_specified##*/}"
30967        if test "x$tool_basename" = "x$tool_specified"; then
30968          # A command without a complete path is provided, search $PATH.
30969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30970$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30971          # Extract the first word of "$tool_basename", so it can be a program name with args.
30972set dummy $tool_basename; ac_word=$2
30973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30974$as_echo_n "checking for $ac_word... " >&6; }
30975if ${ac_cv_path_JAR+:} false; then :
30976  $as_echo_n "(cached) " >&6
30977else
30978  case $JAR in
30979  [\\/]* | ?:[\\/]*)
30980  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30981  ;;
30982  *)
30983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30984for as_dir in $PATH
30985do
30986  IFS=$as_save_IFS
30987  test -z "$as_dir" && as_dir=.
30988    for ac_exec_ext in '' $ac_executable_extensions; do
30989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30990    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30992    break 2
30993  fi
30994done
30995  done
30996IFS=$as_save_IFS
30997
30998  ;;
30999esac
31000fi
31001JAR=$ac_cv_path_JAR
31002if test -n "$JAR"; then
31003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31004$as_echo "$JAR" >&6; }
31005else
31006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31007$as_echo "no" >&6; }
31008fi
31009
31010
31011          if test "x$JAR" = x; then
31012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31013          fi
31014        else
31015          # Otherwise we believe it is a complete path. Use it as it is.
31016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31017$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31019$as_echo_n "checking for JAR... " >&6; }
31020          if test ! -x "$tool_specified"; then
31021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31022$as_echo "not found" >&6; }
31023            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31024          fi
31025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31026$as_echo "$tool_specified" >&6; }
31027        fi
31028      fi
31029    fi
31030
31031  fi
31032
31033
31034
31035  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31036
31037  # Publish this variable in the help.
31038
31039
31040  if [ -z "${JARSIGNER+x}" ]; then
31041    # The variable is not set by user, try to locate tool using the code snippet
31042
31043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31044$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31045      JARSIGNER=$BOOT_JDK/bin/jarsigner
31046      if test ! -x $JARSIGNER; then
31047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31048$as_echo "not found" >&6; }
31049        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31050$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31051        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31052      fi
31053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31054$as_echo "ok" >&6; }
31055
31056
31057  else
31058    # The variable is set, but is it from the command line or the environment?
31059
31060    # Try to remove the string !JARSIGNER! from our list.
31061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31063      # If it failed, the variable was not from the command line. Ignore it,
31064      # but warn the user (except for BASH, which is always set by the calling BASH).
31065      if test "xJARSIGNER" != xBASH; then
31066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31067$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31068      fi
31069      # Try to locate tool using the code snippet
31070
31071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31072$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31073      JARSIGNER=$BOOT_JDK/bin/jarsigner
31074      if test ! -x $JARSIGNER; then
31075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31076$as_echo "not found" >&6; }
31077        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31078$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31079        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31080      fi
31081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31082$as_echo "ok" >&6; }
31083
31084
31085    else
31086      # If it succeeded, then it was overridden by the user. We will use it
31087      # for the tool.
31088
31089      # First remove it from the list of overridden variables, so we can test
31090      # for unknown variables in the end.
31091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31092
31093      # Check if we try to supply an empty value
31094      if test "x$JARSIGNER" = x; then
31095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31096$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31098$as_echo_n "checking for JARSIGNER... " >&6; }
31099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31100$as_echo "disabled" >&6; }
31101      else
31102        # Check if the provided tool contains a complete path.
31103        tool_specified="$JARSIGNER"
31104        tool_basename="${tool_specified##*/}"
31105        if test "x$tool_basename" = "x$tool_specified"; then
31106          # A command without a complete path is provided, search $PATH.
31107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31108$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31109          # Extract the first word of "$tool_basename", so it can be a program name with args.
31110set dummy $tool_basename; ac_word=$2
31111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31112$as_echo_n "checking for $ac_word... " >&6; }
31113if ${ac_cv_path_JARSIGNER+:} false; then :
31114  $as_echo_n "(cached) " >&6
31115else
31116  case $JARSIGNER in
31117  [\\/]* | ?:[\\/]*)
31118  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31119  ;;
31120  *)
31121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31122for as_dir in $PATH
31123do
31124  IFS=$as_save_IFS
31125  test -z "$as_dir" && as_dir=.
31126    for ac_exec_ext in '' $ac_executable_extensions; do
31127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31128    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31130    break 2
31131  fi
31132done
31133  done
31134IFS=$as_save_IFS
31135
31136  ;;
31137esac
31138fi
31139JARSIGNER=$ac_cv_path_JARSIGNER
31140if test -n "$JARSIGNER"; then
31141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31142$as_echo "$JARSIGNER" >&6; }
31143else
31144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31145$as_echo "no" >&6; }
31146fi
31147
31148
31149          if test "x$JARSIGNER" = x; then
31150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31151          fi
31152        else
31153          # Otherwise we believe it is a complete path. Use it as it is.
31154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31155$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31157$as_echo_n "checking for JARSIGNER... " >&6; }
31158          if test ! -x "$tool_specified"; then
31159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31160$as_echo "not found" >&6; }
31161            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31162          fi
31163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31164$as_echo "$tool_specified" >&6; }
31165        fi
31166      fi
31167    fi
31168
31169  fi
31170
31171
31172
31173  # Finally, set some other options...
31174
31175  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31176  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31177
31178
31179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31180$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31181  if "$JAVA" --list-modules > /dev/null 2>&1; then
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31183$as_echo "yes" >&6; }
31184    BOOT_JDK_MODULAR="true"
31185  else
31186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31187$as_echo "no" >&6; }
31188    BOOT_JDK_MODULAR="false"
31189  fi
31190
31191
31192
31193
31194  # Check if the boot jdk is 32 or 64 bit
31195  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31196    BOOT_JDK_BITS="64"
31197  else
31198    BOOT_JDK_BITS="32"
31199  fi
31200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31201$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31203$as_echo "$BOOT_JDK_BITS" >&6; }
31204
31205
31206
31207# Check whether --with-build-jdk was given.
31208if test "${with_build_jdk+set}" = set; then :
31209  withval=$with_build_jdk;
31210fi
31211
31212
31213  CREATE_BUILDJDK=false
31214  EXTERNAL_BUILDJDK=false
31215  BUILD_JDK_FOUND="no"
31216  if test "x$with_build_jdk" != "x"; then
31217
31218  if test "x$BUILD_JDK_FOUND" = xno; then
31219    # Execute the test
31220
31221       if test "x$with_build_jdk" != x; then
31222         BUILD_JDK=$with_build_jdk
31223         BUILD_JDK_FOUND=maybe
31224         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31225$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31226       fi
31227
31228    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31229    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31230      # Do we have a bin/java?
31231      if test ! -x "$BUILD_JDK/bin/java"; then
31232        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31233$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31234        BUILD_JDK_FOUND=no
31235      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31236        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31237$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31238        BUILD_JDK_FOUND=no
31239      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31240        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31241$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31242        BUILD_JDK_FOUND=no
31243      elif test ! -x "$BUILD_JDK/bin/javac"; then
31244        # Do we have a bin/javac?
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31246$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31247        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31248$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31249        BUILD_JDK_FOUND=no
31250      else
31251        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31252        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31253
31254        # Extra M4 quote needed to protect [] in grep expression.
31255        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31256        if test "x$FOUND_CORRECT_VERSION" = x; then
31257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31258$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31259          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31260$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31261          BUILD_JDK_FOUND=no
31262        else
31263          # We're done!
31264          BUILD_JDK_FOUND=yes
31265
31266  # Only process if variable expands to non-empty
31267
31268  if test "x$BUILD_JDK" != x; then
31269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31270
31271  # Input might be given as Windows format, start by converting to
31272  # unix format.
31273  path="$BUILD_JDK"
31274  new_path=`$CYGPATH -u "$path"`
31275
31276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31279  # "foo.exe" is OK but "foo" is an error.
31280  #
31281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31282  # It is also a way to make sure we got the proper file name for the real test later on.
31283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31284  if test "x$test_shortpath" = x; then
31285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31286$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31287    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31288  fi
31289
31290  # Call helper function which possibly converts this using DOS-style short mode.
31291  # If so, the updated path is stored in $new_path.
31292
31293  input_path="$new_path"
31294  # Check if we need to convert this using DOS-style short mode. If the path
31295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31296  # take no chances and rewrite it.
31297  # Note: m4 eats our [], so we need to use [ and ] instead.
31298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31299  if test "x$has_forbidden_chars" != x; then
31300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31304      # Going to short mode and back again did indeed matter. Since short mode is
31305      # case insensitive, let's make it lowercase to improve readability.
31306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31307      # Now convert it back to Unix-style (cygpath)
31308      input_path=`$CYGPATH -u "$shortmode_path"`
31309      new_path="$input_path"
31310    fi
31311  fi
31312
31313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31314  if test "x$test_cygdrive_prefix" = x; then
31315    # As a simple fix, exclude /usr/bin since it's not a real path.
31316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31318      # a path prefixed by /cygdrive for fixpath to work.
31319      new_path="$CYGWIN_ROOT_PATH$input_path"
31320    fi
31321  fi
31322
31323
31324  if test "x$path" != "x$new_path"; then
31325    BUILD_JDK="$new_path"
31326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31327$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31328  fi
31329
31330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31331
31332  path="$BUILD_JDK"
31333  has_colon=`$ECHO $path | $GREP ^.:`
31334  new_path="$path"
31335  if test "x$has_colon" = x; then
31336    # Not in mixed or Windows style, start by that.
31337    new_path=`cmd //c echo $path`
31338  fi
31339
31340
31341  input_path="$new_path"
31342  # Check if we need to convert this using DOS-style short mode. If the path
31343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31344  # take no chances and rewrite it.
31345  # Note: m4 eats our [], so we need to use [ and ] instead.
31346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31347  if test "x$has_forbidden_chars" != x; then
31348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31350  fi
31351
31352
31353  windows_path="$new_path"
31354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31355    unix_path=`$CYGPATH -u "$windows_path"`
31356    new_path="$unix_path"
31357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31359    new_path="$unix_path"
31360  fi
31361
31362  if test "x$path" != "x$new_path"; then
31363    BUILD_JDK="$new_path"
31364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31365$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31366  fi
31367
31368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31370
31371    else
31372      # We're on a unix platform. Hooray! :)
31373      path="$BUILD_JDK"
31374      has_space=`$ECHO "$path" | $GREP " "`
31375      if test "x$has_space" != x; then
31376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31377$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31379      fi
31380
31381      # Use eval to expand a potential ~
31382      eval path="$path"
31383      if test ! -f "$path" && test ! -d "$path"; then
31384        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31385      fi
31386
31387      if test -d "$path"; then
31388        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31389      else
31390        dir="`$DIRNAME "$path"`"
31391        base="`$BASENAME "$path"`"
31392        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31393      fi
31394    fi
31395  fi
31396
31397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31398$as_echo_n "checking for Build JDK... " >&6; }
31399          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31400$as_echo "$BUILD_JDK" >&6; }
31401          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31402$as_echo_n "checking Build JDK version... " >&6; }
31403          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31405$as_echo "$BUILD_JDK_VERSION" >&6; }
31406        fi # end check jdk version
31407      fi # end check java
31408    fi # end check build jdk found
31409  fi
31410
31411    EXTERNAL_BUILDJDK=true
31412  else
31413    if test "x$COMPILE_TYPE" = "xcross"; then
31414      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31415      BUILD_JDK_FOUND=yes
31416      CREATE_BUILDJDK=true
31417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31418$as_echo_n "checking for Build JDK... " >&6; }
31419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31420$as_echo "yes, will build it for the host platform" >&6; }
31421    else
31422      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31423      BUILD_JDK_FOUND=yes
31424      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31425$as_echo_n "checking for Build JDK... " >&6; }
31426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31427$as_echo "yes, will use output dir" >&6; }
31428    fi
31429  fi
31430
31431  JMOD="$BUILD_JDK/bin/jmod"
31432  JLINK="$BUILD_JDK/bin/jlink"
31433
31434
31435
31436  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31438$as_echo_n "checking for Build JDK... " >&6; }
31439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31440$as_echo "no" >&6; }
31441    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31442  fi
31443
31444
31445
31446
31447
31448
31449###############################################################################
31450#
31451# Configure the sources to use. We can add or override individual directories.
31452#
31453###############################################################################
31454
31455
31456  # Where are the sources.
31457  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31458  CORBA_TOPDIR="$SRC_ROOT/corba"
31459  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31460  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31461  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31462  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31463  JDK_TOPDIR="$SRC_ROOT/jdk"
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473  # This feature is no longer supported.
31474
31475
31476
31477# Check whether --with-add-source-root was given.
31478if test "${with_add_source_root+set}" = set; then :
31479  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
31480$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31481fi
31482
31483
31484
31485
31486# Check whether --with-override-source-root was given.
31487if test "${with_override_source_root+set}" = set; then :
31488  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
31489$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31490fi
31491
31492
31493
31494
31495# Check whether --with-adds-and-overrides was given.
31496if test "${with_adds_and_overrides+set}" = set; then :
31497  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
31498$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31499fi
31500
31501
31502
31503
31504# Check whether --with-override-langtools was given.
31505if test "${with_override_langtools+set}" = set; then :
31506  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31507$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31508fi
31509
31510
31511
31512
31513# Check whether --with-override-corba was given.
31514if test "${with_override_corba+set}" = set; then :
31515  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31516$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31517fi
31518
31519
31520
31521
31522# Check whether --with-override-jaxp was given.
31523if test "${with_override_jaxp+set}" = set; then :
31524  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31525$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31526fi
31527
31528
31529
31530
31531# Check whether --with-override-jaxws was given.
31532if test "${with_override_jaxws+set}" = set; then :
31533  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31534$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31535fi
31536
31537
31538
31539
31540# Check whether --with-override-hotspot was given.
31541if test "${with_override_hotspot+set}" = set; then :
31542  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31543$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31544fi
31545
31546
31547
31548
31549# Check whether --with-override-nashorn was given.
31550if test "${with_override_nashorn+set}" = set; then :
31551  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31552$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31553fi
31554
31555
31556
31557
31558# Check whether --with-override-jdk was given.
31559if test "${with_override_jdk+set}" = set; then :
31560  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31561$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31562fi
31563
31564
31565
31566
31567  BUILD_OUTPUT="$OUTPUT_ROOT"
31568
31569  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31570
31571
31572
31573# Check whether --with-import_hotspot was given.
31574if test "${with_import_hotspot+set}" = set; then :
31575  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31576$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31577fi
31578
31579
31580
31581
31582
31583
31584# Check whether --with-import-modules was given.
31585if test "${with_import_modules+set}" = set; then :
31586  withval=$with_import_modules;
31587fi
31588
31589
31590  if test "x$with_import_modules" != x \
31591      && test "x$with_import_modules" != "xno"; then
31592    if test -d "$with_import_modules"; then
31593      IMPORT_MODULES_TOPDIR="$with_import_modules"
31594
31595  # Only process if variable expands to non-empty
31596
31597  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31599
31600  # Input might be given as Windows format, start by converting to
31601  # unix format.
31602  path="$IMPORT_MODULES_TOPDIR"
31603  new_path=`$CYGPATH -u "$path"`
31604
31605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31608  # "foo.exe" is OK but "foo" is an error.
31609  #
31610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31611  # It is also a way to make sure we got the proper file name for the real test later on.
31612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31613  if test "x$test_shortpath" = x; then
31614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31615$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31616    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31617  fi
31618
31619  # Call helper function which possibly converts this using DOS-style short mode.
31620  # If so, the updated path is stored in $new_path.
31621
31622  input_path="$new_path"
31623  # Check if we need to convert this using DOS-style short mode. If the path
31624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31625  # take no chances and rewrite it.
31626  # Note: m4 eats our [], so we need to use [ and ] instead.
31627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31628  if test "x$has_forbidden_chars" != x; then
31629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31633      # Going to short mode and back again did indeed matter. Since short mode is
31634      # case insensitive, let's make it lowercase to improve readability.
31635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31636      # Now convert it back to Unix-style (cygpath)
31637      input_path=`$CYGPATH -u "$shortmode_path"`
31638      new_path="$input_path"
31639    fi
31640  fi
31641
31642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31643  if test "x$test_cygdrive_prefix" = x; then
31644    # As a simple fix, exclude /usr/bin since it's not a real path.
31645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31647      # a path prefixed by /cygdrive for fixpath to work.
31648      new_path="$CYGWIN_ROOT_PATH$input_path"
31649    fi
31650  fi
31651
31652
31653  if test "x$path" != "x$new_path"; then
31654    IMPORT_MODULES_TOPDIR="$new_path"
31655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31656$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31657  fi
31658
31659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31660
31661  path="$IMPORT_MODULES_TOPDIR"
31662  has_colon=`$ECHO $path | $GREP ^.:`
31663  new_path="$path"
31664  if test "x$has_colon" = x; then
31665    # Not in mixed or Windows style, start by that.
31666    new_path=`cmd //c echo $path`
31667  fi
31668
31669
31670  input_path="$new_path"
31671  # Check if we need to convert this using DOS-style short mode. If the path
31672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31673  # take no chances and rewrite it.
31674  # Note: m4 eats our [], so we need to use [ and ] instead.
31675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31676  if test "x$has_forbidden_chars" != x; then
31677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31679  fi
31680
31681
31682  windows_path="$new_path"
31683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31684    unix_path=`$CYGPATH -u "$windows_path"`
31685    new_path="$unix_path"
31686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31688    new_path="$unix_path"
31689  fi
31690
31691  if test "x$path" != "x$new_path"; then
31692    IMPORT_MODULES_TOPDIR="$new_path"
31693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31694$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31695  fi
31696
31697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31699
31700    else
31701      # We're on a unix platform. Hooray! :)
31702      path="$IMPORT_MODULES_TOPDIR"
31703      has_space=`$ECHO "$path" | $GREP " "`
31704      if test "x$has_space" != x; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31706$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31707        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31708      fi
31709
31710      # Use eval to expand a potential ~
31711      eval path="$path"
31712      if test ! -f "$path" && test ! -d "$path"; then
31713        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31714      fi
31715
31716      if test -d "$path"; then
31717        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31718      else
31719        dir="`$DIRNAME "$path"`"
31720        base="`$BASENAME "$path"`"
31721        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31722      fi
31723    fi
31724  fi
31725
31726    elif test -e "$with_import_modules"; then
31727      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31728      $RM -rf "$IMPORT_MODULES_TOPDIR"
31729      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31730      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31731        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31732      fi
31733    else
31734      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31735    fi
31736  fi
31737
31738  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31739    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31740  fi
31741  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31742    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31743  fi
31744  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31745    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31746  fi
31747  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31748    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31749  fi
31750  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31751    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31752  fi
31753  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31754    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31755  fi
31756  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31757    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31758  fi
31759  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31760    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31761  fi
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773###############################################################################
31774#
31775# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31776# native code.
31777#
31778###############################################################################
31779
31780# See if we are doing a complete static build or not
31781
31782  # Check whether --enable-static-build was given.
31783if test "${enable_static_build+set}" = set; then :
31784  enableval=$enable_static_build;
31785fi
31786
31787  STATIC_BUILD=false
31788  if test "x$enable_static_build" = "xyes"; then
31789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31790$as_echo_n "checking if static build is enabled... " >&6; }
31791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31792$as_echo "yes" >&6; }
31793    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31794      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31795    fi
31796    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31797    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31798    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31799    STATIC_BUILD=true
31800  elif test "x$enable_static_build" = "xno"; then
31801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31802$as_echo_n "checking if static build is enabled... " >&6; }
31803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31804$as_echo "no" >&6; }
31805  elif test "x$enable_static_build" != "x"; then
31806    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31807  fi
31808
31809
31810
31811
31812# First determine the toolchain type (compiler family)
31813
31814
31815# Check whether --with-toolchain-type was given.
31816if test "${with_toolchain_type+set}" = set; then :
31817  withval=$with_toolchain_type;
31818fi
31819
31820
31821  # Use indirect variable referencing
31822  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31823  VALID_TOOLCHAINS=${!toolchain_var_name}
31824
31825  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31826    if test -n "$XCODEBUILD"; then
31827      # On Mac OS X, default toolchain to clang after Xcode 5
31828      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31829      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31830      if test $? -ne 0; then
31831        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31832      fi
31833      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31834          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31835          $CUT -f 1 -d .`
31836      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31837$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31838      if test $XCODE_MAJOR_VERSION -ge 5; then
31839          DEFAULT_TOOLCHAIN="clang"
31840      else
31841          DEFAULT_TOOLCHAIN="gcc"
31842      fi
31843    else
31844      # If Xcode is not installed, but the command line tools are
31845      # then we can't run xcodebuild. On these systems we should
31846      # default to clang
31847      DEFAULT_TOOLCHAIN="clang"
31848    fi
31849  else
31850    # First toolchain type in the list is the default
31851    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31852  fi
31853
31854  if test "x$with_toolchain_type" = xlist; then
31855    # List all toolchains
31856    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31857$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31858    for toolchain in $VALID_TOOLCHAINS; do
31859      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31860      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31861      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31862    done
31863
31864    exit 0
31865  elif test "x$with_toolchain_type" != x; then
31866    # User override; check that it is valid
31867    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31868      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31869$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31870      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31871$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31872      as_fn_error $? "Cannot continue." "$LINENO" 5
31873    fi
31874    TOOLCHAIN_TYPE=$with_toolchain_type
31875  else
31876    # No flag given, use default
31877    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31878  fi
31879
31880
31881  TOOLCHAIN_CC_BINARY_clang="clang"
31882  TOOLCHAIN_CC_BINARY_gcc="gcc"
31883  TOOLCHAIN_CC_BINARY_microsoft="cl"
31884  TOOLCHAIN_CC_BINARY_solstudio="cc"
31885  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31886
31887  TOOLCHAIN_CXX_BINARY_clang="clang++"
31888  TOOLCHAIN_CXX_BINARY_gcc="g++"
31889  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31890  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31891  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31892
31893  # Use indirect variable referencing
31894  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31895  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31896  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31897  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31898  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31899  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31900  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31901  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31902
31903
31904  # Define filename patterns
31905  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31906    LIBRARY_PREFIX=
31907    SHARED_LIBRARY_SUFFIX='.dll'
31908    STATIC_LIBRARY_SUFFIX='.lib'
31909    SHARED_LIBRARY='$1.dll'
31910    STATIC_LIBRARY='$1.lib'
31911    OBJ_SUFFIX='.obj'
31912    EXE_SUFFIX='.exe'
31913  else
31914    LIBRARY_PREFIX=lib
31915    SHARED_LIBRARY_SUFFIX='.so'
31916    STATIC_LIBRARY_SUFFIX='.a'
31917    SHARED_LIBRARY='lib$1.so'
31918    STATIC_LIBRARY='lib$1.a'
31919    OBJ_SUFFIX='.o'
31920    EXE_SUFFIX=''
31921    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31922      # For full static builds, we're overloading the SHARED_LIBRARY
31923      # variables in order to limit the amount of changes required.
31924      # It would be better to remove SHARED and just use LIBRARY and
31925      # LIBRARY_SUFFIX for libraries that can be built either
31926      # shared or static and use STATIC_* for libraries that are
31927      # always built statically.
31928      if test "x$STATIC_BUILD" = xtrue; then
31929        SHARED_LIBRARY='lib$1.a'
31930        SHARED_LIBRARY_SUFFIX='.a'
31931      else
31932        SHARED_LIBRARY='lib$1.dylib'
31933        SHARED_LIBRARY_SUFFIX='.dylib'
31934      fi
31935    fi
31936  fi
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31948    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31949$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31950  else
31951    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31952$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31953  fi
31954
31955
31956# User supplied flags should be used when configure detects compilers
31957
31958  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31959    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31960$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31961  fi
31962
31963  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31964    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31965$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31966  fi
31967
31968  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31969    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31970$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31971  fi
31972
31973
31974# Check whether --with-extra-cflags was given.
31975if test "${with_extra_cflags+set}" = set; then :
31976  withval=$with_extra_cflags;
31977fi
31978
31979
31980
31981# Check whether --with-extra-cxxflags was given.
31982if test "${with_extra_cxxflags+set}" = set; then :
31983  withval=$with_extra_cxxflags;
31984fi
31985
31986
31987
31988# Check whether --with-extra-ldflags was given.
31989if test "${with_extra_ldflags+set}" = set; then :
31990  withval=$with_extra_ldflags;
31991fi
31992
31993
31994  EXTRA_CFLAGS="$with_extra_cflags"
31995  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31996  EXTRA_LDFLAGS="$with_extra_ldflags"
31997
31998
31999
32000
32001
32002  # The global CFLAGS and LDLAGS variables are used by configure tests and
32003  # should include the extra parameters
32004  CFLAGS="$EXTRA_CFLAGS"
32005  CXXFLAGS="$EXTRA_CXXFLAGS"
32006  LDFLAGS="$EXTRA_LDFLAGS"
32007  CPPFLAGS=""
32008
32009# The sysroot cflags are needed for configure to be able to run the compilers
32010
32011  if test "x$SYSROOT" != "x"; then
32012    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32013      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32014        # Solaris Studio does not have a concept of sysroot. Instead we must
32015        # make sure the default include and lib dirs are appended to each
32016        # compile and link command line. Must also add -I-xbuiltin to enable
32017        # inlining of system functions and intrinsics.
32018        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32019        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32020            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32021      fi
32022    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32023      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32024      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32025    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32026      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32027      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32028    fi
32029    # The global CFLAGS and LDFLAGS variables need these for configure to function
32030    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32031    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32032    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32033    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32034  fi
32035
32036  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32037    # We also need -iframework<path>/System/Library/Frameworks
32038    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32039    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32040    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32041    # set this here so it doesn't have to be peppered throughout the forest
32042    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32043    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32044  fi
32045
32046
32047
32048
32049
32050# Then detect the actual binaries needed
32051
32052  # FIXME: Is this needed?
32053  ac_ext=cpp
32054ac_cpp='$CXXCPP $CPPFLAGS'
32055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32058
32059
32060  # Store the CFLAGS etc passed to the configure script.
32061  ORG_CFLAGS="$CFLAGS"
32062  ORG_CXXFLAGS="$CXXFLAGS"
32063
32064  # autoconf magic only relies on PATH, so update it if tools dir is specified
32065  OLD_PATH="$PATH"
32066
32067  # On Windows, we need to detect the visual studio installation first.
32068  # This will change the PATH, but we need to keep that new PATH even
32069  # after toolchain detection is done, since the compiler (on x86) uses
32070  # it for DLL resolution in runtime.
32071  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32072      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32073
32074  # Store path to cygwin link.exe to help excluding it when searching for
32075  # VS linker. This must be done before changing the PATH when looking for VS.
32076  # Extract the first word of "link", so it can be a program name with args.
32077set dummy link; ac_word=$2
32078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32079$as_echo_n "checking for $ac_word... " >&6; }
32080if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32081  $as_echo_n "(cached) " >&6
32082else
32083  case $CYGWIN_LINK in
32084  [\\/]* | ?:[\\/]*)
32085  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32086  ;;
32087  *)
32088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32089for as_dir in $PATH
32090do
32091  IFS=$as_save_IFS
32092  test -z "$as_dir" && as_dir=.
32093    for ac_exec_ext in '' $ac_executable_extensions; do
32094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32095    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32097    break 2
32098  fi
32099done
32100  done
32101IFS=$as_save_IFS
32102
32103  ;;
32104esac
32105fi
32106CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32107if test -n "$CYGWIN_LINK"; then
32108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32109$as_echo "$CYGWIN_LINK" >&6; }
32110else
32111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32112$as_echo "no" >&6; }
32113fi
32114
32115
32116  if test "x$CYGWIN_LINK" != x; then
32117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32118$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32119    "$CYGWIN_LINK" --version > /dev/null
32120    if test $? -eq 0 ; then
32121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32122$as_echo "yes" >&6; }
32123    else
32124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32125$as_echo "no" >&6; }
32126      # This might be the VS linker. Don't exclude it later on.
32127      CYGWIN_LINK=""
32128    fi
32129  fi
32130
32131  # First-hand choice is to locate and run the vsvars bat file.
32132
32133
32134# Check whether --with-toolchain-version was given.
32135if test "${with_toolchain_version+set}" = set; then :
32136  withval=$with_toolchain_version;
32137fi
32138
32139
32140  if test "x$with_toolchain_version" = xlist; then
32141    # List all toolchains
32142    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32143$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32144    for version in $VALID_VS_VERSIONS; do
32145      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32146      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32147    done
32148
32149    exit 0
32150  elif test "x$DEVKIT_VS_VERSION" != x; then
32151    VS_VERSION=$DEVKIT_VS_VERSION
32152    TOOLCHAIN_VERSION=$VS_VERSION
32153    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32154    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32155    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32156    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32157    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32158    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32159
32160    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32161    # can still be exported as INCLUDE for compiler invocations without
32162    # SYSROOT_CFLAGS
32163    OLDIFS="$IFS"
32164    IFS=";"
32165    for i in $DEVKIT_VS_INCLUDE; do
32166      ipath=$i
32167
32168  unix_path="$ipath"
32169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32170    windows_path=`$CYGPATH -m "$unix_path"`
32171    ipath="$windows_path"
32172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32173    windows_path=`cmd //c echo $unix_path`
32174    ipath="$windows_path"
32175  fi
32176
32177      VS_INCLUDE="$VS_INCLUDE;$ipath"
32178    done
32179    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32180    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32181    for i in $DEVKIT_VS_LIB; do
32182      libpath=$i
32183
32184  unix_path="$libpath"
32185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32186    windows_path=`$CYGPATH -m "$unix_path"`
32187    libpath="$windows_path"
32188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32189    windows_path=`cmd //c echo $unix_path`
32190    libpath="$windows_path"
32191  fi
32192
32193      VS_LIB="$VS_LIB;$libpath"
32194    done
32195    IFS="$OLDIFS"
32196
32197    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32198$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32199
32200  elif test "x$with_toolchain_version" != x; then
32201    # User override; check that it is valid
32202    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32203      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32204$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32205      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32206$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32207      as_fn_error $? "Cannot continue." "$LINENO" 5
32208    fi
32209    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32210  else
32211    # No flag given, use default
32212    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32213  fi
32214
32215  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32216
32217  VS_VERSION="$VS_VERSION"
32218  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32219  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32220  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32221  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32222
32223  # When using --with-tools-dir, assume it points to the correct and default
32224  # version of Visual Studio or that --with-toolchain-version was also set.
32225  if test "x$with_tools_dir" != x; then
32226
32227  if test "x$VS_ENV_CMD" = x; then
32228    VS_VERSION="${VS_VERSION}"
32229    VS_BASE="$with_tools_dir/../.."
32230    METHOD="--with-tools-dir"
32231
32232    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32233      VCVARSFILE="vc/bin/vcvars32.bat"
32234    else
32235      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32236    fi
32237
32238
32239  windows_path="$VS_BASE"
32240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32241    unix_path=`$CYGPATH -u "$windows_path"`
32242    VS_BASE="$unix_path"
32243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32245    VS_BASE="$unix_path"
32246  fi
32247
32248    if test -d "$VS_BASE"; then
32249      if test -f "$VS_BASE/$VCVARSFILE"; then
32250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32251$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32252        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32253        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32254        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32255        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32256      else
32257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32258$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32259        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32260$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32261      fi
32262    fi
32263  fi
32264
32265
32266  if test "x$VS_ENV_CMD" = x; then
32267    VS_VERSION="${VS_VERSION}"
32268    VS_BASE="$with_tools_dir/../../.."
32269    METHOD="--with-tools-dir"
32270
32271    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32272      VCVARSFILE="vc/bin/vcvars32.bat"
32273    else
32274      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32275    fi
32276
32277
32278  windows_path="$VS_BASE"
32279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32280    unix_path=`$CYGPATH -u "$windows_path"`
32281    VS_BASE="$unix_path"
32282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32284    VS_BASE="$unix_path"
32285  fi
32286
32287    if test -d "$VS_BASE"; then
32288      if test -f "$VS_BASE/$VCVARSFILE"; then
32289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32290$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32291        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32292        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32293        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32294        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32295      else
32296        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32297$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32298        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32299$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32300      fi
32301    fi
32302  fi
32303
32304    if test "x$VS_ENV_CMD" = x; then
32305      # Having specified an argument which is incorrect will produce an instant failure;
32306      # we should not go on looking
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32308$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32309      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32310$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32311      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32312$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32313      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32314    fi
32315  fi
32316
32317  VS_ENV_CMD=""
32318  VS_ENV_ARGS=""
32319
32320  if test "x$VS_COMNTOOLS" != x; then
32321
32322  if test "x$VS_ENV_CMD" = x; then
32323    VS_VERSION="${VS_VERSION}"
32324    VS_BASE="$VS_COMNTOOLS/../.."
32325    METHOD="$VS_COMNTOOLS_VAR variable"
32326
32327    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32328      VCVARSFILE="vc/bin/vcvars32.bat"
32329    else
32330      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32331    fi
32332
32333
32334  windows_path="$VS_BASE"
32335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32336    unix_path=`$CYGPATH -u "$windows_path"`
32337    VS_BASE="$unix_path"
32338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32340    VS_BASE="$unix_path"
32341  fi
32342
32343    if test -d "$VS_BASE"; then
32344      if test -f "$VS_BASE/$VCVARSFILE"; then
32345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32346$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32347        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32348        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32349        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32350        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32351      else
32352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32353$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32354        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32355$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32356      fi
32357    fi
32358  fi
32359
32360  fi
32361  if test "x$PROGRAMFILES" != x; then
32362
32363  if test "x$VS_ENV_CMD" = x; then
32364    VS_VERSION="${VS_VERSION}"
32365    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32366    METHOD="well-known name"
32367
32368    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32369      VCVARSFILE="vc/bin/vcvars32.bat"
32370    else
32371      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32372    fi
32373
32374
32375  windows_path="$VS_BASE"
32376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32377    unix_path=`$CYGPATH -u "$windows_path"`
32378    VS_BASE="$unix_path"
32379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32381    VS_BASE="$unix_path"
32382  fi
32383
32384    if test -d "$VS_BASE"; then
32385      if test -f "$VS_BASE/$VCVARSFILE"; then
32386        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32387$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32388        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32389        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32390        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32391        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32392      else
32393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32394$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32395        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32396$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32397      fi
32398    fi
32399  fi
32400
32401  fi
32402  # Work around the insanely named ProgramFiles(x86) env variable
32403  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32404  if test "x$PROGRAMFILES_X86" != x; then
32405
32406  if test "x$VS_ENV_CMD" = x; then
32407    VS_VERSION="${VS_VERSION}"
32408    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32409    METHOD="well-known name"
32410
32411    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32412      VCVARSFILE="vc/bin/vcvars32.bat"
32413    else
32414      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32415    fi
32416
32417
32418  windows_path="$VS_BASE"
32419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420    unix_path=`$CYGPATH -u "$windows_path"`
32421    VS_BASE="$unix_path"
32422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424    VS_BASE="$unix_path"
32425  fi
32426
32427    if test -d "$VS_BASE"; then
32428      if test -f "$VS_BASE/$VCVARSFILE"; then
32429        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32430$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32431        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32432        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32433        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32434        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32435      else
32436        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32437$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32438        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32439$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32440      fi
32441    fi
32442  fi
32443
32444  fi
32445
32446  if test "x$VS_ENV_CMD" = x; then
32447    VS_VERSION="${VS_VERSION}"
32448    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32449    METHOD="well-known name"
32450
32451    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32452      VCVARSFILE="vc/bin/vcvars32.bat"
32453    else
32454      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32455    fi
32456
32457
32458  windows_path="$VS_BASE"
32459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32460    unix_path=`$CYGPATH -u "$windows_path"`
32461    VS_BASE="$unix_path"
32462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32464    VS_BASE="$unix_path"
32465  fi
32466
32467    if test -d "$VS_BASE"; then
32468      if test -f "$VS_BASE/$VCVARSFILE"; then
32469        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32470$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32471        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32472        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32473        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32474        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32475      else
32476        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32477$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32479$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32480      fi
32481    fi
32482  fi
32483
32484
32485  if test "x$VS_ENV_CMD" = x; then
32486    VS_VERSION="${VS_VERSION}"
32487    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32488    METHOD="well-known name"
32489
32490    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32491      VCVARSFILE="vc/bin/vcvars32.bat"
32492    else
32493      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32494    fi
32495
32496
32497  windows_path="$VS_BASE"
32498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32499    unix_path=`$CYGPATH -u "$windows_path"`
32500    VS_BASE="$unix_path"
32501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32503    VS_BASE="$unix_path"
32504  fi
32505
32506    if test -d "$VS_BASE"; then
32507      if test -f "$VS_BASE/$VCVARSFILE"; then
32508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32509$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32510        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32511        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32512        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32513        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32514      else
32515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32516$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32517        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32518$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32519      fi
32520    fi
32521  fi
32522
32523
32524  if test "x$SDK_INSTALL_DIR" != x; then
32525    if test "x$ProgramW6432" != x; then
32526
32527  if test "x$VS_ENV_CMD" = x; then
32528    VS_VERSION="${VS_VERSION}"
32529    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32530    METHOD="well-known name"
32531
32532  windows_path="$WIN_SDK_BASE"
32533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32534    unix_path=`$CYGPATH -u "$windows_path"`
32535    WIN_SDK_BASE="$unix_path"
32536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32538    WIN_SDK_BASE="$unix_path"
32539  fi
32540
32541    if test -d "$WIN_SDK_BASE"; then
32542      # There have been cases of partial or broken SDK installations. A missing
32543      # lib dir is not going to work.
32544      if test ! -d "$WIN_SDK_BASE/lib"; then
32545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32546$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32547        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32548$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32549      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32550        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32551$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32552        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32553        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32554          VS_ENV_ARGS="/x86"
32555        else
32556          VS_ENV_ARGS="/x64"
32557        fi
32558        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32559        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32560        # TODO: improve detection for other versions of SDK
32561        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32562      else
32563        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32564$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32565        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32566$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32567      fi
32568    fi
32569  fi
32570
32571    fi
32572    if test "x$PROGRAMW6432" != x; then
32573
32574  if test "x$VS_ENV_CMD" = x; then
32575    VS_VERSION="${VS_VERSION}"
32576    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32577    METHOD="well-known name"
32578
32579  windows_path="$WIN_SDK_BASE"
32580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32581    unix_path=`$CYGPATH -u "$windows_path"`
32582    WIN_SDK_BASE="$unix_path"
32583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32585    WIN_SDK_BASE="$unix_path"
32586  fi
32587
32588    if test -d "$WIN_SDK_BASE"; then
32589      # There have been cases of partial or broken SDK installations. A missing
32590      # lib dir is not going to work.
32591      if test ! -d "$WIN_SDK_BASE/lib"; then
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32593$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32594        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32595$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32596      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32598$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32599        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32600        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32601          VS_ENV_ARGS="/x86"
32602        else
32603          VS_ENV_ARGS="/x64"
32604        fi
32605        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32606        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32607        # TODO: improve detection for other versions of SDK
32608        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32609      else
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32611$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32612        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32613$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32614      fi
32615    fi
32616  fi
32617
32618    fi
32619    if test "x$PROGRAMFILES" != x; then
32620
32621  if test "x$VS_ENV_CMD" = x; then
32622    VS_VERSION="${VS_VERSION}"
32623    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32624    METHOD="well-known name"
32625
32626  windows_path="$WIN_SDK_BASE"
32627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32628    unix_path=`$CYGPATH -u "$windows_path"`
32629    WIN_SDK_BASE="$unix_path"
32630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32632    WIN_SDK_BASE="$unix_path"
32633  fi
32634
32635    if test -d "$WIN_SDK_BASE"; then
32636      # There have been cases of partial or broken SDK installations. A missing
32637      # lib dir is not going to work.
32638      if test ! -d "$WIN_SDK_BASE/lib"; then
32639        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32640$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32642$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32643      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32645$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32646        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32647        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32648          VS_ENV_ARGS="/x86"
32649        else
32650          VS_ENV_ARGS="/x64"
32651        fi
32652        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32653        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32654        # TODO: improve detection for other versions of SDK
32655        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32656      else
32657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32660$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32661      fi
32662    fi
32663  fi
32664
32665    fi
32666
32667  if test "x$VS_ENV_CMD" = x; then
32668    VS_VERSION="${VS_VERSION}"
32669    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32670    METHOD="well-known name"
32671
32672  windows_path="$WIN_SDK_BASE"
32673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32674    unix_path=`$CYGPATH -u "$windows_path"`
32675    WIN_SDK_BASE="$unix_path"
32676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32678    WIN_SDK_BASE="$unix_path"
32679  fi
32680
32681    if test -d "$WIN_SDK_BASE"; then
32682      # There have been cases of partial or broken SDK installations. A missing
32683      # lib dir is not going to work.
32684      if test ! -d "$WIN_SDK_BASE/lib"; then
32685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32686$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32687        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32688$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32689      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32690        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32691$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32692        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32693        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32694          VS_ENV_ARGS="/x86"
32695        else
32696          VS_ENV_ARGS="/x64"
32697        fi
32698        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32699        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32700        # TODO: improve detection for other versions of SDK
32701        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32702      else
32703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32706$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32707      fi
32708    fi
32709  fi
32710
32711
32712  if test "x$VS_ENV_CMD" = x; then
32713    VS_VERSION="${VS_VERSION}"
32714    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32715    METHOD="well-known name"
32716
32717  windows_path="$WIN_SDK_BASE"
32718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32719    unix_path=`$CYGPATH -u "$windows_path"`
32720    WIN_SDK_BASE="$unix_path"
32721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32723    WIN_SDK_BASE="$unix_path"
32724  fi
32725
32726    if test -d "$WIN_SDK_BASE"; then
32727      # There have been cases of partial or broken SDK installations. A missing
32728      # lib dir is not going to work.
32729      if test ! -d "$WIN_SDK_BASE/lib"; then
32730        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32731$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32732        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32733$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32734      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32735        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32736$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32737        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32738        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32739          VS_ENV_ARGS="/x86"
32740        else
32741          VS_ENV_ARGS="/x64"
32742        fi
32743        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32744        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32745        # TODO: improve detection for other versions of SDK
32746        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32747      else
32748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32749$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32750        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32751$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32752      fi
32753    fi
32754  fi
32755
32756  fi
32757
32758    if test "x$VS_ENV_CMD" != x; then
32759      TOOLCHAIN_VERSION=$VS_VERSION
32760      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32761      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32762      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32763      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32764      # The rest of the variables are already evaled while probing
32765      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32766$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32767      break
32768    fi
32769  done
32770
32771
32772  # If we have a devkit, skip all of the below.
32773  if test "x$DEVKIT_VS_VERSION" = x; then
32774    if test "x$VS_ENV_CMD" != x; then
32775      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32776
32777  # Only process if variable expands to non-empty
32778
32779  if test "x$VS_ENV_CMD" != x; then
32780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32781
32782  # First separate the path from the arguments. This will split at the first
32783  # space.
32784  complete="$VS_ENV_CMD"
32785  path="${complete%% *}"
32786  tmp="$complete EOL"
32787  arguments="${tmp#* }"
32788
32789  # Input might be given as Windows format, start by converting to
32790  # unix format.
32791  new_path=`$CYGPATH -u "$path"`
32792
32793  # Now try to locate executable using which
32794  new_path=`$WHICH "$new_path" 2> /dev/null`
32795  # bat and cmd files are not always considered executable in cygwin causing which
32796  # to not find them
32797  if test "x$new_path" = x \
32798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32800    new_path=`$CYGPATH -u "$path"`
32801  fi
32802  if test "x$new_path" = x; then
32803    # Oops. Which didn't find the executable.
32804    # The splitting of arguments from the executable at a space might have been incorrect,
32805    # since paths with space are more likely in Windows. Give it another try with the whole
32806    # argument.
32807    path="$complete"
32808    arguments="EOL"
32809    new_path=`$CYGPATH -u "$path"`
32810    new_path=`$WHICH "$new_path" 2> /dev/null`
32811    # bat and cmd files are not always considered executable in cygwin causing which
32812    # to not find them
32813    if test "x$new_path" = x \
32814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32816      new_path=`$CYGPATH -u "$path"`
32817    fi
32818    if test "x$new_path" = x; then
32819      # It's still not found. Now this is an unrecoverable error.
32820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32821$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32822      has_space=`$ECHO "$complete" | $GREP " "`
32823      if test "x$has_space" != x; then
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32826      fi
32827      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32828    fi
32829  fi
32830
32831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32834  # "foo.exe" is OK but "foo" is an error.
32835  #
32836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32837  # It is also a way to make sure we got the proper file name for the real test later on.
32838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32839  if test "x$test_shortpath" = x; then
32840    # Short path failed, file does not exist as specified.
32841    # Try adding .exe or .cmd
32842    if test -f "${new_path}.exe"; then
32843      input_to_shortpath="${new_path}.exe"
32844    elif test -f "${new_path}.cmd"; then
32845      input_to_shortpath="${new_path}.cmd"
32846    else
32847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32848$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32851      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32852    fi
32853  else
32854    input_to_shortpath="$new_path"
32855  fi
32856
32857  # Call helper function which possibly converts this using DOS-style short mode.
32858  # If so, the updated path is stored in $new_path.
32859  new_path="$input_to_shortpath"
32860
32861  input_path="$input_to_shortpath"
32862  # Check if we need to convert this using DOS-style short mode. If the path
32863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32864  # take no chances and rewrite it.
32865  # Note: m4 eats our [], so we need to use [ and ] instead.
32866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32867  if test "x$has_forbidden_chars" != x; then
32868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32872      # Going to short mode and back again did indeed matter. Since short mode is
32873      # case insensitive, let's make it lowercase to improve readability.
32874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32875      # Now convert it back to Unix-style (cygpath)
32876      input_path=`$CYGPATH -u "$shortmode_path"`
32877      new_path="$input_path"
32878    fi
32879  fi
32880
32881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32882  if test "x$test_cygdrive_prefix" = x; then
32883    # As a simple fix, exclude /usr/bin since it's not a real path.
32884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32886      # a path prefixed by /cygdrive for fixpath to work.
32887      new_path="$CYGWIN_ROOT_PATH$input_path"
32888    fi
32889  fi
32890
32891  # remove trailing .exe if any
32892  new_path="${new_path/%.exe/}"
32893
32894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32895
32896  # First separate the path from the arguments. This will split at the first
32897  # space.
32898  complete="$VS_ENV_CMD"
32899  path="${complete%% *}"
32900  tmp="$complete EOL"
32901  arguments="${tmp#* }"
32902
32903  # Input might be given as Windows format, start by converting to
32904  # unix format.
32905  new_path="$path"
32906
32907  windows_path="$new_path"
32908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32909    unix_path=`$CYGPATH -u "$windows_path"`
32910    new_path="$unix_path"
32911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32913    new_path="$unix_path"
32914  fi
32915
32916
32917  # Now try to locate executable using which
32918  new_path=`$WHICH "$new_path" 2> /dev/null`
32919
32920  if test "x$new_path" = x; then
32921    # Oops. Which didn't find the executable.
32922    # The splitting of arguments from the executable at a space might have been incorrect,
32923    # since paths with space are more likely in Windows. Give it another try with the whole
32924    # argument.
32925    path="$complete"
32926    arguments="EOL"
32927    new_path="$path"
32928
32929  windows_path="$new_path"
32930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32931    unix_path=`$CYGPATH -u "$windows_path"`
32932    new_path="$unix_path"
32933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32935    new_path="$unix_path"
32936  fi
32937
32938
32939    new_path=`$WHICH "$new_path" 2> /dev/null`
32940    # bat and cmd files are not always considered executable in MSYS causing which
32941    # to not find them
32942    if test "x$new_path" = x \
32943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32945      new_path="$path"
32946
32947  windows_path="$new_path"
32948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32949    unix_path=`$CYGPATH -u "$windows_path"`
32950    new_path="$unix_path"
32951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32953    new_path="$unix_path"
32954  fi
32955
32956    fi
32957
32958    if test "x$new_path" = x; then
32959      # It's still not found. Now this is an unrecoverable error.
32960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32961$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32962      has_space=`$ECHO "$complete" | $GREP " "`
32963      if test "x$has_space" != x; then
32964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32966      fi
32967      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32968    fi
32969  fi
32970
32971  # Now new_path has a complete unix path to the binary
32972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32973    # Keep paths in /bin as-is, but remove trailing .exe if any
32974    new_path="${new_path/%.exe/}"
32975    # Do not save /bin paths to all_fixpath_prefixes!
32976  else
32977    # Not in mixed or Windows style, start by that.
32978    new_path=`cmd //c echo $new_path`
32979
32980  input_path="$new_path"
32981  # Check if we need to convert this using DOS-style short mode. If the path
32982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32983  # take no chances and rewrite it.
32984  # Note: m4 eats our [], so we need to use [ and ] instead.
32985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32986  if test "x$has_forbidden_chars" != x; then
32987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32989  fi
32990
32991    # Output is in $new_path
32992
32993  windows_path="$new_path"
32994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32995    unix_path=`$CYGPATH -u "$windows_path"`
32996    new_path="$unix_path"
32997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32999    new_path="$unix_path"
33000  fi
33001
33002    # remove trailing .exe if any
33003    new_path="${new_path/%.exe/}"
33004
33005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33007  fi
33008
33009    else
33010      # We're on a unix platform. Hooray! :)
33011      # First separate the path from the arguments. This will split at the first
33012      # space.
33013      complete="$VS_ENV_CMD"
33014      path="${complete%% *}"
33015      tmp="$complete EOL"
33016      arguments="${tmp#* }"
33017
33018      # Cannot rely on the command "which" here since it doesn't always work.
33019      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33020      if test -z "$is_absolute_path"; then
33021        # Path to executable is not absolute. Find it.
33022        IFS_save="$IFS"
33023        IFS=:
33024        for p in $PATH; do
33025          if test -f "$p/$path" && test -x "$p/$path"; then
33026            new_path="$p/$path"
33027            break
33028          fi
33029        done
33030        IFS="$IFS_save"
33031      else
33032        # This is an absolute path, we can use it without further modifications.
33033        new_path="$path"
33034      fi
33035
33036      if test "x$new_path" = x; then
33037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33038$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33039        has_space=`$ECHO "$complete" | $GREP " "`
33040        if test "x$has_space" != x; then
33041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33043        fi
33044        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33045      fi
33046    fi
33047
33048    # Now join together the path and the arguments once again
33049    if test "x$arguments" != xEOL; then
33050      new_complete="$new_path ${arguments% *}"
33051    else
33052      new_complete="$new_path"
33053    fi
33054
33055    if test "x$complete" != "x$new_complete"; then
33056      VS_ENV_CMD="$new_complete"
33057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33058$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33059    fi
33060  fi
33061
33062
33063      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33064      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33065$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33066
33067      # We need to create a couple of temporary files.
33068      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33069      $MKDIR -p $VS_ENV_TMP_DIR
33070
33071      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33072      # Instead create a shell script which will set the relevant variables when run.
33073      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33074
33075  unix_path="$WINPATH_VS_ENV_CMD"
33076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33077    windows_path=`$CYGPATH -m "$unix_path"`
33078    WINPATH_VS_ENV_CMD="$windows_path"
33079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33080    windows_path=`cmd //c echo $unix_path`
33081    WINPATH_VS_ENV_CMD="$windows_path"
33082  fi
33083
33084      WINPATH_BASH="$BASH"
33085
33086  unix_path="$WINPATH_BASH"
33087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33088    windows_path=`$CYGPATH -m "$unix_path"`
33089    WINPATH_BASH="$windows_path"
33090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33091    windows_path=`cmd //c echo $unix_path`
33092    WINPATH_BASH="$windows_path"
33093  fi
33094
33095
33096      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33097      # script (executable by bash) that will setup the important variables.
33098      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33099      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33100      # This will end up something like:
33101      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33102      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33103      # These will end up something like:
33104      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33105      # The trailing space for everyone except PATH is no typo, but is needed due
33106      # to trailing \ in the Windows paths. These will be stripped later.
33107      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33108          >> $EXTRACT_VC_ENV_BAT_FILE
33109      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33110          >> $EXTRACT_VC_ENV_BAT_FILE
33111      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33112          >> $EXTRACT_VC_ENV_BAT_FILE
33113      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33114          >> $EXTRACT_VC_ENV_BAT_FILE
33115      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33116          >> $EXTRACT_VC_ENV_BAT_FILE
33117      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33118          >> $EXTRACT_VC_ENV_BAT_FILE
33119
33120      # Now execute the newly created bat file.
33121      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33122      # Change directory so we don't need to mess with Windows paths in redirects.
33123      cd $VS_ENV_TMP_DIR
33124      cmd /c extract-vs-env.bat | $CAT
33125      cd $CURDIR
33126
33127      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33128        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33129$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33130        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33131$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33132        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33133$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33134        as_fn_error $? "Cannot continue" "$LINENO" 5
33135      fi
33136
33137      # Now set all paths and other env variables. This will allow the rest of
33138      # the configure script to find and run the compiler in the proper way.
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33140$as_echo "$as_me: Setting extracted environment variables" >&6;}
33141      . $VS_ENV_TMP_DIR/set-vs-env.sh
33142      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33143      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33144    else
33145      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33146      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33147$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33148    fi
33149  fi
33150
33151  # At this point, we should have correct variables in the environment, or we can't continue.
33152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33153$as_echo_n "checking for Visual Studio variables... " >&6; }
33154
33155  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33156      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33157    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33159$as_echo "present but broken" >&6; }
33160      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33161    else
33162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33163$as_echo "ok" >&6; }
33164      # Remove any trailing "\" ";" and " " from the variables.
33165      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33166      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33167      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33168      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33169      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33170      # Remove any paths containing # (typically F#) as that messes up make. This
33171      # is needed if visual studio was installed with F# support.
33172      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33173
33174
33175
33176
33177
33178      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33179      OLDIFS="$IFS"
33180      IFS=";"
33181      for i in $VS_INCLUDE; do
33182        ipath=$i
33183        # Only process non-empty elements
33184        if test "x$ipath" != x; then
33185          IFS="$OLDIFS"
33186          # Check that directory exists before calling fixup_path
33187          testpath=$ipath
33188
33189  windows_path="$testpath"
33190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33191    unix_path=`$CYGPATH -u "$windows_path"`
33192    testpath="$unix_path"
33193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33195    testpath="$unix_path"
33196  fi
33197
33198          if test -d "$testpath"; then
33199
33200  # Only process if variable expands to non-empty
33201
33202  if test "x$ipath" != x; then
33203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33204
33205  # Input might be given as Windows format, start by converting to
33206  # unix format.
33207  path="$ipath"
33208  new_path=`$CYGPATH -u "$path"`
33209
33210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33213  # "foo.exe" is OK but "foo" is an error.
33214  #
33215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33216  # It is also a way to make sure we got the proper file name for the real test later on.
33217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33218  if test "x$test_shortpath" = x; then
33219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33220$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33221    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33222  fi
33223
33224  # Call helper function which possibly converts this using DOS-style short mode.
33225  # If so, the updated path is stored in $new_path.
33226
33227  input_path="$new_path"
33228  # Check if we need to convert this using DOS-style short mode. If the path
33229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33230  # take no chances and rewrite it.
33231  # Note: m4 eats our [], so we need to use [ and ] instead.
33232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33233  if test "x$has_forbidden_chars" != x; then
33234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33238      # Going to short mode and back again did indeed matter. Since short mode is
33239      # case insensitive, let's make it lowercase to improve readability.
33240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33241      # Now convert it back to Unix-style (cygpath)
33242      input_path=`$CYGPATH -u "$shortmode_path"`
33243      new_path="$input_path"
33244    fi
33245  fi
33246
33247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33248  if test "x$test_cygdrive_prefix" = x; then
33249    # As a simple fix, exclude /usr/bin since it's not a real path.
33250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33252      # a path prefixed by /cygdrive for fixpath to work.
33253      new_path="$CYGWIN_ROOT_PATH$input_path"
33254    fi
33255  fi
33256
33257
33258  if test "x$path" != "x$new_path"; then
33259    ipath="$new_path"
33260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33261$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33262  fi
33263
33264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33265
33266  path="$ipath"
33267  has_colon=`$ECHO $path | $GREP ^.:`
33268  new_path="$path"
33269  if test "x$has_colon" = x; then
33270    # Not in mixed or Windows style, start by that.
33271    new_path=`cmd //c echo $path`
33272  fi
33273
33274
33275  input_path="$new_path"
33276  # Check if we need to convert this using DOS-style short mode. If the path
33277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33278  # take no chances and rewrite it.
33279  # Note: m4 eats our [], so we need to use [ and ] instead.
33280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33281  if test "x$has_forbidden_chars" != x; then
33282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33284  fi
33285
33286
33287  windows_path="$new_path"
33288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33289    unix_path=`$CYGPATH -u "$windows_path"`
33290    new_path="$unix_path"
33291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33293    new_path="$unix_path"
33294  fi
33295
33296  if test "x$path" != "x$new_path"; then
33297    ipath="$new_path"
33298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33299$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33300  fi
33301
33302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33304
33305    else
33306      # We're on a unix platform. Hooray! :)
33307      path="$ipath"
33308      has_space=`$ECHO "$path" | $GREP " "`
33309      if test "x$has_space" != x; then
33310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33311$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33313      fi
33314
33315      # Use eval to expand a potential ~
33316      eval path="$path"
33317      if test ! -f "$path" && test ! -d "$path"; then
33318        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33319      fi
33320
33321      if test -d "$path"; then
33322        ipath="`cd "$path"; $THEPWDCMD -L`"
33323      else
33324        dir="`$DIRNAME "$path"`"
33325        base="`$BASENAME "$path"`"
33326        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33327      fi
33328    fi
33329  fi
33330
33331            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33332          fi
33333          IFS=";"
33334        fi
33335      done
33336      # Convert VS_LIB into SYSROOT_LDFLAGS
33337      for i in $VS_LIB; do
33338        libpath=$i
33339        # Only process non-empty elements
33340        if test "x$libpath" != x; then
33341          IFS="$OLDIFS"
33342          # Check that directory exists before calling fixup_path
33343          testpath=$libpath
33344
33345  windows_path="$testpath"
33346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33347    unix_path=`$CYGPATH -u "$windows_path"`
33348    testpath="$unix_path"
33349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33351    testpath="$unix_path"
33352  fi
33353
33354          if test -d "$testpath"; then
33355
33356  # Only process if variable expands to non-empty
33357
33358  if test "x$libpath" != x; then
33359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33360
33361  # Input might be given as Windows format, start by converting to
33362  # unix format.
33363  path="$libpath"
33364  new_path=`$CYGPATH -u "$path"`
33365
33366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33369  # "foo.exe" is OK but "foo" is an error.
33370  #
33371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33372  # It is also a way to make sure we got the proper file name for the real test later on.
33373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33374  if test "x$test_shortpath" = x; then
33375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33376$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33377    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33378  fi
33379
33380  # Call helper function which possibly converts this using DOS-style short mode.
33381  # If so, the updated path is stored in $new_path.
33382
33383  input_path="$new_path"
33384  # Check if we need to convert this using DOS-style short mode. If the path
33385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33386  # take no chances and rewrite it.
33387  # Note: m4 eats our [], so we need to use [ and ] instead.
33388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33389  if test "x$has_forbidden_chars" != x; then
33390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33394      # Going to short mode and back again did indeed matter. Since short mode is
33395      # case insensitive, let's make it lowercase to improve readability.
33396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33397      # Now convert it back to Unix-style (cygpath)
33398      input_path=`$CYGPATH -u "$shortmode_path"`
33399      new_path="$input_path"
33400    fi
33401  fi
33402
33403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33404  if test "x$test_cygdrive_prefix" = x; then
33405    # As a simple fix, exclude /usr/bin since it's not a real path.
33406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33408      # a path prefixed by /cygdrive for fixpath to work.
33409      new_path="$CYGWIN_ROOT_PATH$input_path"
33410    fi
33411  fi
33412
33413
33414  if test "x$path" != "x$new_path"; then
33415    libpath="$new_path"
33416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33417$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33418  fi
33419
33420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33421
33422  path="$libpath"
33423  has_colon=`$ECHO $path | $GREP ^.:`
33424  new_path="$path"
33425  if test "x$has_colon" = x; then
33426    # Not in mixed or Windows style, start by that.
33427    new_path=`cmd //c echo $path`
33428  fi
33429
33430
33431  input_path="$new_path"
33432  # Check if we need to convert this using DOS-style short mode. If the path
33433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33434  # take no chances and rewrite it.
33435  # Note: m4 eats our [], so we need to use [ and ] instead.
33436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33437  if test "x$has_forbidden_chars" != x; then
33438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33440  fi
33441
33442
33443  windows_path="$new_path"
33444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33445    unix_path=`$CYGPATH -u "$windows_path"`
33446    new_path="$unix_path"
33447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33449    new_path="$unix_path"
33450  fi
33451
33452  if test "x$path" != "x$new_path"; then
33453    libpath="$new_path"
33454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33455$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33456  fi
33457
33458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33460
33461    else
33462      # We're on a unix platform. Hooray! :)
33463      path="$libpath"
33464      has_space=`$ECHO "$path" | $GREP " "`
33465      if test "x$has_space" != x; then
33466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33467$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33469      fi
33470
33471      # Use eval to expand a potential ~
33472      eval path="$path"
33473      if test ! -f "$path" && test ! -d "$path"; then
33474        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33475      fi
33476
33477      if test -d "$path"; then
33478        libpath="`cd "$path"; $THEPWDCMD -L`"
33479      else
33480        dir="`$DIRNAME "$path"`"
33481        base="`$BASENAME "$path"`"
33482        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33483      fi
33484    fi
33485  fi
33486
33487            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33488          fi
33489          IFS=";"
33490        fi
33491      done
33492      IFS="$OLDIFS"
33493    fi
33494  else
33495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33496$as_echo "not found" >&6; }
33497
33498    if test "x$VS_ENV_CMD" = x; then
33499      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33500$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33501      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33502$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33503    else
33504      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33505$as_echo "$as_me: Running the extraction script failed." >&6;}
33506    fi
33507    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33508$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33509    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33510$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33511    as_fn_error $? "Cannot continue" "$LINENO" 5
33512  fi
33513
33514    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33515    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33516    PATH="$VS_PATH"
33517    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33518    export INCLUDE="$VS_INCLUDE"
33519    export LIB="$VS_LIB"
33520  else
33521    if test "x$XCODE_VERSION_OUTPUT" != x; then
33522      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33523      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33524      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33525    else
33526      # Currently we do not define this for other toolchains. This might change as the need arise.
33527      TOOLCHAIN_VERSION=
33528    fi
33529  fi
33530
33531
33532  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33533  # override all other locations.
33534  if test "x$TOOLCHAIN_PATH" != x; then
33535    PATH=$TOOLCHAIN_PATH:$PATH
33536  fi
33537
33538
33539  #
33540  # Setup the compilers (CC and CXX)
33541  #
33542
33543  COMPILER_NAME=C
33544  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33545
33546  if test "x$CC" != x; then
33547    # User has supplied compiler name already, always let that override.
33548    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33549$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33550    if test "x`basename $CC`" = "x$CC"; then
33551      # A command without a complete path is provided, search $PATH.
33552
33553      for ac_prog in $CC
33554do
33555  # Extract the first word of "$ac_prog", so it can be a program name with args.
33556set dummy $ac_prog; ac_word=$2
33557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33558$as_echo_n "checking for $ac_word... " >&6; }
33559if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33560  $as_echo_n "(cached) " >&6
33561else
33562  case $POTENTIAL_CC in
33563  [\\/]* | ?:[\\/]*)
33564  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33565  ;;
33566  *)
33567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33568for as_dir in $PATH
33569do
33570  IFS=$as_save_IFS
33571  test -z "$as_dir" && as_dir=.
33572    for ac_exec_ext in '' $ac_executable_extensions; do
33573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33574    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33576    break 2
33577  fi
33578done
33579  done
33580IFS=$as_save_IFS
33581
33582  ;;
33583esac
33584fi
33585POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33586if test -n "$POTENTIAL_CC"; then
33587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33588$as_echo "$POTENTIAL_CC" >&6; }
33589else
33590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33591$as_echo "no" >&6; }
33592fi
33593
33594
33595  test -n "$POTENTIAL_CC" && break
33596done
33597
33598      if test "x$POTENTIAL_CC" != x; then
33599        CC=$POTENTIAL_CC
33600      else
33601        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33602      fi
33603    else
33604      # Otherwise it might already be a complete path
33605      if test ! -x "$CC"; then
33606        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33607      fi
33608    fi
33609  else
33610    # No user supplied value. Locate compiler ourselves.
33611
33612    # If we are cross compiling, assume cross compilation tools follows the
33613    # cross compilation standard where they are prefixed with the autoconf
33614    # standard name for the target. For example the binary
33615    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33616    # If we are not cross compiling, then the default compiler name will be
33617    # used.
33618
33619    CC=
33620    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33621    # before checking the rest of the PATH.
33622    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33623    # step, this should not be necessary.
33624    if test -n "$TOOLCHAIN_PATH"; then
33625      PATH_save="$PATH"
33626      PATH="$TOOLCHAIN_PATH"
33627      if test -n "$ac_tool_prefix"; then
33628  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33629set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33631$as_echo_n "checking for $ac_word... " >&6; }
33632if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33633  $as_echo_n "(cached) " >&6
33634else
33635  case $TOOLCHAIN_PATH_CC in
33636  [\\/]* | ?:[\\/]*)
33637  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33638  ;;
33639  *)
33640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33641for as_dir in $PATH
33642do
33643  IFS=$as_save_IFS
33644  test -z "$as_dir" && as_dir=.
33645    for ac_exec_ext in '' $ac_executable_extensions; do
33646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33647    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33649    break 2
33650  fi
33651done
33652  done
33653IFS=$as_save_IFS
33654
33655  ;;
33656esac
33657fi
33658TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33659if test -n "$TOOLCHAIN_PATH_CC"; then
33660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33661$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33662else
33663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33664$as_echo "no" >&6; }
33665fi
33666
33667
33668fi
33669if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33670  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33671  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33672set dummy $SEARCH_LIST; ac_word=$2
33673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33674$as_echo_n "checking for $ac_word... " >&6; }
33675if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33676  $as_echo_n "(cached) " >&6
33677else
33678  case $ac_pt_TOOLCHAIN_PATH_CC in
33679  [\\/]* | ?:[\\/]*)
33680  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33681  ;;
33682  *)
33683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33684for as_dir in $PATH
33685do
33686  IFS=$as_save_IFS
33687  test -z "$as_dir" && as_dir=.
33688    for ac_exec_ext in '' $ac_executable_extensions; do
33689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33690    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33692    break 2
33693  fi
33694done
33695  done
33696IFS=$as_save_IFS
33697
33698  ;;
33699esac
33700fi
33701ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33702if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33704$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33705else
33706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33707$as_echo "no" >&6; }
33708fi
33709
33710  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33711    TOOLCHAIN_PATH_CC=""
33712  else
33713    case $cross_compiling:$ac_tool_warned in
33714yes:)
33715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33717ac_tool_warned=yes ;;
33718esac
33719    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33720  fi
33721else
33722  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33723fi
33724
33725      CC=$TOOLCHAIN_PATH_CC
33726      PATH="$PATH_save"
33727    fi
33728
33729    # AC_PATH_TOOL can't be run multiple times with the same variable,
33730    # so create a new name for this run.
33731    if test "x$CC" = x; then
33732      if test -n "$ac_tool_prefix"; then
33733  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33734set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33736$as_echo_n "checking for $ac_word... " >&6; }
33737if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33738  $as_echo_n "(cached) " >&6
33739else
33740  case $POTENTIAL_CC in
33741  [\\/]* | ?:[\\/]*)
33742  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33743  ;;
33744  *)
33745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33746for as_dir in $PATH
33747do
33748  IFS=$as_save_IFS
33749  test -z "$as_dir" && as_dir=.
33750    for ac_exec_ext in '' $ac_executable_extensions; do
33751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33752    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33754    break 2
33755  fi
33756done
33757  done
33758IFS=$as_save_IFS
33759
33760  ;;
33761esac
33762fi
33763POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33764if test -n "$POTENTIAL_CC"; then
33765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33766$as_echo "$POTENTIAL_CC" >&6; }
33767else
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33769$as_echo "no" >&6; }
33770fi
33771
33772
33773fi
33774if test -z "$ac_cv_path_POTENTIAL_CC"; then
33775  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33776  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33777set dummy $SEARCH_LIST; ac_word=$2
33778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33779$as_echo_n "checking for $ac_word... " >&6; }
33780if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33781  $as_echo_n "(cached) " >&6
33782else
33783  case $ac_pt_POTENTIAL_CC in
33784  [\\/]* | ?:[\\/]*)
33785  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33786  ;;
33787  *)
33788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33789for as_dir in $PATH
33790do
33791  IFS=$as_save_IFS
33792  test -z "$as_dir" && as_dir=.
33793    for ac_exec_ext in '' $ac_executable_extensions; do
33794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33795    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33797    break 2
33798  fi
33799done
33800  done
33801IFS=$as_save_IFS
33802
33803  ;;
33804esac
33805fi
33806ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33807if test -n "$ac_pt_POTENTIAL_CC"; then
33808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33809$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33810else
33811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33812$as_echo "no" >&6; }
33813fi
33814
33815  if test "x$ac_pt_POTENTIAL_CC" = x; then
33816    POTENTIAL_CC=""
33817  else
33818    case $cross_compiling:$ac_tool_warned in
33819yes:)
33820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33822ac_tool_warned=yes ;;
33823esac
33824    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33825  fi
33826else
33827  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33828fi
33829
33830      CC=$POTENTIAL_CC
33831    fi
33832
33833    if test "x$CC" = x; then
33834
33835  # Print a helpful message on how to acquire the necessary build dependency.
33836  # devkit is the help tag: freetype, cups, alsa etc
33837  MISSING_DEPENDENCY=devkit
33838
33839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840    cygwin_help $MISSING_DEPENDENCY
33841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33842    msys_help $MISSING_DEPENDENCY
33843  else
33844    PKGHANDLER_COMMAND=
33845
33846    case $PKGHANDLER in
33847      apt-get)
33848        apt_help     $MISSING_DEPENDENCY ;;
33849      yum)
33850        yum_help     $MISSING_DEPENDENCY ;;
33851      brew)
33852        brew_help    $MISSING_DEPENDENCY ;;
33853      port)
33854        port_help    $MISSING_DEPENDENCY ;;
33855      pkgutil)
33856        pkgutil_help $MISSING_DEPENDENCY ;;
33857      pkgadd)
33858        pkgadd_help  $MISSING_DEPENDENCY ;;
33859    esac
33860
33861    if test "x$PKGHANDLER_COMMAND" != x; then
33862      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33863    fi
33864  fi
33865
33866      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33867    fi
33868  fi
33869
33870  # Now we have a compiler binary in CC. Make sure it's okay.
33871
33872  # Only process if variable expands to non-empty
33873
33874  if test "x$CC" != x; then
33875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33876
33877  # First separate the path from the arguments. This will split at the first
33878  # space.
33879  complete="$CC"
33880  path="${complete%% *}"
33881  tmp="$complete EOL"
33882  arguments="${tmp#* }"
33883
33884  # Input might be given as Windows format, start by converting to
33885  # unix format.
33886  new_path=`$CYGPATH -u "$path"`
33887
33888  # Now try to locate executable using which
33889  new_path=`$WHICH "$new_path" 2> /dev/null`
33890  # bat and cmd files are not always considered executable in cygwin causing which
33891  # to not find them
33892  if test "x$new_path" = x \
33893      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33894      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33895    new_path=`$CYGPATH -u "$path"`
33896  fi
33897  if test "x$new_path" = x; then
33898    # Oops. Which didn't find the executable.
33899    # The splitting of arguments from the executable at a space might have been incorrect,
33900    # since paths with space are more likely in Windows. Give it another try with the whole
33901    # argument.
33902    path="$complete"
33903    arguments="EOL"
33904    new_path=`$CYGPATH -u "$path"`
33905    new_path=`$WHICH "$new_path" 2> /dev/null`
33906    # bat and cmd files are not always considered executable in cygwin causing which
33907    # to not find them
33908    if test "x$new_path" = x \
33909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33911      new_path=`$CYGPATH -u "$path"`
33912    fi
33913    if test "x$new_path" = x; then
33914      # It's still not found. Now this is an unrecoverable error.
33915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33916$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33917      has_space=`$ECHO "$complete" | $GREP " "`
33918      if test "x$has_space" != x; then
33919        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33920$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33921      fi
33922      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33923    fi
33924  fi
33925
33926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33929  # "foo.exe" is OK but "foo" is an error.
33930  #
33931  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33932  # It is also a way to make sure we got the proper file name for the real test later on.
33933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33934  if test "x$test_shortpath" = x; then
33935    # Short path failed, file does not exist as specified.
33936    # Try adding .exe or .cmd
33937    if test -f "${new_path}.exe"; then
33938      input_to_shortpath="${new_path}.exe"
33939    elif test -f "${new_path}.cmd"; then
33940      input_to_shortpath="${new_path}.cmd"
33941    else
33942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33943$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33944      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33945$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33946      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33947    fi
33948  else
33949    input_to_shortpath="$new_path"
33950  fi
33951
33952  # Call helper function which possibly converts this using DOS-style short mode.
33953  # If so, the updated path is stored in $new_path.
33954  new_path="$input_to_shortpath"
33955
33956  input_path="$input_to_shortpath"
33957  # Check if we need to convert this using DOS-style short mode. If the path
33958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33959  # take no chances and rewrite it.
33960  # Note: m4 eats our [], so we need to use [ and ] instead.
33961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33962  if test "x$has_forbidden_chars" != x; then
33963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33967      # Going to short mode and back again did indeed matter. Since short mode is
33968      # case insensitive, let's make it lowercase to improve readability.
33969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33970      # Now convert it back to Unix-style (cygpath)
33971      input_path=`$CYGPATH -u "$shortmode_path"`
33972      new_path="$input_path"
33973    fi
33974  fi
33975
33976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33977  if test "x$test_cygdrive_prefix" = x; then
33978    # As a simple fix, exclude /usr/bin since it's not a real path.
33979    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33981      # a path prefixed by /cygdrive for fixpath to work.
33982      new_path="$CYGWIN_ROOT_PATH$input_path"
33983    fi
33984  fi
33985
33986  # remove trailing .exe if any
33987  new_path="${new_path/%.exe/}"
33988
33989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33990
33991  # First separate the path from the arguments. This will split at the first
33992  # space.
33993  complete="$CC"
33994  path="${complete%% *}"
33995  tmp="$complete EOL"
33996  arguments="${tmp#* }"
33997
33998  # Input might be given as Windows format, start by converting to
33999  # unix format.
34000  new_path="$path"
34001
34002  windows_path="$new_path"
34003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34004    unix_path=`$CYGPATH -u "$windows_path"`
34005    new_path="$unix_path"
34006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34008    new_path="$unix_path"
34009  fi
34010
34011
34012  # Now try to locate executable using which
34013  new_path=`$WHICH "$new_path" 2> /dev/null`
34014
34015  if test "x$new_path" = x; then
34016    # Oops. Which didn't find the executable.
34017    # The splitting of arguments from the executable at a space might have been incorrect,
34018    # since paths with space are more likely in Windows. Give it another try with the whole
34019    # argument.
34020    path="$complete"
34021    arguments="EOL"
34022    new_path="$path"
34023
34024  windows_path="$new_path"
34025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34026    unix_path=`$CYGPATH -u "$windows_path"`
34027    new_path="$unix_path"
34028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34030    new_path="$unix_path"
34031  fi
34032
34033
34034    new_path=`$WHICH "$new_path" 2> /dev/null`
34035    # bat and cmd files are not always considered executable in MSYS causing which
34036    # to not find them
34037    if test "x$new_path" = x \
34038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34040      new_path="$path"
34041
34042  windows_path="$new_path"
34043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34044    unix_path=`$CYGPATH -u "$windows_path"`
34045    new_path="$unix_path"
34046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34048    new_path="$unix_path"
34049  fi
34050
34051    fi
34052
34053    if test "x$new_path" = x; then
34054      # It's still not found. Now this is an unrecoverable error.
34055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34056$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34057      has_space=`$ECHO "$complete" | $GREP " "`
34058      if test "x$has_space" != x; then
34059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34061      fi
34062      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34063    fi
34064  fi
34065
34066  # Now new_path has a complete unix path to the binary
34067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34068    # Keep paths in /bin as-is, but remove trailing .exe if any
34069    new_path="${new_path/%.exe/}"
34070    # Do not save /bin paths to all_fixpath_prefixes!
34071  else
34072    # Not in mixed or Windows style, start by that.
34073    new_path=`cmd //c echo $new_path`
34074
34075  input_path="$new_path"
34076  # Check if we need to convert this using DOS-style short mode. If the path
34077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34078  # take no chances and rewrite it.
34079  # Note: m4 eats our [], so we need to use [ and ] instead.
34080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34081  if test "x$has_forbidden_chars" != x; then
34082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34084  fi
34085
34086    # Output is in $new_path
34087
34088  windows_path="$new_path"
34089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34090    unix_path=`$CYGPATH -u "$windows_path"`
34091    new_path="$unix_path"
34092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34094    new_path="$unix_path"
34095  fi
34096
34097    # remove trailing .exe if any
34098    new_path="${new_path/%.exe/}"
34099
34100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34102  fi
34103
34104    else
34105      # We're on a unix platform. Hooray! :)
34106      # First separate the path from the arguments. This will split at the first
34107      # space.
34108      complete="$CC"
34109      path="${complete%% *}"
34110      tmp="$complete EOL"
34111      arguments="${tmp#* }"
34112
34113      # Cannot rely on the command "which" here since it doesn't always work.
34114      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34115      if test -z "$is_absolute_path"; then
34116        # Path to executable is not absolute. Find it.
34117        IFS_save="$IFS"
34118        IFS=:
34119        for p in $PATH; do
34120          if test -f "$p/$path" && test -x "$p/$path"; then
34121            new_path="$p/$path"
34122            break
34123          fi
34124        done
34125        IFS="$IFS_save"
34126      else
34127        # This is an absolute path, we can use it without further modifications.
34128        new_path="$path"
34129      fi
34130
34131      if test "x$new_path" = x; then
34132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34133$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34134        has_space=`$ECHO "$complete" | $GREP " "`
34135        if test "x$has_space" != x; then
34136          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34137$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34138        fi
34139        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34140      fi
34141    fi
34142
34143    # Now join together the path and the arguments once again
34144    if test "x$arguments" != xEOL; then
34145      new_complete="$new_path ${arguments% *}"
34146    else
34147      new_complete="$new_path"
34148    fi
34149
34150    if test "x$complete" != "x$new_complete"; then
34151      CC="$new_complete"
34152      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34153$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34154    fi
34155  fi
34156
34157  TEST_COMPILER="$CC"
34158
34159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34160$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34161  SYMLINK_ORIGINAL="$TEST_COMPILER"
34162
34163  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34164    # Follow a chain of symbolic links. Use readlink
34165    # where it exists, else fall back to horribly
34166    # complicated shell code.
34167    if test "x$READLINK_TESTED" != yes; then
34168      # On MacOSX there is a readlink tool with a different
34169      # purpose than the GNU readlink tool. Check the found readlink.
34170      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34171      if test "x$ISGNU" = x; then
34172        # A readlink that we do not know how to use.
34173        # Are there other non-GNU readlinks out there?
34174        READLINK_TESTED=yes
34175        READLINK=
34176      fi
34177    fi
34178
34179    if test "x$READLINK" != x; then
34180      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34181    else
34182      # Save the current directory for restoring afterwards
34183      STARTDIR=$PWD
34184      COUNTER=0
34185      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34186      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34187      cd $sym_link_dir
34188      # Use -P flag to resolve symlinks in directories.
34189      cd `$THEPWDCMD -P`
34190      sym_link_dir=`$THEPWDCMD -P`
34191      # Resolve file symlinks
34192      while test $COUNTER -lt 20; do
34193        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34194        if test "x$ISLINK" == x; then
34195          # This is not a symbolic link! We are done!
34196          break
34197        fi
34198        # Again resolve directory symlinks since the target of the just found
34199        # link could be in a different directory
34200        cd `$DIRNAME $ISLINK`
34201        sym_link_dir=`$THEPWDCMD -P`
34202        sym_link_file=`$BASENAME $ISLINK`
34203        let COUNTER=COUNTER+1
34204      done
34205      cd $STARTDIR
34206      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34207    fi
34208  fi
34209
34210  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34212$as_echo "no symlink" >&6; }
34213  else
34214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34215$as_echo "$SYMLINK_ORIGINAL" >&6; }
34216
34217    # We can't handle ccache by gcc wrappers, since we need to know if we're
34218    # using ccache. Instead ccache usage must be controlled by a configure option.
34219    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34220    if test "x$COMPILER_BASENAME" = "xccache"; then
34221      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34222$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34223      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34224    fi
34225  fi
34226
34227
34228  COMPILER=$CC
34229  COMPILER_NAME=$COMPILER_NAME
34230
34231  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34232    # cc -V output typically looks like
34233    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34234    # or
34235    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34236    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34237    # Check that this is likely to be the Solaris Studio cc.
34238    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34239    if test $? -ne 0; then
34240      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34241      { $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
34242$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34243      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34244$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34245      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34246$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34247      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34248    fi
34249    # Remove usage instructions (if present), and
34250    # collapse compiler output into a single line
34251    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34252        $SED -e 's/ *[Uu]sage:.*//'`
34253    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34254        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34255  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34256    # xlc -qversion output typically looks like
34257    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34258    #     Version: 11.01.0000.0015
34259    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34260    # Check that this is likely to be the IBM XL C compiler.
34261    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34262    if test $? -ne 0; then
34263      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34264      { $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
34265$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34266      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34267$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34268      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34269$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34270      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34271    fi
34272    # Collapse compiler output into a single line
34273    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34274    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34275        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34276  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34277    # There is no specific version flag, but all output starts with a version string.
34278    # First line typically looks something like:
34279    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34280    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34281    # Check that this is likely to be Microsoft CL.EXE.
34282    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34283    if test $? -ne 0; then
34284      { $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
34285$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34286      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34287$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34288      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34289    fi
34290    # Collapse compiler output into a single line
34291    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34292    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34293        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34294  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34295    # gcc --version output typically looks like
34296    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34297    #     Copyright (C) 2013 Free Software Foundation, Inc.
34298    #     This is free software; see the source for copying conditions.  There is NO
34299    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34300    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34301    # Check that this is likely to be GCC.
34302    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34303    if test $? -ne 0; then
34304      { $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
34305$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34306      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34307$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34308      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34309    fi
34310    # Remove Copyright and legalese from version string, and
34311    # collapse into a single line
34312    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34313        $SED -e 's/ *Copyright .*//'`
34314    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34315        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34316  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34317    # clang --version output typically looks like
34318    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34319    #    clang version 3.3 (tags/RELEASE_33/final)
34320    # or
34321    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34322    #    Target: x86_64-pc-linux-gnu
34323    #    Thread model: posix
34324    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34325    # Check that this is likely to be clang
34326    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34327    if test $? -ne 0; then
34328      { $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
34329$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34330      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34331$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34332      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34333    fi
34334    # Collapse compiler output into a single line
34335    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34336    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34337        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34338  else
34339      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34340  fi
34341  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34342  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34343  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34344  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34345
34346  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34347$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34348
34349
34350  # Now that we have resolved CC ourself, let autoconf have its go at it
34351  ac_ext=c
34352ac_cpp='$CPP $CPPFLAGS'
34353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34355ac_compiler_gnu=$ac_cv_c_compiler_gnu
34356if test -n "$ac_tool_prefix"; then
34357  for ac_prog in $CC
34358  do
34359    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34360set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34362$as_echo_n "checking for $ac_word... " >&6; }
34363if ${ac_cv_prog_CC+:} false; then :
34364  $as_echo_n "(cached) " >&6
34365else
34366  if test -n "$CC"; then
34367  ac_cv_prog_CC="$CC" # Let the user override the test.
34368else
34369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34370for as_dir in $PATH
34371do
34372  IFS=$as_save_IFS
34373  test -z "$as_dir" && as_dir=.
34374    for ac_exec_ext in '' $ac_executable_extensions; do
34375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34376    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34378    break 2
34379  fi
34380done
34381  done
34382IFS=$as_save_IFS
34383
34384fi
34385fi
34386CC=$ac_cv_prog_CC
34387if test -n "$CC"; then
34388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34389$as_echo "$CC" >&6; }
34390else
34391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34392$as_echo "no" >&6; }
34393fi
34394
34395
34396    test -n "$CC" && break
34397  done
34398fi
34399if test -z "$CC"; then
34400  ac_ct_CC=$CC
34401  for ac_prog in $CC
34402do
34403  # Extract the first word of "$ac_prog", so it can be a program name with args.
34404set dummy $ac_prog; ac_word=$2
34405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34406$as_echo_n "checking for $ac_word... " >&6; }
34407if ${ac_cv_prog_ac_ct_CC+:} false; then :
34408  $as_echo_n "(cached) " >&6
34409else
34410  if test -n "$ac_ct_CC"; then
34411  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34412else
34413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34414for as_dir in $PATH
34415do
34416  IFS=$as_save_IFS
34417  test -z "$as_dir" && as_dir=.
34418    for ac_exec_ext in '' $ac_executable_extensions; do
34419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34420    ac_cv_prog_ac_ct_CC="$ac_prog"
34421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34422    break 2
34423  fi
34424done
34425  done
34426IFS=$as_save_IFS
34427
34428fi
34429fi
34430ac_ct_CC=$ac_cv_prog_ac_ct_CC
34431if test -n "$ac_ct_CC"; then
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34433$as_echo "$ac_ct_CC" >&6; }
34434else
34435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34436$as_echo "no" >&6; }
34437fi
34438
34439
34440  test -n "$ac_ct_CC" && break
34441done
34442
34443  if test "x$ac_ct_CC" = x; then
34444    CC=""
34445  else
34446    case $cross_compiling:$ac_tool_warned in
34447yes:)
34448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34450ac_tool_warned=yes ;;
34451esac
34452    CC=$ac_ct_CC
34453  fi
34454fi
34455
34456
34457test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34459as_fn_error $? "no acceptable C compiler found in \$PATH
34460See \`config.log' for more details" "$LINENO" 5; }
34461
34462# Provide some information about the compiler.
34463$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34464set X $ac_compile
34465ac_compiler=$2
34466for ac_option in --version -v -V -qversion; do
34467  { { ac_try="$ac_compiler $ac_option >&5"
34468case "(($ac_try" in
34469  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34470  *) ac_try_echo=$ac_try;;
34471esac
34472eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34473$as_echo "$ac_try_echo"; } >&5
34474  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34475  ac_status=$?
34476  if test -s conftest.err; then
34477    sed '10a\
34478... rest of stderr output deleted ...
34479         10q' conftest.err >conftest.er1
34480    cat conftest.er1 >&5
34481  fi
34482  rm -f conftest.er1 conftest.err
34483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34484  test $ac_status = 0; }
34485done
34486
34487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34488/* end confdefs.h.  */
34489
34490int
34491main ()
34492{
34493
34494  ;
34495  return 0;
34496}
34497_ACEOF
34498ac_clean_files_save=$ac_clean_files
34499ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34500# Try to create an executable without -o first, disregard a.out.
34501# It will help us diagnose broken compilers, and finding out an intuition
34502# of exeext.
34503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34504$as_echo_n "checking whether the C compiler works... " >&6; }
34505ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34506
34507# The possible output files:
34508ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34509
34510ac_rmfiles=
34511for ac_file in $ac_files
34512do
34513  case $ac_file in
34514    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34515    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34516  esac
34517done
34518rm -f $ac_rmfiles
34519
34520if { { ac_try="$ac_link_default"
34521case "(($ac_try" in
34522  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34523  *) ac_try_echo=$ac_try;;
34524esac
34525eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34526$as_echo "$ac_try_echo"; } >&5
34527  (eval "$ac_link_default") 2>&5
34528  ac_status=$?
34529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34530  test $ac_status = 0; }; then :
34531  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34532# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34533# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34534# so that the user can short-circuit this test for compilers unknown to
34535# Autoconf.
34536for ac_file in $ac_files ''
34537do
34538  test -f "$ac_file" || continue
34539  case $ac_file in
34540    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34541	;;
34542    [ab].out )
34543	# We found the default executable, but exeext='' is most
34544	# certainly right.
34545	break;;
34546    *.* )
34547	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34548	then :; else
34549	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34550	fi
34551	# We set ac_cv_exeext here because the later test for it is not
34552	# safe: cross compilers may not add the suffix if given an `-o'
34553	# argument, so we may need to know it at that point already.
34554	# Even if this section looks crufty: it has the advantage of
34555	# actually working.
34556	break;;
34557    * )
34558	break;;
34559  esac
34560done
34561test "$ac_cv_exeext" = no && ac_cv_exeext=
34562
34563else
34564  ac_file=''
34565fi
34566if test -z "$ac_file"; then :
34567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34568$as_echo "no" >&6; }
34569$as_echo "$as_me: failed program was:" >&5
34570sed 's/^/| /' conftest.$ac_ext >&5
34571
34572{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34574as_fn_error 77 "C compiler cannot create executables
34575See \`config.log' for more details" "$LINENO" 5; }
34576else
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34578$as_echo "yes" >&6; }
34579fi
34580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34581$as_echo_n "checking for C compiler default output file name... " >&6; }
34582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34583$as_echo "$ac_file" >&6; }
34584ac_exeext=$ac_cv_exeext
34585
34586rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34587ac_clean_files=$ac_clean_files_save
34588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34589$as_echo_n "checking for suffix of executables... " >&6; }
34590if { { ac_try="$ac_link"
34591case "(($ac_try" in
34592  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34593  *) ac_try_echo=$ac_try;;
34594esac
34595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34596$as_echo "$ac_try_echo"; } >&5
34597  (eval "$ac_link") 2>&5
34598  ac_status=$?
34599  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34600  test $ac_status = 0; }; then :
34601  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34602# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34603# work properly (i.e., refer to `conftest.exe'), while it won't with
34604# `rm'.
34605for ac_file in conftest.exe conftest conftest.*; do
34606  test -f "$ac_file" || continue
34607  case $ac_file in
34608    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34609    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34610	  break;;
34611    * ) break;;
34612  esac
34613done
34614else
34615  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34617as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34618See \`config.log' for more details" "$LINENO" 5; }
34619fi
34620rm -f conftest conftest$ac_cv_exeext
34621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34622$as_echo "$ac_cv_exeext" >&6; }
34623
34624rm -f conftest.$ac_ext
34625EXEEXT=$ac_cv_exeext
34626ac_exeext=$EXEEXT
34627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34628/* end confdefs.h.  */
34629#include <stdio.h>
34630int
34631main ()
34632{
34633FILE *f = fopen ("conftest.out", "w");
34634 return ferror (f) || fclose (f) != 0;
34635
34636  ;
34637  return 0;
34638}
34639_ACEOF
34640ac_clean_files="$ac_clean_files conftest.out"
34641# Check that the compiler produces executables we can run.  If not, either
34642# the compiler is broken, or we cross compile.
34643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34644$as_echo_n "checking whether we are cross compiling... " >&6; }
34645if test "$cross_compiling" != yes; then
34646  { { ac_try="$ac_link"
34647case "(($ac_try" in
34648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34649  *) ac_try_echo=$ac_try;;
34650esac
34651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34652$as_echo "$ac_try_echo"; } >&5
34653  (eval "$ac_link") 2>&5
34654  ac_status=$?
34655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34656  test $ac_status = 0; }
34657  if { ac_try='./conftest$ac_cv_exeext'
34658  { { case "(($ac_try" in
34659  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34660  *) ac_try_echo=$ac_try;;
34661esac
34662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34663$as_echo "$ac_try_echo"; } >&5
34664  (eval "$ac_try") 2>&5
34665  ac_status=$?
34666  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34667  test $ac_status = 0; }; }; then
34668    cross_compiling=no
34669  else
34670    if test "$cross_compiling" = maybe; then
34671	cross_compiling=yes
34672    else
34673	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34675as_fn_error $? "cannot run C compiled programs.
34676If you meant to cross compile, use \`--host'.
34677See \`config.log' for more details" "$LINENO" 5; }
34678    fi
34679  fi
34680fi
34681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34682$as_echo "$cross_compiling" >&6; }
34683
34684rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34685ac_clean_files=$ac_clean_files_save
34686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34687$as_echo_n "checking for suffix of object files... " >&6; }
34688if ${ac_cv_objext+:} false; then :
34689  $as_echo_n "(cached) " >&6
34690else
34691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34692/* end confdefs.h.  */
34693
34694int
34695main ()
34696{
34697
34698  ;
34699  return 0;
34700}
34701_ACEOF
34702rm -f conftest.o conftest.obj
34703if { { ac_try="$ac_compile"
34704case "(($ac_try" in
34705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34706  *) ac_try_echo=$ac_try;;
34707esac
34708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34709$as_echo "$ac_try_echo"; } >&5
34710  (eval "$ac_compile") 2>&5
34711  ac_status=$?
34712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34713  test $ac_status = 0; }; then :
34714  for ac_file in conftest.o conftest.obj conftest.*; do
34715  test -f "$ac_file" || continue;
34716  case $ac_file in
34717    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34718    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34719       break;;
34720  esac
34721done
34722else
34723  $as_echo "$as_me: failed program was:" >&5
34724sed 's/^/| /' conftest.$ac_ext >&5
34725
34726{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34728as_fn_error $? "cannot compute suffix of object files: cannot compile
34729See \`config.log' for more details" "$LINENO" 5; }
34730fi
34731rm -f conftest.$ac_cv_objext conftest.$ac_ext
34732fi
34733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34734$as_echo "$ac_cv_objext" >&6; }
34735OBJEXT=$ac_cv_objext
34736ac_objext=$OBJEXT
34737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34738$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34739if ${ac_cv_c_compiler_gnu+:} false; then :
34740  $as_echo_n "(cached) " >&6
34741else
34742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34743/* end confdefs.h.  */
34744
34745int
34746main ()
34747{
34748#ifndef __GNUC__
34749       choke me
34750#endif
34751
34752  ;
34753  return 0;
34754}
34755_ACEOF
34756if ac_fn_c_try_compile "$LINENO"; then :
34757  ac_compiler_gnu=yes
34758else
34759  ac_compiler_gnu=no
34760fi
34761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34762ac_cv_c_compiler_gnu=$ac_compiler_gnu
34763
34764fi
34765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34766$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34767if test $ac_compiler_gnu = yes; then
34768  GCC=yes
34769else
34770  GCC=
34771fi
34772ac_test_CFLAGS=${CFLAGS+set}
34773ac_save_CFLAGS=$CFLAGS
34774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34775$as_echo_n "checking whether $CC accepts -g... " >&6; }
34776if ${ac_cv_prog_cc_g+:} false; then :
34777  $as_echo_n "(cached) " >&6
34778else
34779  ac_save_c_werror_flag=$ac_c_werror_flag
34780   ac_c_werror_flag=yes
34781   ac_cv_prog_cc_g=no
34782   CFLAGS="-g"
34783   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34784/* end confdefs.h.  */
34785
34786int
34787main ()
34788{
34789
34790  ;
34791  return 0;
34792}
34793_ACEOF
34794if ac_fn_c_try_compile "$LINENO"; then :
34795  ac_cv_prog_cc_g=yes
34796else
34797  CFLAGS=""
34798      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34799/* end confdefs.h.  */
34800
34801int
34802main ()
34803{
34804
34805  ;
34806  return 0;
34807}
34808_ACEOF
34809if ac_fn_c_try_compile "$LINENO"; then :
34810
34811else
34812  ac_c_werror_flag=$ac_save_c_werror_flag
34813	 CFLAGS="-g"
34814	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34815/* end confdefs.h.  */
34816
34817int
34818main ()
34819{
34820
34821  ;
34822  return 0;
34823}
34824_ACEOF
34825if ac_fn_c_try_compile "$LINENO"; then :
34826  ac_cv_prog_cc_g=yes
34827fi
34828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34829fi
34830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34831fi
34832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34833   ac_c_werror_flag=$ac_save_c_werror_flag
34834fi
34835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34836$as_echo "$ac_cv_prog_cc_g" >&6; }
34837if test "$ac_test_CFLAGS" = set; then
34838  CFLAGS=$ac_save_CFLAGS
34839elif test $ac_cv_prog_cc_g = yes; then
34840  if test "$GCC" = yes; then
34841    CFLAGS="-g -O2"
34842  else
34843    CFLAGS="-g"
34844  fi
34845else
34846  if test "$GCC" = yes; then
34847    CFLAGS="-O2"
34848  else
34849    CFLAGS=
34850  fi
34851fi
34852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34853$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34854if ${ac_cv_prog_cc_c89+:} false; then :
34855  $as_echo_n "(cached) " >&6
34856else
34857  ac_cv_prog_cc_c89=no
34858ac_save_CC=$CC
34859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34860/* end confdefs.h.  */
34861#include <stdarg.h>
34862#include <stdio.h>
34863struct stat;
34864/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34865struct buf { int x; };
34866FILE * (*rcsopen) (struct buf *, struct stat *, int);
34867static char *e (p, i)
34868     char **p;
34869     int i;
34870{
34871  return p[i];
34872}
34873static char *f (char * (*g) (char **, int), char **p, ...)
34874{
34875  char *s;
34876  va_list v;
34877  va_start (v,p);
34878  s = g (p, va_arg (v,int));
34879  va_end (v);
34880  return s;
34881}
34882
34883/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34884   function prototypes and stuff, but not '\xHH' hex character constants.
34885   These don't provoke an error unfortunately, instead are silently treated
34886   as 'x'.  The following induces an error, until -std is added to get
34887   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34888   array size at least.  It's necessary to write '\x00'==0 to get something
34889   that's true only with -std.  */
34890int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34891
34892/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34893   inside strings and character constants.  */
34894#define FOO(x) 'x'
34895int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34896
34897int test (int i, double x);
34898struct s1 {int (*f) (int a);};
34899struct s2 {int (*f) (double a);};
34900int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34901int argc;
34902char **argv;
34903int
34904main ()
34905{
34906return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34907  ;
34908  return 0;
34909}
34910_ACEOF
34911for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34912	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34913do
34914  CC="$ac_save_CC $ac_arg"
34915  if ac_fn_c_try_compile "$LINENO"; then :
34916  ac_cv_prog_cc_c89=$ac_arg
34917fi
34918rm -f core conftest.err conftest.$ac_objext
34919  test "x$ac_cv_prog_cc_c89" != "xno" && break
34920done
34921rm -f conftest.$ac_ext
34922CC=$ac_save_CC
34923
34924fi
34925# AC_CACHE_VAL
34926case "x$ac_cv_prog_cc_c89" in
34927  x)
34928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34929$as_echo "none needed" >&6; } ;;
34930  xno)
34931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34932$as_echo "unsupported" >&6; } ;;
34933  *)
34934    CC="$CC $ac_cv_prog_cc_c89"
34935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34936$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34937esac
34938if test "x$ac_cv_prog_cc_c89" != xno; then :
34939
34940fi
34941
34942ac_ext=cpp
34943ac_cpp='$CXXCPP $CPPFLAGS'
34944ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34945ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34946ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34947
34948
34949
34950  COMPILER_NAME=C++
34951  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34952
34953  if test "x$CXX" != x; then
34954    # User has supplied compiler name already, always let that override.
34955    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34956$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34957    if test "x`basename $CXX`" = "x$CXX"; then
34958      # A command without a complete path is provided, search $PATH.
34959
34960      for ac_prog in $CXX
34961do
34962  # Extract the first word of "$ac_prog", so it can be a program name with args.
34963set dummy $ac_prog; ac_word=$2
34964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34965$as_echo_n "checking for $ac_word... " >&6; }
34966if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34967  $as_echo_n "(cached) " >&6
34968else
34969  case $POTENTIAL_CXX in
34970  [\\/]* | ?:[\\/]*)
34971  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34972  ;;
34973  *)
34974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34975for as_dir in $PATH
34976do
34977  IFS=$as_save_IFS
34978  test -z "$as_dir" && as_dir=.
34979    for ac_exec_ext in '' $ac_executable_extensions; do
34980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34981    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34983    break 2
34984  fi
34985done
34986  done
34987IFS=$as_save_IFS
34988
34989  ;;
34990esac
34991fi
34992POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34993if test -n "$POTENTIAL_CXX"; then
34994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34995$as_echo "$POTENTIAL_CXX" >&6; }
34996else
34997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34998$as_echo "no" >&6; }
34999fi
35000
35001
35002  test -n "$POTENTIAL_CXX" && break
35003done
35004
35005      if test "x$POTENTIAL_CXX" != x; then
35006        CXX=$POTENTIAL_CXX
35007      else
35008        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35009      fi
35010    else
35011      # Otherwise it might already be a complete path
35012      if test ! -x "$CXX"; then
35013        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35014      fi
35015    fi
35016  else
35017    # No user supplied value. Locate compiler ourselves.
35018
35019    # If we are cross compiling, assume cross compilation tools follows the
35020    # cross compilation standard where they are prefixed with the autoconf
35021    # standard name for the target. For example the binary
35022    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35023    # If we are not cross compiling, then the default compiler name will be
35024    # used.
35025
35026    CXX=
35027    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35028    # before checking the rest of the PATH.
35029    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35030    # step, this should not be necessary.
35031    if test -n "$TOOLCHAIN_PATH"; then
35032      PATH_save="$PATH"
35033      PATH="$TOOLCHAIN_PATH"
35034      if test -n "$ac_tool_prefix"; then
35035  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35036set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35038$as_echo_n "checking for $ac_word... " >&6; }
35039if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35040  $as_echo_n "(cached) " >&6
35041else
35042  case $TOOLCHAIN_PATH_CXX in
35043  [\\/]* | ?:[\\/]*)
35044  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35045  ;;
35046  *)
35047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35048for as_dir in $PATH
35049do
35050  IFS=$as_save_IFS
35051  test -z "$as_dir" && as_dir=.
35052    for ac_exec_ext in '' $ac_executable_extensions; do
35053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35054    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35056    break 2
35057  fi
35058done
35059  done
35060IFS=$as_save_IFS
35061
35062  ;;
35063esac
35064fi
35065TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35066if test -n "$TOOLCHAIN_PATH_CXX"; then
35067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35068$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35069else
35070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35071$as_echo "no" >&6; }
35072fi
35073
35074
35075fi
35076if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35077  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35078  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35079set dummy $SEARCH_LIST; ac_word=$2
35080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35081$as_echo_n "checking for $ac_word... " >&6; }
35082if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35083  $as_echo_n "(cached) " >&6
35084else
35085  case $ac_pt_TOOLCHAIN_PATH_CXX in
35086  [\\/]* | ?:[\\/]*)
35087  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35088  ;;
35089  *)
35090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35091for as_dir in $PATH
35092do
35093  IFS=$as_save_IFS
35094  test -z "$as_dir" && as_dir=.
35095    for ac_exec_ext in '' $ac_executable_extensions; do
35096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35097    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35099    break 2
35100  fi
35101done
35102  done
35103IFS=$as_save_IFS
35104
35105  ;;
35106esac
35107fi
35108ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35109if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35111$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35112else
35113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35114$as_echo "no" >&6; }
35115fi
35116
35117  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35118    TOOLCHAIN_PATH_CXX=""
35119  else
35120    case $cross_compiling:$ac_tool_warned in
35121yes:)
35122{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35123$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35124ac_tool_warned=yes ;;
35125esac
35126    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35127  fi
35128else
35129  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35130fi
35131
35132      CXX=$TOOLCHAIN_PATH_CXX
35133      PATH="$PATH_save"
35134    fi
35135
35136    # AC_PATH_TOOL can't be run multiple times with the same variable,
35137    # so create a new name for this run.
35138    if test "x$CXX" = x; then
35139      if test -n "$ac_tool_prefix"; then
35140  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35141set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35143$as_echo_n "checking for $ac_word... " >&6; }
35144if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35145  $as_echo_n "(cached) " >&6
35146else
35147  case $POTENTIAL_CXX in
35148  [\\/]* | ?:[\\/]*)
35149  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35150  ;;
35151  *)
35152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35153for as_dir in $PATH
35154do
35155  IFS=$as_save_IFS
35156  test -z "$as_dir" && as_dir=.
35157    for ac_exec_ext in '' $ac_executable_extensions; do
35158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35159    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35161    break 2
35162  fi
35163done
35164  done
35165IFS=$as_save_IFS
35166
35167  ;;
35168esac
35169fi
35170POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35171if test -n "$POTENTIAL_CXX"; then
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35173$as_echo "$POTENTIAL_CXX" >&6; }
35174else
35175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35176$as_echo "no" >&6; }
35177fi
35178
35179
35180fi
35181if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35182  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35183  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35184set dummy $SEARCH_LIST; ac_word=$2
35185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35186$as_echo_n "checking for $ac_word... " >&6; }
35187if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35188  $as_echo_n "(cached) " >&6
35189else
35190  case $ac_pt_POTENTIAL_CXX in
35191  [\\/]* | ?:[\\/]*)
35192  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35193  ;;
35194  *)
35195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35196for as_dir in $PATH
35197do
35198  IFS=$as_save_IFS
35199  test -z "$as_dir" && as_dir=.
35200    for ac_exec_ext in '' $ac_executable_extensions; do
35201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35202    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35204    break 2
35205  fi
35206done
35207  done
35208IFS=$as_save_IFS
35209
35210  ;;
35211esac
35212fi
35213ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35214if test -n "$ac_pt_POTENTIAL_CXX"; then
35215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35216$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35217else
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35219$as_echo "no" >&6; }
35220fi
35221
35222  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35223    POTENTIAL_CXX=""
35224  else
35225    case $cross_compiling:$ac_tool_warned in
35226yes:)
35227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35229ac_tool_warned=yes ;;
35230esac
35231    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35232  fi
35233else
35234  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35235fi
35236
35237      CXX=$POTENTIAL_CXX
35238    fi
35239
35240    if test "x$CXX" = x; then
35241
35242  # Print a helpful message on how to acquire the necessary build dependency.
35243  # devkit is the help tag: freetype, cups, alsa etc
35244  MISSING_DEPENDENCY=devkit
35245
35246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35247    cygwin_help $MISSING_DEPENDENCY
35248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35249    msys_help $MISSING_DEPENDENCY
35250  else
35251    PKGHANDLER_COMMAND=
35252
35253    case $PKGHANDLER in
35254      apt-get)
35255        apt_help     $MISSING_DEPENDENCY ;;
35256      yum)
35257        yum_help     $MISSING_DEPENDENCY ;;
35258      brew)
35259        brew_help    $MISSING_DEPENDENCY ;;
35260      port)
35261        port_help    $MISSING_DEPENDENCY ;;
35262      pkgutil)
35263        pkgutil_help $MISSING_DEPENDENCY ;;
35264      pkgadd)
35265        pkgadd_help  $MISSING_DEPENDENCY ;;
35266    esac
35267
35268    if test "x$PKGHANDLER_COMMAND" != x; then
35269      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35270    fi
35271  fi
35272
35273      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35274    fi
35275  fi
35276
35277  # Now we have a compiler binary in CXX. Make sure it's okay.
35278
35279  # Only process if variable expands to non-empty
35280
35281  if test "x$CXX" != x; then
35282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35283
35284  # First separate the path from the arguments. This will split at the first
35285  # space.
35286  complete="$CXX"
35287  path="${complete%% *}"
35288  tmp="$complete EOL"
35289  arguments="${tmp#* }"
35290
35291  # Input might be given as Windows format, start by converting to
35292  # unix format.
35293  new_path=`$CYGPATH -u "$path"`
35294
35295  # Now try to locate executable using which
35296  new_path=`$WHICH "$new_path" 2> /dev/null`
35297  # bat and cmd files are not always considered executable in cygwin causing which
35298  # to not find them
35299  if test "x$new_path" = x \
35300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35302    new_path=`$CYGPATH -u "$path"`
35303  fi
35304  if test "x$new_path" = x; then
35305    # Oops. Which didn't find the executable.
35306    # The splitting of arguments from the executable at a space might have been incorrect,
35307    # since paths with space are more likely in Windows. Give it another try with the whole
35308    # argument.
35309    path="$complete"
35310    arguments="EOL"
35311    new_path=`$CYGPATH -u "$path"`
35312    new_path=`$WHICH "$new_path" 2> /dev/null`
35313    # bat and cmd files are not always considered executable in cygwin causing which
35314    # to not find them
35315    if test "x$new_path" = x \
35316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35318      new_path=`$CYGPATH -u "$path"`
35319    fi
35320    if test "x$new_path" = x; then
35321      # It's still not found. Now this is an unrecoverable error.
35322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35323$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35324      has_space=`$ECHO "$complete" | $GREP " "`
35325      if test "x$has_space" != x; then
35326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35328      fi
35329      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35330    fi
35331  fi
35332
35333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35336  # "foo.exe" is OK but "foo" is an error.
35337  #
35338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35339  # It is also a way to make sure we got the proper file name for the real test later on.
35340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35341  if test "x$test_shortpath" = x; then
35342    # Short path failed, file does not exist as specified.
35343    # Try adding .exe or .cmd
35344    if test -f "${new_path}.exe"; then
35345      input_to_shortpath="${new_path}.exe"
35346    elif test -f "${new_path}.cmd"; then
35347      input_to_shortpath="${new_path}.cmd"
35348    else
35349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35350$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35353      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35354    fi
35355  else
35356    input_to_shortpath="$new_path"
35357  fi
35358
35359  # Call helper function which possibly converts this using DOS-style short mode.
35360  # If so, the updated path is stored in $new_path.
35361  new_path="$input_to_shortpath"
35362
35363  input_path="$input_to_shortpath"
35364  # Check if we need to convert this using DOS-style short mode. If the path
35365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35366  # take no chances and rewrite it.
35367  # Note: m4 eats our [], so we need to use [ and ] instead.
35368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35369  if test "x$has_forbidden_chars" != x; then
35370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35374      # Going to short mode and back again did indeed matter. Since short mode is
35375      # case insensitive, let's make it lowercase to improve readability.
35376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35377      # Now convert it back to Unix-style (cygpath)
35378      input_path=`$CYGPATH -u "$shortmode_path"`
35379      new_path="$input_path"
35380    fi
35381  fi
35382
35383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35384  if test "x$test_cygdrive_prefix" = x; then
35385    # As a simple fix, exclude /usr/bin since it's not a real path.
35386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35388      # a path prefixed by /cygdrive for fixpath to work.
35389      new_path="$CYGWIN_ROOT_PATH$input_path"
35390    fi
35391  fi
35392
35393  # remove trailing .exe if any
35394  new_path="${new_path/%.exe/}"
35395
35396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35397
35398  # First separate the path from the arguments. This will split at the first
35399  # space.
35400  complete="$CXX"
35401  path="${complete%% *}"
35402  tmp="$complete EOL"
35403  arguments="${tmp#* }"
35404
35405  # Input might be given as Windows format, start by converting to
35406  # unix format.
35407  new_path="$path"
35408
35409  windows_path="$new_path"
35410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411    unix_path=`$CYGPATH -u "$windows_path"`
35412    new_path="$unix_path"
35413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35415    new_path="$unix_path"
35416  fi
35417
35418
35419  # Now try to locate executable using which
35420  new_path=`$WHICH "$new_path" 2> /dev/null`
35421
35422  if test "x$new_path" = x; then
35423    # Oops. Which didn't find the executable.
35424    # The splitting of arguments from the executable at a space might have been incorrect,
35425    # since paths with space are more likely in Windows. Give it another try with the whole
35426    # argument.
35427    path="$complete"
35428    arguments="EOL"
35429    new_path="$path"
35430
35431  windows_path="$new_path"
35432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35433    unix_path=`$CYGPATH -u "$windows_path"`
35434    new_path="$unix_path"
35435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35437    new_path="$unix_path"
35438  fi
35439
35440
35441    new_path=`$WHICH "$new_path" 2> /dev/null`
35442    # bat and cmd files are not always considered executable in MSYS causing which
35443    # to not find them
35444    if test "x$new_path" = x \
35445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35447      new_path="$path"
35448
35449  windows_path="$new_path"
35450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451    unix_path=`$CYGPATH -u "$windows_path"`
35452    new_path="$unix_path"
35453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35455    new_path="$unix_path"
35456  fi
35457
35458    fi
35459
35460    if test "x$new_path" = x; then
35461      # It's still not found. Now this is an unrecoverable error.
35462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35463$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35464      has_space=`$ECHO "$complete" | $GREP " "`
35465      if test "x$has_space" != x; then
35466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35468      fi
35469      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35470    fi
35471  fi
35472
35473  # Now new_path has a complete unix path to the binary
35474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35475    # Keep paths in /bin as-is, but remove trailing .exe if any
35476    new_path="${new_path/%.exe/}"
35477    # Do not save /bin paths to all_fixpath_prefixes!
35478  else
35479    # Not in mixed or Windows style, start by that.
35480    new_path=`cmd //c echo $new_path`
35481
35482  input_path="$new_path"
35483  # Check if we need to convert this using DOS-style short mode. If the path
35484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35485  # take no chances and rewrite it.
35486  # Note: m4 eats our [], so we need to use [ and ] instead.
35487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35488  if test "x$has_forbidden_chars" != x; then
35489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35491  fi
35492
35493    # Output is in $new_path
35494
35495  windows_path="$new_path"
35496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35497    unix_path=`$CYGPATH -u "$windows_path"`
35498    new_path="$unix_path"
35499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35501    new_path="$unix_path"
35502  fi
35503
35504    # remove trailing .exe if any
35505    new_path="${new_path/%.exe/}"
35506
35507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35509  fi
35510
35511    else
35512      # We're on a unix platform. Hooray! :)
35513      # First separate the path from the arguments. This will split at the first
35514      # space.
35515      complete="$CXX"
35516      path="${complete%% *}"
35517      tmp="$complete EOL"
35518      arguments="${tmp#* }"
35519
35520      # Cannot rely on the command "which" here since it doesn't always work.
35521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35522      if test -z "$is_absolute_path"; then
35523        # Path to executable is not absolute. Find it.
35524        IFS_save="$IFS"
35525        IFS=:
35526        for p in $PATH; do
35527          if test -f "$p/$path" && test -x "$p/$path"; then
35528            new_path="$p/$path"
35529            break
35530          fi
35531        done
35532        IFS="$IFS_save"
35533      else
35534        # This is an absolute path, we can use it without further modifications.
35535        new_path="$path"
35536      fi
35537
35538      if test "x$new_path" = x; then
35539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35540$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35541        has_space=`$ECHO "$complete" | $GREP " "`
35542        if test "x$has_space" != x; then
35543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35545        fi
35546        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35547      fi
35548    fi
35549
35550    # Now join together the path and the arguments once again
35551    if test "x$arguments" != xEOL; then
35552      new_complete="$new_path ${arguments% *}"
35553    else
35554      new_complete="$new_path"
35555    fi
35556
35557    if test "x$complete" != "x$new_complete"; then
35558      CXX="$new_complete"
35559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35560$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35561    fi
35562  fi
35563
35564  TEST_COMPILER="$CXX"
35565
35566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35567$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35568  SYMLINK_ORIGINAL="$TEST_COMPILER"
35569
35570  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35571    # Follow a chain of symbolic links. Use readlink
35572    # where it exists, else fall back to horribly
35573    # complicated shell code.
35574    if test "x$READLINK_TESTED" != yes; then
35575      # On MacOSX there is a readlink tool with a different
35576      # purpose than the GNU readlink tool. Check the found readlink.
35577      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35578      if test "x$ISGNU" = x; then
35579        # A readlink that we do not know how to use.
35580        # Are there other non-GNU readlinks out there?
35581        READLINK_TESTED=yes
35582        READLINK=
35583      fi
35584    fi
35585
35586    if test "x$READLINK" != x; then
35587      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35588    else
35589      # Save the current directory for restoring afterwards
35590      STARTDIR=$PWD
35591      COUNTER=0
35592      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35593      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35594      cd $sym_link_dir
35595      # Use -P flag to resolve symlinks in directories.
35596      cd `$THEPWDCMD -P`
35597      sym_link_dir=`$THEPWDCMD -P`
35598      # Resolve file symlinks
35599      while test $COUNTER -lt 20; do
35600        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35601        if test "x$ISLINK" == x; then
35602          # This is not a symbolic link! We are done!
35603          break
35604        fi
35605        # Again resolve directory symlinks since the target of the just found
35606        # link could be in a different directory
35607        cd `$DIRNAME $ISLINK`
35608        sym_link_dir=`$THEPWDCMD -P`
35609        sym_link_file=`$BASENAME $ISLINK`
35610        let COUNTER=COUNTER+1
35611      done
35612      cd $STARTDIR
35613      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35614    fi
35615  fi
35616
35617  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35619$as_echo "no symlink" >&6; }
35620  else
35621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35622$as_echo "$SYMLINK_ORIGINAL" >&6; }
35623
35624    # We can't handle ccache by gcc wrappers, since we need to know if we're
35625    # using ccache. Instead ccache usage must be controlled by a configure option.
35626    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35627    if test "x$COMPILER_BASENAME" = "xccache"; then
35628      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35629$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35630      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35631    fi
35632  fi
35633
35634
35635  COMPILER=$CXX
35636  COMPILER_NAME=$COMPILER_NAME
35637
35638  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35639    # cc -V output typically looks like
35640    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35641    # or
35642    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35643    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35644    # Check that this is likely to be the Solaris Studio cc.
35645    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35646    if test $? -ne 0; then
35647      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35648      { $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
35649$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35650      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35651$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35652      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35653$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35654      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35655    fi
35656    # Remove usage instructions (if present), and
35657    # collapse compiler output into a single line
35658    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35659        $SED -e 's/ *[Uu]sage:.*//'`
35660    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35661        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35662  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35663    # xlc -qversion output typically looks like
35664    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35665    #     Version: 11.01.0000.0015
35666    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35667    # Check that this is likely to be the IBM XL C compiler.
35668    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35669    if test $? -ne 0; then
35670      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35671      { $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
35672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35674$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35675      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35676$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35677      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35678    fi
35679    # Collapse compiler output into a single line
35680    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35681    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35682        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35683  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35684    # There is no specific version flag, but all output starts with a version string.
35685    # First line typically looks something like:
35686    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35687    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35688    # Check that this is likely to be Microsoft CL.EXE.
35689    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35690    if test $? -ne 0; then
35691      { $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
35692$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35693      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35694$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35695      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35696    fi
35697    # Collapse compiler output into a single line
35698    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35699    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35700        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35701  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35702    # gcc --version output typically looks like
35703    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35704    #     Copyright (C) 2013 Free Software Foundation, Inc.
35705    #     This is free software; see the source for copying conditions.  There is NO
35706    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35707    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35708    # Check that this is likely to be GCC.
35709    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35710    if test $? -ne 0; then
35711      { $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
35712$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35713      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35714$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35715      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35716    fi
35717    # Remove Copyright and legalese from version string, and
35718    # collapse into a single line
35719    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35720        $SED -e 's/ *Copyright .*//'`
35721    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35722        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35723  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35724    # clang --version output typically looks like
35725    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35726    #    clang version 3.3 (tags/RELEASE_33/final)
35727    # or
35728    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35729    #    Target: x86_64-pc-linux-gnu
35730    #    Thread model: posix
35731    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35732    # Check that this is likely to be clang
35733    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35734    if test $? -ne 0; then
35735      { $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
35736$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35737      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35738$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35739      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35740    fi
35741    # Collapse compiler output into a single line
35742    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35743    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35744        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35745  else
35746      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35747  fi
35748  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35749  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35750  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35751  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35752
35753  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35754$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35755
35756
35757  # Now that we have resolved CXX ourself, let autoconf have its go at it
35758  ac_ext=cpp
35759ac_cpp='$CXXCPP $CPPFLAGS'
35760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35763if test -z "$CXX"; then
35764  if test -n "$CCC"; then
35765    CXX=$CCC
35766  else
35767    if test -n "$ac_tool_prefix"; then
35768  for ac_prog in $CXX
35769  do
35770    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35773$as_echo_n "checking for $ac_word... " >&6; }
35774if ${ac_cv_prog_CXX+:} false; then :
35775  $as_echo_n "(cached) " >&6
35776else
35777  if test -n "$CXX"; then
35778  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35779else
35780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35781for as_dir in $PATH
35782do
35783  IFS=$as_save_IFS
35784  test -z "$as_dir" && as_dir=.
35785    for ac_exec_ext in '' $ac_executable_extensions; do
35786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35787    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35789    break 2
35790  fi
35791done
35792  done
35793IFS=$as_save_IFS
35794
35795fi
35796fi
35797CXX=$ac_cv_prog_CXX
35798if test -n "$CXX"; then
35799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35800$as_echo "$CXX" >&6; }
35801else
35802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35803$as_echo "no" >&6; }
35804fi
35805
35806
35807    test -n "$CXX" && break
35808  done
35809fi
35810if test -z "$CXX"; then
35811  ac_ct_CXX=$CXX
35812  for ac_prog in $CXX
35813do
35814  # Extract the first word of "$ac_prog", so it can be a program name with args.
35815set dummy $ac_prog; ac_word=$2
35816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35817$as_echo_n "checking for $ac_word... " >&6; }
35818if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35819  $as_echo_n "(cached) " >&6
35820else
35821  if test -n "$ac_ct_CXX"; then
35822  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35823else
35824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35825for as_dir in $PATH
35826do
35827  IFS=$as_save_IFS
35828  test -z "$as_dir" && as_dir=.
35829    for ac_exec_ext in '' $ac_executable_extensions; do
35830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35831    ac_cv_prog_ac_ct_CXX="$ac_prog"
35832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35833    break 2
35834  fi
35835done
35836  done
35837IFS=$as_save_IFS
35838
35839fi
35840fi
35841ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35842if test -n "$ac_ct_CXX"; then
35843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35844$as_echo "$ac_ct_CXX" >&6; }
35845else
35846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35847$as_echo "no" >&6; }
35848fi
35849
35850
35851  test -n "$ac_ct_CXX" && break
35852done
35853
35854  if test "x$ac_ct_CXX" = x; then
35855    CXX="g++"
35856  else
35857    case $cross_compiling:$ac_tool_warned in
35858yes:)
35859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35861ac_tool_warned=yes ;;
35862esac
35863    CXX=$ac_ct_CXX
35864  fi
35865fi
35866
35867  fi
35868fi
35869# Provide some information about the compiler.
35870$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35871set X $ac_compile
35872ac_compiler=$2
35873for ac_option in --version -v -V -qversion; do
35874  { { ac_try="$ac_compiler $ac_option >&5"
35875case "(($ac_try" in
35876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35877  *) ac_try_echo=$ac_try;;
35878esac
35879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35880$as_echo "$ac_try_echo"; } >&5
35881  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35882  ac_status=$?
35883  if test -s conftest.err; then
35884    sed '10a\
35885... rest of stderr output deleted ...
35886         10q' conftest.err >conftest.er1
35887    cat conftest.er1 >&5
35888  fi
35889  rm -f conftest.er1 conftest.err
35890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35891  test $ac_status = 0; }
35892done
35893
35894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35895$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35896if ${ac_cv_cxx_compiler_gnu+:} false; then :
35897  $as_echo_n "(cached) " >&6
35898else
35899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35900/* end confdefs.h.  */
35901
35902int
35903main ()
35904{
35905#ifndef __GNUC__
35906       choke me
35907#endif
35908
35909  ;
35910  return 0;
35911}
35912_ACEOF
35913if ac_fn_cxx_try_compile "$LINENO"; then :
35914  ac_compiler_gnu=yes
35915else
35916  ac_compiler_gnu=no
35917fi
35918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35919ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35920
35921fi
35922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35923$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35924if test $ac_compiler_gnu = yes; then
35925  GXX=yes
35926else
35927  GXX=
35928fi
35929ac_test_CXXFLAGS=${CXXFLAGS+set}
35930ac_save_CXXFLAGS=$CXXFLAGS
35931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35932$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35933if ${ac_cv_prog_cxx_g+:} false; then :
35934  $as_echo_n "(cached) " >&6
35935else
35936  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35937   ac_cxx_werror_flag=yes
35938   ac_cv_prog_cxx_g=no
35939   CXXFLAGS="-g"
35940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35941/* end confdefs.h.  */
35942
35943int
35944main ()
35945{
35946
35947  ;
35948  return 0;
35949}
35950_ACEOF
35951if ac_fn_cxx_try_compile "$LINENO"; then :
35952  ac_cv_prog_cxx_g=yes
35953else
35954  CXXFLAGS=""
35955      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35956/* end confdefs.h.  */
35957
35958int
35959main ()
35960{
35961
35962  ;
35963  return 0;
35964}
35965_ACEOF
35966if ac_fn_cxx_try_compile "$LINENO"; then :
35967
35968else
35969  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35970	 CXXFLAGS="-g"
35971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35972/* end confdefs.h.  */
35973
35974int
35975main ()
35976{
35977
35978  ;
35979  return 0;
35980}
35981_ACEOF
35982if ac_fn_cxx_try_compile "$LINENO"; then :
35983  ac_cv_prog_cxx_g=yes
35984fi
35985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35986fi
35987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35988fi
35989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35990   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35991fi
35992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35993$as_echo "$ac_cv_prog_cxx_g" >&6; }
35994if test "$ac_test_CXXFLAGS" = set; then
35995  CXXFLAGS=$ac_save_CXXFLAGS
35996elif test $ac_cv_prog_cxx_g = yes; then
35997  if test "$GXX" = yes; then
35998    CXXFLAGS="-g -O2"
35999  else
36000    CXXFLAGS="-g"
36001  fi
36002else
36003  if test "$GXX" = yes; then
36004    CXXFLAGS="-O2"
36005  else
36006    CXXFLAGS=
36007  fi
36008fi
36009ac_ext=cpp
36010ac_cpp='$CXXCPP $CPPFLAGS'
36011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36014
36015
36016  # This is the compiler version number on the form X.Y[.Z]
36017
36018
36019
36020
36021  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36022    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36023$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36024    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36025$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36026  fi
36027
36028  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36029  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36030    { $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
36031$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;}
36032  fi
36033
36034  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36035    { $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
36036$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36037  fi
36038
36039  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36040
36041
36042  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
36090
36091
36092    # Execute function body
36093
36094  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36095  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36096
36097  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36098    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36099  fi
36100
36101  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36102    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36103  fi
36104
36105  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36106  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36107
36108  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36109    :
36110
36111  else
36112    :
36113
36114          { $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
36115$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36116
36117
36118  fi
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133  fi
36134
36135  #
36136  # Setup the preprocessor (CPP and CXXCPP)
36137  #
36138  ac_ext=c
36139ac_cpp='$CPP $CPPFLAGS'
36140ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36141ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36142ac_compiler_gnu=$ac_cv_c_compiler_gnu
36143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36144$as_echo_n "checking how to run the C preprocessor... " >&6; }
36145# On Suns, sometimes $CPP names a directory.
36146if test -n "$CPP" && test -d "$CPP"; then
36147  CPP=
36148fi
36149if test -z "$CPP"; then
36150  if ${ac_cv_prog_CPP+:} false; then :
36151  $as_echo_n "(cached) " >&6
36152else
36153      # Double quotes because CPP needs to be expanded
36154    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36155    do
36156      ac_preproc_ok=false
36157for ac_c_preproc_warn_flag in '' yes
36158do
36159  # Use a header file that comes with gcc, so configuring glibc
36160  # with a fresh cross-compiler works.
36161  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36162  # <limits.h> exists even on freestanding compilers.
36163  # On the NeXT, cc -E runs the code through the compiler's parser,
36164  # not just through cpp. "Syntax error" is here to catch this case.
36165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36166/* end confdefs.h.  */
36167#ifdef __STDC__
36168# include <limits.h>
36169#else
36170# include <assert.h>
36171#endif
36172		     Syntax error
36173_ACEOF
36174if ac_fn_c_try_cpp "$LINENO"; then :
36175
36176else
36177  # Broken: fails on valid input.
36178continue
36179fi
36180rm -f conftest.err conftest.i conftest.$ac_ext
36181
36182  # OK, works on sane cases.  Now check whether nonexistent headers
36183  # can be detected and how.
36184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36185/* end confdefs.h.  */
36186#include <ac_nonexistent.h>
36187_ACEOF
36188if ac_fn_c_try_cpp "$LINENO"; then :
36189  # Broken: success on invalid input.
36190continue
36191else
36192  # Passes both tests.
36193ac_preproc_ok=:
36194break
36195fi
36196rm -f conftest.err conftest.i conftest.$ac_ext
36197
36198done
36199# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36200rm -f conftest.i conftest.err conftest.$ac_ext
36201if $ac_preproc_ok; then :
36202  break
36203fi
36204
36205    done
36206    ac_cv_prog_CPP=$CPP
36207
36208fi
36209  CPP=$ac_cv_prog_CPP
36210else
36211  ac_cv_prog_CPP=$CPP
36212fi
36213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36214$as_echo "$CPP" >&6; }
36215ac_preproc_ok=false
36216for ac_c_preproc_warn_flag in '' yes
36217do
36218  # Use a header file that comes with gcc, so configuring glibc
36219  # with a fresh cross-compiler works.
36220  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36221  # <limits.h> exists even on freestanding compilers.
36222  # On the NeXT, cc -E runs the code through the compiler's parser,
36223  # not just through cpp. "Syntax error" is here to catch this case.
36224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36225/* end confdefs.h.  */
36226#ifdef __STDC__
36227# include <limits.h>
36228#else
36229# include <assert.h>
36230#endif
36231		     Syntax error
36232_ACEOF
36233if ac_fn_c_try_cpp "$LINENO"; then :
36234
36235else
36236  # Broken: fails on valid input.
36237continue
36238fi
36239rm -f conftest.err conftest.i conftest.$ac_ext
36240
36241  # OK, works on sane cases.  Now check whether nonexistent headers
36242  # can be detected and how.
36243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36244/* end confdefs.h.  */
36245#include <ac_nonexistent.h>
36246_ACEOF
36247if ac_fn_c_try_cpp "$LINENO"; then :
36248  # Broken: success on invalid input.
36249continue
36250else
36251  # Passes both tests.
36252ac_preproc_ok=:
36253break
36254fi
36255rm -f conftest.err conftest.i conftest.$ac_ext
36256
36257done
36258# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36259rm -f conftest.i conftest.err conftest.$ac_ext
36260if $ac_preproc_ok; then :
36261
36262else
36263  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36264$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36265as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36266See \`config.log' for more details" "$LINENO" 5; }
36267fi
36268
36269ac_ext=cpp
36270ac_cpp='$CXXCPP $CPPFLAGS'
36271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36274
36275
36276  # Only process if variable expands to non-empty
36277
36278  if test "x$CPP" != x; then
36279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280
36281  # First separate the path from the arguments. This will split at the first
36282  # space.
36283  complete="$CPP"
36284  path="${complete%% *}"
36285  tmp="$complete EOL"
36286  arguments="${tmp#* }"
36287
36288  # Input might be given as Windows format, start by converting to
36289  # unix format.
36290  new_path=`$CYGPATH -u "$path"`
36291
36292  # Now try to locate executable using which
36293  new_path=`$WHICH "$new_path" 2> /dev/null`
36294  # bat and cmd files are not always considered executable in cygwin causing which
36295  # to not find them
36296  if test "x$new_path" = x \
36297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36299    new_path=`$CYGPATH -u "$path"`
36300  fi
36301  if test "x$new_path" = x; then
36302    # Oops. Which didn't find the executable.
36303    # The splitting of arguments from the executable at a space might have been incorrect,
36304    # since paths with space are more likely in Windows. Give it another try with the whole
36305    # argument.
36306    path="$complete"
36307    arguments="EOL"
36308    new_path=`$CYGPATH -u "$path"`
36309    new_path=`$WHICH "$new_path" 2> /dev/null`
36310    # bat and cmd files are not always considered executable in cygwin causing which
36311    # to not find them
36312    if test "x$new_path" = x \
36313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36315      new_path=`$CYGPATH -u "$path"`
36316    fi
36317    if test "x$new_path" = x; then
36318      # It's still not found. Now this is an unrecoverable error.
36319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36320$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36321      has_space=`$ECHO "$complete" | $GREP " "`
36322      if test "x$has_space" != x; then
36323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36325      fi
36326      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36327    fi
36328  fi
36329
36330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36333  # "foo.exe" is OK but "foo" is an error.
36334  #
36335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36336  # It is also a way to make sure we got the proper file name for the real test later on.
36337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36338  if test "x$test_shortpath" = x; then
36339    # Short path failed, file does not exist as specified.
36340    # Try adding .exe or .cmd
36341    if test -f "${new_path}.exe"; then
36342      input_to_shortpath="${new_path}.exe"
36343    elif test -f "${new_path}.cmd"; then
36344      input_to_shortpath="${new_path}.cmd"
36345    else
36346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36347$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36350      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36351    fi
36352  else
36353    input_to_shortpath="$new_path"
36354  fi
36355
36356  # Call helper function which possibly converts this using DOS-style short mode.
36357  # If so, the updated path is stored in $new_path.
36358  new_path="$input_to_shortpath"
36359
36360  input_path="$input_to_shortpath"
36361  # Check if we need to convert this using DOS-style short mode. If the path
36362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36363  # take no chances and rewrite it.
36364  # Note: m4 eats our [], so we need to use [ and ] instead.
36365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36366  if test "x$has_forbidden_chars" != x; then
36367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36371      # Going to short mode and back again did indeed matter. Since short mode is
36372      # case insensitive, let's make it lowercase to improve readability.
36373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36374      # Now convert it back to Unix-style (cygpath)
36375      input_path=`$CYGPATH -u "$shortmode_path"`
36376      new_path="$input_path"
36377    fi
36378  fi
36379
36380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36381  if test "x$test_cygdrive_prefix" = x; then
36382    # As a simple fix, exclude /usr/bin since it's not a real path.
36383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36385      # a path prefixed by /cygdrive for fixpath to work.
36386      new_path="$CYGWIN_ROOT_PATH$input_path"
36387    fi
36388  fi
36389
36390  # remove trailing .exe if any
36391  new_path="${new_path/%.exe/}"
36392
36393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394
36395  # First separate the path from the arguments. This will split at the first
36396  # space.
36397  complete="$CPP"
36398  path="${complete%% *}"
36399  tmp="$complete EOL"
36400  arguments="${tmp#* }"
36401
36402  # Input might be given as Windows format, start by converting to
36403  # unix format.
36404  new_path="$path"
36405
36406  windows_path="$new_path"
36407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36408    unix_path=`$CYGPATH -u "$windows_path"`
36409    new_path="$unix_path"
36410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36412    new_path="$unix_path"
36413  fi
36414
36415
36416  # Now try to locate executable using which
36417  new_path=`$WHICH "$new_path" 2> /dev/null`
36418
36419  if test "x$new_path" = x; then
36420    # Oops. Which didn't find the executable.
36421    # The splitting of arguments from the executable at a space might have been incorrect,
36422    # since paths with space are more likely in Windows. Give it another try with the whole
36423    # argument.
36424    path="$complete"
36425    arguments="EOL"
36426    new_path="$path"
36427
36428  windows_path="$new_path"
36429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36430    unix_path=`$CYGPATH -u "$windows_path"`
36431    new_path="$unix_path"
36432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36434    new_path="$unix_path"
36435  fi
36436
36437
36438    new_path=`$WHICH "$new_path" 2> /dev/null`
36439    # bat and cmd files are not always considered executable in MSYS causing which
36440    # to not find them
36441    if test "x$new_path" = x \
36442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36444      new_path="$path"
36445
36446  windows_path="$new_path"
36447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448    unix_path=`$CYGPATH -u "$windows_path"`
36449    new_path="$unix_path"
36450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452    new_path="$unix_path"
36453  fi
36454
36455    fi
36456
36457    if test "x$new_path" = x; then
36458      # It's still not found. Now this is an unrecoverable error.
36459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36460$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36461      has_space=`$ECHO "$complete" | $GREP " "`
36462      if test "x$has_space" != x; then
36463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36465      fi
36466      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36467    fi
36468  fi
36469
36470  # Now new_path has a complete unix path to the binary
36471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36472    # Keep paths in /bin as-is, but remove trailing .exe if any
36473    new_path="${new_path/%.exe/}"
36474    # Do not save /bin paths to all_fixpath_prefixes!
36475  else
36476    # Not in mixed or Windows style, start by that.
36477    new_path=`cmd //c echo $new_path`
36478
36479  input_path="$new_path"
36480  # Check if we need to convert this using DOS-style short mode. If the path
36481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36482  # take no chances and rewrite it.
36483  # Note: m4 eats our [], so we need to use [ and ] instead.
36484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36485  if test "x$has_forbidden_chars" != x; then
36486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36488  fi
36489
36490    # Output is in $new_path
36491
36492  windows_path="$new_path"
36493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36494    unix_path=`$CYGPATH -u "$windows_path"`
36495    new_path="$unix_path"
36496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36498    new_path="$unix_path"
36499  fi
36500
36501    # remove trailing .exe if any
36502    new_path="${new_path/%.exe/}"
36503
36504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36506  fi
36507
36508    else
36509      # We're on a unix platform. Hooray! :)
36510      # First separate the path from the arguments. This will split at the first
36511      # space.
36512      complete="$CPP"
36513      path="${complete%% *}"
36514      tmp="$complete EOL"
36515      arguments="${tmp#* }"
36516
36517      # Cannot rely on the command "which" here since it doesn't always work.
36518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36519      if test -z "$is_absolute_path"; then
36520        # Path to executable is not absolute. Find it.
36521        IFS_save="$IFS"
36522        IFS=:
36523        for p in $PATH; do
36524          if test -f "$p/$path" && test -x "$p/$path"; then
36525            new_path="$p/$path"
36526            break
36527          fi
36528        done
36529        IFS="$IFS_save"
36530      else
36531        # This is an absolute path, we can use it without further modifications.
36532        new_path="$path"
36533      fi
36534
36535      if test "x$new_path" = x; then
36536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36537$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36538        has_space=`$ECHO "$complete" | $GREP " "`
36539        if test "x$has_space" != x; then
36540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36542        fi
36543        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36544      fi
36545    fi
36546
36547    # Now join together the path and the arguments once again
36548    if test "x$arguments" != xEOL; then
36549      new_complete="$new_path ${arguments% *}"
36550    else
36551      new_complete="$new_path"
36552    fi
36553
36554    if test "x$complete" != "x$new_complete"; then
36555      CPP="$new_complete"
36556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36557$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36558    fi
36559  fi
36560
36561  ac_ext=cpp
36562ac_cpp='$CXXCPP $CPPFLAGS'
36563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36567$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36568if test -z "$CXXCPP"; then
36569  if ${ac_cv_prog_CXXCPP+:} false; then :
36570  $as_echo_n "(cached) " >&6
36571else
36572      # Double quotes because CXXCPP needs to be expanded
36573    for CXXCPP in "$CXX -E" "/lib/cpp"
36574    do
36575      ac_preproc_ok=false
36576for ac_cxx_preproc_warn_flag in '' yes
36577do
36578  # Use a header file that comes with gcc, so configuring glibc
36579  # with a fresh cross-compiler works.
36580  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36581  # <limits.h> exists even on freestanding compilers.
36582  # On the NeXT, cc -E runs the code through the compiler's parser,
36583  # not just through cpp. "Syntax error" is here to catch this case.
36584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36585/* end confdefs.h.  */
36586#ifdef __STDC__
36587# include <limits.h>
36588#else
36589# include <assert.h>
36590#endif
36591		     Syntax error
36592_ACEOF
36593if ac_fn_cxx_try_cpp "$LINENO"; then :
36594
36595else
36596  # Broken: fails on valid input.
36597continue
36598fi
36599rm -f conftest.err conftest.i conftest.$ac_ext
36600
36601  # OK, works on sane cases.  Now check whether nonexistent headers
36602  # can be detected and how.
36603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36604/* end confdefs.h.  */
36605#include <ac_nonexistent.h>
36606_ACEOF
36607if ac_fn_cxx_try_cpp "$LINENO"; then :
36608  # Broken: success on invalid input.
36609continue
36610else
36611  # Passes both tests.
36612ac_preproc_ok=:
36613break
36614fi
36615rm -f conftest.err conftest.i conftest.$ac_ext
36616
36617done
36618# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36619rm -f conftest.i conftest.err conftest.$ac_ext
36620if $ac_preproc_ok; then :
36621  break
36622fi
36623
36624    done
36625    ac_cv_prog_CXXCPP=$CXXCPP
36626
36627fi
36628  CXXCPP=$ac_cv_prog_CXXCPP
36629else
36630  ac_cv_prog_CXXCPP=$CXXCPP
36631fi
36632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36633$as_echo "$CXXCPP" >&6; }
36634ac_preproc_ok=false
36635for ac_cxx_preproc_warn_flag in '' yes
36636do
36637  # Use a header file that comes with gcc, so configuring glibc
36638  # with a fresh cross-compiler works.
36639  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36640  # <limits.h> exists even on freestanding compilers.
36641  # On the NeXT, cc -E runs the code through the compiler's parser,
36642  # not just through cpp. "Syntax error" is here to catch this case.
36643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36644/* end confdefs.h.  */
36645#ifdef __STDC__
36646# include <limits.h>
36647#else
36648# include <assert.h>
36649#endif
36650		     Syntax error
36651_ACEOF
36652if ac_fn_cxx_try_cpp "$LINENO"; then :
36653
36654else
36655  # Broken: fails on valid input.
36656continue
36657fi
36658rm -f conftest.err conftest.i conftest.$ac_ext
36659
36660  # OK, works on sane cases.  Now check whether nonexistent headers
36661  # can be detected and how.
36662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36663/* end confdefs.h.  */
36664#include <ac_nonexistent.h>
36665_ACEOF
36666if ac_fn_cxx_try_cpp "$LINENO"; then :
36667  # Broken: success on invalid input.
36668continue
36669else
36670  # Passes both tests.
36671ac_preproc_ok=:
36672break
36673fi
36674rm -f conftest.err conftest.i conftest.$ac_ext
36675
36676done
36677# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36678rm -f conftest.i conftest.err conftest.$ac_ext
36679if $ac_preproc_ok; then :
36680
36681else
36682  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36684as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36685See \`config.log' for more details" "$LINENO" 5; }
36686fi
36687
36688ac_ext=cpp
36689ac_cpp='$CXXCPP $CPPFLAGS'
36690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36693
36694
36695  # Only process if variable expands to non-empty
36696
36697  if test "x$CXXCPP" != x; then
36698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36699
36700  # First separate the path from the arguments. This will split at the first
36701  # space.
36702  complete="$CXXCPP"
36703  path="${complete%% *}"
36704  tmp="$complete EOL"
36705  arguments="${tmp#* }"
36706
36707  # Input might be given as Windows format, start by converting to
36708  # unix format.
36709  new_path=`$CYGPATH -u "$path"`
36710
36711  # Now try to locate executable using which
36712  new_path=`$WHICH "$new_path" 2> /dev/null`
36713  # bat and cmd files are not always considered executable in cygwin causing which
36714  # to not find them
36715  if test "x$new_path" = x \
36716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36718    new_path=`$CYGPATH -u "$path"`
36719  fi
36720  if test "x$new_path" = x; then
36721    # Oops. Which didn't find the executable.
36722    # The splitting of arguments from the executable at a space might have been incorrect,
36723    # since paths with space are more likely in Windows. Give it another try with the whole
36724    # argument.
36725    path="$complete"
36726    arguments="EOL"
36727    new_path=`$CYGPATH -u "$path"`
36728    new_path=`$WHICH "$new_path" 2> /dev/null`
36729    # bat and cmd files are not always considered executable in cygwin causing which
36730    # to not find them
36731    if test "x$new_path" = x \
36732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36734      new_path=`$CYGPATH -u "$path"`
36735    fi
36736    if test "x$new_path" = x; then
36737      # It's still not found. Now this is an unrecoverable error.
36738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36739$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36740      has_space=`$ECHO "$complete" | $GREP " "`
36741      if test "x$has_space" != x; then
36742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36744      fi
36745      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36746    fi
36747  fi
36748
36749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36752  # "foo.exe" is OK but "foo" is an error.
36753  #
36754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36755  # It is also a way to make sure we got the proper file name for the real test later on.
36756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36757  if test "x$test_shortpath" = x; then
36758    # Short path failed, file does not exist as specified.
36759    # Try adding .exe or .cmd
36760    if test -f "${new_path}.exe"; then
36761      input_to_shortpath="${new_path}.exe"
36762    elif test -f "${new_path}.cmd"; then
36763      input_to_shortpath="${new_path}.cmd"
36764    else
36765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36766$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36769      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36770    fi
36771  else
36772    input_to_shortpath="$new_path"
36773  fi
36774
36775  # Call helper function which possibly converts this using DOS-style short mode.
36776  # If so, the updated path is stored in $new_path.
36777  new_path="$input_to_shortpath"
36778
36779  input_path="$input_to_shortpath"
36780  # Check if we need to convert this using DOS-style short mode. If the path
36781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36782  # take no chances and rewrite it.
36783  # Note: m4 eats our [], so we need to use [ and ] instead.
36784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36785  if test "x$has_forbidden_chars" != x; then
36786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36790      # Going to short mode and back again did indeed matter. Since short mode is
36791      # case insensitive, let's make it lowercase to improve readability.
36792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36793      # Now convert it back to Unix-style (cygpath)
36794      input_path=`$CYGPATH -u "$shortmode_path"`
36795      new_path="$input_path"
36796    fi
36797  fi
36798
36799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36800  if test "x$test_cygdrive_prefix" = x; then
36801    # As a simple fix, exclude /usr/bin since it's not a real path.
36802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36804      # a path prefixed by /cygdrive for fixpath to work.
36805      new_path="$CYGWIN_ROOT_PATH$input_path"
36806    fi
36807  fi
36808
36809  # remove trailing .exe if any
36810  new_path="${new_path/%.exe/}"
36811
36812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36813
36814  # First separate the path from the arguments. This will split at the first
36815  # space.
36816  complete="$CXXCPP"
36817  path="${complete%% *}"
36818  tmp="$complete EOL"
36819  arguments="${tmp#* }"
36820
36821  # Input might be given as Windows format, start by converting to
36822  # unix format.
36823  new_path="$path"
36824
36825  windows_path="$new_path"
36826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36827    unix_path=`$CYGPATH -u "$windows_path"`
36828    new_path="$unix_path"
36829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36831    new_path="$unix_path"
36832  fi
36833
36834
36835  # Now try to locate executable using which
36836  new_path=`$WHICH "$new_path" 2> /dev/null`
36837
36838  if test "x$new_path" = x; then
36839    # Oops. Which didn't find the executable.
36840    # The splitting of arguments from the executable at a space might have been incorrect,
36841    # since paths with space are more likely in Windows. Give it another try with the whole
36842    # argument.
36843    path="$complete"
36844    arguments="EOL"
36845    new_path="$path"
36846
36847  windows_path="$new_path"
36848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36849    unix_path=`$CYGPATH -u "$windows_path"`
36850    new_path="$unix_path"
36851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36853    new_path="$unix_path"
36854  fi
36855
36856
36857    new_path=`$WHICH "$new_path" 2> /dev/null`
36858    # bat and cmd files are not always considered executable in MSYS causing which
36859    # to not find them
36860    if test "x$new_path" = x \
36861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36863      new_path="$path"
36864
36865  windows_path="$new_path"
36866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36867    unix_path=`$CYGPATH -u "$windows_path"`
36868    new_path="$unix_path"
36869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36871    new_path="$unix_path"
36872  fi
36873
36874    fi
36875
36876    if test "x$new_path" = x; then
36877      # It's still not found. Now this is an unrecoverable error.
36878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36879$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36880      has_space=`$ECHO "$complete" | $GREP " "`
36881      if test "x$has_space" != x; then
36882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36884      fi
36885      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36886    fi
36887  fi
36888
36889  # Now new_path has a complete unix path to the binary
36890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36891    # Keep paths in /bin as-is, but remove trailing .exe if any
36892    new_path="${new_path/%.exe/}"
36893    # Do not save /bin paths to all_fixpath_prefixes!
36894  else
36895    # Not in mixed or Windows style, start by that.
36896    new_path=`cmd //c echo $new_path`
36897
36898  input_path="$new_path"
36899  # Check if we need to convert this using DOS-style short mode. If the path
36900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36901  # take no chances and rewrite it.
36902  # Note: m4 eats our [], so we need to use [ and ] instead.
36903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36904  if test "x$has_forbidden_chars" != x; then
36905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36907  fi
36908
36909    # Output is in $new_path
36910
36911  windows_path="$new_path"
36912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36913    unix_path=`$CYGPATH -u "$windows_path"`
36914    new_path="$unix_path"
36915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36917    new_path="$unix_path"
36918  fi
36919
36920    # remove trailing .exe if any
36921    new_path="${new_path/%.exe/}"
36922
36923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36925  fi
36926
36927    else
36928      # We're on a unix platform. Hooray! :)
36929      # First separate the path from the arguments. This will split at the first
36930      # space.
36931      complete="$CXXCPP"
36932      path="${complete%% *}"
36933      tmp="$complete EOL"
36934      arguments="${tmp#* }"
36935
36936      # Cannot rely on the command "which" here since it doesn't always work.
36937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36938      if test -z "$is_absolute_path"; then
36939        # Path to executable is not absolute. Find it.
36940        IFS_save="$IFS"
36941        IFS=:
36942        for p in $PATH; do
36943          if test -f "$p/$path" && test -x "$p/$path"; then
36944            new_path="$p/$path"
36945            break
36946          fi
36947        done
36948        IFS="$IFS_save"
36949      else
36950        # This is an absolute path, we can use it without further modifications.
36951        new_path="$path"
36952      fi
36953
36954      if test "x$new_path" = x; then
36955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36956$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36957        has_space=`$ECHO "$complete" | $GREP " "`
36958        if test "x$has_space" != x; then
36959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36961        fi
36962        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36963      fi
36964    fi
36965
36966    # Now join together the path and the arguments once again
36967    if test "x$arguments" != xEOL; then
36968      new_complete="$new_path ${arguments% *}"
36969    else
36970      new_complete="$new_path"
36971    fi
36972
36973    if test "x$complete" != "x$new_complete"; then
36974      CXXCPP="$new_complete"
36975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36976$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36977    fi
36978  fi
36979
36980
36981  #
36982  # Setup the linker (LD)
36983  #
36984  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36985    # In the Microsoft toolchain we have a separate LD command "link".
36986    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36987    # a cygwin program for something completely different.
36988    # Extract the first word of "link", so it can be a program name with args.
36989set dummy link; ac_word=$2
36990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36991$as_echo_n "checking for $ac_word... " >&6; }
36992if ${ac_cv_prog_LD+:} false; then :
36993  $as_echo_n "(cached) " >&6
36994else
36995  if test -n "$LD"; then
36996  ac_cv_prog_LD="$LD" # Let the user override the test.
36997else
36998  ac_prog_rejected=no
36999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37000for as_dir in $PATH
37001do
37002  IFS=$as_save_IFS
37003  test -z "$as_dir" && as_dir=.
37004    for ac_exec_ext in '' $ac_executable_extensions; do
37005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37006    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37007       ac_prog_rejected=yes
37008       continue
37009     fi
37010    ac_cv_prog_LD="link"
37011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37012    break 2
37013  fi
37014done
37015  done
37016IFS=$as_save_IFS
37017
37018if test $ac_prog_rejected = yes; then
37019  # We found a bogon in the path, so make sure we never use it.
37020  set dummy $ac_cv_prog_LD
37021  shift
37022  if test $# != 0; then
37023    # We chose a different compiler from the bogus one.
37024    # However, it has the same basename, so the bogon will be chosen
37025    # first if we set LD to just the basename; use the full file name.
37026    shift
37027    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37028  fi
37029fi
37030fi
37031fi
37032LD=$ac_cv_prog_LD
37033if test -n "$LD"; then
37034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37035$as_echo "$LD" >&6; }
37036else
37037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37038$as_echo "no" >&6; }
37039fi
37040
37041
37042
37043  # Only process if variable expands to non-empty
37044
37045  if test "x$LD" != x; then
37046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37047
37048  # First separate the path from the arguments. This will split at the first
37049  # space.
37050  complete="$LD"
37051  path="${complete%% *}"
37052  tmp="$complete EOL"
37053  arguments="${tmp#* }"
37054
37055  # Input might be given as Windows format, start by converting to
37056  # unix format.
37057  new_path=`$CYGPATH -u "$path"`
37058
37059  # Now try to locate executable using which
37060  new_path=`$WHICH "$new_path" 2> /dev/null`
37061  # bat and cmd files are not always considered executable in cygwin causing which
37062  # to not find them
37063  if test "x$new_path" = x \
37064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37066    new_path=`$CYGPATH -u "$path"`
37067  fi
37068  if test "x$new_path" = x; then
37069    # Oops. Which didn't find the executable.
37070    # The splitting of arguments from the executable at a space might have been incorrect,
37071    # since paths with space are more likely in Windows. Give it another try with the whole
37072    # argument.
37073    path="$complete"
37074    arguments="EOL"
37075    new_path=`$CYGPATH -u "$path"`
37076    new_path=`$WHICH "$new_path" 2> /dev/null`
37077    # bat and cmd files are not always considered executable in cygwin causing which
37078    # to not find them
37079    if test "x$new_path" = x \
37080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37082      new_path=`$CYGPATH -u "$path"`
37083    fi
37084    if test "x$new_path" = x; then
37085      # It's still not found. Now this is an unrecoverable error.
37086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37087$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37088      has_space=`$ECHO "$complete" | $GREP " "`
37089      if test "x$has_space" != x; then
37090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37092      fi
37093      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37094    fi
37095  fi
37096
37097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37100  # "foo.exe" is OK but "foo" is an error.
37101  #
37102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37103  # It is also a way to make sure we got the proper file name for the real test later on.
37104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37105  if test "x$test_shortpath" = x; then
37106    # Short path failed, file does not exist as specified.
37107    # Try adding .exe or .cmd
37108    if test -f "${new_path}.exe"; then
37109      input_to_shortpath="${new_path}.exe"
37110    elif test -f "${new_path}.cmd"; then
37111      input_to_shortpath="${new_path}.cmd"
37112    else
37113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37114$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37117      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37118    fi
37119  else
37120    input_to_shortpath="$new_path"
37121  fi
37122
37123  # Call helper function which possibly converts this using DOS-style short mode.
37124  # If so, the updated path is stored in $new_path.
37125  new_path="$input_to_shortpath"
37126
37127  input_path="$input_to_shortpath"
37128  # Check if we need to convert this using DOS-style short mode. If the path
37129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37130  # take no chances and rewrite it.
37131  # Note: m4 eats our [], so we need to use [ and ] instead.
37132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37133  if test "x$has_forbidden_chars" != x; then
37134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37138      # Going to short mode and back again did indeed matter. Since short mode is
37139      # case insensitive, let's make it lowercase to improve readability.
37140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37141      # Now convert it back to Unix-style (cygpath)
37142      input_path=`$CYGPATH -u "$shortmode_path"`
37143      new_path="$input_path"
37144    fi
37145  fi
37146
37147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37148  if test "x$test_cygdrive_prefix" = x; then
37149    # As a simple fix, exclude /usr/bin since it's not a real path.
37150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37152      # a path prefixed by /cygdrive for fixpath to work.
37153      new_path="$CYGWIN_ROOT_PATH$input_path"
37154    fi
37155  fi
37156
37157  # remove trailing .exe if any
37158  new_path="${new_path/%.exe/}"
37159
37160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37161
37162  # First separate the path from the arguments. This will split at the first
37163  # space.
37164  complete="$LD"
37165  path="${complete%% *}"
37166  tmp="$complete EOL"
37167  arguments="${tmp#* }"
37168
37169  # Input might be given as Windows format, start by converting to
37170  # unix format.
37171  new_path="$path"
37172
37173  windows_path="$new_path"
37174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37175    unix_path=`$CYGPATH -u "$windows_path"`
37176    new_path="$unix_path"
37177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37179    new_path="$unix_path"
37180  fi
37181
37182
37183  # Now try to locate executable using which
37184  new_path=`$WHICH "$new_path" 2> /dev/null`
37185
37186  if test "x$new_path" = x; then
37187    # Oops. Which didn't find the executable.
37188    # The splitting of arguments from the executable at a space might have been incorrect,
37189    # since paths with space are more likely in Windows. Give it another try with the whole
37190    # argument.
37191    path="$complete"
37192    arguments="EOL"
37193    new_path="$path"
37194
37195  windows_path="$new_path"
37196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37197    unix_path=`$CYGPATH -u "$windows_path"`
37198    new_path="$unix_path"
37199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37201    new_path="$unix_path"
37202  fi
37203
37204
37205    new_path=`$WHICH "$new_path" 2> /dev/null`
37206    # bat and cmd files are not always considered executable in MSYS causing which
37207    # to not find them
37208    if test "x$new_path" = x \
37209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37211      new_path="$path"
37212
37213  windows_path="$new_path"
37214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37215    unix_path=`$CYGPATH -u "$windows_path"`
37216    new_path="$unix_path"
37217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37219    new_path="$unix_path"
37220  fi
37221
37222    fi
37223
37224    if test "x$new_path" = x; then
37225      # It's still not found. Now this is an unrecoverable error.
37226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37227$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37228      has_space=`$ECHO "$complete" | $GREP " "`
37229      if test "x$has_space" != x; then
37230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37232      fi
37233      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37234    fi
37235  fi
37236
37237  # Now new_path has a complete unix path to the binary
37238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37239    # Keep paths in /bin as-is, but remove trailing .exe if any
37240    new_path="${new_path/%.exe/}"
37241    # Do not save /bin paths to all_fixpath_prefixes!
37242  else
37243    # Not in mixed or Windows style, start by that.
37244    new_path=`cmd //c echo $new_path`
37245
37246  input_path="$new_path"
37247  # Check if we need to convert this using DOS-style short mode. If the path
37248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37249  # take no chances and rewrite it.
37250  # Note: m4 eats our [], so we need to use [ and ] instead.
37251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37252  if test "x$has_forbidden_chars" != x; then
37253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37255  fi
37256
37257    # Output is in $new_path
37258
37259  windows_path="$new_path"
37260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37261    unix_path=`$CYGPATH -u "$windows_path"`
37262    new_path="$unix_path"
37263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37265    new_path="$unix_path"
37266  fi
37267
37268    # remove trailing .exe if any
37269    new_path="${new_path/%.exe/}"
37270
37271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37273  fi
37274
37275    else
37276      # We're on a unix platform. Hooray! :)
37277      # First separate the path from the arguments. This will split at the first
37278      # space.
37279      complete="$LD"
37280      path="${complete%% *}"
37281      tmp="$complete EOL"
37282      arguments="${tmp#* }"
37283
37284      # Cannot rely on the command "which" here since it doesn't always work.
37285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37286      if test -z "$is_absolute_path"; then
37287        # Path to executable is not absolute. Find it.
37288        IFS_save="$IFS"
37289        IFS=:
37290        for p in $PATH; do
37291          if test -f "$p/$path" && test -x "$p/$path"; then
37292            new_path="$p/$path"
37293            break
37294          fi
37295        done
37296        IFS="$IFS_save"
37297      else
37298        # This is an absolute path, we can use it without further modifications.
37299        new_path="$path"
37300      fi
37301
37302      if test "x$new_path" = x; then
37303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37304$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37305        has_space=`$ECHO "$complete" | $GREP " "`
37306        if test "x$has_space" != x; then
37307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37309        fi
37310        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37311      fi
37312    fi
37313
37314    # Now join together the path and the arguments once again
37315    if test "x$arguments" != xEOL; then
37316      new_complete="$new_path ${arguments% *}"
37317    else
37318      new_complete="$new_path"
37319    fi
37320
37321    if test "x$complete" != "x$new_complete"; then
37322      LD="$new_complete"
37323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37324$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37325    fi
37326  fi
37327
37328    # Verify that we indeed succeeded with this trick.
37329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37330$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37331    "$LD" --version > /dev/null
37332    if test $? -eq 0 ; then
37333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37334$as_echo "no" >&6; }
37335      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37336    else
37337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37338$as_echo "yes" >&6; }
37339    fi
37340    LDCXX="$LD"
37341  else
37342    # All other toolchains use the compiler to link.
37343    LD="$CC"
37344    LDCXX="$CXX"
37345  fi
37346
37347  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37348
37349
37350  #
37351  # Setup the assembler (AS)
37352  #
37353  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37354
37355
37356  # Publish this variable in the help.
37357
37358
37359  if [ -z "${AS+x}" ]; then
37360    # The variable is not set by user, try to locate tool using the code snippet
37361    for ac_prog in as
37362do
37363  # Extract the first word of "$ac_prog", so it can be a program name with args.
37364set dummy $ac_prog; ac_word=$2
37365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37366$as_echo_n "checking for $ac_word... " >&6; }
37367if ${ac_cv_path_AS+:} false; then :
37368  $as_echo_n "(cached) " >&6
37369else
37370  case $AS in
37371  [\\/]* | ?:[\\/]*)
37372  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37373  ;;
37374  *)
37375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37376for as_dir in $PATH
37377do
37378  IFS=$as_save_IFS
37379  test -z "$as_dir" && as_dir=.
37380    for ac_exec_ext in '' $ac_executable_extensions; do
37381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37382    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37384    break 2
37385  fi
37386done
37387  done
37388IFS=$as_save_IFS
37389
37390  ;;
37391esac
37392fi
37393AS=$ac_cv_path_AS
37394if test -n "$AS"; then
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37396$as_echo "$AS" >&6; }
37397else
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37399$as_echo "no" >&6; }
37400fi
37401
37402
37403  test -n "$AS" && break
37404done
37405
37406  else
37407    # The variable is set, but is it from the command line or the environment?
37408
37409    # Try to remove the string !AS! from our list.
37410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37412      # If it failed, the variable was not from the command line. Ignore it,
37413      # but warn the user (except for BASH, which is always set by the calling BASH).
37414      if test "xAS" != xBASH; then
37415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37416$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37417      fi
37418      # Try to locate tool using the code snippet
37419      for ac_prog in as
37420do
37421  # Extract the first word of "$ac_prog", so it can be a program name with args.
37422set dummy $ac_prog; ac_word=$2
37423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37424$as_echo_n "checking for $ac_word... " >&6; }
37425if ${ac_cv_path_AS+:} false; then :
37426  $as_echo_n "(cached) " >&6
37427else
37428  case $AS in
37429  [\\/]* | ?:[\\/]*)
37430  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37431  ;;
37432  *)
37433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37434for as_dir in $PATH
37435do
37436  IFS=$as_save_IFS
37437  test -z "$as_dir" && as_dir=.
37438    for ac_exec_ext in '' $ac_executable_extensions; do
37439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37440    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37442    break 2
37443  fi
37444done
37445  done
37446IFS=$as_save_IFS
37447
37448  ;;
37449esac
37450fi
37451AS=$ac_cv_path_AS
37452if test -n "$AS"; then
37453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37454$as_echo "$AS" >&6; }
37455else
37456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37457$as_echo "no" >&6; }
37458fi
37459
37460
37461  test -n "$AS" && break
37462done
37463
37464    else
37465      # If it succeeded, then it was overridden by the user. We will use it
37466      # for the tool.
37467
37468      # First remove it from the list of overridden variables, so we can test
37469      # for unknown variables in the end.
37470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37471
37472      # Check if we try to supply an empty value
37473      if test "x$AS" = x; then
37474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37475$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37477$as_echo_n "checking for AS... " >&6; }
37478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37479$as_echo "disabled" >&6; }
37480      else
37481        # Check if the provided tool contains a complete path.
37482        tool_specified="$AS"
37483        tool_basename="${tool_specified##*/}"
37484        if test "x$tool_basename" = "x$tool_specified"; then
37485          # A command without a complete path is provided, search $PATH.
37486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37487$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37488          # Extract the first word of "$tool_basename", so it can be a program name with args.
37489set dummy $tool_basename; ac_word=$2
37490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37491$as_echo_n "checking for $ac_word... " >&6; }
37492if ${ac_cv_path_AS+:} false; then :
37493  $as_echo_n "(cached) " >&6
37494else
37495  case $AS in
37496  [\\/]* | ?:[\\/]*)
37497  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37498  ;;
37499  *)
37500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37501for as_dir in $PATH
37502do
37503  IFS=$as_save_IFS
37504  test -z "$as_dir" && as_dir=.
37505    for ac_exec_ext in '' $ac_executable_extensions; do
37506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37507    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37509    break 2
37510  fi
37511done
37512  done
37513IFS=$as_save_IFS
37514
37515  ;;
37516esac
37517fi
37518AS=$ac_cv_path_AS
37519if test -n "$AS"; then
37520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37521$as_echo "$AS" >&6; }
37522else
37523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37524$as_echo "no" >&6; }
37525fi
37526
37527
37528          if test "x$AS" = x; then
37529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37530          fi
37531        else
37532          # Otherwise we believe it is a complete path. Use it as it is.
37533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37534$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37536$as_echo_n "checking for AS... " >&6; }
37537          if test ! -x "$tool_specified"; then
37538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37539$as_echo "not found" >&6; }
37540            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37541          fi
37542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37543$as_echo "$tool_specified" >&6; }
37544        fi
37545      fi
37546    fi
37547
37548  fi
37549
37550
37551
37552  # Only process if variable expands to non-empty
37553
37554  if test "x$AS" != x; then
37555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37556
37557  # First separate the path from the arguments. This will split at the first
37558  # space.
37559  complete="$AS"
37560  path="${complete%% *}"
37561  tmp="$complete EOL"
37562  arguments="${tmp#* }"
37563
37564  # Input might be given as Windows format, start by converting to
37565  # unix format.
37566  new_path=`$CYGPATH -u "$path"`
37567
37568  # Now try to locate executable using which
37569  new_path=`$WHICH "$new_path" 2> /dev/null`
37570  # bat and cmd files are not always considered executable in cygwin causing which
37571  # to not find them
37572  if test "x$new_path" = x \
37573      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37574      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37575    new_path=`$CYGPATH -u "$path"`
37576  fi
37577  if test "x$new_path" = x; then
37578    # Oops. Which didn't find the executable.
37579    # The splitting of arguments from the executable at a space might have been incorrect,
37580    # since paths with space are more likely in Windows. Give it another try with the whole
37581    # argument.
37582    path="$complete"
37583    arguments="EOL"
37584    new_path=`$CYGPATH -u "$path"`
37585    new_path=`$WHICH "$new_path" 2> /dev/null`
37586    # bat and cmd files are not always considered executable in cygwin causing which
37587    # to not find them
37588    if test "x$new_path" = x \
37589        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37590        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37591      new_path=`$CYGPATH -u "$path"`
37592    fi
37593    if test "x$new_path" = x; then
37594      # It's still not found. Now this is an unrecoverable error.
37595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37596$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37597      has_space=`$ECHO "$complete" | $GREP " "`
37598      if test "x$has_space" != x; then
37599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37601      fi
37602      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37603    fi
37604  fi
37605
37606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37609  # "foo.exe" is OK but "foo" is an error.
37610  #
37611  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37612  # It is also a way to make sure we got the proper file name for the real test later on.
37613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37614  if test "x$test_shortpath" = x; then
37615    # Short path failed, file does not exist as specified.
37616    # Try adding .exe or .cmd
37617    if test -f "${new_path}.exe"; then
37618      input_to_shortpath="${new_path}.exe"
37619    elif test -f "${new_path}.cmd"; then
37620      input_to_shortpath="${new_path}.cmd"
37621    else
37622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37623$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37624      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37625$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37626      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37627    fi
37628  else
37629    input_to_shortpath="$new_path"
37630  fi
37631
37632  # Call helper function which possibly converts this using DOS-style short mode.
37633  # If so, the updated path is stored in $new_path.
37634  new_path="$input_to_shortpath"
37635
37636  input_path="$input_to_shortpath"
37637  # Check if we need to convert this using DOS-style short mode. If the path
37638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37639  # take no chances and rewrite it.
37640  # Note: m4 eats our [], so we need to use [ and ] instead.
37641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37642  if test "x$has_forbidden_chars" != x; then
37643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37647      # Going to short mode and back again did indeed matter. Since short mode is
37648      # case insensitive, let's make it lowercase to improve readability.
37649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37650      # Now convert it back to Unix-style (cygpath)
37651      input_path=`$CYGPATH -u "$shortmode_path"`
37652      new_path="$input_path"
37653    fi
37654  fi
37655
37656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37657  if test "x$test_cygdrive_prefix" = x; then
37658    # As a simple fix, exclude /usr/bin since it's not a real path.
37659    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37661      # a path prefixed by /cygdrive for fixpath to work.
37662      new_path="$CYGWIN_ROOT_PATH$input_path"
37663    fi
37664  fi
37665
37666  # remove trailing .exe if any
37667  new_path="${new_path/%.exe/}"
37668
37669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37670
37671  # First separate the path from the arguments. This will split at the first
37672  # space.
37673  complete="$AS"
37674  path="${complete%% *}"
37675  tmp="$complete EOL"
37676  arguments="${tmp#* }"
37677
37678  # Input might be given as Windows format, start by converting to
37679  # unix format.
37680  new_path="$path"
37681
37682  windows_path="$new_path"
37683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37684    unix_path=`$CYGPATH -u "$windows_path"`
37685    new_path="$unix_path"
37686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37688    new_path="$unix_path"
37689  fi
37690
37691
37692  # Now try to locate executable using which
37693  new_path=`$WHICH "$new_path" 2> /dev/null`
37694
37695  if test "x$new_path" = x; then
37696    # Oops. Which didn't find the executable.
37697    # The splitting of arguments from the executable at a space might have been incorrect,
37698    # since paths with space are more likely in Windows. Give it another try with the whole
37699    # argument.
37700    path="$complete"
37701    arguments="EOL"
37702    new_path="$path"
37703
37704  windows_path="$new_path"
37705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37706    unix_path=`$CYGPATH -u "$windows_path"`
37707    new_path="$unix_path"
37708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37710    new_path="$unix_path"
37711  fi
37712
37713
37714    new_path=`$WHICH "$new_path" 2> /dev/null`
37715    # bat and cmd files are not always considered executable in MSYS causing which
37716    # to not find them
37717    if test "x$new_path" = x \
37718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37720      new_path="$path"
37721
37722  windows_path="$new_path"
37723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37724    unix_path=`$CYGPATH -u "$windows_path"`
37725    new_path="$unix_path"
37726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37728    new_path="$unix_path"
37729  fi
37730
37731    fi
37732
37733    if test "x$new_path" = x; then
37734      # It's still not found. Now this is an unrecoverable error.
37735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37736$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37737      has_space=`$ECHO "$complete" | $GREP " "`
37738      if test "x$has_space" != x; then
37739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37741      fi
37742      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37743    fi
37744  fi
37745
37746  # Now new_path has a complete unix path to the binary
37747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37748    # Keep paths in /bin as-is, but remove trailing .exe if any
37749    new_path="${new_path/%.exe/}"
37750    # Do not save /bin paths to all_fixpath_prefixes!
37751  else
37752    # Not in mixed or Windows style, start by that.
37753    new_path=`cmd //c echo $new_path`
37754
37755  input_path="$new_path"
37756  # Check if we need to convert this using DOS-style short mode. If the path
37757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37758  # take no chances and rewrite it.
37759  # Note: m4 eats our [], so we need to use [ and ] instead.
37760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37761  if test "x$has_forbidden_chars" != x; then
37762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37764  fi
37765
37766    # Output is in $new_path
37767
37768  windows_path="$new_path"
37769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37770    unix_path=`$CYGPATH -u "$windows_path"`
37771    new_path="$unix_path"
37772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37774    new_path="$unix_path"
37775  fi
37776
37777    # remove trailing .exe if any
37778    new_path="${new_path/%.exe/}"
37779
37780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37782  fi
37783
37784    else
37785      # We're on a unix platform. Hooray! :)
37786      # First separate the path from the arguments. This will split at the first
37787      # space.
37788      complete="$AS"
37789      path="${complete%% *}"
37790      tmp="$complete EOL"
37791      arguments="${tmp#* }"
37792
37793      # Cannot rely on the command "which" here since it doesn't always work.
37794      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37795      if test -z "$is_absolute_path"; then
37796        # Path to executable is not absolute. Find it.
37797        IFS_save="$IFS"
37798        IFS=:
37799        for p in $PATH; do
37800          if test -f "$p/$path" && test -x "$p/$path"; then
37801            new_path="$p/$path"
37802            break
37803          fi
37804        done
37805        IFS="$IFS_save"
37806      else
37807        # This is an absolute path, we can use it without further modifications.
37808        new_path="$path"
37809      fi
37810
37811      if test "x$new_path" = x; then
37812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37813$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37814        has_space=`$ECHO "$complete" | $GREP " "`
37815        if test "x$has_space" != x; then
37816          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37818        fi
37819        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37820      fi
37821    fi
37822
37823    # Now join together the path and the arguments once again
37824    if test "x$arguments" != xEOL; then
37825      new_complete="$new_path ${arguments% *}"
37826    else
37827      new_complete="$new_path"
37828    fi
37829
37830    if test "x$complete" != "x$new_complete"; then
37831      AS="$new_complete"
37832      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37833$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37834    fi
37835  fi
37836
37837    if test "x$AS" = x; then
37838      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37839    fi
37840  else
37841    # FIXME: is this correct for microsoft?
37842    AS="$CC -c"
37843  fi
37844
37845
37846  #
37847  # Setup the archiver (AR)
37848  #
37849  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37850    # The corresponding ar tool is lib.exe (used to create static libraries)
37851    # Extract the first word of "lib", so it can be a program name with args.
37852set dummy lib; ac_word=$2
37853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37854$as_echo_n "checking for $ac_word... " >&6; }
37855if ${ac_cv_prog_AR+:} false; then :
37856  $as_echo_n "(cached) " >&6
37857else
37858  if test -n "$AR"; then
37859  ac_cv_prog_AR="$AR" # Let the user override the test.
37860else
37861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37862for as_dir in $PATH
37863do
37864  IFS=$as_save_IFS
37865  test -z "$as_dir" && as_dir=.
37866    for ac_exec_ext in '' $ac_executable_extensions; do
37867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37868    ac_cv_prog_AR="lib"
37869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37870    break 2
37871  fi
37872done
37873  done
37874IFS=$as_save_IFS
37875
37876fi
37877fi
37878AR=$ac_cv_prog_AR
37879if test -n "$AR"; then
37880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37881$as_echo "$AR" >&6; }
37882else
37883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37884$as_echo "no" >&6; }
37885fi
37886
37887
37888  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37889
37890
37891  # Publish this variable in the help.
37892
37893
37894  if [ -z "${AR+x}" ]; then
37895    # The variable is not set by user, try to locate tool using the code snippet
37896    if test -n "$ac_tool_prefix"; then
37897  for ac_prog in ar gcc-ar
37898  do
37899    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37900set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37902$as_echo_n "checking for $ac_word... " >&6; }
37903if ${ac_cv_prog_AR+:} false; then :
37904  $as_echo_n "(cached) " >&6
37905else
37906  if test -n "$AR"; then
37907  ac_cv_prog_AR="$AR" # Let the user override the test.
37908else
37909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37910for as_dir in $PATH
37911do
37912  IFS=$as_save_IFS
37913  test -z "$as_dir" && as_dir=.
37914    for ac_exec_ext in '' $ac_executable_extensions; do
37915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37916    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37918    break 2
37919  fi
37920done
37921  done
37922IFS=$as_save_IFS
37923
37924fi
37925fi
37926AR=$ac_cv_prog_AR
37927if test -n "$AR"; then
37928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37929$as_echo "$AR" >&6; }
37930else
37931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37932$as_echo "no" >&6; }
37933fi
37934
37935
37936    test -n "$AR" && break
37937  done
37938fi
37939if test -z "$AR"; then
37940  ac_ct_AR=$AR
37941  for ac_prog in ar gcc-ar
37942do
37943  # Extract the first word of "$ac_prog", so it can be a program name with args.
37944set dummy $ac_prog; ac_word=$2
37945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37946$as_echo_n "checking for $ac_word... " >&6; }
37947if ${ac_cv_prog_ac_ct_AR+:} false; then :
37948  $as_echo_n "(cached) " >&6
37949else
37950  if test -n "$ac_ct_AR"; then
37951  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37952else
37953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37954for as_dir in $PATH
37955do
37956  IFS=$as_save_IFS
37957  test -z "$as_dir" && as_dir=.
37958    for ac_exec_ext in '' $ac_executable_extensions; do
37959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37960    ac_cv_prog_ac_ct_AR="$ac_prog"
37961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37962    break 2
37963  fi
37964done
37965  done
37966IFS=$as_save_IFS
37967
37968fi
37969fi
37970ac_ct_AR=$ac_cv_prog_ac_ct_AR
37971if test -n "$ac_ct_AR"; then
37972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37973$as_echo "$ac_ct_AR" >&6; }
37974else
37975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37976$as_echo "no" >&6; }
37977fi
37978
37979
37980  test -n "$ac_ct_AR" && break
37981done
37982
37983  if test "x$ac_ct_AR" = x; then
37984    AR=""
37985  else
37986    case $cross_compiling:$ac_tool_warned in
37987yes:)
37988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37990ac_tool_warned=yes ;;
37991esac
37992    AR=$ac_ct_AR
37993  fi
37994fi
37995
37996  else
37997    # The variable is set, but is it from the command line or the environment?
37998
37999    # Try to remove the string !AR! from our list.
38000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38002      # If it failed, the variable was not from the command line. Ignore it,
38003      # but warn the user (except for BASH, which is always set by the calling BASH).
38004      if test "xAR" != xBASH; then
38005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38006$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38007      fi
38008      # Try to locate tool using the code snippet
38009      if test -n "$ac_tool_prefix"; then
38010  for ac_prog in ar gcc-ar
38011  do
38012    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38013set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38015$as_echo_n "checking for $ac_word... " >&6; }
38016if ${ac_cv_prog_AR+:} false; then :
38017  $as_echo_n "(cached) " >&6
38018else
38019  if test -n "$AR"; then
38020  ac_cv_prog_AR="$AR" # Let the user override the test.
38021else
38022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38023for as_dir in $PATH
38024do
38025  IFS=$as_save_IFS
38026  test -z "$as_dir" && as_dir=.
38027    for ac_exec_ext in '' $ac_executable_extensions; do
38028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38029    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38031    break 2
38032  fi
38033done
38034  done
38035IFS=$as_save_IFS
38036
38037fi
38038fi
38039AR=$ac_cv_prog_AR
38040if test -n "$AR"; then
38041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38042$as_echo "$AR" >&6; }
38043else
38044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38045$as_echo "no" >&6; }
38046fi
38047
38048
38049    test -n "$AR" && break
38050  done
38051fi
38052if test -z "$AR"; then
38053  ac_ct_AR=$AR
38054  for ac_prog in ar gcc-ar
38055do
38056  # Extract the first word of "$ac_prog", so it can be a program name with args.
38057set dummy $ac_prog; ac_word=$2
38058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38059$as_echo_n "checking for $ac_word... " >&6; }
38060if ${ac_cv_prog_ac_ct_AR+:} false; then :
38061  $as_echo_n "(cached) " >&6
38062else
38063  if test -n "$ac_ct_AR"; then
38064  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38065else
38066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38067for as_dir in $PATH
38068do
38069  IFS=$as_save_IFS
38070  test -z "$as_dir" && as_dir=.
38071    for ac_exec_ext in '' $ac_executable_extensions; do
38072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38073    ac_cv_prog_ac_ct_AR="$ac_prog"
38074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38075    break 2
38076  fi
38077done
38078  done
38079IFS=$as_save_IFS
38080
38081fi
38082fi
38083ac_ct_AR=$ac_cv_prog_ac_ct_AR
38084if test -n "$ac_ct_AR"; then
38085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38086$as_echo "$ac_ct_AR" >&6; }
38087else
38088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38089$as_echo "no" >&6; }
38090fi
38091
38092
38093  test -n "$ac_ct_AR" && break
38094done
38095
38096  if test "x$ac_ct_AR" = x; then
38097    AR=""
38098  else
38099    case $cross_compiling:$ac_tool_warned in
38100yes:)
38101{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38102$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38103ac_tool_warned=yes ;;
38104esac
38105    AR=$ac_ct_AR
38106  fi
38107fi
38108
38109    else
38110      # If it succeeded, then it was overridden by the user. We will use it
38111      # for the tool.
38112
38113      # First remove it from the list of overridden variables, so we can test
38114      # for unknown variables in the end.
38115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38116
38117      # Check if we try to supply an empty value
38118      if test "x$AR" = x; then
38119        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38120$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38122$as_echo_n "checking for AR... " >&6; }
38123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38124$as_echo "disabled" >&6; }
38125      else
38126        # Check if the provided tool contains a complete path.
38127        tool_specified="$AR"
38128        tool_basename="${tool_specified##*/}"
38129        if test "x$tool_basename" = "x$tool_specified"; then
38130          # A command without a complete path is provided, search $PATH.
38131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38132$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38133          # Extract the first word of "$tool_basename", so it can be a program name with args.
38134set dummy $tool_basename; ac_word=$2
38135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38136$as_echo_n "checking for $ac_word... " >&6; }
38137if ${ac_cv_path_AR+:} false; then :
38138  $as_echo_n "(cached) " >&6
38139else
38140  case $AR in
38141  [\\/]* | ?:[\\/]*)
38142  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38143  ;;
38144  *)
38145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38146for as_dir in $PATH
38147do
38148  IFS=$as_save_IFS
38149  test -z "$as_dir" && as_dir=.
38150    for ac_exec_ext in '' $ac_executable_extensions; do
38151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38152    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38154    break 2
38155  fi
38156done
38157  done
38158IFS=$as_save_IFS
38159
38160  ;;
38161esac
38162fi
38163AR=$ac_cv_path_AR
38164if test -n "$AR"; then
38165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38166$as_echo "$AR" >&6; }
38167else
38168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38169$as_echo "no" >&6; }
38170fi
38171
38172
38173          if test "x$AR" = x; then
38174            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38175          fi
38176        else
38177          # Otherwise we believe it is a complete path. Use it as it is.
38178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38179$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38180          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38181$as_echo_n "checking for AR... " >&6; }
38182          if test ! -x "$tool_specified"; then
38183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38184$as_echo "not found" >&6; }
38185            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38186          fi
38187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38188$as_echo "$tool_specified" >&6; }
38189        fi
38190      fi
38191    fi
38192
38193  fi
38194
38195
38196  else
38197
38198
38199  # Publish this variable in the help.
38200
38201
38202  if [ -z "${AR+x}" ]; then
38203    # The variable is not set by user, try to locate tool using the code snippet
38204    if test -n "$ac_tool_prefix"; then
38205  for ac_prog in ar
38206  do
38207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38210$as_echo_n "checking for $ac_word... " >&6; }
38211if ${ac_cv_prog_AR+:} false; then :
38212  $as_echo_n "(cached) " >&6
38213else
38214  if test -n "$AR"; then
38215  ac_cv_prog_AR="$AR" # Let the user override the test.
38216else
38217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38218for as_dir in $PATH
38219do
38220  IFS=$as_save_IFS
38221  test -z "$as_dir" && as_dir=.
38222    for ac_exec_ext in '' $ac_executable_extensions; do
38223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38224    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38226    break 2
38227  fi
38228done
38229  done
38230IFS=$as_save_IFS
38231
38232fi
38233fi
38234AR=$ac_cv_prog_AR
38235if test -n "$AR"; then
38236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38237$as_echo "$AR" >&6; }
38238else
38239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38240$as_echo "no" >&6; }
38241fi
38242
38243
38244    test -n "$AR" && break
38245  done
38246fi
38247if test -z "$AR"; then
38248  ac_ct_AR=$AR
38249  for ac_prog in ar
38250do
38251  # Extract the first word of "$ac_prog", so it can be a program name with args.
38252set dummy $ac_prog; ac_word=$2
38253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38254$as_echo_n "checking for $ac_word... " >&6; }
38255if ${ac_cv_prog_ac_ct_AR+:} false; then :
38256  $as_echo_n "(cached) " >&6
38257else
38258  if test -n "$ac_ct_AR"; then
38259  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38260else
38261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38262for as_dir in $PATH
38263do
38264  IFS=$as_save_IFS
38265  test -z "$as_dir" && as_dir=.
38266    for ac_exec_ext in '' $ac_executable_extensions; do
38267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38268    ac_cv_prog_ac_ct_AR="$ac_prog"
38269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38270    break 2
38271  fi
38272done
38273  done
38274IFS=$as_save_IFS
38275
38276fi
38277fi
38278ac_ct_AR=$ac_cv_prog_ac_ct_AR
38279if test -n "$ac_ct_AR"; then
38280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38281$as_echo "$ac_ct_AR" >&6; }
38282else
38283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38284$as_echo "no" >&6; }
38285fi
38286
38287
38288  test -n "$ac_ct_AR" && break
38289done
38290
38291  if test "x$ac_ct_AR" = x; then
38292    AR=""
38293  else
38294    case $cross_compiling:$ac_tool_warned in
38295yes:)
38296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38298ac_tool_warned=yes ;;
38299esac
38300    AR=$ac_ct_AR
38301  fi
38302fi
38303
38304  else
38305    # The variable is set, but is it from the command line or the environment?
38306
38307    # Try to remove the string !AR! from our list.
38308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38310      # If it failed, the variable was not from the command line. Ignore it,
38311      # but warn the user (except for BASH, which is always set by the calling BASH).
38312      if test "xAR" != xBASH; then
38313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38314$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38315      fi
38316      # Try to locate tool using the code snippet
38317      if test -n "$ac_tool_prefix"; then
38318  for ac_prog in ar
38319  do
38320    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38321set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38323$as_echo_n "checking for $ac_word... " >&6; }
38324if ${ac_cv_prog_AR+:} false; then :
38325  $as_echo_n "(cached) " >&6
38326else
38327  if test -n "$AR"; then
38328  ac_cv_prog_AR="$AR" # Let the user override the test.
38329else
38330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38331for as_dir in $PATH
38332do
38333  IFS=$as_save_IFS
38334  test -z "$as_dir" && as_dir=.
38335    for ac_exec_ext in '' $ac_executable_extensions; do
38336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38337    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38339    break 2
38340  fi
38341done
38342  done
38343IFS=$as_save_IFS
38344
38345fi
38346fi
38347AR=$ac_cv_prog_AR
38348if test -n "$AR"; then
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38350$as_echo "$AR" >&6; }
38351else
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38353$as_echo "no" >&6; }
38354fi
38355
38356
38357    test -n "$AR" && break
38358  done
38359fi
38360if test -z "$AR"; then
38361  ac_ct_AR=$AR
38362  for ac_prog in ar
38363do
38364  # Extract the first word of "$ac_prog", so it can be a program name with args.
38365set dummy $ac_prog; ac_word=$2
38366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38367$as_echo_n "checking for $ac_word... " >&6; }
38368if ${ac_cv_prog_ac_ct_AR+:} false; then :
38369  $as_echo_n "(cached) " >&6
38370else
38371  if test -n "$ac_ct_AR"; then
38372  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38373else
38374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38375for as_dir in $PATH
38376do
38377  IFS=$as_save_IFS
38378  test -z "$as_dir" && as_dir=.
38379    for ac_exec_ext in '' $ac_executable_extensions; do
38380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38381    ac_cv_prog_ac_ct_AR="$ac_prog"
38382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38383    break 2
38384  fi
38385done
38386  done
38387IFS=$as_save_IFS
38388
38389fi
38390fi
38391ac_ct_AR=$ac_cv_prog_ac_ct_AR
38392if test -n "$ac_ct_AR"; then
38393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38394$as_echo "$ac_ct_AR" >&6; }
38395else
38396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38397$as_echo "no" >&6; }
38398fi
38399
38400
38401  test -n "$ac_ct_AR" && break
38402done
38403
38404  if test "x$ac_ct_AR" = x; then
38405    AR=""
38406  else
38407    case $cross_compiling:$ac_tool_warned in
38408yes:)
38409{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38410$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38411ac_tool_warned=yes ;;
38412esac
38413    AR=$ac_ct_AR
38414  fi
38415fi
38416
38417    else
38418      # If it succeeded, then it was overridden by the user. We will use it
38419      # for the tool.
38420
38421      # First remove it from the list of overridden variables, so we can test
38422      # for unknown variables in the end.
38423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38424
38425      # Check if we try to supply an empty value
38426      if test "x$AR" = x; then
38427        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38428$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38430$as_echo_n "checking for AR... " >&6; }
38431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38432$as_echo "disabled" >&6; }
38433      else
38434        # Check if the provided tool contains a complete path.
38435        tool_specified="$AR"
38436        tool_basename="${tool_specified##*/}"
38437        if test "x$tool_basename" = "x$tool_specified"; then
38438          # A command without a complete path is provided, search $PATH.
38439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38440$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38441          # Extract the first word of "$tool_basename", so it can be a program name with args.
38442set dummy $tool_basename; ac_word=$2
38443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38444$as_echo_n "checking for $ac_word... " >&6; }
38445if ${ac_cv_path_AR+:} false; then :
38446  $as_echo_n "(cached) " >&6
38447else
38448  case $AR in
38449  [\\/]* | ?:[\\/]*)
38450  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38451  ;;
38452  *)
38453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38454for as_dir in $PATH
38455do
38456  IFS=$as_save_IFS
38457  test -z "$as_dir" && as_dir=.
38458    for ac_exec_ext in '' $ac_executable_extensions; do
38459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38460    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38462    break 2
38463  fi
38464done
38465  done
38466IFS=$as_save_IFS
38467
38468  ;;
38469esac
38470fi
38471AR=$ac_cv_path_AR
38472if test -n "$AR"; then
38473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38474$as_echo "$AR" >&6; }
38475else
38476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38477$as_echo "no" >&6; }
38478fi
38479
38480
38481          if test "x$AR" = x; then
38482            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38483          fi
38484        else
38485          # Otherwise we believe it is a complete path. Use it as it is.
38486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38487$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38488          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38489$as_echo_n "checking for AR... " >&6; }
38490          if test ! -x "$tool_specified"; then
38491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38492$as_echo "not found" >&6; }
38493            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38494          fi
38495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38496$as_echo "$tool_specified" >&6; }
38497        fi
38498      fi
38499    fi
38500
38501  fi
38502
38503
38504  fi
38505
38506  # Only process if variable expands to non-empty
38507
38508  if test "x$AR" != x; then
38509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38510
38511  # First separate the path from the arguments. This will split at the first
38512  # space.
38513  complete="$AR"
38514  path="${complete%% *}"
38515  tmp="$complete EOL"
38516  arguments="${tmp#* }"
38517
38518  # Input might be given as Windows format, start by converting to
38519  # unix format.
38520  new_path=`$CYGPATH -u "$path"`
38521
38522  # Now try to locate executable using which
38523  new_path=`$WHICH "$new_path" 2> /dev/null`
38524  # bat and cmd files are not always considered executable in cygwin causing which
38525  # to not find them
38526  if test "x$new_path" = x \
38527      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38528      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38529    new_path=`$CYGPATH -u "$path"`
38530  fi
38531  if test "x$new_path" = x; then
38532    # Oops. Which didn't find the executable.
38533    # The splitting of arguments from the executable at a space might have been incorrect,
38534    # since paths with space are more likely in Windows. Give it another try with the whole
38535    # argument.
38536    path="$complete"
38537    arguments="EOL"
38538    new_path=`$CYGPATH -u "$path"`
38539    new_path=`$WHICH "$new_path" 2> /dev/null`
38540    # bat and cmd files are not always considered executable in cygwin causing which
38541    # to not find them
38542    if test "x$new_path" = x \
38543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38545      new_path=`$CYGPATH -u "$path"`
38546    fi
38547    if test "x$new_path" = x; then
38548      # It's still not found. Now this is an unrecoverable error.
38549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38550$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38551      has_space=`$ECHO "$complete" | $GREP " "`
38552      if test "x$has_space" != x; then
38553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38555      fi
38556      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38557    fi
38558  fi
38559
38560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38563  # "foo.exe" is OK but "foo" is an error.
38564  #
38565  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38566  # It is also a way to make sure we got the proper file name for the real test later on.
38567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38568  if test "x$test_shortpath" = x; then
38569    # Short path failed, file does not exist as specified.
38570    # Try adding .exe or .cmd
38571    if test -f "${new_path}.exe"; then
38572      input_to_shortpath="${new_path}.exe"
38573    elif test -f "${new_path}.cmd"; then
38574      input_to_shortpath="${new_path}.cmd"
38575    else
38576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38577$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38581    fi
38582  else
38583    input_to_shortpath="$new_path"
38584  fi
38585
38586  # Call helper function which possibly converts this using DOS-style short mode.
38587  # If so, the updated path is stored in $new_path.
38588  new_path="$input_to_shortpath"
38589
38590  input_path="$input_to_shortpath"
38591  # Check if we need to convert this using DOS-style short mode. If the path
38592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38593  # take no chances and rewrite it.
38594  # Note: m4 eats our [], so we need to use [ and ] instead.
38595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38596  if test "x$has_forbidden_chars" != x; then
38597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38601      # Going to short mode and back again did indeed matter. Since short mode is
38602      # case insensitive, let's make it lowercase to improve readability.
38603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38604      # Now convert it back to Unix-style (cygpath)
38605      input_path=`$CYGPATH -u "$shortmode_path"`
38606      new_path="$input_path"
38607    fi
38608  fi
38609
38610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38611  if test "x$test_cygdrive_prefix" = x; then
38612    # As a simple fix, exclude /usr/bin since it's not a real path.
38613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38615      # a path prefixed by /cygdrive for fixpath to work.
38616      new_path="$CYGWIN_ROOT_PATH$input_path"
38617    fi
38618  fi
38619
38620  # remove trailing .exe if any
38621  new_path="${new_path/%.exe/}"
38622
38623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38624
38625  # First separate the path from the arguments. This will split at the first
38626  # space.
38627  complete="$AR"
38628  path="${complete%% *}"
38629  tmp="$complete EOL"
38630  arguments="${tmp#* }"
38631
38632  # Input might be given as Windows format, start by converting to
38633  # unix format.
38634  new_path="$path"
38635
38636  windows_path="$new_path"
38637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38638    unix_path=`$CYGPATH -u "$windows_path"`
38639    new_path="$unix_path"
38640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38642    new_path="$unix_path"
38643  fi
38644
38645
38646  # Now try to locate executable using which
38647  new_path=`$WHICH "$new_path" 2> /dev/null`
38648
38649  if test "x$new_path" = x; then
38650    # Oops. Which didn't find the executable.
38651    # The splitting of arguments from the executable at a space might have been incorrect,
38652    # since paths with space are more likely in Windows. Give it another try with the whole
38653    # argument.
38654    path="$complete"
38655    arguments="EOL"
38656    new_path="$path"
38657
38658  windows_path="$new_path"
38659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38660    unix_path=`$CYGPATH -u "$windows_path"`
38661    new_path="$unix_path"
38662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38664    new_path="$unix_path"
38665  fi
38666
38667
38668    new_path=`$WHICH "$new_path" 2> /dev/null`
38669    # bat and cmd files are not always considered executable in MSYS causing which
38670    # to not find them
38671    if test "x$new_path" = x \
38672        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38673        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38674      new_path="$path"
38675
38676  windows_path="$new_path"
38677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38678    unix_path=`$CYGPATH -u "$windows_path"`
38679    new_path="$unix_path"
38680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38682    new_path="$unix_path"
38683  fi
38684
38685    fi
38686
38687    if test "x$new_path" = x; then
38688      # It's still not found. Now this is an unrecoverable error.
38689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38690$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38691      has_space=`$ECHO "$complete" | $GREP " "`
38692      if test "x$has_space" != x; then
38693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38695      fi
38696      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38697    fi
38698  fi
38699
38700  # Now new_path has a complete unix path to the binary
38701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38702    # Keep paths in /bin as-is, but remove trailing .exe if any
38703    new_path="${new_path/%.exe/}"
38704    # Do not save /bin paths to all_fixpath_prefixes!
38705  else
38706    # Not in mixed or Windows style, start by that.
38707    new_path=`cmd //c echo $new_path`
38708
38709  input_path="$new_path"
38710  # Check if we need to convert this using DOS-style short mode. If the path
38711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38712  # take no chances and rewrite it.
38713  # Note: m4 eats our [], so we need to use [ and ] instead.
38714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38715  if test "x$has_forbidden_chars" != x; then
38716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38718  fi
38719
38720    # Output is in $new_path
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731    # remove trailing .exe if any
38732    new_path="${new_path/%.exe/}"
38733
38734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38736  fi
38737
38738    else
38739      # We're on a unix platform. Hooray! :)
38740      # First separate the path from the arguments. This will split at the first
38741      # space.
38742      complete="$AR"
38743      path="${complete%% *}"
38744      tmp="$complete EOL"
38745      arguments="${tmp#* }"
38746
38747      # Cannot rely on the command "which" here since it doesn't always work.
38748      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38749      if test -z "$is_absolute_path"; then
38750        # Path to executable is not absolute. Find it.
38751        IFS_save="$IFS"
38752        IFS=:
38753        for p in $PATH; do
38754          if test -f "$p/$path" && test -x "$p/$path"; then
38755            new_path="$p/$path"
38756            break
38757          fi
38758        done
38759        IFS="$IFS_save"
38760      else
38761        # This is an absolute path, we can use it without further modifications.
38762        new_path="$path"
38763      fi
38764
38765      if test "x$new_path" = x; then
38766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38767$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38768        has_space=`$ECHO "$complete" | $GREP " "`
38769        if test "x$has_space" != x; then
38770          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38772        fi
38773        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38774      fi
38775    fi
38776
38777    # Now join together the path and the arguments once again
38778    if test "x$arguments" != xEOL; then
38779      new_complete="$new_path ${arguments% *}"
38780    else
38781      new_complete="$new_path"
38782    fi
38783
38784    if test "x$complete" != "x$new_complete"; then
38785      AR="$new_complete"
38786      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38787$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38788    fi
38789  fi
38790
38791
38792
38793  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38794
38795
38796  # Publish this variable in the help.
38797
38798
38799  if [ -z "${LIPO+x}" ]; then
38800    # The variable is not set by user, try to locate tool using the code snippet
38801    for ac_prog in lipo
38802do
38803  # Extract the first word of "$ac_prog", so it can be a program name with args.
38804set dummy $ac_prog; ac_word=$2
38805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38806$as_echo_n "checking for $ac_word... " >&6; }
38807if ${ac_cv_path_LIPO+:} false; then :
38808  $as_echo_n "(cached) " >&6
38809else
38810  case $LIPO in
38811  [\\/]* | ?:[\\/]*)
38812  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38813  ;;
38814  *)
38815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38816for as_dir in $PATH
38817do
38818  IFS=$as_save_IFS
38819  test -z "$as_dir" && as_dir=.
38820    for ac_exec_ext in '' $ac_executable_extensions; do
38821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38822    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38824    break 2
38825  fi
38826done
38827  done
38828IFS=$as_save_IFS
38829
38830  ;;
38831esac
38832fi
38833LIPO=$ac_cv_path_LIPO
38834if test -n "$LIPO"; then
38835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38836$as_echo "$LIPO" >&6; }
38837else
38838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38839$as_echo "no" >&6; }
38840fi
38841
38842
38843  test -n "$LIPO" && break
38844done
38845
38846  else
38847    # The variable is set, but is it from the command line or the environment?
38848
38849    # Try to remove the string !LIPO! from our list.
38850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38852      # If it failed, the variable was not from the command line. Ignore it,
38853      # but warn the user (except for BASH, which is always set by the calling BASH).
38854      if test "xLIPO" != xBASH; then
38855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38856$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38857      fi
38858      # Try to locate tool using the code snippet
38859      for ac_prog in lipo
38860do
38861  # Extract the first word of "$ac_prog", so it can be a program name with args.
38862set dummy $ac_prog; ac_word=$2
38863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38864$as_echo_n "checking for $ac_word... " >&6; }
38865if ${ac_cv_path_LIPO+:} false; then :
38866  $as_echo_n "(cached) " >&6
38867else
38868  case $LIPO in
38869  [\\/]* | ?:[\\/]*)
38870  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38871  ;;
38872  *)
38873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38874for as_dir in $PATH
38875do
38876  IFS=$as_save_IFS
38877  test -z "$as_dir" && as_dir=.
38878    for ac_exec_ext in '' $ac_executable_extensions; do
38879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38880    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38882    break 2
38883  fi
38884done
38885  done
38886IFS=$as_save_IFS
38887
38888  ;;
38889esac
38890fi
38891LIPO=$ac_cv_path_LIPO
38892if test -n "$LIPO"; then
38893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38894$as_echo "$LIPO" >&6; }
38895else
38896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38897$as_echo "no" >&6; }
38898fi
38899
38900
38901  test -n "$LIPO" && break
38902done
38903
38904    else
38905      # If it succeeded, then it was overridden by the user. We will use it
38906      # for the tool.
38907
38908      # First remove it from the list of overridden variables, so we can test
38909      # for unknown variables in the end.
38910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38911
38912      # Check if we try to supply an empty value
38913      if test "x$LIPO" = x; then
38914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38915$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38917$as_echo_n "checking for LIPO... " >&6; }
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38919$as_echo "disabled" >&6; }
38920      else
38921        # Check if the provided tool contains a complete path.
38922        tool_specified="$LIPO"
38923        tool_basename="${tool_specified##*/}"
38924        if test "x$tool_basename" = "x$tool_specified"; then
38925          # A command without a complete path is provided, search $PATH.
38926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38927$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38928          # Extract the first word of "$tool_basename", so it can be a program name with args.
38929set dummy $tool_basename; ac_word=$2
38930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38931$as_echo_n "checking for $ac_word... " >&6; }
38932if ${ac_cv_path_LIPO+:} false; then :
38933  $as_echo_n "(cached) " >&6
38934else
38935  case $LIPO in
38936  [\\/]* | ?:[\\/]*)
38937  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38938  ;;
38939  *)
38940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38941for as_dir in $PATH
38942do
38943  IFS=$as_save_IFS
38944  test -z "$as_dir" && as_dir=.
38945    for ac_exec_ext in '' $ac_executable_extensions; do
38946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38947    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38949    break 2
38950  fi
38951done
38952  done
38953IFS=$as_save_IFS
38954
38955  ;;
38956esac
38957fi
38958LIPO=$ac_cv_path_LIPO
38959if test -n "$LIPO"; then
38960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38961$as_echo "$LIPO" >&6; }
38962else
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38964$as_echo "no" >&6; }
38965fi
38966
38967
38968          if test "x$LIPO" = x; then
38969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38970          fi
38971        else
38972          # Otherwise we believe it is a complete path. Use it as it is.
38973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38974$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38976$as_echo_n "checking for LIPO... " >&6; }
38977          if test ! -x "$tool_specified"; then
38978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38979$as_echo "not found" >&6; }
38980            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38981          fi
38982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38983$as_echo "$tool_specified" >&6; }
38984        fi
38985      fi
38986    fi
38987
38988  fi
38989
38990
38991
38992  # Only process if variable expands to non-empty
38993
38994  if test "x$LIPO" != x; then
38995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38996
38997  # First separate the path from the arguments. This will split at the first
38998  # space.
38999  complete="$LIPO"
39000  path="${complete%% *}"
39001  tmp="$complete EOL"
39002  arguments="${tmp#* }"
39003
39004  # Input might be given as Windows format, start by converting to
39005  # unix format.
39006  new_path=`$CYGPATH -u "$path"`
39007
39008  # Now try to locate executable using which
39009  new_path=`$WHICH "$new_path" 2> /dev/null`
39010  # bat and cmd files are not always considered executable in cygwin causing which
39011  # to not find them
39012  if test "x$new_path" = x \
39013      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39014      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39015    new_path=`$CYGPATH -u "$path"`
39016  fi
39017  if test "x$new_path" = x; then
39018    # Oops. Which didn't find the executable.
39019    # The splitting of arguments from the executable at a space might have been incorrect,
39020    # since paths with space are more likely in Windows. Give it another try with the whole
39021    # argument.
39022    path="$complete"
39023    arguments="EOL"
39024    new_path=`$CYGPATH -u "$path"`
39025    new_path=`$WHICH "$new_path" 2> /dev/null`
39026    # bat and cmd files are not always considered executable in cygwin causing which
39027    # to not find them
39028    if test "x$new_path" = x \
39029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39031      new_path=`$CYGPATH -u "$path"`
39032    fi
39033    if test "x$new_path" = x; then
39034      # It's still not found. Now this is an unrecoverable error.
39035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39036$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39037      has_space=`$ECHO "$complete" | $GREP " "`
39038      if test "x$has_space" != x; then
39039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39041      fi
39042      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39043    fi
39044  fi
39045
39046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39049  # "foo.exe" is OK but "foo" is an error.
39050  #
39051  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39052  # It is also a way to make sure we got the proper file name for the real test later on.
39053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39054  if test "x$test_shortpath" = x; then
39055    # Short path failed, file does not exist as specified.
39056    # Try adding .exe or .cmd
39057    if test -f "${new_path}.exe"; then
39058      input_to_shortpath="${new_path}.exe"
39059    elif test -f "${new_path}.cmd"; then
39060      input_to_shortpath="${new_path}.cmd"
39061    else
39062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39063$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39066      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39067    fi
39068  else
39069    input_to_shortpath="$new_path"
39070  fi
39071
39072  # Call helper function which possibly converts this using DOS-style short mode.
39073  # If so, the updated path is stored in $new_path.
39074  new_path="$input_to_shortpath"
39075
39076  input_path="$input_to_shortpath"
39077  # Check if we need to convert this using DOS-style short mode. If the path
39078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39079  # take no chances and rewrite it.
39080  # Note: m4 eats our [], so we need to use [ and ] instead.
39081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39082  if test "x$has_forbidden_chars" != x; then
39083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39087      # Going to short mode and back again did indeed matter. Since short mode is
39088      # case insensitive, let's make it lowercase to improve readability.
39089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39090      # Now convert it back to Unix-style (cygpath)
39091      input_path=`$CYGPATH -u "$shortmode_path"`
39092      new_path="$input_path"
39093    fi
39094  fi
39095
39096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39097  if test "x$test_cygdrive_prefix" = x; then
39098    # As a simple fix, exclude /usr/bin since it's not a real path.
39099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39101      # a path prefixed by /cygdrive for fixpath to work.
39102      new_path="$CYGWIN_ROOT_PATH$input_path"
39103    fi
39104  fi
39105
39106  # remove trailing .exe if any
39107  new_path="${new_path/%.exe/}"
39108
39109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39110
39111  # First separate the path from the arguments. This will split at the first
39112  # space.
39113  complete="$LIPO"
39114  path="${complete%% *}"
39115  tmp="$complete EOL"
39116  arguments="${tmp#* }"
39117
39118  # Input might be given as Windows format, start by converting to
39119  # unix format.
39120  new_path="$path"
39121
39122  windows_path="$new_path"
39123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39124    unix_path=`$CYGPATH -u "$windows_path"`
39125    new_path="$unix_path"
39126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39128    new_path="$unix_path"
39129  fi
39130
39131
39132  # Now try to locate executable using which
39133  new_path=`$WHICH "$new_path" 2> /dev/null`
39134
39135  if test "x$new_path" = x; then
39136    # Oops. Which didn't find the executable.
39137    # The splitting of arguments from the executable at a space might have been incorrect,
39138    # since paths with space are more likely in Windows. Give it another try with the whole
39139    # argument.
39140    path="$complete"
39141    arguments="EOL"
39142    new_path="$path"
39143
39144  windows_path="$new_path"
39145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39146    unix_path=`$CYGPATH -u "$windows_path"`
39147    new_path="$unix_path"
39148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39150    new_path="$unix_path"
39151  fi
39152
39153
39154    new_path=`$WHICH "$new_path" 2> /dev/null`
39155    # bat and cmd files are not always considered executable in MSYS causing which
39156    # to not find them
39157    if test "x$new_path" = x \
39158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39160      new_path="$path"
39161
39162  windows_path="$new_path"
39163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39164    unix_path=`$CYGPATH -u "$windows_path"`
39165    new_path="$unix_path"
39166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39168    new_path="$unix_path"
39169  fi
39170
39171    fi
39172
39173    if test "x$new_path" = x; then
39174      # It's still not found. Now this is an unrecoverable error.
39175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39176$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39177      has_space=`$ECHO "$complete" | $GREP " "`
39178      if test "x$has_space" != x; then
39179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39181      fi
39182      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39183    fi
39184  fi
39185
39186  # Now new_path has a complete unix path to the binary
39187  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39188    # Keep paths in /bin as-is, but remove trailing .exe if any
39189    new_path="${new_path/%.exe/}"
39190    # Do not save /bin paths to all_fixpath_prefixes!
39191  else
39192    # Not in mixed or Windows style, start by that.
39193    new_path=`cmd //c echo $new_path`
39194
39195  input_path="$new_path"
39196  # Check if we need to convert this using DOS-style short mode. If the path
39197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39198  # take no chances and rewrite it.
39199  # Note: m4 eats our [], so we need to use [ and ] instead.
39200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39201  if test "x$has_forbidden_chars" != x; then
39202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39204  fi
39205
39206    # Output is in $new_path
39207
39208  windows_path="$new_path"
39209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39210    unix_path=`$CYGPATH -u "$windows_path"`
39211    new_path="$unix_path"
39212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39214    new_path="$unix_path"
39215  fi
39216
39217    # remove trailing .exe if any
39218    new_path="${new_path/%.exe/}"
39219
39220    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39221    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39222  fi
39223
39224    else
39225      # We're on a unix platform. Hooray! :)
39226      # First separate the path from the arguments. This will split at the first
39227      # space.
39228      complete="$LIPO"
39229      path="${complete%% *}"
39230      tmp="$complete EOL"
39231      arguments="${tmp#* }"
39232
39233      # Cannot rely on the command "which" here since it doesn't always work.
39234      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39235      if test -z "$is_absolute_path"; then
39236        # Path to executable is not absolute. Find it.
39237        IFS_save="$IFS"
39238        IFS=:
39239        for p in $PATH; do
39240          if test -f "$p/$path" && test -x "$p/$path"; then
39241            new_path="$p/$path"
39242            break
39243          fi
39244        done
39245        IFS="$IFS_save"
39246      else
39247        # This is an absolute path, we can use it without further modifications.
39248        new_path="$path"
39249      fi
39250
39251      if test "x$new_path" = x; then
39252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39253$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39254        has_space=`$ECHO "$complete" | $GREP " "`
39255        if test "x$has_space" != x; then
39256          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39258        fi
39259        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39260      fi
39261    fi
39262
39263    # Now join together the path and the arguments once again
39264    if test "x$arguments" != xEOL; then
39265      new_complete="$new_path ${arguments% *}"
39266    else
39267      new_complete="$new_path"
39268    fi
39269
39270    if test "x$complete" != "x$new_complete"; then
39271      LIPO="$new_complete"
39272      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39273$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39274    fi
39275  fi
39276
39277  fi
39278
39279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39280    # Extract the first word of "mt", so it can be a program name with args.
39281set dummy mt; ac_word=$2
39282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39283$as_echo_n "checking for $ac_word... " >&6; }
39284if ${ac_cv_prog_MT+:} false; then :
39285  $as_echo_n "(cached) " >&6
39286else
39287  if test -n "$MT"; then
39288  ac_cv_prog_MT="$MT" # Let the user override the test.
39289else
39290  ac_prog_rejected=no
39291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39292for as_dir in $PATH
39293do
39294  IFS=$as_save_IFS
39295  test -z "$as_dir" && as_dir=.
39296    for ac_exec_ext in '' $ac_executable_extensions; do
39297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39298    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39299       ac_prog_rejected=yes
39300       continue
39301     fi
39302    ac_cv_prog_MT="mt"
39303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39304    break 2
39305  fi
39306done
39307  done
39308IFS=$as_save_IFS
39309
39310if test $ac_prog_rejected = yes; then
39311  # We found a bogon in the path, so make sure we never use it.
39312  set dummy $ac_cv_prog_MT
39313  shift
39314  if test $# != 0; then
39315    # We chose a different compiler from the bogus one.
39316    # However, it has the same basename, so the bogon will be chosen
39317    # first if we set MT to just the basename; use the full file name.
39318    shift
39319    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39320  fi
39321fi
39322fi
39323fi
39324MT=$ac_cv_prog_MT
39325if test -n "$MT"; then
39326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39327$as_echo "$MT" >&6; }
39328else
39329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39330$as_echo "no" >&6; }
39331fi
39332
39333
39334
39335  # Only process if variable expands to non-empty
39336
39337  if test "x$MT" != x; then
39338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39339
39340  # First separate the path from the arguments. This will split at the first
39341  # space.
39342  complete="$MT"
39343  path="${complete%% *}"
39344  tmp="$complete EOL"
39345  arguments="${tmp#* }"
39346
39347  # Input might be given as Windows format, start by converting to
39348  # unix format.
39349  new_path=`$CYGPATH -u "$path"`
39350
39351  # Now try to locate executable using which
39352  new_path=`$WHICH "$new_path" 2> /dev/null`
39353  # bat and cmd files are not always considered executable in cygwin causing which
39354  # to not find them
39355  if test "x$new_path" = x \
39356      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39357      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39358    new_path=`$CYGPATH -u "$path"`
39359  fi
39360  if test "x$new_path" = x; then
39361    # Oops. Which didn't find the executable.
39362    # The splitting of arguments from the executable at a space might have been incorrect,
39363    # since paths with space are more likely in Windows. Give it another try with the whole
39364    # argument.
39365    path="$complete"
39366    arguments="EOL"
39367    new_path=`$CYGPATH -u "$path"`
39368    new_path=`$WHICH "$new_path" 2> /dev/null`
39369    # bat and cmd files are not always considered executable in cygwin causing which
39370    # to not find them
39371    if test "x$new_path" = x \
39372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39374      new_path=`$CYGPATH -u "$path"`
39375    fi
39376    if test "x$new_path" = x; then
39377      # It's still not found. Now this is an unrecoverable error.
39378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39379$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39380      has_space=`$ECHO "$complete" | $GREP " "`
39381      if test "x$has_space" != x; then
39382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39384      fi
39385      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39386    fi
39387  fi
39388
39389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39392  # "foo.exe" is OK but "foo" is an error.
39393  #
39394  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39395  # It is also a way to make sure we got the proper file name for the real test later on.
39396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39397  if test "x$test_shortpath" = x; then
39398    # Short path failed, file does not exist as specified.
39399    # Try adding .exe or .cmd
39400    if test -f "${new_path}.exe"; then
39401      input_to_shortpath="${new_path}.exe"
39402    elif test -f "${new_path}.cmd"; then
39403      input_to_shortpath="${new_path}.cmd"
39404    else
39405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39406$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39409      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39410    fi
39411  else
39412    input_to_shortpath="$new_path"
39413  fi
39414
39415  # Call helper function which possibly converts this using DOS-style short mode.
39416  # If so, the updated path is stored in $new_path.
39417  new_path="$input_to_shortpath"
39418
39419  input_path="$input_to_shortpath"
39420  # Check if we need to convert this using DOS-style short mode. If the path
39421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39422  # take no chances and rewrite it.
39423  # Note: m4 eats our [], so we need to use [ and ] instead.
39424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39425  if test "x$has_forbidden_chars" != x; then
39426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39430      # Going to short mode and back again did indeed matter. Since short mode is
39431      # case insensitive, let's make it lowercase to improve readability.
39432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39433      # Now convert it back to Unix-style (cygpath)
39434      input_path=`$CYGPATH -u "$shortmode_path"`
39435      new_path="$input_path"
39436    fi
39437  fi
39438
39439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39440  if test "x$test_cygdrive_prefix" = x; then
39441    # As a simple fix, exclude /usr/bin since it's not a real path.
39442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39444      # a path prefixed by /cygdrive for fixpath to work.
39445      new_path="$CYGWIN_ROOT_PATH$input_path"
39446    fi
39447  fi
39448
39449  # remove trailing .exe if any
39450  new_path="${new_path/%.exe/}"
39451
39452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39453
39454  # First separate the path from the arguments. This will split at the first
39455  # space.
39456  complete="$MT"
39457  path="${complete%% *}"
39458  tmp="$complete EOL"
39459  arguments="${tmp#* }"
39460
39461  # Input might be given as Windows format, start by converting to
39462  # unix format.
39463  new_path="$path"
39464
39465  windows_path="$new_path"
39466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39467    unix_path=`$CYGPATH -u "$windows_path"`
39468    new_path="$unix_path"
39469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39471    new_path="$unix_path"
39472  fi
39473
39474
39475  # Now try to locate executable using which
39476  new_path=`$WHICH "$new_path" 2> /dev/null`
39477
39478  if test "x$new_path" = x; then
39479    # Oops. Which didn't find the executable.
39480    # The splitting of arguments from the executable at a space might have been incorrect,
39481    # since paths with space are more likely in Windows. Give it another try with the whole
39482    # argument.
39483    path="$complete"
39484    arguments="EOL"
39485    new_path="$path"
39486
39487  windows_path="$new_path"
39488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39489    unix_path=`$CYGPATH -u "$windows_path"`
39490    new_path="$unix_path"
39491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39493    new_path="$unix_path"
39494  fi
39495
39496
39497    new_path=`$WHICH "$new_path" 2> /dev/null`
39498    # bat and cmd files are not always considered executable in MSYS causing which
39499    # to not find them
39500    if test "x$new_path" = x \
39501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39503      new_path="$path"
39504
39505  windows_path="$new_path"
39506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39507    unix_path=`$CYGPATH -u "$windows_path"`
39508    new_path="$unix_path"
39509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39511    new_path="$unix_path"
39512  fi
39513
39514    fi
39515
39516    if test "x$new_path" = x; then
39517      # It's still not found. Now this is an unrecoverable error.
39518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39519$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39520      has_space=`$ECHO "$complete" | $GREP " "`
39521      if test "x$has_space" != x; then
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39524      fi
39525      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39526    fi
39527  fi
39528
39529  # Now new_path has a complete unix path to the binary
39530  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39531    # Keep paths in /bin as-is, but remove trailing .exe if any
39532    new_path="${new_path/%.exe/}"
39533    # Do not save /bin paths to all_fixpath_prefixes!
39534  else
39535    # Not in mixed or Windows style, start by that.
39536    new_path=`cmd //c echo $new_path`
39537
39538  input_path="$new_path"
39539  # Check if we need to convert this using DOS-style short mode. If the path
39540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39541  # take no chances and rewrite it.
39542  # Note: m4 eats our [], so we need to use [ and ] instead.
39543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39544  if test "x$has_forbidden_chars" != x; then
39545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39547  fi
39548
39549    # Output is in $new_path
39550
39551  windows_path="$new_path"
39552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39553    unix_path=`$CYGPATH -u "$windows_path"`
39554    new_path="$unix_path"
39555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39557    new_path="$unix_path"
39558  fi
39559
39560    # remove trailing .exe if any
39561    new_path="${new_path/%.exe/}"
39562
39563    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39564    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39565  fi
39566
39567    else
39568      # We're on a unix platform. Hooray! :)
39569      # First separate the path from the arguments. This will split at the first
39570      # space.
39571      complete="$MT"
39572      path="${complete%% *}"
39573      tmp="$complete EOL"
39574      arguments="${tmp#* }"
39575
39576      # Cannot rely on the command "which" here since it doesn't always work.
39577      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39578      if test -z "$is_absolute_path"; then
39579        # Path to executable is not absolute. Find it.
39580        IFS_save="$IFS"
39581        IFS=:
39582        for p in $PATH; do
39583          if test -f "$p/$path" && test -x "$p/$path"; then
39584            new_path="$p/$path"
39585            break
39586          fi
39587        done
39588        IFS="$IFS_save"
39589      else
39590        # This is an absolute path, we can use it without further modifications.
39591        new_path="$path"
39592      fi
39593
39594      if test "x$new_path" = x; then
39595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39596$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39597        has_space=`$ECHO "$complete" | $GREP " "`
39598        if test "x$has_space" != x; then
39599          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39601        fi
39602        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39603      fi
39604    fi
39605
39606    # Now join together the path and the arguments once again
39607    if test "x$arguments" != xEOL; then
39608      new_complete="$new_path ${arguments% *}"
39609    else
39610      new_complete="$new_path"
39611    fi
39612
39613    if test "x$complete" != "x$new_complete"; then
39614      MT="$new_complete"
39615      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39616$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39617    fi
39618  fi
39619
39620    # Setup the resource compiler (RC)
39621    # Extract the first word of "rc", so it can be a program name with args.
39622set dummy rc; ac_word=$2
39623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39624$as_echo_n "checking for $ac_word... " >&6; }
39625if ${ac_cv_prog_RC+:} false; then :
39626  $as_echo_n "(cached) " >&6
39627else
39628  if test -n "$RC"; then
39629  ac_cv_prog_RC="$RC" # Let the user override the test.
39630else
39631  ac_prog_rejected=no
39632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39633for as_dir in $PATH
39634do
39635  IFS=$as_save_IFS
39636  test -z "$as_dir" && as_dir=.
39637    for ac_exec_ext in '' $ac_executable_extensions; do
39638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39639    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39640       ac_prog_rejected=yes
39641       continue
39642     fi
39643    ac_cv_prog_RC="rc"
39644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39645    break 2
39646  fi
39647done
39648  done
39649IFS=$as_save_IFS
39650
39651if test $ac_prog_rejected = yes; then
39652  # We found a bogon in the path, so make sure we never use it.
39653  set dummy $ac_cv_prog_RC
39654  shift
39655  if test $# != 0; then
39656    # We chose a different compiler from the bogus one.
39657    # However, it has the same basename, so the bogon will be chosen
39658    # first if we set RC to just the basename; use the full file name.
39659    shift
39660    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39661  fi
39662fi
39663fi
39664fi
39665RC=$ac_cv_prog_RC
39666if test -n "$RC"; then
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39668$as_echo "$RC" >&6; }
39669else
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39671$as_echo "no" >&6; }
39672fi
39673
39674
39675
39676  # Only process if variable expands to non-empty
39677
39678  if test "x$RC" != x; then
39679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39680
39681  # First separate the path from the arguments. This will split at the first
39682  # space.
39683  complete="$RC"
39684  path="${complete%% *}"
39685  tmp="$complete EOL"
39686  arguments="${tmp#* }"
39687
39688  # Input might be given as Windows format, start by converting to
39689  # unix format.
39690  new_path=`$CYGPATH -u "$path"`
39691
39692  # Now try to locate executable using which
39693  new_path=`$WHICH "$new_path" 2> /dev/null`
39694  # bat and cmd files are not always considered executable in cygwin causing which
39695  # to not find them
39696  if test "x$new_path" = x \
39697      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39698      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39699    new_path=`$CYGPATH -u "$path"`
39700  fi
39701  if test "x$new_path" = x; then
39702    # Oops. Which didn't find the executable.
39703    # The splitting of arguments from the executable at a space might have been incorrect,
39704    # since paths with space are more likely in Windows. Give it another try with the whole
39705    # argument.
39706    path="$complete"
39707    arguments="EOL"
39708    new_path=`$CYGPATH -u "$path"`
39709    new_path=`$WHICH "$new_path" 2> /dev/null`
39710    # bat and cmd files are not always considered executable in cygwin causing which
39711    # to not find them
39712    if test "x$new_path" = x \
39713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39715      new_path=`$CYGPATH -u "$path"`
39716    fi
39717    if test "x$new_path" = x; then
39718      # It's still not found. Now this is an unrecoverable error.
39719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39720$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39721      has_space=`$ECHO "$complete" | $GREP " "`
39722      if test "x$has_space" != x; then
39723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39725      fi
39726      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39727    fi
39728  fi
39729
39730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39733  # "foo.exe" is OK but "foo" is an error.
39734  #
39735  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39736  # It is also a way to make sure we got the proper file name for the real test later on.
39737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39738  if test "x$test_shortpath" = x; then
39739    # Short path failed, file does not exist as specified.
39740    # Try adding .exe or .cmd
39741    if test -f "${new_path}.exe"; then
39742      input_to_shortpath="${new_path}.exe"
39743    elif test -f "${new_path}.cmd"; then
39744      input_to_shortpath="${new_path}.cmd"
39745    else
39746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39747$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39750      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39751    fi
39752  else
39753    input_to_shortpath="$new_path"
39754  fi
39755
39756  # Call helper function which possibly converts this using DOS-style short mode.
39757  # If so, the updated path is stored in $new_path.
39758  new_path="$input_to_shortpath"
39759
39760  input_path="$input_to_shortpath"
39761  # Check if we need to convert this using DOS-style short mode. If the path
39762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39763  # take no chances and rewrite it.
39764  # Note: m4 eats our [], so we need to use [ and ] instead.
39765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39766  if test "x$has_forbidden_chars" != x; then
39767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39771      # Going to short mode and back again did indeed matter. Since short mode is
39772      # case insensitive, let's make it lowercase to improve readability.
39773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39774      # Now convert it back to Unix-style (cygpath)
39775      input_path=`$CYGPATH -u "$shortmode_path"`
39776      new_path="$input_path"
39777    fi
39778  fi
39779
39780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39781  if test "x$test_cygdrive_prefix" = x; then
39782    # As a simple fix, exclude /usr/bin since it's not a real path.
39783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39785      # a path prefixed by /cygdrive for fixpath to work.
39786      new_path="$CYGWIN_ROOT_PATH$input_path"
39787    fi
39788  fi
39789
39790  # remove trailing .exe if any
39791  new_path="${new_path/%.exe/}"
39792
39793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39794
39795  # First separate the path from the arguments. This will split at the first
39796  # space.
39797  complete="$RC"
39798  path="${complete%% *}"
39799  tmp="$complete EOL"
39800  arguments="${tmp#* }"
39801
39802  # Input might be given as Windows format, start by converting to
39803  # unix format.
39804  new_path="$path"
39805
39806  windows_path="$new_path"
39807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39808    unix_path=`$CYGPATH -u "$windows_path"`
39809    new_path="$unix_path"
39810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39812    new_path="$unix_path"
39813  fi
39814
39815
39816  # Now try to locate executable using which
39817  new_path=`$WHICH "$new_path" 2> /dev/null`
39818
39819  if test "x$new_path" = x; then
39820    # Oops. Which didn't find the executable.
39821    # The splitting of arguments from the executable at a space might have been incorrect,
39822    # since paths with space are more likely in Windows. Give it another try with the whole
39823    # argument.
39824    path="$complete"
39825    arguments="EOL"
39826    new_path="$path"
39827
39828  windows_path="$new_path"
39829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39830    unix_path=`$CYGPATH -u "$windows_path"`
39831    new_path="$unix_path"
39832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39834    new_path="$unix_path"
39835  fi
39836
39837
39838    new_path=`$WHICH "$new_path" 2> /dev/null`
39839    # bat and cmd files are not always considered executable in MSYS causing which
39840    # to not find them
39841    if test "x$new_path" = x \
39842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39844      new_path="$path"
39845
39846  windows_path="$new_path"
39847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39848    unix_path=`$CYGPATH -u "$windows_path"`
39849    new_path="$unix_path"
39850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39852    new_path="$unix_path"
39853  fi
39854
39855    fi
39856
39857    if test "x$new_path" = x; then
39858      # It's still not found. Now this is an unrecoverable error.
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39860$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39861      has_space=`$ECHO "$complete" | $GREP " "`
39862      if test "x$has_space" != x; then
39863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39865      fi
39866      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39867    fi
39868  fi
39869
39870  # Now new_path has a complete unix path to the binary
39871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39872    # Keep paths in /bin as-is, but remove trailing .exe if any
39873    new_path="${new_path/%.exe/}"
39874    # Do not save /bin paths to all_fixpath_prefixes!
39875  else
39876    # Not in mixed or Windows style, start by that.
39877    new_path=`cmd //c echo $new_path`
39878
39879  input_path="$new_path"
39880  # Check if we need to convert this using DOS-style short mode. If the path
39881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39882  # take no chances and rewrite it.
39883  # Note: m4 eats our [], so we need to use [ and ] instead.
39884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39885  if test "x$has_forbidden_chars" != x; then
39886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39888  fi
39889
39890    # Output is in $new_path
39891
39892  windows_path="$new_path"
39893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894    unix_path=`$CYGPATH -u "$windows_path"`
39895    new_path="$unix_path"
39896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898    new_path="$unix_path"
39899  fi
39900
39901    # remove trailing .exe if any
39902    new_path="${new_path/%.exe/}"
39903
39904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39906  fi
39907
39908    else
39909      # We're on a unix platform. Hooray! :)
39910      # First separate the path from the arguments. This will split at the first
39911      # space.
39912      complete="$RC"
39913      path="${complete%% *}"
39914      tmp="$complete EOL"
39915      arguments="${tmp#* }"
39916
39917      # Cannot rely on the command "which" here since it doesn't always work.
39918      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39919      if test -z "$is_absolute_path"; then
39920        # Path to executable is not absolute. Find it.
39921        IFS_save="$IFS"
39922        IFS=:
39923        for p in $PATH; do
39924          if test -f "$p/$path" && test -x "$p/$path"; then
39925            new_path="$p/$path"
39926            break
39927          fi
39928        done
39929        IFS="$IFS_save"
39930      else
39931        # This is an absolute path, we can use it without further modifications.
39932        new_path="$path"
39933      fi
39934
39935      if test "x$new_path" = x; then
39936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39937$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39938        has_space=`$ECHO "$complete" | $GREP " "`
39939        if test "x$has_space" != x; then
39940          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39942        fi
39943        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39944      fi
39945    fi
39946
39947    # Now join together the path and the arguments once again
39948    if test "x$arguments" != xEOL; then
39949      new_complete="$new_path ${arguments% *}"
39950    else
39951      new_complete="$new_path"
39952    fi
39953
39954    if test "x$complete" != "x$new_complete"; then
39955      RC="$new_complete"
39956      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39957$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39958    fi
39959  fi
39960
39961    # Extract the first word of "dumpbin", so it can be a program name with args.
39962set dummy dumpbin; ac_word=$2
39963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39964$as_echo_n "checking for $ac_word... " >&6; }
39965if ${ac_cv_prog_DUMPBIN+:} false; then :
39966  $as_echo_n "(cached) " >&6
39967else
39968  if test -n "$DUMPBIN"; then
39969  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39970else
39971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39972for as_dir in $PATH
39973do
39974  IFS=$as_save_IFS
39975  test -z "$as_dir" && as_dir=.
39976    for ac_exec_ext in '' $ac_executable_extensions; do
39977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39978    ac_cv_prog_DUMPBIN="dumpbin"
39979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39980    break 2
39981  fi
39982done
39983  done
39984IFS=$as_save_IFS
39985
39986fi
39987fi
39988DUMPBIN=$ac_cv_prog_DUMPBIN
39989if test -n "$DUMPBIN"; then
39990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39991$as_echo "$DUMPBIN" >&6; }
39992else
39993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39994$as_echo "no" >&6; }
39995fi
39996
39997
39998
39999  # Only process if variable expands to non-empty
40000
40001  if test "x$DUMPBIN" != x; then
40002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40003
40004  # First separate the path from the arguments. This will split at the first
40005  # space.
40006  complete="$DUMPBIN"
40007  path="${complete%% *}"
40008  tmp="$complete EOL"
40009  arguments="${tmp#* }"
40010
40011  # Input might be given as Windows format, start by converting to
40012  # unix format.
40013  new_path=`$CYGPATH -u "$path"`
40014
40015  # Now try to locate executable using which
40016  new_path=`$WHICH "$new_path" 2> /dev/null`
40017  # bat and cmd files are not always considered executable in cygwin causing which
40018  # to not find them
40019  if test "x$new_path" = x \
40020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40022    new_path=`$CYGPATH -u "$path"`
40023  fi
40024  if test "x$new_path" = x; then
40025    # Oops. Which didn't find the executable.
40026    # The splitting of arguments from the executable at a space might have been incorrect,
40027    # since paths with space are more likely in Windows. Give it another try with the whole
40028    # argument.
40029    path="$complete"
40030    arguments="EOL"
40031    new_path=`$CYGPATH -u "$path"`
40032    new_path=`$WHICH "$new_path" 2> /dev/null`
40033    # bat and cmd files are not always considered executable in cygwin causing which
40034    # to not find them
40035    if test "x$new_path" = x \
40036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40038      new_path=`$CYGPATH -u "$path"`
40039    fi
40040    if test "x$new_path" = x; then
40041      # It's still not found. Now this is an unrecoverable error.
40042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40043$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40044      has_space=`$ECHO "$complete" | $GREP " "`
40045      if test "x$has_space" != x; then
40046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40048      fi
40049      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40050    fi
40051  fi
40052
40053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40056  # "foo.exe" is OK but "foo" is an error.
40057  #
40058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40059  # It is also a way to make sure we got the proper file name for the real test later on.
40060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40061  if test "x$test_shortpath" = x; then
40062    # Short path failed, file does not exist as specified.
40063    # Try adding .exe or .cmd
40064    if test -f "${new_path}.exe"; then
40065      input_to_shortpath="${new_path}.exe"
40066    elif test -f "${new_path}.cmd"; then
40067      input_to_shortpath="${new_path}.cmd"
40068    else
40069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40070$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40073      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40074    fi
40075  else
40076    input_to_shortpath="$new_path"
40077  fi
40078
40079  # Call helper function which possibly converts this using DOS-style short mode.
40080  # If so, the updated path is stored in $new_path.
40081  new_path="$input_to_shortpath"
40082
40083  input_path="$input_to_shortpath"
40084  # Check if we need to convert this using DOS-style short mode. If the path
40085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40086  # take no chances and rewrite it.
40087  # Note: m4 eats our [], so we need to use [ and ] instead.
40088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40089  if test "x$has_forbidden_chars" != x; then
40090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40094      # Going to short mode and back again did indeed matter. Since short mode is
40095      # case insensitive, let's make it lowercase to improve readability.
40096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40097      # Now convert it back to Unix-style (cygpath)
40098      input_path=`$CYGPATH -u "$shortmode_path"`
40099      new_path="$input_path"
40100    fi
40101  fi
40102
40103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40104  if test "x$test_cygdrive_prefix" = x; then
40105    # As a simple fix, exclude /usr/bin since it's not a real path.
40106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40108      # a path prefixed by /cygdrive for fixpath to work.
40109      new_path="$CYGWIN_ROOT_PATH$input_path"
40110    fi
40111  fi
40112
40113  # remove trailing .exe if any
40114  new_path="${new_path/%.exe/}"
40115
40116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40117
40118  # First separate the path from the arguments. This will split at the first
40119  # space.
40120  complete="$DUMPBIN"
40121  path="${complete%% *}"
40122  tmp="$complete EOL"
40123  arguments="${tmp#* }"
40124
40125  # Input might be given as Windows format, start by converting to
40126  # unix format.
40127  new_path="$path"
40128
40129  windows_path="$new_path"
40130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40131    unix_path=`$CYGPATH -u "$windows_path"`
40132    new_path="$unix_path"
40133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40135    new_path="$unix_path"
40136  fi
40137
40138
40139  # Now try to locate executable using which
40140  new_path=`$WHICH "$new_path" 2> /dev/null`
40141
40142  if test "x$new_path" = x; then
40143    # Oops. Which didn't find the executable.
40144    # The splitting of arguments from the executable at a space might have been incorrect,
40145    # since paths with space are more likely in Windows. Give it another try with the whole
40146    # argument.
40147    path="$complete"
40148    arguments="EOL"
40149    new_path="$path"
40150
40151  windows_path="$new_path"
40152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40153    unix_path=`$CYGPATH -u "$windows_path"`
40154    new_path="$unix_path"
40155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40157    new_path="$unix_path"
40158  fi
40159
40160
40161    new_path=`$WHICH "$new_path" 2> /dev/null`
40162    # bat and cmd files are not always considered executable in MSYS causing which
40163    # to not find them
40164    if test "x$new_path" = x \
40165        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40166        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40167      new_path="$path"
40168
40169  windows_path="$new_path"
40170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40171    unix_path=`$CYGPATH -u "$windows_path"`
40172    new_path="$unix_path"
40173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40175    new_path="$unix_path"
40176  fi
40177
40178    fi
40179
40180    if test "x$new_path" = x; then
40181      # It's still not found. Now this is an unrecoverable error.
40182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40183$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40184      has_space=`$ECHO "$complete" | $GREP " "`
40185      if test "x$has_space" != x; then
40186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40188      fi
40189      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40190    fi
40191  fi
40192
40193  # Now new_path has a complete unix path to the binary
40194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40195    # Keep paths in /bin as-is, but remove trailing .exe if any
40196    new_path="${new_path/%.exe/}"
40197    # Do not save /bin paths to all_fixpath_prefixes!
40198  else
40199    # Not in mixed or Windows style, start by that.
40200    new_path=`cmd //c echo $new_path`
40201
40202  input_path="$new_path"
40203  # Check if we need to convert this using DOS-style short mode. If the path
40204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40205  # take no chances and rewrite it.
40206  # Note: m4 eats our [], so we need to use [ and ] instead.
40207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40208  if test "x$has_forbidden_chars" != x; then
40209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40211  fi
40212
40213    # Output is in $new_path
40214
40215  windows_path="$new_path"
40216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40217    unix_path=`$CYGPATH -u "$windows_path"`
40218    new_path="$unix_path"
40219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40221    new_path="$unix_path"
40222  fi
40223
40224    # remove trailing .exe if any
40225    new_path="${new_path/%.exe/}"
40226
40227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40229  fi
40230
40231    else
40232      # We're on a unix platform. Hooray! :)
40233      # First separate the path from the arguments. This will split at the first
40234      # space.
40235      complete="$DUMPBIN"
40236      path="${complete%% *}"
40237      tmp="$complete EOL"
40238      arguments="${tmp#* }"
40239
40240      # Cannot rely on the command "which" here since it doesn't always work.
40241      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40242      if test -z "$is_absolute_path"; then
40243        # Path to executable is not absolute. Find it.
40244        IFS_save="$IFS"
40245        IFS=:
40246        for p in $PATH; do
40247          if test -f "$p/$path" && test -x "$p/$path"; then
40248            new_path="$p/$path"
40249            break
40250          fi
40251        done
40252        IFS="$IFS_save"
40253      else
40254        # This is an absolute path, we can use it without further modifications.
40255        new_path="$path"
40256      fi
40257
40258      if test "x$new_path" = x; then
40259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40260$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40261        has_space=`$ECHO "$complete" | $GREP " "`
40262        if test "x$has_space" != x; then
40263          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40265        fi
40266        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40267      fi
40268    fi
40269
40270    # Now join together the path and the arguments once again
40271    if test "x$arguments" != xEOL; then
40272      new_complete="$new_path ${arguments% *}"
40273    else
40274      new_complete="$new_path"
40275    fi
40276
40277    if test "x$complete" != "x$new_complete"; then
40278      DUMPBIN="$new_complete"
40279      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40280$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40281    fi
40282  fi
40283
40284    # We need to check for 'msbuild.exe' because at the place where we expect to
40285    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40286    # won't find the 'msbuild.exe' executable in that case (and the
40287    # 'ac_executable_extensions' is unusable due to performance reasons).
40288    # Notice that we intentionally don't fix up the path to MSBUILD because we
40289    # will call it in a DOS shell during freetype detection on Windows (see
40290    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40291    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40292set dummy msbuild.exe; ac_word=$2
40293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40294$as_echo_n "checking for $ac_word... " >&6; }
40295if ${ac_cv_prog_MSBUILD+:} false; then :
40296  $as_echo_n "(cached) " >&6
40297else
40298  if test -n "$MSBUILD"; then
40299  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40300else
40301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40302for as_dir in $PATH
40303do
40304  IFS=$as_save_IFS
40305  test -z "$as_dir" && as_dir=.
40306    for ac_exec_ext in '' $ac_executable_extensions; do
40307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40308    ac_cv_prog_MSBUILD="msbuild.exe"
40309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40310    break 2
40311  fi
40312done
40313  done
40314IFS=$as_save_IFS
40315
40316fi
40317fi
40318MSBUILD=$ac_cv_prog_MSBUILD
40319if test -n "$MSBUILD"; then
40320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40321$as_echo "$MSBUILD" >&6; }
40322else
40323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40324$as_echo "no" >&6; }
40325fi
40326
40327
40328  fi
40329
40330  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40331
40332
40333  # Publish this variable in the help.
40334
40335
40336  if [ -z "${STRIP+x}" ]; then
40337    # The variable is not set by user, try to locate tool using the code snippet
40338    for ac_prog in strip
40339do
40340  # Extract the first word of "$ac_prog", so it can be a program name with args.
40341set dummy $ac_prog; ac_word=$2
40342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40343$as_echo_n "checking for $ac_word... " >&6; }
40344if ${ac_cv_path_STRIP+:} false; then :
40345  $as_echo_n "(cached) " >&6
40346else
40347  case $STRIP in
40348  [\\/]* | ?:[\\/]*)
40349  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40350  ;;
40351  *)
40352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40353for as_dir in $PATH
40354do
40355  IFS=$as_save_IFS
40356  test -z "$as_dir" && as_dir=.
40357    for ac_exec_ext in '' $ac_executable_extensions; do
40358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40359    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40361    break 2
40362  fi
40363done
40364  done
40365IFS=$as_save_IFS
40366
40367  ;;
40368esac
40369fi
40370STRIP=$ac_cv_path_STRIP
40371if test -n "$STRIP"; then
40372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40373$as_echo "$STRIP" >&6; }
40374else
40375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40376$as_echo "no" >&6; }
40377fi
40378
40379
40380  test -n "$STRIP" && break
40381done
40382
40383  else
40384    # The variable is set, but is it from the command line or the environment?
40385
40386    # Try to remove the string !STRIP! from our list.
40387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40389      # If it failed, the variable was not from the command line. Ignore it,
40390      # but warn the user (except for BASH, which is always set by the calling BASH).
40391      if test "xSTRIP" != xBASH; then
40392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40393$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40394      fi
40395      # Try to locate tool using the code snippet
40396      for ac_prog in strip
40397do
40398  # Extract the first word of "$ac_prog", so it can be a program name with args.
40399set dummy $ac_prog; ac_word=$2
40400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40401$as_echo_n "checking for $ac_word... " >&6; }
40402if ${ac_cv_path_STRIP+:} false; then :
40403  $as_echo_n "(cached) " >&6
40404else
40405  case $STRIP in
40406  [\\/]* | ?:[\\/]*)
40407  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40408  ;;
40409  *)
40410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40411for as_dir in $PATH
40412do
40413  IFS=$as_save_IFS
40414  test -z "$as_dir" && as_dir=.
40415    for ac_exec_ext in '' $ac_executable_extensions; do
40416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40417    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40419    break 2
40420  fi
40421done
40422  done
40423IFS=$as_save_IFS
40424
40425  ;;
40426esac
40427fi
40428STRIP=$ac_cv_path_STRIP
40429if test -n "$STRIP"; then
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40431$as_echo "$STRIP" >&6; }
40432else
40433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40434$as_echo "no" >&6; }
40435fi
40436
40437
40438  test -n "$STRIP" && break
40439done
40440
40441    else
40442      # If it succeeded, then it was overridden by the user. We will use it
40443      # for the tool.
40444
40445      # First remove it from the list of overridden variables, so we can test
40446      # for unknown variables in the end.
40447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40448
40449      # Check if we try to supply an empty value
40450      if test "x$STRIP" = x; then
40451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40452$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40454$as_echo_n "checking for STRIP... " >&6; }
40455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40456$as_echo "disabled" >&6; }
40457      else
40458        # Check if the provided tool contains a complete path.
40459        tool_specified="$STRIP"
40460        tool_basename="${tool_specified##*/}"
40461        if test "x$tool_basename" = "x$tool_specified"; then
40462          # A command without a complete path is provided, search $PATH.
40463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40464$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40465          # Extract the first word of "$tool_basename", so it can be a program name with args.
40466set dummy $tool_basename; ac_word=$2
40467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40468$as_echo_n "checking for $ac_word... " >&6; }
40469if ${ac_cv_path_STRIP+:} false; then :
40470  $as_echo_n "(cached) " >&6
40471else
40472  case $STRIP in
40473  [\\/]* | ?:[\\/]*)
40474  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40475  ;;
40476  *)
40477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40478for as_dir in $PATH
40479do
40480  IFS=$as_save_IFS
40481  test -z "$as_dir" && as_dir=.
40482    for ac_exec_ext in '' $ac_executable_extensions; do
40483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40484    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40486    break 2
40487  fi
40488done
40489  done
40490IFS=$as_save_IFS
40491
40492  ;;
40493esac
40494fi
40495STRIP=$ac_cv_path_STRIP
40496if test -n "$STRIP"; then
40497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40498$as_echo "$STRIP" >&6; }
40499else
40500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40501$as_echo "no" >&6; }
40502fi
40503
40504
40505          if test "x$STRIP" = x; then
40506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40507          fi
40508        else
40509          # Otherwise we believe it is a complete path. Use it as it is.
40510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40511$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40513$as_echo_n "checking for STRIP... " >&6; }
40514          if test ! -x "$tool_specified"; then
40515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40516$as_echo "not found" >&6; }
40517            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40518          fi
40519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40520$as_echo "$tool_specified" >&6; }
40521        fi
40522      fi
40523    fi
40524
40525  fi
40526
40527
40528
40529  # Only process if variable expands to non-empty
40530
40531  if test "x$STRIP" != x; then
40532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40533
40534  # First separate the path from the arguments. This will split at the first
40535  # space.
40536  complete="$STRIP"
40537  path="${complete%% *}"
40538  tmp="$complete EOL"
40539  arguments="${tmp#* }"
40540
40541  # Input might be given as Windows format, start by converting to
40542  # unix format.
40543  new_path=`$CYGPATH -u "$path"`
40544
40545  # Now try to locate executable using which
40546  new_path=`$WHICH "$new_path" 2> /dev/null`
40547  # bat and cmd files are not always considered executable in cygwin causing which
40548  # to not find them
40549  if test "x$new_path" = x \
40550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40552    new_path=`$CYGPATH -u "$path"`
40553  fi
40554  if test "x$new_path" = x; then
40555    # Oops. Which didn't find the executable.
40556    # The splitting of arguments from the executable at a space might have been incorrect,
40557    # since paths with space are more likely in Windows. Give it another try with the whole
40558    # argument.
40559    path="$complete"
40560    arguments="EOL"
40561    new_path=`$CYGPATH -u "$path"`
40562    new_path=`$WHICH "$new_path" 2> /dev/null`
40563    # bat and cmd files are not always considered executable in cygwin causing which
40564    # to not find them
40565    if test "x$new_path" = x \
40566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40568      new_path=`$CYGPATH -u "$path"`
40569    fi
40570    if test "x$new_path" = x; then
40571      # It's still not found. Now this is an unrecoverable error.
40572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40573$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40574      has_space=`$ECHO "$complete" | $GREP " "`
40575      if test "x$has_space" != x; then
40576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40578      fi
40579      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40580    fi
40581  fi
40582
40583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40586  # "foo.exe" is OK but "foo" is an error.
40587  #
40588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40589  # It is also a way to make sure we got the proper file name for the real test later on.
40590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40591  if test "x$test_shortpath" = x; then
40592    # Short path failed, file does not exist as specified.
40593    # Try adding .exe or .cmd
40594    if test -f "${new_path}.exe"; then
40595      input_to_shortpath="${new_path}.exe"
40596    elif test -f "${new_path}.cmd"; then
40597      input_to_shortpath="${new_path}.cmd"
40598    else
40599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40600$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40603      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40604    fi
40605  else
40606    input_to_shortpath="$new_path"
40607  fi
40608
40609  # Call helper function which possibly converts this using DOS-style short mode.
40610  # If so, the updated path is stored in $new_path.
40611  new_path="$input_to_shortpath"
40612
40613  input_path="$input_to_shortpath"
40614  # Check if we need to convert this using DOS-style short mode. If the path
40615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40616  # take no chances and rewrite it.
40617  # Note: m4 eats our [], so we need to use [ and ] instead.
40618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40619  if test "x$has_forbidden_chars" != x; then
40620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40624      # Going to short mode and back again did indeed matter. Since short mode is
40625      # case insensitive, let's make it lowercase to improve readability.
40626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40627      # Now convert it back to Unix-style (cygpath)
40628      input_path=`$CYGPATH -u "$shortmode_path"`
40629      new_path="$input_path"
40630    fi
40631  fi
40632
40633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40634  if test "x$test_cygdrive_prefix" = x; then
40635    # As a simple fix, exclude /usr/bin since it's not a real path.
40636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40638      # a path prefixed by /cygdrive for fixpath to work.
40639      new_path="$CYGWIN_ROOT_PATH$input_path"
40640    fi
40641  fi
40642
40643  # remove trailing .exe if any
40644  new_path="${new_path/%.exe/}"
40645
40646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40647
40648  # First separate the path from the arguments. This will split at the first
40649  # space.
40650  complete="$STRIP"
40651  path="${complete%% *}"
40652  tmp="$complete EOL"
40653  arguments="${tmp#* }"
40654
40655  # Input might be given as Windows format, start by converting to
40656  # unix format.
40657  new_path="$path"
40658
40659  windows_path="$new_path"
40660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40661    unix_path=`$CYGPATH -u "$windows_path"`
40662    new_path="$unix_path"
40663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40665    new_path="$unix_path"
40666  fi
40667
40668
40669  # Now try to locate executable using which
40670  new_path=`$WHICH "$new_path" 2> /dev/null`
40671
40672  if test "x$new_path" = x; then
40673    # Oops. Which didn't find the executable.
40674    # The splitting of arguments from the executable at a space might have been incorrect,
40675    # since paths with space are more likely in Windows. Give it another try with the whole
40676    # argument.
40677    path="$complete"
40678    arguments="EOL"
40679    new_path="$path"
40680
40681  windows_path="$new_path"
40682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40683    unix_path=`$CYGPATH -u "$windows_path"`
40684    new_path="$unix_path"
40685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40687    new_path="$unix_path"
40688  fi
40689
40690
40691    new_path=`$WHICH "$new_path" 2> /dev/null`
40692    # bat and cmd files are not always considered executable in MSYS causing which
40693    # to not find them
40694    if test "x$new_path" = x \
40695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40697      new_path="$path"
40698
40699  windows_path="$new_path"
40700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40701    unix_path=`$CYGPATH -u "$windows_path"`
40702    new_path="$unix_path"
40703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40705    new_path="$unix_path"
40706  fi
40707
40708    fi
40709
40710    if test "x$new_path" = x; then
40711      # It's still not found. Now this is an unrecoverable error.
40712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40713$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40714      has_space=`$ECHO "$complete" | $GREP " "`
40715      if test "x$has_space" != x; then
40716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40718      fi
40719      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40720    fi
40721  fi
40722
40723  # Now new_path has a complete unix path to the binary
40724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40725    # Keep paths in /bin as-is, but remove trailing .exe if any
40726    new_path="${new_path/%.exe/}"
40727    # Do not save /bin paths to all_fixpath_prefixes!
40728  else
40729    # Not in mixed or Windows style, start by that.
40730    new_path=`cmd //c echo $new_path`
40731
40732  input_path="$new_path"
40733  # Check if we need to convert this using DOS-style short mode. If the path
40734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40735  # take no chances and rewrite it.
40736  # Note: m4 eats our [], so we need to use [ and ] instead.
40737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40738  if test "x$has_forbidden_chars" != x; then
40739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40741  fi
40742
40743    # Output is in $new_path
40744
40745  windows_path="$new_path"
40746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40747    unix_path=`$CYGPATH -u "$windows_path"`
40748    new_path="$unix_path"
40749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40751    new_path="$unix_path"
40752  fi
40753
40754    # remove trailing .exe if any
40755    new_path="${new_path/%.exe/}"
40756
40757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40759  fi
40760
40761    else
40762      # We're on a unix platform. Hooray! :)
40763      # First separate the path from the arguments. This will split at the first
40764      # space.
40765      complete="$STRIP"
40766      path="${complete%% *}"
40767      tmp="$complete EOL"
40768      arguments="${tmp#* }"
40769
40770      # Cannot rely on the command "which" here since it doesn't always work.
40771      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40772      if test -z "$is_absolute_path"; then
40773        # Path to executable is not absolute. Find it.
40774        IFS_save="$IFS"
40775        IFS=:
40776        for p in $PATH; do
40777          if test -f "$p/$path" && test -x "$p/$path"; then
40778            new_path="$p/$path"
40779            break
40780          fi
40781        done
40782        IFS="$IFS_save"
40783      else
40784        # This is an absolute path, we can use it without further modifications.
40785        new_path="$path"
40786      fi
40787
40788      if test "x$new_path" = x; then
40789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40790$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40791        has_space=`$ECHO "$complete" | $GREP " "`
40792        if test "x$has_space" != x; then
40793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40795        fi
40796        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40797      fi
40798    fi
40799
40800    # Now join together the path and the arguments once again
40801    if test "x$arguments" != xEOL; then
40802      new_complete="$new_path ${arguments% *}"
40803    else
40804      new_complete="$new_path"
40805    fi
40806
40807    if test "x$complete" != "x$new_complete"; then
40808      STRIP="$new_complete"
40809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40810$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40811    fi
40812  fi
40813
40814
40815
40816  # Publish this variable in the help.
40817
40818
40819  if [ -z "${NM+x}" ]; then
40820    # The variable is not set by user, try to locate tool using the code snippet
40821    for ac_prog in nm
40822do
40823  # Extract the first word of "$ac_prog", so it can be a program name with args.
40824set dummy $ac_prog; ac_word=$2
40825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40826$as_echo_n "checking for $ac_word... " >&6; }
40827if ${ac_cv_path_NM+:} false; then :
40828  $as_echo_n "(cached) " >&6
40829else
40830  case $NM in
40831  [\\/]* | ?:[\\/]*)
40832  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40833  ;;
40834  *)
40835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40836for as_dir in $PATH
40837do
40838  IFS=$as_save_IFS
40839  test -z "$as_dir" && as_dir=.
40840    for ac_exec_ext in '' $ac_executable_extensions; do
40841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40842    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40844    break 2
40845  fi
40846done
40847  done
40848IFS=$as_save_IFS
40849
40850  ;;
40851esac
40852fi
40853NM=$ac_cv_path_NM
40854if test -n "$NM"; then
40855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40856$as_echo "$NM" >&6; }
40857else
40858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40859$as_echo "no" >&6; }
40860fi
40861
40862
40863  test -n "$NM" && break
40864done
40865
40866  else
40867    # The variable is set, but is it from the command line or the environment?
40868
40869    # Try to remove the string !NM! from our list.
40870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40872      # If it failed, the variable was not from the command line. Ignore it,
40873      # but warn the user (except for BASH, which is always set by the calling BASH).
40874      if test "xNM" != xBASH; then
40875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40876$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40877      fi
40878      # Try to locate tool using the code snippet
40879      for ac_prog in nm
40880do
40881  # Extract the first word of "$ac_prog", so it can be a program name with args.
40882set dummy $ac_prog; ac_word=$2
40883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40884$as_echo_n "checking for $ac_word... " >&6; }
40885if ${ac_cv_path_NM+:} false; then :
40886  $as_echo_n "(cached) " >&6
40887else
40888  case $NM in
40889  [\\/]* | ?:[\\/]*)
40890  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40891  ;;
40892  *)
40893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40894for as_dir in $PATH
40895do
40896  IFS=$as_save_IFS
40897  test -z "$as_dir" && as_dir=.
40898    for ac_exec_ext in '' $ac_executable_extensions; do
40899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40900    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40902    break 2
40903  fi
40904done
40905  done
40906IFS=$as_save_IFS
40907
40908  ;;
40909esac
40910fi
40911NM=$ac_cv_path_NM
40912if test -n "$NM"; then
40913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40914$as_echo "$NM" >&6; }
40915else
40916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40917$as_echo "no" >&6; }
40918fi
40919
40920
40921  test -n "$NM" && break
40922done
40923
40924    else
40925      # If it succeeded, then it was overridden by the user. We will use it
40926      # for the tool.
40927
40928      # First remove it from the list of overridden variables, so we can test
40929      # for unknown variables in the end.
40930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40931
40932      # Check if we try to supply an empty value
40933      if test "x$NM" = x; then
40934        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40935$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40937$as_echo_n "checking for NM... " >&6; }
40938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40939$as_echo "disabled" >&6; }
40940      else
40941        # Check if the provided tool contains a complete path.
40942        tool_specified="$NM"
40943        tool_basename="${tool_specified##*/}"
40944        if test "x$tool_basename" = "x$tool_specified"; then
40945          # A command without a complete path is provided, search $PATH.
40946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40947$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40948          # Extract the first word of "$tool_basename", so it can be a program name with args.
40949set dummy $tool_basename; ac_word=$2
40950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40951$as_echo_n "checking for $ac_word... " >&6; }
40952if ${ac_cv_path_NM+:} false; then :
40953  $as_echo_n "(cached) " >&6
40954else
40955  case $NM in
40956  [\\/]* | ?:[\\/]*)
40957  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40958  ;;
40959  *)
40960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40961for as_dir in $PATH
40962do
40963  IFS=$as_save_IFS
40964  test -z "$as_dir" && as_dir=.
40965    for ac_exec_ext in '' $ac_executable_extensions; do
40966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40967    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40969    break 2
40970  fi
40971done
40972  done
40973IFS=$as_save_IFS
40974
40975  ;;
40976esac
40977fi
40978NM=$ac_cv_path_NM
40979if test -n "$NM"; then
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40981$as_echo "$NM" >&6; }
40982else
40983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40984$as_echo "no" >&6; }
40985fi
40986
40987
40988          if test "x$NM" = x; then
40989            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40990          fi
40991        else
40992          # Otherwise we believe it is a complete path. Use it as it is.
40993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40994$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40995          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40996$as_echo_n "checking for NM... " >&6; }
40997          if test ! -x "$tool_specified"; then
40998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40999$as_echo "not found" >&6; }
41000            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41001          fi
41002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41003$as_echo "$tool_specified" >&6; }
41004        fi
41005      fi
41006    fi
41007
41008  fi
41009
41010
41011
41012  # Only process if variable expands to non-empty
41013
41014  if test "x$NM" != x; then
41015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41016
41017  # First separate the path from the arguments. This will split at the first
41018  # space.
41019  complete="$NM"
41020  path="${complete%% *}"
41021  tmp="$complete EOL"
41022  arguments="${tmp#* }"
41023
41024  # Input might be given as Windows format, start by converting to
41025  # unix format.
41026  new_path=`$CYGPATH -u "$path"`
41027
41028  # Now try to locate executable using which
41029  new_path=`$WHICH "$new_path" 2> /dev/null`
41030  # bat and cmd files are not always considered executable in cygwin causing which
41031  # to not find them
41032  if test "x$new_path" = x \
41033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41035    new_path=`$CYGPATH -u "$path"`
41036  fi
41037  if test "x$new_path" = x; then
41038    # Oops. Which didn't find the executable.
41039    # The splitting of arguments from the executable at a space might have been incorrect,
41040    # since paths with space are more likely in Windows. Give it another try with the whole
41041    # argument.
41042    path="$complete"
41043    arguments="EOL"
41044    new_path=`$CYGPATH -u "$path"`
41045    new_path=`$WHICH "$new_path" 2> /dev/null`
41046    # bat and cmd files are not always considered executable in cygwin causing which
41047    # to not find them
41048    if test "x$new_path" = x \
41049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41051      new_path=`$CYGPATH -u "$path"`
41052    fi
41053    if test "x$new_path" = x; then
41054      # It's still not found. Now this is an unrecoverable error.
41055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41056$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41057      has_space=`$ECHO "$complete" | $GREP " "`
41058      if test "x$has_space" != x; then
41059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41061      fi
41062      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41063    fi
41064  fi
41065
41066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41069  # "foo.exe" is OK but "foo" is an error.
41070  #
41071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41072  # It is also a way to make sure we got the proper file name for the real test later on.
41073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41074  if test "x$test_shortpath" = x; then
41075    # Short path failed, file does not exist as specified.
41076    # Try adding .exe or .cmd
41077    if test -f "${new_path}.exe"; then
41078      input_to_shortpath="${new_path}.exe"
41079    elif test -f "${new_path}.cmd"; then
41080      input_to_shortpath="${new_path}.cmd"
41081    else
41082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41083$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41086      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41087    fi
41088  else
41089    input_to_shortpath="$new_path"
41090  fi
41091
41092  # Call helper function which possibly converts this using DOS-style short mode.
41093  # If so, the updated path is stored in $new_path.
41094  new_path="$input_to_shortpath"
41095
41096  input_path="$input_to_shortpath"
41097  # Check if we need to convert this using DOS-style short mode. If the path
41098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41099  # take no chances and rewrite it.
41100  # Note: m4 eats our [], so we need to use [ and ] instead.
41101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41102  if test "x$has_forbidden_chars" != x; then
41103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41107      # Going to short mode and back again did indeed matter. Since short mode is
41108      # case insensitive, let's make it lowercase to improve readability.
41109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41110      # Now convert it back to Unix-style (cygpath)
41111      input_path=`$CYGPATH -u "$shortmode_path"`
41112      new_path="$input_path"
41113    fi
41114  fi
41115
41116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41117  if test "x$test_cygdrive_prefix" = x; then
41118    # As a simple fix, exclude /usr/bin since it's not a real path.
41119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41121      # a path prefixed by /cygdrive for fixpath to work.
41122      new_path="$CYGWIN_ROOT_PATH$input_path"
41123    fi
41124  fi
41125
41126  # remove trailing .exe if any
41127  new_path="${new_path/%.exe/}"
41128
41129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41130
41131  # First separate the path from the arguments. This will split at the first
41132  # space.
41133  complete="$NM"
41134  path="${complete%% *}"
41135  tmp="$complete EOL"
41136  arguments="${tmp#* }"
41137
41138  # Input might be given as Windows format, start by converting to
41139  # unix format.
41140  new_path="$path"
41141
41142  windows_path="$new_path"
41143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41144    unix_path=`$CYGPATH -u "$windows_path"`
41145    new_path="$unix_path"
41146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41148    new_path="$unix_path"
41149  fi
41150
41151
41152  # Now try to locate executable using which
41153  new_path=`$WHICH "$new_path" 2> /dev/null`
41154
41155  if test "x$new_path" = x; then
41156    # Oops. Which didn't find the executable.
41157    # The splitting of arguments from the executable at a space might have been incorrect,
41158    # since paths with space are more likely in Windows. Give it another try with the whole
41159    # argument.
41160    path="$complete"
41161    arguments="EOL"
41162    new_path="$path"
41163
41164  windows_path="$new_path"
41165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41166    unix_path=`$CYGPATH -u "$windows_path"`
41167    new_path="$unix_path"
41168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41170    new_path="$unix_path"
41171  fi
41172
41173
41174    new_path=`$WHICH "$new_path" 2> /dev/null`
41175    # bat and cmd files are not always considered executable in MSYS causing which
41176    # to not find them
41177    if test "x$new_path" = x \
41178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41180      new_path="$path"
41181
41182  windows_path="$new_path"
41183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41184    unix_path=`$CYGPATH -u "$windows_path"`
41185    new_path="$unix_path"
41186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41188    new_path="$unix_path"
41189  fi
41190
41191    fi
41192
41193    if test "x$new_path" = x; then
41194      # It's still not found. Now this is an unrecoverable error.
41195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41196$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41197      has_space=`$ECHO "$complete" | $GREP " "`
41198      if test "x$has_space" != x; then
41199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41201      fi
41202      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41203    fi
41204  fi
41205
41206  # Now new_path has a complete unix path to the binary
41207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41208    # Keep paths in /bin as-is, but remove trailing .exe if any
41209    new_path="${new_path/%.exe/}"
41210    # Do not save /bin paths to all_fixpath_prefixes!
41211  else
41212    # Not in mixed or Windows style, start by that.
41213    new_path=`cmd //c echo $new_path`
41214
41215  input_path="$new_path"
41216  # Check if we need to convert this using DOS-style short mode. If the path
41217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41218  # take no chances and rewrite it.
41219  # Note: m4 eats our [], so we need to use [ and ] instead.
41220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41221  if test "x$has_forbidden_chars" != x; then
41222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41224  fi
41225
41226    # Output is in $new_path
41227
41228  windows_path="$new_path"
41229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41230    unix_path=`$CYGPATH -u "$windows_path"`
41231    new_path="$unix_path"
41232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41234    new_path="$unix_path"
41235  fi
41236
41237    # remove trailing .exe if any
41238    new_path="${new_path/%.exe/}"
41239
41240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41242  fi
41243
41244    else
41245      # We're on a unix platform. Hooray! :)
41246      # First separate the path from the arguments. This will split at the first
41247      # space.
41248      complete="$NM"
41249      path="${complete%% *}"
41250      tmp="$complete EOL"
41251      arguments="${tmp#* }"
41252
41253      # Cannot rely on the command "which" here since it doesn't always work.
41254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41255      if test -z "$is_absolute_path"; then
41256        # Path to executable is not absolute. Find it.
41257        IFS_save="$IFS"
41258        IFS=:
41259        for p in $PATH; do
41260          if test -f "$p/$path" && test -x "$p/$path"; then
41261            new_path="$p/$path"
41262            break
41263          fi
41264        done
41265        IFS="$IFS_save"
41266      else
41267        # This is an absolute path, we can use it without further modifications.
41268        new_path="$path"
41269      fi
41270
41271      if test "x$new_path" = x; then
41272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41273$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41274        has_space=`$ECHO "$complete" | $GREP " "`
41275        if test "x$has_space" != x; then
41276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41278        fi
41279        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41280      fi
41281    fi
41282
41283    # Now join together the path and the arguments once again
41284    if test "x$arguments" != xEOL; then
41285      new_complete="$new_path ${arguments% *}"
41286    else
41287      new_complete="$new_path"
41288    fi
41289
41290    if test "x$complete" != "x$new_complete"; then
41291      NM="$new_complete"
41292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41293$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41294    fi
41295  fi
41296
41297
41298
41299  # Publish this variable in the help.
41300
41301
41302  if [ -z "${GNM+x}" ]; then
41303    # The variable is not set by user, try to locate tool using the code snippet
41304    for ac_prog in gnm
41305do
41306  # Extract the first word of "$ac_prog", so it can be a program name with args.
41307set dummy $ac_prog; ac_word=$2
41308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41309$as_echo_n "checking for $ac_word... " >&6; }
41310if ${ac_cv_path_GNM+:} false; then :
41311  $as_echo_n "(cached) " >&6
41312else
41313  case $GNM in
41314  [\\/]* | ?:[\\/]*)
41315  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41316  ;;
41317  *)
41318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41319for as_dir in $PATH
41320do
41321  IFS=$as_save_IFS
41322  test -z "$as_dir" && as_dir=.
41323    for ac_exec_ext in '' $ac_executable_extensions; do
41324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41325    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41327    break 2
41328  fi
41329done
41330  done
41331IFS=$as_save_IFS
41332
41333  ;;
41334esac
41335fi
41336GNM=$ac_cv_path_GNM
41337if test -n "$GNM"; then
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41339$as_echo "$GNM" >&6; }
41340else
41341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41342$as_echo "no" >&6; }
41343fi
41344
41345
41346  test -n "$GNM" && break
41347done
41348
41349  else
41350    # The variable is set, but is it from the command line or the environment?
41351
41352    # Try to remove the string !GNM! from our list.
41353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41355      # If it failed, the variable was not from the command line. Ignore it,
41356      # but warn the user (except for BASH, which is always set by the calling BASH).
41357      if test "xGNM" != xBASH; then
41358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41359$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41360      fi
41361      # Try to locate tool using the code snippet
41362      for ac_prog in gnm
41363do
41364  # Extract the first word of "$ac_prog", so it can be a program name with args.
41365set dummy $ac_prog; ac_word=$2
41366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41367$as_echo_n "checking for $ac_word... " >&6; }
41368if ${ac_cv_path_GNM+:} false; then :
41369  $as_echo_n "(cached) " >&6
41370else
41371  case $GNM in
41372  [\\/]* | ?:[\\/]*)
41373  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41374  ;;
41375  *)
41376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41377for as_dir in $PATH
41378do
41379  IFS=$as_save_IFS
41380  test -z "$as_dir" && as_dir=.
41381    for ac_exec_ext in '' $ac_executable_extensions; do
41382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41383    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41385    break 2
41386  fi
41387done
41388  done
41389IFS=$as_save_IFS
41390
41391  ;;
41392esac
41393fi
41394GNM=$ac_cv_path_GNM
41395if test -n "$GNM"; then
41396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41397$as_echo "$GNM" >&6; }
41398else
41399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41400$as_echo "no" >&6; }
41401fi
41402
41403
41404  test -n "$GNM" && break
41405done
41406
41407    else
41408      # If it succeeded, then it was overridden by the user. We will use it
41409      # for the tool.
41410
41411      # First remove it from the list of overridden variables, so we can test
41412      # for unknown variables in the end.
41413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41414
41415      # Check if we try to supply an empty value
41416      if test "x$GNM" = x; then
41417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41418$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41420$as_echo_n "checking for GNM... " >&6; }
41421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41422$as_echo "disabled" >&6; }
41423      else
41424        # Check if the provided tool contains a complete path.
41425        tool_specified="$GNM"
41426        tool_basename="${tool_specified##*/}"
41427        if test "x$tool_basename" = "x$tool_specified"; then
41428          # A command without a complete path is provided, search $PATH.
41429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41430$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41431          # Extract the first word of "$tool_basename", so it can be a program name with args.
41432set dummy $tool_basename; ac_word=$2
41433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41434$as_echo_n "checking for $ac_word... " >&6; }
41435if ${ac_cv_path_GNM+:} false; then :
41436  $as_echo_n "(cached) " >&6
41437else
41438  case $GNM in
41439  [\\/]* | ?:[\\/]*)
41440  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41441  ;;
41442  *)
41443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41444for as_dir in $PATH
41445do
41446  IFS=$as_save_IFS
41447  test -z "$as_dir" && as_dir=.
41448    for ac_exec_ext in '' $ac_executable_extensions; do
41449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41450    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41452    break 2
41453  fi
41454done
41455  done
41456IFS=$as_save_IFS
41457
41458  ;;
41459esac
41460fi
41461GNM=$ac_cv_path_GNM
41462if test -n "$GNM"; then
41463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41464$as_echo "$GNM" >&6; }
41465else
41466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41467$as_echo "no" >&6; }
41468fi
41469
41470
41471          if test "x$GNM" = x; then
41472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41473          fi
41474        else
41475          # Otherwise we believe it is a complete path. Use it as it is.
41476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41477$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41479$as_echo_n "checking for GNM... " >&6; }
41480          if test ! -x "$tool_specified"; then
41481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41482$as_echo "not found" >&6; }
41483            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41484          fi
41485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41486$as_echo "$tool_specified" >&6; }
41487        fi
41488      fi
41489    fi
41490
41491  fi
41492
41493
41494
41495  # Only process if variable expands to non-empty
41496
41497  if test "x$GNM" != x; then
41498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41499
41500  # First separate the path from the arguments. This will split at the first
41501  # space.
41502  complete="$GNM"
41503  path="${complete%% *}"
41504  tmp="$complete EOL"
41505  arguments="${tmp#* }"
41506
41507  # Input might be given as Windows format, start by converting to
41508  # unix format.
41509  new_path=`$CYGPATH -u "$path"`
41510
41511  # Now try to locate executable using which
41512  new_path=`$WHICH "$new_path" 2> /dev/null`
41513  # bat and cmd files are not always considered executable in cygwin causing which
41514  # to not find them
41515  if test "x$new_path" = x \
41516      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41517      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41518    new_path=`$CYGPATH -u "$path"`
41519  fi
41520  if test "x$new_path" = x; then
41521    # Oops. Which didn't find the executable.
41522    # The splitting of arguments from the executable at a space might have been incorrect,
41523    # since paths with space are more likely in Windows. Give it another try with the whole
41524    # argument.
41525    path="$complete"
41526    arguments="EOL"
41527    new_path=`$CYGPATH -u "$path"`
41528    new_path=`$WHICH "$new_path" 2> /dev/null`
41529    # bat and cmd files are not always considered executable in cygwin causing which
41530    # to not find them
41531    if test "x$new_path" = x \
41532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41534      new_path=`$CYGPATH -u "$path"`
41535    fi
41536    if test "x$new_path" = x; then
41537      # It's still not found. Now this is an unrecoverable error.
41538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41539$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41540      has_space=`$ECHO "$complete" | $GREP " "`
41541      if test "x$has_space" != x; then
41542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41544      fi
41545      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41546    fi
41547  fi
41548
41549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41552  # "foo.exe" is OK but "foo" is an error.
41553  #
41554  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41555  # It is also a way to make sure we got the proper file name for the real test later on.
41556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41557  if test "x$test_shortpath" = x; then
41558    # Short path failed, file does not exist as specified.
41559    # Try adding .exe or .cmd
41560    if test -f "${new_path}.exe"; then
41561      input_to_shortpath="${new_path}.exe"
41562    elif test -f "${new_path}.cmd"; then
41563      input_to_shortpath="${new_path}.cmd"
41564    else
41565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41566$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41569      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41570    fi
41571  else
41572    input_to_shortpath="$new_path"
41573  fi
41574
41575  # Call helper function which possibly converts this using DOS-style short mode.
41576  # If so, the updated path is stored in $new_path.
41577  new_path="$input_to_shortpath"
41578
41579  input_path="$input_to_shortpath"
41580  # Check if we need to convert this using DOS-style short mode. If the path
41581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41582  # take no chances and rewrite it.
41583  # Note: m4 eats our [], so we need to use [ and ] instead.
41584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41585  if test "x$has_forbidden_chars" != x; then
41586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41590      # Going to short mode and back again did indeed matter. Since short mode is
41591      # case insensitive, let's make it lowercase to improve readability.
41592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41593      # Now convert it back to Unix-style (cygpath)
41594      input_path=`$CYGPATH -u "$shortmode_path"`
41595      new_path="$input_path"
41596    fi
41597  fi
41598
41599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41600  if test "x$test_cygdrive_prefix" = x; then
41601    # As a simple fix, exclude /usr/bin since it's not a real path.
41602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41604      # a path prefixed by /cygdrive for fixpath to work.
41605      new_path="$CYGWIN_ROOT_PATH$input_path"
41606    fi
41607  fi
41608
41609  # remove trailing .exe if any
41610  new_path="${new_path/%.exe/}"
41611
41612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41613
41614  # First separate the path from the arguments. This will split at the first
41615  # space.
41616  complete="$GNM"
41617  path="${complete%% *}"
41618  tmp="$complete EOL"
41619  arguments="${tmp#* }"
41620
41621  # Input might be given as Windows format, start by converting to
41622  # unix format.
41623  new_path="$path"
41624
41625  windows_path="$new_path"
41626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41627    unix_path=`$CYGPATH -u "$windows_path"`
41628    new_path="$unix_path"
41629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41631    new_path="$unix_path"
41632  fi
41633
41634
41635  # Now try to locate executable using which
41636  new_path=`$WHICH "$new_path" 2> /dev/null`
41637
41638  if test "x$new_path" = x; then
41639    # Oops. Which didn't find the executable.
41640    # The splitting of arguments from the executable at a space might have been incorrect,
41641    # since paths with space are more likely in Windows. Give it another try with the whole
41642    # argument.
41643    path="$complete"
41644    arguments="EOL"
41645    new_path="$path"
41646
41647  windows_path="$new_path"
41648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41649    unix_path=`$CYGPATH -u "$windows_path"`
41650    new_path="$unix_path"
41651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41653    new_path="$unix_path"
41654  fi
41655
41656
41657    new_path=`$WHICH "$new_path" 2> /dev/null`
41658    # bat and cmd files are not always considered executable in MSYS causing which
41659    # to not find them
41660    if test "x$new_path" = x \
41661        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41662        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41663      new_path="$path"
41664
41665  windows_path="$new_path"
41666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41667    unix_path=`$CYGPATH -u "$windows_path"`
41668    new_path="$unix_path"
41669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41671    new_path="$unix_path"
41672  fi
41673
41674    fi
41675
41676    if test "x$new_path" = x; then
41677      # It's still not found. Now this is an unrecoverable error.
41678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41679$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41680      has_space=`$ECHO "$complete" | $GREP " "`
41681      if test "x$has_space" != x; then
41682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41684      fi
41685      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41686    fi
41687  fi
41688
41689  # Now new_path has a complete unix path to the binary
41690  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41691    # Keep paths in /bin as-is, but remove trailing .exe if any
41692    new_path="${new_path/%.exe/}"
41693    # Do not save /bin paths to all_fixpath_prefixes!
41694  else
41695    # Not in mixed or Windows style, start by that.
41696    new_path=`cmd //c echo $new_path`
41697
41698  input_path="$new_path"
41699  # Check if we need to convert this using DOS-style short mode. If the path
41700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41701  # take no chances and rewrite it.
41702  # Note: m4 eats our [], so we need to use [ and ] instead.
41703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41704  if test "x$has_forbidden_chars" != x; then
41705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41707  fi
41708
41709    # Output is in $new_path
41710
41711  windows_path="$new_path"
41712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41713    unix_path=`$CYGPATH -u "$windows_path"`
41714    new_path="$unix_path"
41715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41717    new_path="$unix_path"
41718  fi
41719
41720    # remove trailing .exe if any
41721    new_path="${new_path/%.exe/}"
41722
41723    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41724    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41725  fi
41726
41727    else
41728      # We're on a unix platform. Hooray! :)
41729      # First separate the path from the arguments. This will split at the first
41730      # space.
41731      complete="$GNM"
41732      path="${complete%% *}"
41733      tmp="$complete EOL"
41734      arguments="${tmp#* }"
41735
41736      # Cannot rely on the command "which" here since it doesn't always work.
41737      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41738      if test -z "$is_absolute_path"; then
41739        # Path to executable is not absolute. Find it.
41740        IFS_save="$IFS"
41741        IFS=:
41742        for p in $PATH; do
41743          if test -f "$p/$path" && test -x "$p/$path"; then
41744            new_path="$p/$path"
41745            break
41746          fi
41747        done
41748        IFS="$IFS_save"
41749      else
41750        # This is an absolute path, we can use it without further modifications.
41751        new_path="$path"
41752      fi
41753
41754      if test "x$new_path" = x; then
41755        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41756$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41757        has_space=`$ECHO "$complete" | $GREP " "`
41758        if test "x$has_space" != x; then
41759          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41760$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41761        fi
41762        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41763      fi
41764    fi
41765
41766    # Now join together the path and the arguments once again
41767    if test "x$arguments" != xEOL; then
41768      new_complete="$new_path ${arguments% *}"
41769    else
41770      new_complete="$new_path"
41771    fi
41772
41773    if test "x$complete" != "x$new_complete"; then
41774      GNM="$new_complete"
41775      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41776$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41777    fi
41778  fi
41779
41780  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41781    # FIXME: we should unify this with the solaris case above.
41782
41783
41784  # Publish this variable in the help.
41785
41786
41787  if [ -z "${STRIP+x}" ]; then
41788    # The variable is not set by user, try to locate tool using the code snippet
41789    if test -n "$ac_tool_prefix"; then
41790  for ac_prog in strip
41791  do
41792    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41793set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41795$as_echo_n "checking for $ac_word... " >&6; }
41796if ${ac_cv_prog_STRIP+:} false; then :
41797  $as_echo_n "(cached) " >&6
41798else
41799  if test -n "$STRIP"; then
41800  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41801else
41802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41803for as_dir in $PATH
41804do
41805  IFS=$as_save_IFS
41806  test -z "$as_dir" && as_dir=.
41807    for ac_exec_ext in '' $ac_executable_extensions; do
41808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41809    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41811    break 2
41812  fi
41813done
41814  done
41815IFS=$as_save_IFS
41816
41817fi
41818fi
41819STRIP=$ac_cv_prog_STRIP
41820if test -n "$STRIP"; then
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41822$as_echo "$STRIP" >&6; }
41823else
41824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41825$as_echo "no" >&6; }
41826fi
41827
41828
41829    test -n "$STRIP" && break
41830  done
41831fi
41832if test -z "$STRIP"; then
41833  ac_ct_STRIP=$STRIP
41834  for ac_prog in strip
41835do
41836  # Extract the first word of "$ac_prog", so it can be a program name with args.
41837set dummy $ac_prog; ac_word=$2
41838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41839$as_echo_n "checking for $ac_word... " >&6; }
41840if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41841  $as_echo_n "(cached) " >&6
41842else
41843  if test -n "$ac_ct_STRIP"; then
41844  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41845else
41846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41847for as_dir in $PATH
41848do
41849  IFS=$as_save_IFS
41850  test -z "$as_dir" && as_dir=.
41851    for ac_exec_ext in '' $ac_executable_extensions; do
41852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41853    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41855    break 2
41856  fi
41857done
41858  done
41859IFS=$as_save_IFS
41860
41861fi
41862fi
41863ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41864if test -n "$ac_ct_STRIP"; then
41865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41866$as_echo "$ac_ct_STRIP" >&6; }
41867else
41868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41869$as_echo "no" >&6; }
41870fi
41871
41872
41873  test -n "$ac_ct_STRIP" && break
41874done
41875
41876  if test "x$ac_ct_STRIP" = x; then
41877    STRIP=""
41878  else
41879    case $cross_compiling:$ac_tool_warned in
41880yes:)
41881{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41882$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41883ac_tool_warned=yes ;;
41884esac
41885    STRIP=$ac_ct_STRIP
41886  fi
41887fi
41888
41889  else
41890    # The variable is set, but is it from the command line or the environment?
41891
41892    # Try to remove the string !STRIP! from our list.
41893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41895      # If it failed, the variable was not from the command line. Ignore it,
41896      # but warn the user (except for BASH, which is always set by the calling BASH).
41897      if test "xSTRIP" != xBASH; then
41898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41899$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41900      fi
41901      # Try to locate tool using the code snippet
41902      if test -n "$ac_tool_prefix"; then
41903  for ac_prog in strip
41904  do
41905    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41906set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41908$as_echo_n "checking for $ac_word... " >&6; }
41909if ${ac_cv_prog_STRIP+:} false; then :
41910  $as_echo_n "(cached) " >&6
41911else
41912  if test -n "$STRIP"; then
41913  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41914else
41915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41916for as_dir in $PATH
41917do
41918  IFS=$as_save_IFS
41919  test -z "$as_dir" && as_dir=.
41920    for ac_exec_ext in '' $ac_executable_extensions; do
41921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41922    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41924    break 2
41925  fi
41926done
41927  done
41928IFS=$as_save_IFS
41929
41930fi
41931fi
41932STRIP=$ac_cv_prog_STRIP
41933if test -n "$STRIP"; then
41934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41935$as_echo "$STRIP" >&6; }
41936else
41937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41938$as_echo "no" >&6; }
41939fi
41940
41941
41942    test -n "$STRIP" && break
41943  done
41944fi
41945if test -z "$STRIP"; then
41946  ac_ct_STRIP=$STRIP
41947  for ac_prog in strip
41948do
41949  # Extract the first word of "$ac_prog", so it can be a program name with args.
41950set dummy $ac_prog; ac_word=$2
41951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41952$as_echo_n "checking for $ac_word... " >&6; }
41953if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41954  $as_echo_n "(cached) " >&6
41955else
41956  if test -n "$ac_ct_STRIP"; then
41957  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41958else
41959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41960for as_dir in $PATH
41961do
41962  IFS=$as_save_IFS
41963  test -z "$as_dir" && as_dir=.
41964    for ac_exec_ext in '' $ac_executable_extensions; do
41965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41966    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41968    break 2
41969  fi
41970done
41971  done
41972IFS=$as_save_IFS
41973
41974fi
41975fi
41976ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41977if test -n "$ac_ct_STRIP"; then
41978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41979$as_echo "$ac_ct_STRIP" >&6; }
41980else
41981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41982$as_echo "no" >&6; }
41983fi
41984
41985
41986  test -n "$ac_ct_STRIP" && break
41987done
41988
41989  if test "x$ac_ct_STRIP" = x; then
41990    STRIP=""
41991  else
41992    case $cross_compiling:$ac_tool_warned in
41993yes:)
41994{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41995$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41996ac_tool_warned=yes ;;
41997esac
41998    STRIP=$ac_ct_STRIP
41999  fi
42000fi
42001
42002    else
42003      # If it succeeded, then it was overridden by the user. We will use it
42004      # for the tool.
42005
42006      # First remove it from the list of overridden variables, so we can test
42007      # for unknown variables in the end.
42008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42009
42010      # Check if we try to supply an empty value
42011      if test "x$STRIP" = x; then
42012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42013$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42015$as_echo_n "checking for STRIP... " >&6; }
42016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42017$as_echo "disabled" >&6; }
42018      else
42019        # Check if the provided tool contains a complete path.
42020        tool_specified="$STRIP"
42021        tool_basename="${tool_specified##*/}"
42022        if test "x$tool_basename" = "x$tool_specified"; then
42023          # A command without a complete path is provided, search $PATH.
42024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42025$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42026          # Extract the first word of "$tool_basename", so it can be a program name with args.
42027set dummy $tool_basename; ac_word=$2
42028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42029$as_echo_n "checking for $ac_word... " >&6; }
42030if ${ac_cv_path_STRIP+:} false; then :
42031  $as_echo_n "(cached) " >&6
42032else
42033  case $STRIP in
42034  [\\/]* | ?:[\\/]*)
42035  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42036  ;;
42037  *)
42038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42039for as_dir in $PATH
42040do
42041  IFS=$as_save_IFS
42042  test -z "$as_dir" && as_dir=.
42043    for ac_exec_ext in '' $ac_executable_extensions; do
42044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42045    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42047    break 2
42048  fi
42049done
42050  done
42051IFS=$as_save_IFS
42052
42053  ;;
42054esac
42055fi
42056STRIP=$ac_cv_path_STRIP
42057if test -n "$STRIP"; then
42058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42059$as_echo "$STRIP" >&6; }
42060else
42061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42062$as_echo "no" >&6; }
42063fi
42064
42065
42066          if test "x$STRIP" = x; then
42067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42068          fi
42069        else
42070          # Otherwise we believe it is a complete path. Use it as it is.
42071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42072$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42074$as_echo_n "checking for STRIP... " >&6; }
42075          if test ! -x "$tool_specified"; then
42076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42077$as_echo "not found" >&6; }
42078            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42079          fi
42080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42081$as_echo "$tool_specified" >&6; }
42082        fi
42083      fi
42084    fi
42085
42086  fi
42087
42088
42089
42090  # Only process if variable expands to non-empty
42091
42092  if test "x$STRIP" != x; then
42093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42094
42095  # First separate the path from the arguments. This will split at the first
42096  # space.
42097  complete="$STRIP"
42098  path="${complete%% *}"
42099  tmp="$complete EOL"
42100  arguments="${tmp#* }"
42101
42102  # Input might be given as Windows format, start by converting to
42103  # unix format.
42104  new_path=`$CYGPATH -u "$path"`
42105
42106  # Now try to locate executable using which
42107  new_path=`$WHICH "$new_path" 2> /dev/null`
42108  # bat and cmd files are not always considered executable in cygwin causing which
42109  # to not find them
42110  if test "x$new_path" = x \
42111      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42112      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42113    new_path=`$CYGPATH -u "$path"`
42114  fi
42115  if test "x$new_path" = x; then
42116    # Oops. Which didn't find the executable.
42117    # The splitting of arguments from the executable at a space might have been incorrect,
42118    # since paths with space are more likely in Windows. Give it another try with the whole
42119    # argument.
42120    path="$complete"
42121    arguments="EOL"
42122    new_path=`$CYGPATH -u "$path"`
42123    new_path=`$WHICH "$new_path" 2> /dev/null`
42124    # bat and cmd files are not always considered executable in cygwin causing which
42125    # to not find them
42126    if test "x$new_path" = x \
42127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42129      new_path=`$CYGPATH -u "$path"`
42130    fi
42131    if test "x$new_path" = x; then
42132      # It's still not found. Now this is an unrecoverable error.
42133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42134$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42135      has_space=`$ECHO "$complete" | $GREP " "`
42136      if test "x$has_space" != x; then
42137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42139      fi
42140      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42141    fi
42142  fi
42143
42144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42147  # "foo.exe" is OK but "foo" is an error.
42148  #
42149  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42150  # It is also a way to make sure we got the proper file name for the real test later on.
42151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42152  if test "x$test_shortpath" = x; then
42153    # Short path failed, file does not exist as specified.
42154    # Try adding .exe or .cmd
42155    if test -f "${new_path}.exe"; then
42156      input_to_shortpath="${new_path}.exe"
42157    elif test -f "${new_path}.cmd"; then
42158      input_to_shortpath="${new_path}.cmd"
42159    else
42160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42161$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42162      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42163$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42164      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42165    fi
42166  else
42167    input_to_shortpath="$new_path"
42168  fi
42169
42170  # Call helper function which possibly converts this using DOS-style short mode.
42171  # If so, the updated path is stored in $new_path.
42172  new_path="$input_to_shortpath"
42173
42174  input_path="$input_to_shortpath"
42175  # Check if we need to convert this using DOS-style short mode. If the path
42176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42177  # take no chances and rewrite it.
42178  # Note: m4 eats our [], so we need to use [ and ] instead.
42179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42180  if test "x$has_forbidden_chars" != x; then
42181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42185      # Going to short mode and back again did indeed matter. Since short mode is
42186      # case insensitive, let's make it lowercase to improve readability.
42187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42188      # Now convert it back to Unix-style (cygpath)
42189      input_path=`$CYGPATH -u "$shortmode_path"`
42190      new_path="$input_path"
42191    fi
42192  fi
42193
42194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42195  if test "x$test_cygdrive_prefix" = x; then
42196    # As a simple fix, exclude /usr/bin since it's not a real path.
42197    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42199      # a path prefixed by /cygdrive for fixpath to work.
42200      new_path="$CYGWIN_ROOT_PATH$input_path"
42201    fi
42202  fi
42203
42204  # remove trailing .exe if any
42205  new_path="${new_path/%.exe/}"
42206
42207    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42208
42209  # First separate the path from the arguments. This will split at the first
42210  # space.
42211  complete="$STRIP"
42212  path="${complete%% *}"
42213  tmp="$complete EOL"
42214  arguments="${tmp#* }"
42215
42216  # Input might be given as Windows format, start by converting to
42217  # unix format.
42218  new_path="$path"
42219
42220  windows_path="$new_path"
42221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42222    unix_path=`$CYGPATH -u "$windows_path"`
42223    new_path="$unix_path"
42224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42226    new_path="$unix_path"
42227  fi
42228
42229
42230  # Now try to locate executable using which
42231  new_path=`$WHICH "$new_path" 2> /dev/null`
42232
42233  if test "x$new_path" = x; then
42234    # Oops. Which didn't find the executable.
42235    # The splitting of arguments from the executable at a space might have been incorrect,
42236    # since paths with space are more likely in Windows. Give it another try with the whole
42237    # argument.
42238    path="$complete"
42239    arguments="EOL"
42240    new_path="$path"
42241
42242  windows_path="$new_path"
42243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42244    unix_path=`$CYGPATH -u "$windows_path"`
42245    new_path="$unix_path"
42246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42248    new_path="$unix_path"
42249  fi
42250
42251
42252    new_path=`$WHICH "$new_path" 2> /dev/null`
42253    # bat and cmd files are not always considered executable in MSYS causing which
42254    # to not find them
42255    if test "x$new_path" = x \
42256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42258      new_path="$path"
42259
42260  windows_path="$new_path"
42261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42262    unix_path=`$CYGPATH -u "$windows_path"`
42263    new_path="$unix_path"
42264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42266    new_path="$unix_path"
42267  fi
42268
42269    fi
42270
42271    if test "x$new_path" = x; then
42272      # It's still not found. Now this is an unrecoverable error.
42273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42274$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42275      has_space=`$ECHO "$complete" | $GREP " "`
42276      if test "x$has_space" != x; then
42277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42279      fi
42280      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42281    fi
42282  fi
42283
42284  # Now new_path has a complete unix path to the binary
42285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42286    # Keep paths in /bin as-is, but remove trailing .exe if any
42287    new_path="${new_path/%.exe/}"
42288    # Do not save /bin paths to all_fixpath_prefixes!
42289  else
42290    # Not in mixed or Windows style, start by that.
42291    new_path=`cmd //c echo $new_path`
42292
42293  input_path="$new_path"
42294  # Check if we need to convert this using DOS-style short mode. If the path
42295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42296  # take no chances and rewrite it.
42297  # Note: m4 eats our [], so we need to use [ and ] instead.
42298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42299  if test "x$has_forbidden_chars" != x; then
42300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42302  fi
42303
42304    # Output is in $new_path
42305
42306  windows_path="$new_path"
42307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42308    unix_path=`$CYGPATH -u "$windows_path"`
42309    new_path="$unix_path"
42310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42312    new_path="$unix_path"
42313  fi
42314
42315    # remove trailing .exe if any
42316    new_path="${new_path/%.exe/}"
42317
42318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42320  fi
42321
42322    else
42323      # We're on a unix platform. Hooray! :)
42324      # First separate the path from the arguments. This will split at the first
42325      # space.
42326      complete="$STRIP"
42327      path="${complete%% *}"
42328      tmp="$complete EOL"
42329      arguments="${tmp#* }"
42330
42331      # Cannot rely on the command "which" here since it doesn't always work.
42332      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42333      if test -z "$is_absolute_path"; then
42334        # Path to executable is not absolute. Find it.
42335        IFS_save="$IFS"
42336        IFS=:
42337        for p in $PATH; do
42338          if test -f "$p/$path" && test -x "$p/$path"; then
42339            new_path="$p/$path"
42340            break
42341          fi
42342        done
42343        IFS="$IFS_save"
42344      else
42345        # This is an absolute path, we can use it without further modifications.
42346        new_path="$path"
42347      fi
42348
42349      if test "x$new_path" = x; then
42350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42351$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42352        has_space=`$ECHO "$complete" | $GREP " "`
42353        if test "x$has_space" != x; then
42354          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42355$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42356        fi
42357        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42358      fi
42359    fi
42360
42361    # Now join together the path and the arguments once again
42362    if test "x$arguments" != xEOL; then
42363      new_complete="$new_path ${arguments% *}"
42364    else
42365      new_complete="$new_path"
42366    fi
42367
42368    if test "x$complete" != "x$new_complete"; then
42369      STRIP="$new_complete"
42370      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42371$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42372    fi
42373  fi
42374
42375    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42376
42377
42378  # Publish this variable in the help.
42379
42380
42381  if [ -z "${NM+x}" ]; then
42382    # The variable is not set by user, try to locate tool using the code snippet
42383    if test -n "$ac_tool_prefix"; then
42384  for ac_prog in nm gcc-nm
42385  do
42386    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42389$as_echo_n "checking for $ac_word... " >&6; }
42390if ${ac_cv_prog_NM+:} false; then :
42391  $as_echo_n "(cached) " >&6
42392else
42393  if test -n "$NM"; then
42394  ac_cv_prog_NM="$NM" # Let the user override the test.
42395else
42396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42397for as_dir in $PATH
42398do
42399  IFS=$as_save_IFS
42400  test -z "$as_dir" && as_dir=.
42401    for ac_exec_ext in '' $ac_executable_extensions; do
42402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42403    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42405    break 2
42406  fi
42407done
42408  done
42409IFS=$as_save_IFS
42410
42411fi
42412fi
42413NM=$ac_cv_prog_NM
42414if test -n "$NM"; then
42415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42416$as_echo "$NM" >&6; }
42417else
42418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42419$as_echo "no" >&6; }
42420fi
42421
42422
42423    test -n "$NM" && break
42424  done
42425fi
42426if test -z "$NM"; then
42427  ac_ct_NM=$NM
42428  for ac_prog in nm gcc-nm
42429do
42430  # Extract the first word of "$ac_prog", so it can be a program name with args.
42431set dummy $ac_prog; ac_word=$2
42432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42433$as_echo_n "checking for $ac_word... " >&6; }
42434if ${ac_cv_prog_ac_ct_NM+:} false; then :
42435  $as_echo_n "(cached) " >&6
42436else
42437  if test -n "$ac_ct_NM"; then
42438  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42439else
42440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42441for as_dir in $PATH
42442do
42443  IFS=$as_save_IFS
42444  test -z "$as_dir" && as_dir=.
42445    for ac_exec_ext in '' $ac_executable_extensions; do
42446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42447    ac_cv_prog_ac_ct_NM="$ac_prog"
42448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42449    break 2
42450  fi
42451done
42452  done
42453IFS=$as_save_IFS
42454
42455fi
42456fi
42457ac_ct_NM=$ac_cv_prog_ac_ct_NM
42458if test -n "$ac_ct_NM"; then
42459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42460$as_echo "$ac_ct_NM" >&6; }
42461else
42462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42463$as_echo "no" >&6; }
42464fi
42465
42466
42467  test -n "$ac_ct_NM" && break
42468done
42469
42470  if test "x$ac_ct_NM" = x; then
42471    NM=""
42472  else
42473    case $cross_compiling:$ac_tool_warned in
42474yes:)
42475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42477ac_tool_warned=yes ;;
42478esac
42479    NM=$ac_ct_NM
42480  fi
42481fi
42482
42483  else
42484    # The variable is set, but is it from the command line or the environment?
42485
42486    # Try to remove the string !NM! from our list.
42487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42489      # If it failed, the variable was not from the command line. Ignore it,
42490      # but warn the user (except for BASH, which is always set by the calling BASH).
42491      if test "xNM" != xBASH; then
42492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42493$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42494      fi
42495      # Try to locate tool using the code snippet
42496      if test -n "$ac_tool_prefix"; then
42497  for ac_prog in nm gcc-nm
42498  do
42499    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42500set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42502$as_echo_n "checking for $ac_word... " >&6; }
42503if ${ac_cv_prog_NM+:} false; then :
42504  $as_echo_n "(cached) " >&6
42505else
42506  if test -n "$NM"; then
42507  ac_cv_prog_NM="$NM" # Let the user override the test.
42508else
42509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42510for as_dir in $PATH
42511do
42512  IFS=$as_save_IFS
42513  test -z "$as_dir" && as_dir=.
42514    for ac_exec_ext in '' $ac_executable_extensions; do
42515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42516    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42518    break 2
42519  fi
42520done
42521  done
42522IFS=$as_save_IFS
42523
42524fi
42525fi
42526NM=$ac_cv_prog_NM
42527if test -n "$NM"; then
42528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42529$as_echo "$NM" >&6; }
42530else
42531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42532$as_echo "no" >&6; }
42533fi
42534
42535
42536    test -n "$NM" && break
42537  done
42538fi
42539if test -z "$NM"; then
42540  ac_ct_NM=$NM
42541  for ac_prog in nm gcc-nm
42542do
42543  # Extract the first word of "$ac_prog", so it can be a program name with args.
42544set dummy $ac_prog; ac_word=$2
42545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42546$as_echo_n "checking for $ac_word... " >&6; }
42547if ${ac_cv_prog_ac_ct_NM+:} false; then :
42548  $as_echo_n "(cached) " >&6
42549else
42550  if test -n "$ac_ct_NM"; then
42551  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42552else
42553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42554for as_dir in $PATH
42555do
42556  IFS=$as_save_IFS
42557  test -z "$as_dir" && as_dir=.
42558    for ac_exec_ext in '' $ac_executable_extensions; do
42559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42560    ac_cv_prog_ac_ct_NM="$ac_prog"
42561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42562    break 2
42563  fi
42564done
42565  done
42566IFS=$as_save_IFS
42567
42568fi
42569fi
42570ac_ct_NM=$ac_cv_prog_ac_ct_NM
42571if test -n "$ac_ct_NM"; then
42572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42573$as_echo "$ac_ct_NM" >&6; }
42574else
42575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42576$as_echo "no" >&6; }
42577fi
42578
42579
42580  test -n "$ac_ct_NM" && break
42581done
42582
42583  if test "x$ac_ct_NM" = x; then
42584    NM=""
42585  else
42586    case $cross_compiling:$ac_tool_warned in
42587yes:)
42588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42590ac_tool_warned=yes ;;
42591esac
42592    NM=$ac_ct_NM
42593  fi
42594fi
42595
42596    else
42597      # If it succeeded, then it was overridden by the user. We will use it
42598      # for the tool.
42599
42600      # First remove it from the list of overridden variables, so we can test
42601      # for unknown variables in the end.
42602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42603
42604      # Check if we try to supply an empty value
42605      if test "x$NM" = x; then
42606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42607$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42609$as_echo_n "checking for NM... " >&6; }
42610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42611$as_echo "disabled" >&6; }
42612      else
42613        # Check if the provided tool contains a complete path.
42614        tool_specified="$NM"
42615        tool_basename="${tool_specified##*/}"
42616        if test "x$tool_basename" = "x$tool_specified"; then
42617          # A command without a complete path is provided, search $PATH.
42618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42619$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42620          # Extract the first word of "$tool_basename", so it can be a program name with args.
42621set dummy $tool_basename; ac_word=$2
42622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42623$as_echo_n "checking for $ac_word... " >&6; }
42624if ${ac_cv_path_NM+:} false; then :
42625  $as_echo_n "(cached) " >&6
42626else
42627  case $NM in
42628  [\\/]* | ?:[\\/]*)
42629  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42630  ;;
42631  *)
42632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42633for as_dir in $PATH
42634do
42635  IFS=$as_save_IFS
42636  test -z "$as_dir" && as_dir=.
42637    for ac_exec_ext in '' $ac_executable_extensions; do
42638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42639    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42641    break 2
42642  fi
42643done
42644  done
42645IFS=$as_save_IFS
42646
42647  ;;
42648esac
42649fi
42650NM=$ac_cv_path_NM
42651if test -n "$NM"; then
42652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42653$as_echo "$NM" >&6; }
42654else
42655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42656$as_echo "no" >&6; }
42657fi
42658
42659
42660          if test "x$NM" = x; then
42661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42662          fi
42663        else
42664          # Otherwise we believe it is a complete path. Use it as it is.
42665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42666$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42668$as_echo_n "checking for NM... " >&6; }
42669          if test ! -x "$tool_specified"; then
42670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42671$as_echo "not found" >&6; }
42672            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42673          fi
42674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42675$as_echo "$tool_specified" >&6; }
42676        fi
42677      fi
42678    fi
42679
42680  fi
42681
42682
42683    else
42684
42685
42686  # Publish this variable in the help.
42687
42688
42689  if [ -z "${NM+x}" ]; then
42690    # The variable is not set by user, try to locate tool using the code snippet
42691    if test -n "$ac_tool_prefix"; then
42692  for ac_prog in nm
42693  do
42694    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42697$as_echo_n "checking for $ac_word... " >&6; }
42698if ${ac_cv_prog_NM+:} false; then :
42699  $as_echo_n "(cached) " >&6
42700else
42701  if test -n "$NM"; then
42702  ac_cv_prog_NM="$NM" # Let the user override the test.
42703else
42704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42705for as_dir in $PATH
42706do
42707  IFS=$as_save_IFS
42708  test -z "$as_dir" && as_dir=.
42709    for ac_exec_ext in '' $ac_executable_extensions; do
42710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42711    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42713    break 2
42714  fi
42715done
42716  done
42717IFS=$as_save_IFS
42718
42719fi
42720fi
42721NM=$ac_cv_prog_NM
42722if test -n "$NM"; then
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42724$as_echo "$NM" >&6; }
42725else
42726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42727$as_echo "no" >&6; }
42728fi
42729
42730
42731    test -n "$NM" && break
42732  done
42733fi
42734if test -z "$NM"; then
42735  ac_ct_NM=$NM
42736  for ac_prog in nm
42737do
42738  # Extract the first word of "$ac_prog", so it can be a program name with args.
42739set dummy $ac_prog; ac_word=$2
42740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42741$as_echo_n "checking for $ac_word... " >&6; }
42742if ${ac_cv_prog_ac_ct_NM+:} false; then :
42743  $as_echo_n "(cached) " >&6
42744else
42745  if test -n "$ac_ct_NM"; then
42746  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42747else
42748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42749for as_dir in $PATH
42750do
42751  IFS=$as_save_IFS
42752  test -z "$as_dir" && as_dir=.
42753    for ac_exec_ext in '' $ac_executable_extensions; do
42754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42755    ac_cv_prog_ac_ct_NM="$ac_prog"
42756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42757    break 2
42758  fi
42759done
42760  done
42761IFS=$as_save_IFS
42762
42763fi
42764fi
42765ac_ct_NM=$ac_cv_prog_ac_ct_NM
42766if test -n "$ac_ct_NM"; then
42767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42768$as_echo "$ac_ct_NM" >&6; }
42769else
42770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42771$as_echo "no" >&6; }
42772fi
42773
42774
42775  test -n "$ac_ct_NM" && break
42776done
42777
42778  if test "x$ac_ct_NM" = x; then
42779    NM=""
42780  else
42781    case $cross_compiling:$ac_tool_warned in
42782yes:)
42783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42785ac_tool_warned=yes ;;
42786esac
42787    NM=$ac_ct_NM
42788  fi
42789fi
42790
42791  else
42792    # The variable is set, but is it from the command line or the environment?
42793
42794    # Try to remove the string !NM! from our list.
42795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42797      # If it failed, the variable was not from the command line. Ignore it,
42798      # but warn the user (except for BASH, which is always set by the calling BASH).
42799      if test "xNM" != xBASH; then
42800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42801$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42802      fi
42803      # Try to locate tool using the code snippet
42804      if test -n "$ac_tool_prefix"; then
42805  for ac_prog in nm
42806  do
42807    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42808set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42810$as_echo_n "checking for $ac_word... " >&6; }
42811if ${ac_cv_prog_NM+:} false; then :
42812  $as_echo_n "(cached) " >&6
42813else
42814  if test -n "$NM"; then
42815  ac_cv_prog_NM="$NM" # Let the user override the test.
42816else
42817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42818for as_dir in $PATH
42819do
42820  IFS=$as_save_IFS
42821  test -z "$as_dir" && as_dir=.
42822    for ac_exec_ext in '' $ac_executable_extensions; do
42823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42824    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42826    break 2
42827  fi
42828done
42829  done
42830IFS=$as_save_IFS
42831
42832fi
42833fi
42834NM=$ac_cv_prog_NM
42835if test -n "$NM"; then
42836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42837$as_echo "$NM" >&6; }
42838else
42839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42840$as_echo "no" >&6; }
42841fi
42842
42843
42844    test -n "$NM" && break
42845  done
42846fi
42847if test -z "$NM"; then
42848  ac_ct_NM=$NM
42849  for ac_prog in nm
42850do
42851  # Extract the first word of "$ac_prog", so it can be a program name with args.
42852set dummy $ac_prog; ac_word=$2
42853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42854$as_echo_n "checking for $ac_word... " >&6; }
42855if ${ac_cv_prog_ac_ct_NM+:} false; then :
42856  $as_echo_n "(cached) " >&6
42857else
42858  if test -n "$ac_ct_NM"; then
42859  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42860else
42861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42862for as_dir in $PATH
42863do
42864  IFS=$as_save_IFS
42865  test -z "$as_dir" && as_dir=.
42866    for ac_exec_ext in '' $ac_executable_extensions; do
42867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42868    ac_cv_prog_ac_ct_NM="$ac_prog"
42869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42870    break 2
42871  fi
42872done
42873  done
42874IFS=$as_save_IFS
42875
42876fi
42877fi
42878ac_ct_NM=$ac_cv_prog_ac_ct_NM
42879if test -n "$ac_ct_NM"; then
42880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42881$as_echo "$ac_ct_NM" >&6; }
42882else
42883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42884$as_echo "no" >&6; }
42885fi
42886
42887
42888  test -n "$ac_ct_NM" && break
42889done
42890
42891  if test "x$ac_ct_NM" = x; then
42892    NM=""
42893  else
42894    case $cross_compiling:$ac_tool_warned in
42895yes:)
42896{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42897$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42898ac_tool_warned=yes ;;
42899esac
42900    NM=$ac_ct_NM
42901  fi
42902fi
42903
42904    else
42905      # If it succeeded, then it was overridden by the user. We will use it
42906      # for the tool.
42907
42908      # First remove it from the list of overridden variables, so we can test
42909      # for unknown variables in the end.
42910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42911
42912      # Check if we try to supply an empty value
42913      if test "x$NM" = x; then
42914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42915$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42917$as_echo_n "checking for NM... " >&6; }
42918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42919$as_echo "disabled" >&6; }
42920      else
42921        # Check if the provided tool contains a complete path.
42922        tool_specified="$NM"
42923        tool_basename="${tool_specified##*/}"
42924        if test "x$tool_basename" = "x$tool_specified"; then
42925          # A command without a complete path is provided, search $PATH.
42926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42927$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42928          # Extract the first word of "$tool_basename", so it can be a program name with args.
42929set dummy $tool_basename; ac_word=$2
42930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42931$as_echo_n "checking for $ac_word... " >&6; }
42932if ${ac_cv_path_NM+:} false; then :
42933  $as_echo_n "(cached) " >&6
42934else
42935  case $NM in
42936  [\\/]* | ?:[\\/]*)
42937  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42938  ;;
42939  *)
42940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42941for as_dir in $PATH
42942do
42943  IFS=$as_save_IFS
42944  test -z "$as_dir" && as_dir=.
42945    for ac_exec_ext in '' $ac_executable_extensions; do
42946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42947    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42949    break 2
42950  fi
42951done
42952  done
42953IFS=$as_save_IFS
42954
42955  ;;
42956esac
42957fi
42958NM=$ac_cv_path_NM
42959if test -n "$NM"; then
42960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42961$as_echo "$NM" >&6; }
42962else
42963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42964$as_echo "no" >&6; }
42965fi
42966
42967
42968          if test "x$NM" = x; then
42969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42970          fi
42971        else
42972          # Otherwise we believe it is a complete path. Use it as it is.
42973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42974$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42976$as_echo_n "checking for NM... " >&6; }
42977          if test ! -x "$tool_specified"; then
42978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42979$as_echo "not found" >&6; }
42980            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42981          fi
42982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42983$as_echo "$tool_specified" >&6; }
42984        fi
42985      fi
42986    fi
42987
42988  fi
42989
42990
42991    fi
42992
42993  # Only process if variable expands to non-empty
42994
42995  if test "x$NM" != x; then
42996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42997
42998  # First separate the path from the arguments. This will split at the first
42999  # space.
43000  complete="$NM"
43001  path="${complete%% *}"
43002  tmp="$complete EOL"
43003  arguments="${tmp#* }"
43004
43005  # Input might be given as Windows format, start by converting to
43006  # unix format.
43007  new_path=`$CYGPATH -u "$path"`
43008
43009  # Now try to locate executable using which
43010  new_path=`$WHICH "$new_path" 2> /dev/null`
43011  # bat and cmd files are not always considered executable in cygwin causing which
43012  # to not find them
43013  if test "x$new_path" = x \
43014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43016    new_path=`$CYGPATH -u "$path"`
43017  fi
43018  if test "x$new_path" = x; then
43019    # Oops. Which didn't find the executable.
43020    # The splitting of arguments from the executable at a space might have been incorrect,
43021    # since paths with space are more likely in Windows. Give it another try with the whole
43022    # argument.
43023    path="$complete"
43024    arguments="EOL"
43025    new_path=`$CYGPATH -u "$path"`
43026    new_path=`$WHICH "$new_path" 2> /dev/null`
43027    # bat and cmd files are not always considered executable in cygwin causing which
43028    # to not find them
43029    if test "x$new_path" = x \
43030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43032      new_path=`$CYGPATH -u "$path"`
43033    fi
43034    if test "x$new_path" = x; then
43035      # It's still not found. Now this is an unrecoverable error.
43036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43037$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43038      has_space=`$ECHO "$complete" | $GREP " "`
43039      if test "x$has_space" != x; then
43040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43042      fi
43043      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43044    fi
43045  fi
43046
43047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43050  # "foo.exe" is OK but "foo" is an error.
43051  #
43052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43053  # It is also a way to make sure we got the proper file name for the real test later on.
43054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43055  if test "x$test_shortpath" = x; then
43056    # Short path failed, file does not exist as specified.
43057    # Try adding .exe or .cmd
43058    if test -f "${new_path}.exe"; then
43059      input_to_shortpath="${new_path}.exe"
43060    elif test -f "${new_path}.cmd"; then
43061      input_to_shortpath="${new_path}.cmd"
43062    else
43063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43064$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43067      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43068    fi
43069  else
43070    input_to_shortpath="$new_path"
43071  fi
43072
43073  # Call helper function which possibly converts this using DOS-style short mode.
43074  # If so, the updated path is stored in $new_path.
43075  new_path="$input_to_shortpath"
43076
43077  input_path="$input_to_shortpath"
43078  # Check if we need to convert this using DOS-style short mode. If the path
43079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43080  # take no chances and rewrite it.
43081  # Note: m4 eats our [], so we need to use [ and ] instead.
43082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43083  if test "x$has_forbidden_chars" != x; then
43084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43088      # Going to short mode and back again did indeed matter. Since short mode is
43089      # case insensitive, let's make it lowercase to improve readability.
43090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43091      # Now convert it back to Unix-style (cygpath)
43092      input_path=`$CYGPATH -u "$shortmode_path"`
43093      new_path="$input_path"
43094    fi
43095  fi
43096
43097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43098  if test "x$test_cygdrive_prefix" = x; then
43099    # As a simple fix, exclude /usr/bin since it's not a real path.
43100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43102      # a path prefixed by /cygdrive for fixpath to work.
43103      new_path="$CYGWIN_ROOT_PATH$input_path"
43104    fi
43105  fi
43106
43107  # remove trailing .exe if any
43108  new_path="${new_path/%.exe/}"
43109
43110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43111
43112  # First separate the path from the arguments. This will split at the first
43113  # space.
43114  complete="$NM"
43115  path="${complete%% *}"
43116  tmp="$complete EOL"
43117  arguments="${tmp#* }"
43118
43119  # Input might be given as Windows format, start by converting to
43120  # unix format.
43121  new_path="$path"
43122
43123  windows_path="$new_path"
43124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43125    unix_path=`$CYGPATH -u "$windows_path"`
43126    new_path="$unix_path"
43127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43129    new_path="$unix_path"
43130  fi
43131
43132
43133  # Now try to locate executable using which
43134  new_path=`$WHICH "$new_path" 2> /dev/null`
43135
43136  if test "x$new_path" = x; then
43137    # Oops. Which didn't find the executable.
43138    # The splitting of arguments from the executable at a space might have been incorrect,
43139    # since paths with space are more likely in Windows. Give it another try with the whole
43140    # argument.
43141    path="$complete"
43142    arguments="EOL"
43143    new_path="$path"
43144
43145  windows_path="$new_path"
43146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43147    unix_path=`$CYGPATH -u "$windows_path"`
43148    new_path="$unix_path"
43149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43151    new_path="$unix_path"
43152  fi
43153
43154
43155    new_path=`$WHICH "$new_path" 2> /dev/null`
43156    # bat and cmd files are not always considered executable in MSYS causing which
43157    # to not find them
43158    if test "x$new_path" = x \
43159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43161      new_path="$path"
43162
43163  windows_path="$new_path"
43164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43165    unix_path=`$CYGPATH -u "$windows_path"`
43166    new_path="$unix_path"
43167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43169    new_path="$unix_path"
43170  fi
43171
43172    fi
43173
43174    if test "x$new_path" = x; then
43175      # It's still not found. Now this is an unrecoverable error.
43176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43177$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43178      has_space=`$ECHO "$complete" | $GREP " "`
43179      if test "x$has_space" != x; then
43180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43182      fi
43183      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43184    fi
43185  fi
43186
43187  # Now new_path has a complete unix path to the binary
43188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43189    # Keep paths in /bin as-is, but remove trailing .exe if any
43190    new_path="${new_path/%.exe/}"
43191    # Do not save /bin paths to all_fixpath_prefixes!
43192  else
43193    # Not in mixed or Windows style, start by that.
43194    new_path=`cmd //c echo $new_path`
43195
43196  input_path="$new_path"
43197  # Check if we need to convert this using DOS-style short mode. If the path
43198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43199  # take no chances and rewrite it.
43200  # Note: m4 eats our [], so we need to use [ and ] instead.
43201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43202  if test "x$has_forbidden_chars" != x; then
43203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43205  fi
43206
43207    # Output is in $new_path
43208
43209  windows_path="$new_path"
43210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43211    unix_path=`$CYGPATH -u "$windows_path"`
43212    new_path="$unix_path"
43213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43215    new_path="$unix_path"
43216  fi
43217
43218    # remove trailing .exe if any
43219    new_path="${new_path/%.exe/}"
43220
43221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43223  fi
43224
43225    else
43226      # We're on a unix platform. Hooray! :)
43227      # First separate the path from the arguments. This will split at the first
43228      # space.
43229      complete="$NM"
43230      path="${complete%% *}"
43231      tmp="$complete EOL"
43232      arguments="${tmp#* }"
43233
43234      # Cannot rely on the command "which" here since it doesn't always work.
43235      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43236      if test -z "$is_absolute_path"; then
43237        # Path to executable is not absolute. Find it.
43238        IFS_save="$IFS"
43239        IFS=:
43240        for p in $PATH; do
43241          if test -f "$p/$path" && test -x "$p/$path"; then
43242            new_path="$p/$path"
43243            break
43244          fi
43245        done
43246        IFS="$IFS_save"
43247      else
43248        # This is an absolute path, we can use it without further modifications.
43249        new_path="$path"
43250      fi
43251
43252      if test "x$new_path" = x; then
43253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43254$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43255        has_space=`$ECHO "$complete" | $GREP " "`
43256        if test "x$has_space" != x; then
43257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43259        fi
43260        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43261      fi
43262    fi
43263
43264    # Now join together the path and the arguments once again
43265    if test "x$arguments" != xEOL; then
43266      new_complete="$new_path ${arguments% *}"
43267    else
43268      new_complete="$new_path"
43269    fi
43270
43271    if test "x$complete" != "x$new_complete"; then
43272      NM="$new_complete"
43273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43274$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43275    fi
43276  fi
43277
43278    GNM="$NM"
43279
43280  fi
43281
43282  # objcopy is used for moving debug symbols to separate files when
43283  # full debug symbols are enabled.
43284  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43285
43286
43287  # Publish this variable in the help.
43288
43289
43290  if [ -z "${OBJCOPY+x}" ]; then
43291    # The variable is not set by user, try to locate tool using the code snippet
43292    if test -n "$ac_tool_prefix"; then
43293  for ac_prog in gobjcopy objcopy
43294  do
43295    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43296set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43298$as_echo_n "checking for $ac_word... " >&6; }
43299if ${ac_cv_prog_OBJCOPY+:} false; then :
43300  $as_echo_n "(cached) " >&6
43301else
43302  if test -n "$OBJCOPY"; then
43303  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43304else
43305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43306for as_dir in $PATH
43307do
43308  IFS=$as_save_IFS
43309  test -z "$as_dir" && as_dir=.
43310    for ac_exec_ext in '' $ac_executable_extensions; do
43311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43312    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43314    break 2
43315  fi
43316done
43317  done
43318IFS=$as_save_IFS
43319
43320fi
43321fi
43322OBJCOPY=$ac_cv_prog_OBJCOPY
43323if test -n "$OBJCOPY"; then
43324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43325$as_echo "$OBJCOPY" >&6; }
43326else
43327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43328$as_echo "no" >&6; }
43329fi
43330
43331
43332    test -n "$OBJCOPY" && break
43333  done
43334fi
43335if test -z "$OBJCOPY"; then
43336  ac_ct_OBJCOPY=$OBJCOPY
43337  for ac_prog in gobjcopy objcopy
43338do
43339  # Extract the first word of "$ac_prog", so it can be a program name with args.
43340set dummy $ac_prog; ac_word=$2
43341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43342$as_echo_n "checking for $ac_word... " >&6; }
43343if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43344  $as_echo_n "(cached) " >&6
43345else
43346  if test -n "$ac_ct_OBJCOPY"; then
43347  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43348else
43349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43350for as_dir in $PATH
43351do
43352  IFS=$as_save_IFS
43353  test -z "$as_dir" && as_dir=.
43354    for ac_exec_ext in '' $ac_executable_extensions; do
43355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43356    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43358    break 2
43359  fi
43360done
43361  done
43362IFS=$as_save_IFS
43363
43364fi
43365fi
43366ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43367if test -n "$ac_ct_OBJCOPY"; then
43368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43369$as_echo "$ac_ct_OBJCOPY" >&6; }
43370else
43371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43372$as_echo "no" >&6; }
43373fi
43374
43375
43376  test -n "$ac_ct_OBJCOPY" && break
43377done
43378
43379  if test "x$ac_ct_OBJCOPY" = x; then
43380    OBJCOPY=""
43381  else
43382    case $cross_compiling:$ac_tool_warned in
43383yes:)
43384{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43385$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43386ac_tool_warned=yes ;;
43387esac
43388    OBJCOPY=$ac_ct_OBJCOPY
43389  fi
43390fi
43391
43392  else
43393    # The variable is set, but is it from the command line or the environment?
43394
43395    # Try to remove the string !OBJCOPY! from our list.
43396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43398      # If it failed, the variable was not from the command line. Ignore it,
43399      # but warn the user (except for BASH, which is always set by the calling BASH).
43400      if test "xOBJCOPY" != xBASH; then
43401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43402$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43403      fi
43404      # Try to locate tool using the code snippet
43405      if test -n "$ac_tool_prefix"; then
43406  for ac_prog in gobjcopy objcopy
43407  do
43408    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43409set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43411$as_echo_n "checking for $ac_word... " >&6; }
43412if ${ac_cv_prog_OBJCOPY+:} false; then :
43413  $as_echo_n "(cached) " >&6
43414else
43415  if test -n "$OBJCOPY"; then
43416  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43417else
43418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43419for as_dir in $PATH
43420do
43421  IFS=$as_save_IFS
43422  test -z "$as_dir" && as_dir=.
43423    for ac_exec_ext in '' $ac_executable_extensions; do
43424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43425    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43427    break 2
43428  fi
43429done
43430  done
43431IFS=$as_save_IFS
43432
43433fi
43434fi
43435OBJCOPY=$ac_cv_prog_OBJCOPY
43436if test -n "$OBJCOPY"; then
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43438$as_echo "$OBJCOPY" >&6; }
43439else
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43441$as_echo "no" >&6; }
43442fi
43443
43444
43445    test -n "$OBJCOPY" && break
43446  done
43447fi
43448if test -z "$OBJCOPY"; then
43449  ac_ct_OBJCOPY=$OBJCOPY
43450  for ac_prog in gobjcopy objcopy
43451do
43452  # Extract the first word of "$ac_prog", so it can be a program name with args.
43453set dummy $ac_prog; ac_word=$2
43454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43455$as_echo_n "checking for $ac_word... " >&6; }
43456if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43457  $as_echo_n "(cached) " >&6
43458else
43459  if test -n "$ac_ct_OBJCOPY"; then
43460  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43461else
43462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43463for as_dir in $PATH
43464do
43465  IFS=$as_save_IFS
43466  test -z "$as_dir" && as_dir=.
43467    for ac_exec_ext in '' $ac_executable_extensions; do
43468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43469    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43471    break 2
43472  fi
43473done
43474  done
43475IFS=$as_save_IFS
43476
43477fi
43478fi
43479ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43480if test -n "$ac_ct_OBJCOPY"; then
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43482$as_echo "$ac_ct_OBJCOPY" >&6; }
43483else
43484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43485$as_echo "no" >&6; }
43486fi
43487
43488
43489  test -n "$ac_ct_OBJCOPY" && break
43490done
43491
43492  if test "x$ac_ct_OBJCOPY" = x; then
43493    OBJCOPY=""
43494  else
43495    case $cross_compiling:$ac_tool_warned in
43496yes:)
43497{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43498$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43499ac_tool_warned=yes ;;
43500esac
43501    OBJCOPY=$ac_ct_OBJCOPY
43502  fi
43503fi
43504
43505    else
43506      # If it succeeded, then it was overridden by the user. We will use it
43507      # for the tool.
43508
43509      # First remove it from the list of overridden variables, so we can test
43510      # for unknown variables in the end.
43511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43512
43513      # Check if we try to supply an empty value
43514      if test "x$OBJCOPY" = x; then
43515        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43516$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43518$as_echo_n "checking for OBJCOPY... " >&6; }
43519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43520$as_echo "disabled" >&6; }
43521      else
43522        # Check if the provided tool contains a complete path.
43523        tool_specified="$OBJCOPY"
43524        tool_basename="${tool_specified##*/}"
43525        if test "x$tool_basename" = "x$tool_specified"; then
43526          # A command without a complete path is provided, search $PATH.
43527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43528$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43529          # Extract the first word of "$tool_basename", so it can be a program name with args.
43530set dummy $tool_basename; ac_word=$2
43531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43532$as_echo_n "checking for $ac_word... " >&6; }
43533if ${ac_cv_path_OBJCOPY+:} false; then :
43534  $as_echo_n "(cached) " >&6
43535else
43536  case $OBJCOPY in
43537  [\\/]* | ?:[\\/]*)
43538  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43539  ;;
43540  *)
43541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43542for as_dir in $PATH
43543do
43544  IFS=$as_save_IFS
43545  test -z "$as_dir" && as_dir=.
43546    for ac_exec_ext in '' $ac_executable_extensions; do
43547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43548    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43550    break 2
43551  fi
43552done
43553  done
43554IFS=$as_save_IFS
43555
43556  ;;
43557esac
43558fi
43559OBJCOPY=$ac_cv_path_OBJCOPY
43560if test -n "$OBJCOPY"; then
43561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43562$as_echo "$OBJCOPY" >&6; }
43563else
43564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43565$as_echo "no" >&6; }
43566fi
43567
43568
43569          if test "x$OBJCOPY" = x; then
43570            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43571          fi
43572        else
43573          # Otherwise we believe it is a complete path. Use it as it is.
43574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43575$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43576          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43577$as_echo_n "checking for OBJCOPY... " >&6; }
43578          if test ! -x "$tool_specified"; then
43579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43580$as_echo "not found" >&6; }
43581            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43582          fi
43583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43584$as_echo "$tool_specified" >&6; }
43585        fi
43586      fi
43587    fi
43588
43589  fi
43590
43591
43592    # Only call fixup if objcopy was found.
43593    if test -n "$OBJCOPY"; then
43594
43595  # Only process if variable expands to non-empty
43596
43597  if test "x$OBJCOPY" != x; then
43598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43599
43600  # First separate the path from the arguments. This will split at the first
43601  # space.
43602  complete="$OBJCOPY"
43603  path="${complete%% *}"
43604  tmp="$complete EOL"
43605  arguments="${tmp#* }"
43606
43607  # Input might be given as Windows format, start by converting to
43608  # unix format.
43609  new_path=`$CYGPATH -u "$path"`
43610
43611  # Now try to locate executable using which
43612  new_path=`$WHICH "$new_path" 2> /dev/null`
43613  # bat and cmd files are not always considered executable in cygwin causing which
43614  # to not find them
43615  if test "x$new_path" = x \
43616      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43617      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43618    new_path=`$CYGPATH -u "$path"`
43619  fi
43620  if test "x$new_path" = x; then
43621    # Oops. Which didn't find the executable.
43622    # The splitting of arguments from the executable at a space might have been incorrect,
43623    # since paths with space are more likely in Windows. Give it another try with the whole
43624    # argument.
43625    path="$complete"
43626    arguments="EOL"
43627    new_path=`$CYGPATH -u "$path"`
43628    new_path=`$WHICH "$new_path" 2> /dev/null`
43629    # bat and cmd files are not always considered executable in cygwin causing which
43630    # to not find them
43631    if test "x$new_path" = x \
43632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43634      new_path=`$CYGPATH -u "$path"`
43635    fi
43636    if test "x$new_path" = x; then
43637      # It's still not found. Now this is an unrecoverable error.
43638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43639$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43640      has_space=`$ECHO "$complete" | $GREP " "`
43641      if test "x$has_space" != x; then
43642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43644      fi
43645      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43646    fi
43647  fi
43648
43649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43652  # "foo.exe" is OK but "foo" is an error.
43653  #
43654  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43655  # It is also a way to make sure we got the proper file name for the real test later on.
43656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43657  if test "x$test_shortpath" = x; then
43658    # Short path failed, file does not exist as specified.
43659    # Try adding .exe or .cmd
43660    if test -f "${new_path}.exe"; then
43661      input_to_shortpath="${new_path}.exe"
43662    elif test -f "${new_path}.cmd"; then
43663      input_to_shortpath="${new_path}.cmd"
43664    else
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43666$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43669      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43670    fi
43671  else
43672    input_to_shortpath="$new_path"
43673  fi
43674
43675  # Call helper function which possibly converts this using DOS-style short mode.
43676  # If so, the updated path is stored in $new_path.
43677  new_path="$input_to_shortpath"
43678
43679  input_path="$input_to_shortpath"
43680  # Check if we need to convert this using DOS-style short mode. If the path
43681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43682  # take no chances and rewrite it.
43683  # Note: m4 eats our [], so we need to use [ and ] instead.
43684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43685  if test "x$has_forbidden_chars" != x; then
43686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43690      # Going to short mode and back again did indeed matter. Since short mode is
43691      # case insensitive, let's make it lowercase to improve readability.
43692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43693      # Now convert it back to Unix-style (cygpath)
43694      input_path=`$CYGPATH -u "$shortmode_path"`
43695      new_path="$input_path"
43696    fi
43697  fi
43698
43699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43700  if test "x$test_cygdrive_prefix" = x; then
43701    # As a simple fix, exclude /usr/bin since it's not a real path.
43702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43704      # a path prefixed by /cygdrive for fixpath to work.
43705      new_path="$CYGWIN_ROOT_PATH$input_path"
43706    fi
43707  fi
43708
43709  # remove trailing .exe if any
43710  new_path="${new_path/%.exe/}"
43711
43712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43713
43714  # First separate the path from the arguments. This will split at the first
43715  # space.
43716  complete="$OBJCOPY"
43717  path="${complete%% *}"
43718  tmp="$complete EOL"
43719  arguments="${tmp#* }"
43720
43721  # Input might be given as Windows format, start by converting to
43722  # unix format.
43723  new_path="$path"
43724
43725  windows_path="$new_path"
43726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43727    unix_path=`$CYGPATH -u "$windows_path"`
43728    new_path="$unix_path"
43729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43731    new_path="$unix_path"
43732  fi
43733
43734
43735  # Now try to locate executable using which
43736  new_path=`$WHICH "$new_path" 2> /dev/null`
43737
43738  if test "x$new_path" = x; then
43739    # Oops. Which didn't find the executable.
43740    # The splitting of arguments from the executable at a space might have been incorrect,
43741    # since paths with space are more likely in Windows. Give it another try with the whole
43742    # argument.
43743    path="$complete"
43744    arguments="EOL"
43745    new_path="$path"
43746
43747  windows_path="$new_path"
43748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43749    unix_path=`$CYGPATH -u "$windows_path"`
43750    new_path="$unix_path"
43751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43753    new_path="$unix_path"
43754  fi
43755
43756
43757    new_path=`$WHICH "$new_path" 2> /dev/null`
43758    # bat and cmd files are not always considered executable in MSYS causing which
43759    # to not find them
43760    if test "x$new_path" = x \
43761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43763      new_path="$path"
43764
43765  windows_path="$new_path"
43766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43767    unix_path=`$CYGPATH -u "$windows_path"`
43768    new_path="$unix_path"
43769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43771    new_path="$unix_path"
43772  fi
43773
43774    fi
43775
43776    if test "x$new_path" = x; then
43777      # It's still not found. Now this is an unrecoverable error.
43778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43779$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43780      has_space=`$ECHO "$complete" | $GREP " "`
43781      if test "x$has_space" != x; then
43782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43784      fi
43785      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43786    fi
43787  fi
43788
43789  # Now new_path has a complete unix path to the binary
43790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43791    # Keep paths in /bin as-is, but remove trailing .exe if any
43792    new_path="${new_path/%.exe/}"
43793    # Do not save /bin paths to all_fixpath_prefixes!
43794  else
43795    # Not in mixed or Windows style, start by that.
43796    new_path=`cmd //c echo $new_path`
43797
43798  input_path="$new_path"
43799  # Check if we need to convert this using DOS-style short mode. If the path
43800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43801  # take no chances and rewrite it.
43802  # Note: m4 eats our [], so we need to use [ and ] instead.
43803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43804  if test "x$has_forbidden_chars" != x; then
43805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43807  fi
43808
43809    # Output is in $new_path
43810
43811  windows_path="$new_path"
43812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43813    unix_path=`$CYGPATH -u "$windows_path"`
43814    new_path="$unix_path"
43815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43817    new_path="$unix_path"
43818  fi
43819
43820    # remove trailing .exe if any
43821    new_path="${new_path/%.exe/}"
43822
43823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43825  fi
43826
43827    else
43828      # We're on a unix platform. Hooray! :)
43829      # First separate the path from the arguments. This will split at the first
43830      # space.
43831      complete="$OBJCOPY"
43832      path="${complete%% *}"
43833      tmp="$complete EOL"
43834      arguments="${tmp#* }"
43835
43836      # Cannot rely on the command "which" here since it doesn't always work.
43837      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43838      if test -z "$is_absolute_path"; then
43839        # Path to executable is not absolute. Find it.
43840        IFS_save="$IFS"
43841        IFS=:
43842        for p in $PATH; do
43843          if test -f "$p/$path" && test -x "$p/$path"; then
43844            new_path="$p/$path"
43845            break
43846          fi
43847        done
43848        IFS="$IFS_save"
43849      else
43850        # This is an absolute path, we can use it without further modifications.
43851        new_path="$path"
43852      fi
43853
43854      if test "x$new_path" = x; then
43855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43856$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43857        has_space=`$ECHO "$complete" | $GREP " "`
43858        if test "x$has_space" != x; then
43859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43861        fi
43862        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43863      fi
43864    fi
43865
43866    # Now join together the path and the arguments once again
43867    if test "x$arguments" != xEOL; then
43868      new_complete="$new_path ${arguments% *}"
43869    else
43870      new_complete="$new_path"
43871    fi
43872
43873    if test "x$complete" != "x$new_complete"; then
43874      OBJCOPY="$new_complete"
43875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43876$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43877    fi
43878  fi
43879
43880      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43881        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43882        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43883        # - version number is last blank separate word on first line
43884        # - version number formats that have been seen:
43885        #   - <major>.<minor>
43886        #   - <major>.<minor>.<micro>
43887        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43888        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43889         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43890              -e 's/.* //' \
43891              -e '/^[01]\./b bad' \
43892              -e '/^2\./{' \
43893              -e '  s/^2\.//' \
43894              -e '  /^[0-9]$/b bad' \
43895              -e '  /^[0-9]\./b bad' \
43896              -e '  /^1[0-9]$/b bad' \
43897              -e '  /^1[0-9]\./b bad' \
43898              -e '  /^20\./b bad' \
43899              -e '  /^21\.0$/b bad' \
43900              -e '  /^21\.0\./b bad' \
43901              -e '}' \
43902              -e ':good' \
43903              -e 's/.*/VALID_VERSION/p' \
43904              -e 'q' \
43905              -e ':bad' \
43906              -e 's/.*/BAD_VERSION/p' \
43907              -e 'q'`
43908        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43909          OBJCOPY=
43910          { $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
43911$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43912          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43913$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43914          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43915$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43916          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43917$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43918          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43919$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43920        fi
43921      fi
43922    fi
43923  fi
43924
43925
43926
43927  # Publish this variable in the help.
43928
43929
43930  if [ -z "${OBJDUMP+x}" ]; then
43931    # The variable is not set by user, try to locate tool using the code snippet
43932    if test -n "$ac_tool_prefix"; then
43933  for ac_prog in gobjdump objdump
43934  do
43935    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43936set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43938$as_echo_n "checking for $ac_word... " >&6; }
43939if ${ac_cv_prog_OBJDUMP+:} false; then :
43940  $as_echo_n "(cached) " >&6
43941else
43942  if test -n "$OBJDUMP"; then
43943  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43944else
43945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43946for as_dir in $PATH
43947do
43948  IFS=$as_save_IFS
43949  test -z "$as_dir" && as_dir=.
43950    for ac_exec_ext in '' $ac_executable_extensions; do
43951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43952    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43954    break 2
43955  fi
43956done
43957  done
43958IFS=$as_save_IFS
43959
43960fi
43961fi
43962OBJDUMP=$ac_cv_prog_OBJDUMP
43963if test -n "$OBJDUMP"; then
43964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43965$as_echo "$OBJDUMP" >&6; }
43966else
43967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43968$as_echo "no" >&6; }
43969fi
43970
43971
43972    test -n "$OBJDUMP" && break
43973  done
43974fi
43975if test -z "$OBJDUMP"; then
43976  ac_ct_OBJDUMP=$OBJDUMP
43977  for ac_prog in gobjdump objdump
43978do
43979  # Extract the first word of "$ac_prog", so it can be a program name with args.
43980set dummy $ac_prog; ac_word=$2
43981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43982$as_echo_n "checking for $ac_word... " >&6; }
43983if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43984  $as_echo_n "(cached) " >&6
43985else
43986  if test -n "$ac_ct_OBJDUMP"; then
43987  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43988else
43989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43990for as_dir in $PATH
43991do
43992  IFS=$as_save_IFS
43993  test -z "$as_dir" && as_dir=.
43994    for ac_exec_ext in '' $ac_executable_extensions; do
43995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43996    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43998    break 2
43999  fi
44000done
44001  done
44002IFS=$as_save_IFS
44003
44004fi
44005fi
44006ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44007if test -n "$ac_ct_OBJDUMP"; then
44008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44009$as_echo "$ac_ct_OBJDUMP" >&6; }
44010else
44011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44012$as_echo "no" >&6; }
44013fi
44014
44015
44016  test -n "$ac_ct_OBJDUMP" && break
44017done
44018
44019  if test "x$ac_ct_OBJDUMP" = x; then
44020    OBJDUMP=""
44021  else
44022    case $cross_compiling:$ac_tool_warned in
44023yes:)
44024{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44025$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44026ac_tool_warned=yes ;;
44027esac
44028    OBJDUMP=$ac_ct_OBJDUMP
44029  fi
44030fi
44031
44032  else
44033    # The variable is set, but is it from the command line or the environment?
44034
44035    # Try to remove the string !OBJDUMP! from our list.
44036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44038      # If it failed, the variable was not from the command line. Ignore it,
44039      # but warn the user (except for BASH, which is always set by the calling BASH).
44040      if test "xOBJDUMP" != xBASH; then
44041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44042$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44043      fi
44044      # Try to locate tool using the code snippet
44045      if test -n "$ac_tool_prefix"; then
44046  for ac_prog in gobjdump objdump
44047  do
44048    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44051$as_echo_n "checking for $ac_word... " >&6; }
44052if ${ac_cv_prog_OBJDUMP+:} false; then :
44053  $as_echo_n "(cached) " >&6
44054else
44055  if test -n "$OBJDUMP"; then
44056  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44057else
44058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44059for as_dir in $PATH
44060do
44061  IFS=$as_save_IFS
44062  test -z "$as_dir" && as_dir=.
44063    for ac_exec_ext in '' $ac_executable_extensions; do
44064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44065    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44067    break 2
44068  fi
44069done
44070  done
44071IFS=$as_save_IFS
44072
44073fi
44074fi
44075OBJDUMP=$ac_cv_prog_OBJDUMP
44076if test -n "$OBJDUMP"; then
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44078$as_echo "$OBJDUMP" >&6; }
44079else
44080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44081$as_echo "no" >&6; }
44082fi
44083
44084
44085    test -n "$OBJDUMP" && break
44086  done
44087fi
44088if test -z "$OBJDUMP"; then
44089  ac_ct_OBJDUMP=$OBJDUMP
44090  for ac_prog in gobjdump objdump
44091do
44092  # Extract the first word of "$ac_prog", so it can be a program name with args.
44093set dummy $ac_prog; ac_word=$2
44094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44095$as_echo_n "checking for $ac_word... " >&6; }
44096if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44097  $as_echo_n "(cached) " >&6
44098else
44099  if test -n "$ac_ct_OBJDUMP"; then
44100  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44101else
44102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44103for as_dir in $PATH
44104do
44105  IFS=$as_save_IFS
44106  test -z "$as_dir" && as_dir=.
44107    for ac_exec_ext in '' $ac_executable_extensions; do
44108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44109    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44111    break 2
44112  fi
44113done
44114  done
44115IFS=$as_save_IFS
44116
44117fi
44118fi
44119ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44120if test -n "$ac_ct_OBJDUMP"; then
44121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44122$as_echo "$ac_ct_OBJDUMP" >&6; }
44123else
44124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44125$as_echo "no" >&6; }
44126fi
44127
44128
44129  test -n "$ac_ct_OBJDUMP" && break
44130done
44131
44132  if test "x$ac_ct_OBJDUMP" = x; then
44133    OBJDUMP=""
44134  else
44135    case $cross_compiling:$ac_tool_warned in
44136yes:)
44137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44139ac_tool_warned=yes ;;
44140esac
44141    OBJDUMP=$ac_ct_OBJDUMP
44142  fi
44143fi
44144
44145    else
44146      # If it succeeded, then it was overridden by the user. We will use it
44147      # for the tool.
44148
44149      # First remove it from the list of overridden variables, so we can test
44150      # for unknown variables in the end.
44151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44152
44153      # Check if we try to supply an empty value
44154      if test "x$OBJDUMP" = x; then
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44156$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44158$as_echo_n "checking for OBJDUMP... " >&6; }
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44160$as_echo "disabled" >&6; }
44161      else
44162        # Check if the provided tool contains a complete path.
44163        tool_specified="$OBJDUMP"
44164        tool_basename="${tool_specified##*/}"
44165        if test "x$tool_basename" = "x$tool_specified"; then
44166          # A command without a complete path is provided, search $PATH.
44167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44168$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44169          # Extract the first word of "$tool_basename", so it can be a program name with args.
44170set dummy $tool_basename; ac_word=$2
44171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44172$as_echo_n "checking for $ac_word... " >&6; }
44173if ${ac_cv_path_OBJDUMP+:} false; then :
44174  $as_echo_n "(cached) " >&6
44175else
44176  case $OBJDUMP in
44177  [\\/]* | ?:[\\/]*)
44178  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44179  ;;
44180  *)
44181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44182for as_dir in $PATH
44183do
44184  IFS=$as_save_IFS
44185  test -z "$as_dir" && as_dir=.
44186    for ac_exec_ext in '' $ac_executable_extensions; do
44187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44188    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44190    break 2
44191  fi
44192done
44193  done
44194IFS=$as_save_IFS
44195
44196  ;;
44197esac
44198fi
44199OBJDUMP=$ac_cv_path_OBJDUMP
44200if test -n "$OBJDUMP"; then
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44202$as_echo "$OBJDUMP" >&6; }
44203else
44204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44205$as_echo "no" >&6; }
44206fi
44207
44208
44209          if test "x$OBJDUMP" = x; then
44210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44211          fi
44212        else
44213          # Otherwise we believe it is a complete path. Use it as it is.
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44215$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44217$as_echo_n "checking for OBJDUMP... " >&6; }
44218          if test ! -x "$tool_specified"; then
44219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44220$as_echo "not found" >&6; }
44221            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44222          fi
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44224$as_echo "$tool_specified" >&6; }
44225        fi
44226      fi
44227    fi
44228
44229  fi
44230
44231
44232  if test "x$OBJDUMP" != x; then
44233    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44234    # bails if argument is missing.
44235
44236  # Only process if variable expands to non-empty
44237
44238  if test "x$OBJDUMP" != x; then
44239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44240
44241  # First separate the path from the arguments. This will split at the first
44242  # space.
44243  complete="$OBJDUMP"
44244  path="${complete%% *}"
44245  tmp="$complete EOL"
44246  arguments="${tmp#* }"
44247
44248  # Input might be given as Windows format, start by converting to
44249  # unix format.
44250  new_path=`$CYGPATH -u "$path"`
44251
44252  # Now try to locate executable using which
44253  new_path=`$WHICH "$new_path" 2> /dev/null`
44254  # bat and cmd files are not always considered executable in cygwin causing which
44255  # to not find them
44256  if test "x$new_path" = x \
44257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44259    new_path=`$CYGPATH -u "$path"`
44260  fi
44261  if test "x$new_path" = x; then
44262    # Oops. Which didn't find the executable.
44263    # The splitting of arguments from the executable at a space might have been incorrect,
44264    # since paths with space are more likely in Windows. Give it another try with the whole
44265    # argument.
44266    path="$complete"
44267    arguments="EOL"
44268    new_path=`$CYGPATH -u "$path"`
44269    new_path=`$WHICH "$new_path" 2> /dev/null`
44270    # bat and cmd files are not always considered executable in cygwin causing which
44271    # to not find them
44272    if test "x$new_path" = x \
44273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44275      new_path=`$CYGPATH -u "$path"`
44276    fi
44277    if test "x$new_path" = x; then
44278      # It's still not found. Now this is an unrecoverable error.
44279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44280$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44281      has_space=`$ECHO "$complete" | $GREP " "`
44282      if test "x$has_space" != x; then
44283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44285      fi
44286      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44287    fi
44288  fi
44289
44290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44293  # "foo.exe" is OK but "foo" is an error.
44294  #
44295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44296  # It is also a way to make sure we got the proper file name for the real test later on.
44297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44298  if test "x$test_shortpath" = x; then
44299    # Short path failed, file does not exist as specified.
44300    # Try adding .exe or .cmd
44301    if test -f "${new_path}.exe"; then
44302      input_to_shortpath="${new_path}.exe"
44303    elif test -f "${new_path}.cmd"; then
44304      input_to_shortpath="${new_path}.cmd"
44305    else
44306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44307$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44310      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44311    fi
44312  else
44313    input_to_shortpath="$new_path"
44314  fi
44315
44316  # Call helper function which possibly converts this using DOS-style short mode.
44317  # If so, the updated path is stored in $new_path.
44318  new_path="$input_to_shortpath"
44319
44320  input_path="$input_to_shortpath"
44321  # Check if we need to convert this using DOS-style short mode. If the path
44322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44323  # take no chances and rewrite it.
44324  # Note: m4 eats our [], so we need to use [ and ] instead.
44325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44326  if test "x$has_forbidden_chars" != x; then
44327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44331      # Going to short mode and back again did indeed matter. Since short mode is
44332      # case insensitive, let's make it lowercase to improve readability.
44333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44334      # Now convert it back to Unix-style (cygpath)
44335      input_path=`$CYGPATH -u "$shortmode_path"`
44336      new_path="$input_path"
44337    fi
44338  fi
44339
44340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44341  if test "x$test_cygdrive_prefix" = x; then
44342    # As a simple fix, exclude /usr/bin since it's not a real path.
44343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44345      # a path prefixed by /cygdrive for fixpath to work.
44346      new_path="$CYGWIN_ROOT_PATH$input_path"
44347    fi
44348  fi
44349
44350  # remove trailing .exe if any
44351  new_path="${new_path/%.exe/}"
44352
44353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44354
44355  # First separate the path from the arguments. This will split at the first
44356  # space.
44357  complete="$OBJDUMP"
44358  path="${complete%% *}"
44359  tmp="$complete EOL"
44360  arguments="${tmp#* }"
44361
44362  # Input might be given as Windows format, start by converting to
44363  # unix format.
44364  new_path="$path"
44365
44366  windows_path="$new_path"
44367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368    unix_path=`$CYGPATH -u "$windows_path"`
44369    new_path="$unix_path"
44370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44372    new_path="$unix_path"
44373  fi
44374
44375
44376  # Now try to locate executable using which
44377  new_path=`$WHICH "$new_path" 2> /dev/null`
44378
44379  if test "x$new_path" = x; then
44380    # Oops. Which didn't find the executable.
44381    # The splitting of arguments from the executable at a space might have been incorrect,
44382    # since paths with space are more likely in Windows. Give it another try with the whole
44383    # argument.
44384    path="$complete"
44385    arguments="EOL"
44386    new_path="$path"
44387
44388  windows_path="$new_path"
44389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44390    unix_path=`$CYGPATH -u "$windows_path"`
44391    new_path="$unix_path"
44392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44394    new_path="$unix_path"
44395  fi
44396
44397
44398    new_path=`$WHICH "$new_path" 2> /dev/null`
44399    # bat and cmd files are not always considered executable in MSYS causing which
44400    # to not find them
44401    if test "x$new_path" = x \
44402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44404      new_path="$path"
44405
44406  windows_path="$new_path"
44407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408    unix_path=`$CYGPATH -u "$windows_path"`
44409    new_path="$unix_path"
44410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44412    new_path="$unix_path"
44413  fi
44414
44415    fi
44416
44417    if test "x$new_path" = x; then
44418      # It's still not found. Now this is an unrecoverable error.
44419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44420$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44421      has_space=`$ECHO "$complete" | $GREP " "`
44422      if test "x$has_space" != x; then
44423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44425      fi
44426      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44427    fi
44428  fi
44429
44430  # Now new_path has a complete unix path to the binary
44431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44432    # Keep paths in /bin as-is, but remove trailing .exe if any
44433    new_path="${new_path/%.exe/}"
44434    # Do not save /bin paths to all_fixpath_prefixes!
44435  else
44436    # Not in mixed or Windows style, start by that.
44437    new_path=`cmd //c echo $new_path`
44438
44439  input_path="$new_path"
44440  # Check if we need to convert this using DOS-style short mode. If the path
44441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44442  # take no chances and rewrite it.
44443  # Note: m4 eats our [], so we need to use [ and ] instead.
44444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44445  if test "x$has_forbidden_chars" != x; then
44446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44448  fi
44449
44450    # Output is in $new_path
44451
44452  windows_path="$new_path"
44453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44454    unix_path=`$CYGPATH -u "$windows_path"`
44455    new_path="$unix_path"
44456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44458    new_path="$unix_path"
44459  fi
44460
44461    # remove trailing .exe if any
44462    new_path="${new_path/%.exe/}"
44463
44464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44466  fi
44467
44468    else
44469      # We're on a unix platform. Hooray! :)
44470      # First separate the path from the arguments. This will split at the first
44471      # space.
44472      complete="$OBJDUMP"
44473      path="${complete%% *}"
44474      tmp="$complete EOL"
44475      arguments="${tmp#* }"
44476
44477      # Cannot rely on the command "which" here since it doesn't always work.
44478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44479      if test -z "$is_absolute_path"; then
44480        # Path to executable is not absolute. Find it.
44481        IFS_save="$IFS"
44482        IFS=:
44483        for p in $PATH; do
44484          if test -f "$p/$path" && test -x "$p/$path"; then
44485            new_path="$p/$path"
44486            break
44487          fi
44488        done
44489        IFS="$IFS_save"
44490      else
44491        # This is an absolute path, we can use it without further modifications.
44492        new_path="$path"
44493      fi
44494
44495      if test "x$new_path" = x; then
44496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44497$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44498        has_space=`$ECHO "$complete" | $GREP " "`
44499        if test "x$has_space" != x; then
44500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44502        fi
44503        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44504      fi
44505    fi
44506
44507    # Now join together the path and the arguments once again
44508    if test "x$arguments" != xEOL; then
44509      new_complete="$new_path ${arguments% *}"
44510    else
44511      new_complete="$new_path"
44512    fi
44513
44514    if test "x$complete" != "x$new_complete"; then
44515      OBJDUMP="$new_complete"
44516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44517$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44518    fi
44519  fi
44520
44521  fi
44522
44523
44524  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44525  # to remain in place. Otherwise the compiler will not work in some siutations
44526  # in later configure checks.
44527  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44528    PATH="$OLD_PATH"
44529  fi
44530
44531  # Restore the flags to the user specified values.
44532  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44533  CFLAGS="$ORG_CFLAGS"
44534  CXXFLAGS="$ORG_CXXFLAGS"
44535
44536
44537# Finally do some processing after the detection phase
44538
44539  if test "x$COMPILE_TYPE" = "xcross"; then
44540    # Now we need to find a C/C++ compiler that can build executables for the
44541    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44542    # used once. Also, we need to do this without adding a tools dir to the
44543    # path, otherwise we might pick up cross-compilers which don't use standard
44544    # naming.
44545
44546    OLDPATH="$PATH"
44547
44548
44549# Check whether --with-build-devkit was given.
44550if test "${with_build_devkit+set}" = set; then :
44551  withval=$with_build_devkit;
44552fi
44553
44554    if test "x$with_build_devkit" = "xyes"; then
44555      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44556    elif test -n "$with_build_devkit"; then
44557      if test ! -d "$with_build_devkit"; then
44558        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44559      else
44560
44561  # Only process if variable expands to non-empty
44562
44563  if test "x$with_build_devkit" != x; then
44564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44565
44566  # Input might be given as Windows format, start by converting to
44567  # unix format.
44568  path="$with_build_devkit"
44569  new_path=`$CYGPATH -u "$path"`
44570
44571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44574  # "foo.exe" is OK but "foo" is an error.
44575  #
44576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44577  # It is also a way to make sure we got the proper file name for the real test later on.
44578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44579  if test "x$test_shortpath" = x; then
44580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44581$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44582    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44583  fi
44584
44585  # Call helper function which possibly converts this using DOS-style short mode.
44586  # If so, the updated path is stored in $new_path.
44587
44588  input_path="$new_path"
44589  # Check if we need to convert this using DOS-style short mode. If the path
44590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44591  # take no chances and rewrite it.
44592  # Note: m4 eats our [], so we need to use [ and ] instead.
44593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44594  if test "x$has_forbidden_chars" != x; then
44595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44599      # Going to short mode and back again did indeed matter. Since short mode is
44600      # case insensitive, let's make it lowercase to improve readability.
44601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44602      # Now convert it back to Unix-style (cygpath)
44603      input_path=`$CYGPATH -u "$shortmode_path"`
44604      new_path="$input_path"
44605    fi
44606  fi
44607
44608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44609  if test "x$test_cygdrive_prefix" = x; then
44610    # As a simple fix, exclude /usr/bin since it's not a real path.
44611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44613      # a path prefixed by /cygdrive for fixpath to work.
44614      new_path="$CYGWIN_ROOT_PATH$input_path"
44615    fi
44616  fi
44617
44618
44619  if test "x$path" != "x$new_path"; then
44620    with_build_devkit="$new_path"
44621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44622$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44623  fi
44624
44625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44626
44627  path="$with_build_devkit"
44628  has_colon=`$ECHO $path | $GREP ^.:`
44629  new_path="$path"
44630  if test "x$has_colon" = x; then
44631    # Not in mixed or Windows style, start by that.
44632    new_path=`cmd //c echo $path`
44633  fi
44634
44635
44636  input_path="$new_path"
44637  # Check if we need to convert this using DOS-style short mode. If the path
44638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44639  # take no chances and rewrite it.
44640  # Note: m4 eats our [], so we need to use [ and ] instead.
44641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44642  if test "x$has_forbidden_chars" != x; then
44643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44645  fi
44646
44647
44648  windows_path="$new_path"
44649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44650    unix_path=`$CYGPATH -u "$windows_path"`
44651    new_path="$unix_path"
44652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44654    new_path="$unix_path"
44655  fi
44656
44657  if test "x$path" != "x$new_path"; then
44658    with_build_devkit="$new_path"
44659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44660$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44661  fi
44662
44663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44665
44666    else
44667      # We're on a unix platform. Hooray! :)
44668      path="$with_build_devkit"
44669      has_space=`$ECHO "$path" | $GREP " "`
44670      if test "x$has_space" != x; then
44671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44672$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44674      fi
44675
44676      # Use eval to expand a potential ~
44677      eval path="$path"
44678      if test ! -f "$path" && test ! -d "$path"; then
44679        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44680      fi
44681
44682      if test -d "$path"; then
44683        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44684      else
44685        dir="`$DIRNAME "$path"`"
44686        base="`$BASENAME "$path"`"
44687        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44688      fi
44689    fi
44690  fi
44691
44692        BUILD_DEVKIT_ROOT="$with_build_devkit"
44693        # Check for a meta data info file in the root of the devkit
44694        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44695          # Process devkit.info so that existing devkit variables are not
44696          # modified by this
44697          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44698              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44699              -e "s/\$host/\$build/g" \
44700              $BUILD_DEVKIT_ROOT/devkit.info \
44701              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44702          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44703          # This potentially sets the following:
44704          # A descriptive name of the devkit
44705
44706  if test "x$BUILD_DEVKIT_NAME" = x; then
44707    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44708  fi
44709
44710          # Corresponds to --with-extra-path
44711
44712  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44713    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44714  fi
44715
44716          # Corresponds to --with-toolchain-path
44717
44718  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44719    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44720  fi
44721
44722          # Corresponds to --with-sysroot
44723
44724  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44725    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44726  fi
44727
44728          # Skip the Window specific parts
44729        fi
44730
44731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44732$as_echo_n "checking for build platform devkit... " >&6; }
44733        if test "x$BUILD_DEVKIT_NAME" != x; then
44734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44735$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44736        else
44737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44738$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44739        fi
44740
44741        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44742
44743  if test "x$BUILD_SYSROOT" != "x"; then
44744    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44745      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44746        # Solaris Studio does not have a concept of sysroot. Instead we must
44747        # make sure the default include and lib dirs are appended to each
44748        # compile and link command line. Must also add -I-xbuiltin to enable
44749        # inlining of system functions and intrinsics.
44750        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44751        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44752            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44753      fi
44754    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44755      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44756      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44757    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44758      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44759      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44760    fi
44761    # The global CFLAGS and LDFLAGS variables need these for configure to function
44762    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44763    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44764    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44765    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44766  fi
44767
44768  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44769    # We also need -iframework<path>/System/Library/Frameworks
44770    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44771    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44772    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44773    # set this here so it doesn't have to be peppered throughout the forest
44774    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44775    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44776  fi
44777
44778
44779
44780
44781
44782         # Fallback default of just /bin if DEVKIT_PATH is not defined
44783        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44784          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44785        fi
44786        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44787      fi
44788    fi
44789
44790    # FIXME: we should list the discovered compilers as an exclude pattern!
44791    # If we do that, we can do this detection before POST_DETECTION, and still
44792    # find the build compilers in the tools dir, if needed.
44793
44794
44795
44796  # Publish this variable in the help.
44797
44798
44799  if [ -z "${BUILD_CC+x}" ]; then
44800    # The variable is not set by user, try to locate tool using the code snippet
44801    for ac_prog in cl cc gcc
44802do
44803  # Extract the first word of "$ac_prog", so it can be a program name with args.
44804set dummy $ac_prog; ac_word=$2
44805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44806$as_echo_n "checking for $ac_word... " >&6; }
44807if ${ac_cv_path_BUILD_CC+:} false; then :
44808  $as_echo_n "(cached) " >&6
44809else
44810  case $BUILD_CC in
44811  [\\/]* | ?:[\\/]*)
44812  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44813  ;;
44814  *)
44815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44816for as_dir in $PATH
44817do
44818  IFS=$as_save_IFS
44819  test -z "$as_dir" && as_dir=.
44820    for ac_exec_ext in '' $ac_executable_extensions; do
44821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44822    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44824    break 2
44825  fi
44826done
44827  done
44828IFS=$as_save_IFS
44829
44830  ;;
44831esac
44832fi
44833BUILD_CC=$ac_cv_path_BUILD_CC
44834if test -n "$BUILD_CC"; then
44835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44836$as_echo "$BUILD_CC" >&6; }
44837else
44838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44839$as_echo "no" >&6; }
44840fi
44841
44842
44843  test -n "$BUILD_CC" && break
44844done
44845
44846  else
44847    # The variable is set, but is it from the command line or the environment?
44848
44849    # Try to remove the string !BUILD_CC! from our list.
44850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44852      # If it failed, the variable was not from the command line. Ignore it,
44853      # but warn the user (except for BASH, which is always set by the calling BASH).
44854      if test "xBUILD_CC" != xBASH; then
44855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44856$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44857      fi
44858      # Try to locate tool using the code snippet
44859      for ac_prog in cl cc gcc
44860do
44861  # Extract the first word of "$ac_prog", so it can be a program name with args.
44862set dummy $ac_prog; ac_word=$2
44863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44864$as_echo_n "checking for $ac_word... " >&6; }
44865if ${ac_cv_path_BUILD_CC+:} false; then :
44866  $as_echo_n "(cached) " >&6
44867else
44868  case $BUILD_CC in
44869  [\\/]* | ?:[\\/]*)
44870  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44871  ;;
44872  *)
44873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44874for as_dir in $PATH
44875do
44876  IFS=$as_save_IFS
44877  test -z "$as_dir" && as_dir=.
44878    for ac_exec_ext in '' $ac_executable_extensions; do
44879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44880    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44882    break 2
44883  fi
44884done
44885  done
44886IFS=$as_save_IFS
44887
44888  ;;
44889esac
44890fi
44891BUILD_CC=$ac_cv_path_BUILD_CC
44892if test -n "$BUILD_CC"; then
44893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44894$as_echo "$BUILD_CC" >&6; }
44895else
44896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44897$as_echo "no" >&6; }
44898fi
44899
44900
44901  test -n "$BUILD_CC" && break
44902done
44903
44904    else
44905      # If it succeeded, then it was overridden by the user. We will use it
44906      # for the tool.
44907
44908      # First remove it from the list of overridden variables, so we can test
44909      # for unknown variables in the end.
44910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44911
44912      # Check if we try to supply an empty value
44913      if test "x$BUILD_CC" = x; then
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44915$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44917$as_echo_n "checking for BUILD_CC... " >&6; }
44918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44919$as_echo "disabled" >&6; }
44920      else
44921        # Check if the provided tool contains a complete path.
44922        tool_specified="$BUILD_CC"
44923        tool_basename="${tool_specified##*/}"
44924        if test "x$tool_basename" = "x$tool_specified"; then
44925          # A command without a complete path is provided, search $PATH.
44926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44927$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44928          # Extract the first word of "$tool_basename", so it can be a program name with args.
44929set dummy $tool_basename; ac_word=$2
44930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44931$as_echo_n "checking for $ac_word... " >&6; }
44932if ${ac_cv_path_BUILD_CC+:} false; then :
44933  $as_echo_n "(cached) " >&6
44934else
44935  case $BUILD_CC in
44936  [\\/]* | ?:[\\/]*)
44937  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44938  ;;
44939  *)
44940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44941for as_dir in $PATH
44942do
44943  IFS=$as_save_IFS
44944  test -z "$as_dir" && as_dir=.
44945    for ac_exec_ext in '' $ac_executable_extensions; do
44946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44947    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44949    break 2
44950  fi
44951done
44952  done
44953IFS=$as_save_IFS
44954
44955  ;;
44956esac
44957fi
44958BUILD_CC=$ac_cv_path_BUILD_CC
44959if test -n "$BUILD_CC"; then
44960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44961$as_echo "$BUILD_CC" >&6; }
44962else
44963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44964$as_echo "no" >&6; }
44965fi
44966
44967
44968          if test "x$BUILD_CC" = x; then
44969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44970          fi
44971        else
44972          # Otherwise we believe it is a complete path. Use it as it is.
44973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44974$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44976$as_echo_n "checking for BUILD_CC... " >&6; }
44977          if test ! -x "$tool_specified"; then
44978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44979$as_echo "not found" >&6; }
44980            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44981          fi
44982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44983$as_echo "$tool_specified" >&6; }
44984        fi
44985      fi
44986    fi
44987
44988  fi
44989
44990
44991
44992  if test "x$BUILD_CC" = x; then
44993    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44994  fi
44995
44996
44997
44998  # Only process if variable expands to non-empty
44999
45000  if test "x$BUILD_CC" != x; then
45001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45002
45003  # First separate the path from the arguments. This will split at the first
45004  # space.
45005  complete="$BUILD_CC"
45006  path="${complete%% *}"
45007  tmp="$complete EOL"
45008  arguments="${tmp#* }"
45009
45010  # Input might be given as Windows format, start by converting to
45011  # unix format.
45012  new_path=`$CYGPATH -u "$path"`
45013
45014  # Now try to locate executable using which
45015  new_path=`$WHICH "$new_path" 2> /dev/null`
45016  # bat and cmd files are not always considered executable in cygwin causing which
45017  # to not find them
45018  if test "x$new_path" = x \
45019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45021    new_path=`$CYGPATH -u "$path"`
45022  fi
45023  if test "x$new_path" = x; then
45024    # Oops. Which didn't find the executable.
45025    # The splitting of arguments from the executable at a space might have been incorrect,
45026    # since paths with space are more likely in Windows. Give it another try with the whole
45027    # argument.
45028    path="$complete"
45029    arguments="EOL"
45030    new_path=`$CYGPATH -u "$path"`
45031    new_path=`$WHICH "$new_path" 2> /dev/null`
45032    # bat and cmd files are not always considered executable in cygwin causing which
45033    # to not find them
45034    if test "x$new_path" = x \
45035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45037      new_path=`$CYGPATH -u "$path"`
45038    fi
45039    if test "x$new_path" = x; then
45040      # It's still not found. Now this is an unrecoverable error.
45041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45042$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45043      has_space=`$ECHO "$complete" | $GREP " "`
45044      if test "x$has_space" != x; then
45045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45047      fi
45048      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45049    fi
45050  fi
45051
45052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45055  # "foo.exe" is OK but "foo" is an error.
45056  #
45057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45058  # It is also a way to make sure we got the proper file name for the real test later on.
45059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45060  if test "x$test_shortpath" = x; then
45061    # Short path failed, file does not exist as specified.
45062    # Try adding .exe or .cmd
45063    if test -f "${new_path}.exe"; then
45064      input_to_shortpath="${new_path}.exe"
45065    elif test -f "${new_path}.cmd"; then
45066      input_to_shortpath="${new_path}.cmd"
45067    else
45068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45069$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45072      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45073    fi
45074  else
45075    input_to_shortpath="$new_path"
45076  fi
45077
45078  # Call helper function which possibly converts this using DOS-style short mode.
45079  # If so, the updated path is stored in $new_path.
45080  new_path="$input_to_shortpath"
45081
45082  input_path="$input_to_shortpath"
45083  # Check if we need to convert this using DOS-style short mode. If the path
45084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45085  # take no chances and rewrite it.
45086  # Note: m4 eats our [], so we need to use [ and ] instead.
45087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45088  if test "x$has_forbidden_chars" != x; then
45089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45093      # Going to short mode and back again did indeed matter. Since short mode is
45094      # case insensitive, let's make it lowercase to improve readability.
45095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45096      # Now convert it back to Unix-style (cygpath)
45097      input_path=`$CYGPATH -u "$shortmode_path"`
45098      new_path="$input_path"
45099    fi
45100  fi
45101
45102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45103  if test "x$test_cygdrive_prefix" = x; then
45104    # As a simple fix, exclude /usr/bin since it's not a real path.
45105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45107      # a path prefixed by /cygdrive for fixpath to work.
45108      new_path="$CYGWIN_ROOT_PATH$input_path"
45109    fi
45110  fi
45111
45112  # remove trailing .exe if any
45113  new_path="${new_path/%.exe/}"
45114
45115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45116
45117  # First separate the path from the arguments. This will split at the first
45118  # space.
45119  complete="$BUILD_CC"
45120  path="${complete%% *}"
45121  tmp="$complete EOL"
45122  arguments="${tmp#* }"
45123
45124  # Input might be given as Windows format, start by converting to
45125  # unix format.
45126  new_path="$path"
45127
45128  windows_path="$new_path"
45129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130    unix_path=`$CYGPATH -u "$windows_path"`
45131    new_path="$unix_path"
45132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45134    new_path="$unix_path"
45135  fi
45136
45137
45138  # Now try to locate executable using which
45139  new_path=`$WHICH "$new_path" 2> /dev/null`
45140
45141  if test "x$new_path" = x; then
45142    # Oops. Which didn't find the executable.
45143    # The splitting of arguments from the executable at a space might have been incorrect,
45144    # since paths with space are more likely in Windows. Give it another try with the whole
45145    # argument.
45146    path="$complete"
45147    arguments="EOL"
45148    new_path="$path"
45149
45150  windows_path="$new_path"
45151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45152    unix_path=`$CYGPATH -u "$windows_path"`
45153    new_path="$unix_path"
45154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45156    new_path="$unix_path"
45157  fi
45158
45159
45160    new_path=`$WHICH "$new_path" 2> /dev/null`
45161    # bat and cmd files are not always considered executable in MSYS causing which
45162    # to not find them
45163    if test "x$new_path" = x \
45164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45166      new_path="$path"
45167
45168  windows_path="$new_path"
45169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45170    unix_path=`$CYGPATH -u "$windows_path"`
45171    new_path="$unix_path"
45172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45174    new_path="$unix_path"
45175  fi
45176
45177    fi
45178
45179    if test "x$new_path" = x; then
45180      # It's still not found. Now this is an unrecoverable error.
45181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45182$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45183      has_space=`$ECHO "$complete" | $GREP " "`
45184      if test "x$has_space" != x; then
45185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45187      fi
45188      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45189    fi
45190  fi
45191
45192  # Now new_path has a complete unix path to the binary
45193  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45194    # Keep paths in /bin as-is, but remove trailing .exe if any
45195    new_path="${new_path/%.exe/}"
45196    # Do not save /bin paths to all_fixpath_prefixes!
45197  else
45198    # Not in mixed or Windows style, start by that.
45199    new_path=`cmd //c echo $new_path`
45200
45201  input_path="$new_path"
45202  # Check if we need to convert this using DOS-style short mode. If the path
45203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45204  # take no chances and rewrite it.
45205  # Note: m4 eats our [], so we need to use [ and ] instead.
45206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45207  if test "x$has_forbidden_chars" != x; then
45208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45210  fi
45211
45212    # Output is in $new_path
45213
45214  windows_path="$new_path"
45215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45216    unix_path=`$CYGPATH -u "$windows_path"`
45217    new_path="$unix_path"
45218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45220    new_path="$unix_path"
45221  fi
45222
45223    # remove trailing .exe if any
45224    new_path="${new_path/%.exe/}"
45225
45226    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45227    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45228  fi
45229
45230    else
45231      # We're on a unix platform. Hooray! :)
45232      # First separate the path from the arguments. This will split at the first
45233      # space.
45234      complete="$BUILD_CC"
45235      path="${complete%% *}"
45236      tmp="$complete EOL"
45237      arguments="${tmp#* }"
45238
45239      # Cannot rely on the command "which" here since it doesn't always work.
45240      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45241      if test -z "$is_absolute_path"; then
45242        # Path to executable is not absolute. Find it.
45243        IFS_save="$IFS"
45244        IFS=:
45245        for p in $PATH; do
45246          if test -f "$p/$path" && test -x "$p/$path"; then
45247            new_path="$p/$path"
45248            break
45249          fi
45250        done
45251        IFS="$IFS_save"
45252      else
45253        # This is an absolute path, we can use it without further modifications.
45254        new_path="$path"
45255      fi
45256
45257      if test "x$new_path" = x; then
45258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45259$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45260        has_space=`$ECHO "$complete" | $GREP " "`
45261        if test "x$has_space" != x; then
45262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45264        fi
45265        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45266      fi
45267    fi
45268
45269    # Now join together the path and the arguments once again
45270    if test "x$arguments" != xEOL; then
45271      new_complete="$new_path ${arguments% *}"
45272    else
45273      new_complete="$new_path"
45274    fi
45275
45276    if test "x$complete" != "x$new_complete"; then
45277      BUILD_CC="$new_complete"
45278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45279$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45280    fi
45281  fi
45282
45283
45284
45285
45286  # Publish this variable in the help.
45287
45288
45289  if [ -z "${BUILD_CXX+x}" ]; then
45290    # The variable is not set by user, try to locate tool using the code snippet
45291    for ac_prog in cl CC g++
45292do
45293  # Extract the first word of "$ac_prog", so it can be a program name with args.
45294set dummy $ac_prog; ac_word=$2
45295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45296$as_echo_n "checking for $ac_word... " >&6; }
45297if ${ac_cv_path_BUILD_CXX+:} false; then :
45298  $as_echo_n "(cached) " >&6
45299else
45300  case $BUILD_CXX in
45301  [\\/]* | ?:[\\/]*)
45302  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45303  ;;
45304  *)
45305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45306for as_dir in $PATH
45307do
45308  IFS=$as_save_IFS
45309  test -z "$as_dir" && as_dir=.
45310    for ac_exec_ext in '' $ac_executable_extensions; do
45311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45312    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45314    break 2
45315  fi
45316done
45317  done
45318IFS=$as_save_IFS
45319
45320  ;;
45321esac
45322fi
45323BUILD_CXX=$ac_cv_path_BUILD_CXX
45324if test -n "$BUILD_CXX"; then
45325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45326$as_echo "$BUILD_CXX" >&6; }
45327else
45328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45329$as_echo "no" >&6; }
45330fi
45331
45332
45333  test -n "$BUILD_CXX" && break
45334done
45335
45336  else
45337    # The variable is set, but is it from the command line or the environment?
45338
45339    # Try to remove the string !BUILD_CXX! from our list.
45340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45342      # If it failed, the variable was not from the command line. Ignore it,
45343      # but warn the user (except for BASH, which is always set by the calling BASH).
45344      if test "xBUILD_CXX" != xBASH; then
45345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45346$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45347      fi
45348      # Try to locate tool using the code snippet
45349      for ac_prog in cl CC g++
45350do
45351  # Extract the first word of "$ac_prog", so it can be a program name with args.
45352set dummy $ac_prog; ac_word=$2
45353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45354$as_echo_n "checking for $ac_word... " >&6; }
45355if ${ac_cv_path_BUILD_CXX+:} false; then :
45356  $as_echo_n "(cached) " >&6
45357else
45358  case $BUILD_CXX in
45359  [\\/]* | ?:[\\/]*)
45360  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45361  ;;
45362  *)
45363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45364for as_dir in $PATH
45365do
45366  IFS=$as_save_IFS
45367  test -z "$as_dir" && as_dir=.
45368    for ac_exec_ext in '' $ac_executable_extensions; do
45369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45370    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45372    break 2
45373  fi
45374done
45375  done
45376IFS=$as_save_IFS
45377
45378  ;;
45379esac
45380fi
45381BUILD_CXX=$ac_cv_path_BUILD_CXX
45382if test -n "$BUILD_CXX"; then
45383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45384$as_echo "$BUILD_CXX" >&6; }
45385else
45386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45387$as_echo "no" >&6; }
45388fi
45389
45390
45391  test -n "$BUILD_CXX" && break
45392done
45393
45394    else
45395      # If it succeeded, then it was overridden by the user. We will use it
45396      # for the tool.
45397
45398      # First remove it from the list of overridden variables, so we can test
45399      # for unknown variables in the end.
45400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45401
45402      # Check if we try to supply an empty value
45403      if test "x$BUILD_CXX" = x; then
45404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45405$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45407$as_echo_n "checking for BUILD_CXX... " >&6; }
45408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45409$as_echo "disabled" >&6; }
45410      else
45411        # Check if the provided tool contains a complete path.
45412        tool_specified="$BUILD_CXX"
45413        tool_basename="${tool_specified##*/}"
45414        if test "x$tool_basename" = "x$tool_specified"; then
45415          # A command without a complete path is provided, search $PATH.
45416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45417$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45418          # Extract the first word of "$tool_basename", so it can be a program name with args.
45419set dummy $tool_basename; ac_word=$2
45420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45421$as_echo_n "checking for $ac_word... " >&6; }
45422if ${ac_cv_path_BUILD_CXX+:} false; then :
45423  $as_echo_n "(cached) " >&6
45424else
45425  case $BUILD_CXX in
45426  [\\/]* | ?:[\\/]*)
45427  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45428  ;;
45429  *)
45430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45431for as_dir in $PATH
45432do
45433  IFS=$as_save_IFS
45434  test -z "$as_dir" && as_dir=.
45435    for ac_exec_ext in '' $ac_executable_extensions; do
45436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45437    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45439    break 2
45440  fi
45441done
45442  done
45443IFS=$as_save_IFS
45444
45445  ;;
45446esac
45447fi
45448BUILD_CXX=$ac_cv_path_BUILD_CXX
45449if test -n "$BUILD_CXX"; then
45450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45451$as_echo "$BUILD_CXX" >&6; }
45452else
45453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45454$as_echo "no" >&6; }
45455fi
45456
45457
45458          if test "x$BUILD_CXX" = x; then
45459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45460          fi
45461        else
45462          # Otherwise we believe it is a complete path. Use it as it is.
45463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45464$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45466$as_echo_n "checking for BUILD_CXX... " >&6; }
45467          if test ! -x "$tool_specified"; then
45468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45469$as_echo "not found" >&6; }
45470            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45471          fi
45472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45473$as_echo "$tool_specified" >&6; }
45474        fi
45475      fi
45476    fi
45477
45478  fi
45479
45480
45481
45482  if test "x$BUILD_CXX" = x; then
45483    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45484  fi
45485
45486
45487
45488  # Only process if variable expands to non-empty
45489
45490  if test "x$BUILD_CXX" != x; then
45491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45492
45493  # First separate the path from the arguments. This will split at the first
45494  # space.
45495  complete="$BUILD_CXX"
45496  path="${complete%% *}"
45497  tmp="$complete EOL"
45498  arguments="${tmp#* }"
45499
45500  # Input might be given as Windows format, start by converting to
45501  # unix format.
45502  new_path=`$CYGPATH -u "$path"`
45503
45504  # Now try to locate executable using which
45505  new_path=`$WHICH "$new_path" 2> /dev/null`
45506  # bat and cmd files are not always considered executable in cygwin causing which
45507  # to not find them
45508  if test "x$new_path" = x \
45509      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45510      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45511    new_path=`$CYGPATH -u "$path"`
45512  fi
45513  if test "x$new_path" = x; then
45514    # Oops. Which didn't find the executable.
45515    # The splitting of arguments from the executable at a space might have been incorrect,
45516    # since paths with space are more likely in Windows. Give it another try with the whole
45517    # argument.
45518    path="$complete"
45519    arguments="EOL"
45520    new_path=`$CYGPATH -u "$path"`
45521    new_path=`$WHICH "$new_path" 2> /dev/null`
45522    # bat and cmd files are not always considered executable in cygwin causing which
45523    # to not find them
45524    if test "x$new_path" = x \
45525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45527      new_path=`$CYGPATH -u "$path"`
45528    fi
45529    if test "x$new_path" = x; then
45530      # It's still not found. Now this is an unrecoverable error.
45531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45532$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45533      has_space=`$ECHO "$complete" | $GREP " "`
45534      if test "x$has_space" != x; then
45535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45537      fi
45538      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45539    fi
45540  fi
45541
45542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45545  # "foo.exe" is OK but "foo" is an error.
45546  #
45547  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45548  # It is also a way to make sure we got the proper file name for the real test later on.
45549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45550  if test "x$test_shortpath" = x; then
45551    # Short path failed, file does not exist as specified.
45552    # Try adding .exe or .cmd
45553    if test -f "${new_path}.exe"; then
45554      input_to_shortpath="${new_path}.exe"
45555    elif test -f "${new_path}.cmd"; then
45556      input_to_shortpath="${new_path}.cmd"
45557    else
45558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45559$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45562      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45563    fi
45564  else
45565    input_to_shortpath="$new_path"
45566  fi
45567
45568  # Call helper function which possibly converts this using DOS-style short mode.
45569  # If so, the updated path is stored in $new_path.
45570  new_path="$input_to_shortpath"
45571
45572  input_path="$input_to_shortpath"
45573  # Check if we need to convert this using DOS-style short mode. If the path
45574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45575  # take no chances and rewrite it.
45576  # Note: m4 eats our [], so we need to use [ and ] instead.
45577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45578  if test "x$has_forbidden_chars" != x; then
45579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45583      # Going to short mode and back again did indeed matter. Since short mode is
45584      # case insensitive, let's make it lowercase to improve readability.
45585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45586      # Now convert it back to Unix-style (cygpath)
45587      input_path=`$CYGPATH -u "$shortmode_path"`
45588      new_path="$input_path"
45589    fi
45590  fi
45591
45592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45593  if test "x$test_cygdrive_prefix" = x; then
45594    # As a simple fix, exclude /usr/bin since it's not a real path.
45595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45597      # a path prefixed by /cygdrive for fixpath to work.
45598      new_path="$CYGWIN_ROOT_PATH$input_path"
45599    fi
45600  fi
45601
45602  # remove trailing .exe if any
45603  new_path="${new_path/%.exe/}"
45604
45605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45606
45607  # First separate the path from the arguments. This will split at the first
45608  # space.
45609  complete="$BUILD_CXX"
45610  path="${complete%% *}"
45611  tmp="$complete EOL"
45612  arguments="${tmp#* }"
45613
45614  # Input might be given as Windows format, start by converting to
45615  # unix format.
45616  new_path="$path"
45617
45618  windows_path="$new_path"
45619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45620    unix_path=`$CYGPATH -u "$windows_path"`
45621    new_path="$unix_path"
45622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45624    new_path="$unix_path"
45625  fi
45626
45627
45628  # Now try to locate executable using which
45629  new_path=`$WHICH "$new_path" 2> /dev/null`
45630
45631  if test "x$new_path" = x; then
45632    # Oops. Which didn't find the executable.
45633    # The splitting of arguments from the executable at a space might have been incorrect,
45634    # since paths with space are more likely in Windows. Give it another try with the whole
45635    # argument.
45636    path="$complete"
45637    arguments="EOL"
45638    new_path="$path"
45639
45640  windows_path="$new_path"
45641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45642    unix_path=`$CYGPATH -u "$windows_path"`
45643    new_path="$unix_path"
45644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45646    new_path="$unix_path"
45647  fi
45648
45649
45650    new_path=`$WHICH "$new_path" 2> /dev/null`
45651    # bat and cmd files are not always considered executable in MSYS causing which
45652    # to not find them
45653    if test "x$new_path" = x \
45654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45656      new_path="$path"
45657
45658  windows_path="$new_path"
45659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45660    unix_path=`$CYGPATH -u "$windows_path"`
45661    new_path="$unix_path"
45662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45664    new_path="$unix_path"
45665  fi
45666
45667    fi
45668
45669    if test "x$new_path" = x; then
45670      # It's still not found. Now this is an unrecoverable error.
45671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45672$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45673      has_space=`$ECHO "$complete" | $GREP " "`
45674      if test "x$has_space" != x; then
45675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45677      fi
45678      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45679    fi
45680  fi
45681
45682  # Now new_path has a complete unix path to the binary
45683  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45684    # Keep paths in /bin as-is, but remove trailing .exe if any
45685    new_path="${new_path/%.exe/}"
45686    # Do not save /bin paths to all_fixpath_prefixes!
45687  else
45688    # Not in mixed or Windows style, start by that.
45689    new_path=`cmd //c echo $new_path`
45690
45691  input_path="$new_path"
45692  # Check if we need to convert this using DOS-style short mode. If the path
45693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45694  # take no chances and rewrite it.
45695  # Note: m4 eats our [], so we need to use [ and ] instead.
45696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45697  if test "x$has_forbidden_chars" != x; then
45698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45700  fi
45701
45702    # Output is in $new_path
45703
45704  windows_path="$new_path"
45705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45706    unix_path=`$CYGPATH -u "$windows_path"`
45707    new_path="$unix_path"
45708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45710    new_path="$unix_path"
45711  fi
45712
45713    # remove trailing .exe if any
45714    new_path="${new_path/%.exe/}"
45715
45716    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45717    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45718  fi
45719
45720    else
45721      # We're on a unix platform. Hooray! :)
45722      # First separate the path from the arguments. This will split at the first
45723      # space.
45724      complete="$BUILD_CXX"
45725      path="${complete%% *}"
45726      tmp="$complete EOL"
45727      arguments="${tmp#* }"
45728
45729      # Cannot rely on the command "which" here since it doesn't always work.
45730      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45731      if test -z "$is_absolute_path"; then
45732        # Path to executable is not absolute. Find it.
45733        IFS_save="$IFS"
45734        IFS=:
45735        for p in $PATH; do
45736          if test -f "$p/$path" && test -x "$p/$path"; then
45737            new_path="$p/$path"
45738            break
45739          fi
45740        done
45741        IFS="$IFS_save"
45742      else
45743        # This is an absolute path, we can use it without further modifications.
45744        new_path="$path"
45745      fi
45746
45747      if test "x$new_path" = x; then
45748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45749$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45750        has_space=`$ECHO "$complete" | $GREP " "`
45751        if test "x$has_space" != x; then
45752          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45753$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45754        fi
45755        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45756      fi
45757    fi
45758
45759    # Now join together the path and the arguments once again
45760    if test "x$arguments" != xEOL; then
45761      new_complete="$new_path ${arguments% *}"
45762    else
45763      new_complete="$new_path"
45764    fi
45765
45766    if test "x$complete" != "x$new_complete"; then
45767      BUILD_CXX="$new_complete"
45768      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45769$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45770    fi
45771  fi
45772
45773
45774
45775  # Publish this variable in the help.
45776
45777
45778  if [ -z "${BUILD_NM+x}" ]; then
45779    # The variable is not set by user, try to locate tool using the code snippet
45780    for ac_prog in nm gcc-nm
45781do
45782  # Extract the first word of "$ac_prog", so it can be a program name with args.
45783set dummy $ac_prog; ac_word=$2
45784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45785$as_echo_n "checking for $ac_word... " >&6; }
45786if ${ac_cv_path_BUILD_NM+:} false; then :
45787  $as_echo_n "(cached) " >&6
45788else
45789  case $BUILD_NM in
45790  [\\/]* | ?:[\\/]*)
45791  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45792  ;;
45793  *)
45794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45795for as_dir in $PATH
45796do
45797  IFS=$as_save_IFS
45798  test -z "$as_dir" && as_dir=.
45799    for ac_exec_ext in '' $ac_executable_extensions; do
45800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45801    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45803    break 2
45804  fi
45805done
45806  done
45807IFS=$as_save_IFS
45808
45809  ;;
45810esac
45811fi
45812BUILD_NM=$ac_cv_path_BUILD_NM
45813if test -n "$BUILD_NM"; then
45814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45815$as_echo "$BUILD_NM" >&6; }
45816else
45817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45818$as_echo "no" >&6; }
45819fi
45820
45821
45822  test -n "$BUILD_NM" && break
45823done
45824
45825  else
45826    # The variable is set, but is it from the command line or the environment?
45827
45828    # Try to remove the string !BUILD_NM! from our list.
45829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45831      # If it failed, the variable was not from the command line. Ignore it,
45832      # but warn the user (except for BASH, which is always set by the calling BASH).
45833      if test "xBUILD_NM" != xBASH; then
45834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45835$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45836      fi
45837      # Try to locate tool using the code snippet
45838      for ac_prog in nm gcc-nm
45839do
45840  # Extract the first word of "$ac_prog", so it can be a program name with args.
45841set dummy $ac_prog; ac_word=$2
45842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45843$as_echo_n "checking for $ac_word... " >&6; }
45844if ${ac_cv_path_BUILD_NM+:} false; then :
45845  $as_echo_n "(cached) " >&6
45846else
45847  case $BUILD_NM in
45848  [\\/]* | ?:[\\/]*)
45849  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45850  ;;
45851  *)
45852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45853for as_dir in $PATH
45854do
45855  IFS=$as_save_IFS
45856  test -z "$as_dir" && as_dir=.
45857    for ac_exec_ext in '' $ac_executable_extensions; do
45858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45859    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45861    break 2
45862  fi
45863done
45864  done
45865IFS=$as_save_IFS
45866
45867  ;;
45868esac
45869fi
45870BUILD_NM=$ac_cv_path_BUILD_NM
45871if test -n "$BUILD_NM"; then
45872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45873$as_echo "$BUILD_NM" >&6; }
45874else
45875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45876$as_echo "no" >&6; }
45877fi
45878
45879
45880  test -n "$BUILD_NM" && break
45881done
45882
45883    else
45884      # If it succeeded, then it was overridden by the user. We will use it
45885      # for the tool.
45886
45887      # First remove it from the list of overridden variables, so we can test
45888      # for unknown variables in the end.
45889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45890
45891      # Check if we try to supply an empty value
45892      if test "x$BUILD_NM" = x; then
45893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45894$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45896$as_echo_n "checking for BUILD_NM... " >&6; }
45897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45898$as_echo "disabled" >&6; }
45899      else
45900        # Check if the provided tool contains a complete path.
45901        tool_specified="$BUILD_NM"
45902        tool_basename="${tool_specified##*/}"
45903        if test "x$tool_basename" = "x$tool_specified"; then
45904          # A command without a complete path is provided, search $PATH.
45905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45906$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45907          # Extract the first word of "$tool_basename", so it can be a program name with args.
45908set dummy $tool_basename; ac_word=$2
45909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45910$as_echo_n "checking for $ac_word... " >&6; }
45911if ${ac_cv_path_BUILD_NM+:} false; then :
45912  $as_echo_n "(cached) " >&6
45913else
45914  case $BUILD_NM in
45915  [\\/]* | ?:[\\/]*)
45916  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45917  ;;
45918  *)
45919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45920for as_dir in $PATH
45921do
45922  IFS=$as_save_IFS
45923  test -z "$as_dir" && as_dir=.
45924    for ac_exec_ext in '' $ac_executable_extensions; do
45925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45926    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45928    break 2
45929  fi
45930done
45931  done
45932IFS=$as_save_IFS
45933
45934  ;;
45935esac
45936fi
45937BUILD_NM=$ac_cv_path_BUILD_NM
45938if test -n "$BUILD_NM"; then
45939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45940$as_echo "$BUILD_NM" >&6; }
45941else
45942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45943$as_echo "no" >&6; }
45944fi
45945
45946
45947          if test "x$BUILD_NM" = x; then
45948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45949          fi
45950        else
45951          # Otherwise we believe it is a complete path. Use it as it is.
45952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45953$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45955$as_echo_n "checking for BUILD_NM... " >&6; }
45956          if test ! -x "$tool_specified"; then
45957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45958$as_echo "not found" >&6; }
45959            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45960          fi
45961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45962$as_echo "$tool_specified" >&6; }
45963        fi
45964      fi
45965    fi
45966
45967  fi
45968
45969
45970
45971  # Only process if variable expands to non-empty
45972
45973  if test "x$BUILD_NM" != x; then
45974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45975
45976  # First separate the path from the arguments. This will split at the first
45977  # space.
45978  complete="$BUILD_NM"
45979  path="${complete%% *}"
45980  tmp="$complete EOL"
45981  arguments="${tmp#* }"
45982
45983  # Input might be given as Windows format, start by converting to
45984  # unix format.
45985  new_path=`$CYGPATH -u "$path"`
45986
45987  # Now try to locate executable using which
45988  new_path=`$WHICH "$new_path" 2> /dev/null`
45989  # bat and cmd files are not always considered executable in cygwin causing which
45990  # to not find them
45991  if test "x$new_path" = x \
45992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45994    new_path=`$CYGPATH -u "$path"`
45995  fi
45996  if test "x$new_path" = x; then
45997    # Oops. Which didn't find the executable.
45998    # The splitting of arguments from the executable at a space might have been incorrect,
45999    # since paths with space are more likely in Windows. Give it another try with the whole
46000    # argument.
46001    path="$complete"
46002    arguments="EOL"
46003    new_path=`$CYGPATH -u "$path"`
46004    new_path=`$WHICH "$new_path" 2> /dev/null`
46005    # bat and cmd files are not always considered executable in cygwin causing which
46006    # to not find them
46007    if test "x$new_path" = x \
46008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46010      new_path=`$CYGPATH -u "$path"`
46011    fi
46012    if test "x$new_path" = x; then
46013      # It's still not found. Now this is an unrecoverable error.
46014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46015$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46016      has_space=`$ECHO "$complete" | $GREP " "`
46017      if test "x$has_space" != x; then
46018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46020      fi
46021      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46022    fi
46023  fi
46024
46025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46028  # "foo.exe" is OK but "foo" is an error.
46029  #
46030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46031  # It is also a way to make sure we got the proper file name for the real test later on.
46032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46033  if test "x$test_shortpath" = x; then
46034    # Short path failed, file does not exist as specified.
46035    # Try adding .exe or .cmd
46036    if test -f "${new_path}.exe"; then
46037      input_to_shortpath="${new_path}.exe"
46038    elif test -f "${new_path}.cmd"; then
46039      input_to_shortpath="${new_path}.cmd"
46040    else
46041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46042$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46045      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46046    fi
46047  else
46048    input_to_shortpath="$new_path"
46049  fi
46050
46051  # Call helper function which possibly converts this using DOS-style short mode.
46052  # If so, the updated path is stored in $new_path.
46053  new_path="$input_to_shortpath"
46054
46055  input_path="$input_to_shortpath"
46056  # Check if we need to convert this using DOS-style short mode. If the path
46057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46058  # take no chances and rewrite it.
46059  # Note: m4 eats our [], so we need to use [ and ] instead.
46060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46061  if test "x$has_forbidden_chars" != x; then
46062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46066      # Going to short mode and back again did indeed matter. Since short mode is
46067      # case insensitive, let's make it lowercase to improve readability.
46068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46069      # Now convert it back to Unix-style (cygpath)
46070      input_path=`$CYGPATH -u "$shortmode_path"`
46071      new_path="$input_path"
46072    fi
46073  fi
46074
46075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46076  if test "x$test_cygdrive_prefix" = x; then
46077    # As a simple fix, exclude /usr/bin since it's not a real path.
46078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46080      # a path prefixed by /cygdrive for fixpath to work.
46081      new_path="$CYGWIN_ROOT_PATH$input_path"
46082    fi
46083  fi
46084
46085  # remove trailing .exe if any
46086  new_path="${new_path/%.exe/}"
46087
46088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46089
46090  # First separate the path from the arguments. This will split at the first
46091  # space.
46092  complete="$BUILD_NM"
46093  path="${complete%% *}"
46094  tmp="$complete EOL"
46095  arguments="${tmp#* }"
46096
46097  # Input might be given as Windows format, start by converting to
46098  # unix format.
46099  new_path="$path"
46100
46101  windows_path="$new_path"
46102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46103    unix_path=`$CYGPATH -u "$windows_path"`
46104    new_path="$unix_path"
46105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46107    new_path="$unix_path"
46108  fi
46109
46110
46111  # Now try to locate executable using which
46112  new_path=`$WHICH "$new_path" 2> /dev/null`
46113
46114  if test "x$new_path" = x; then
46115    # Oops. Which didn't find the executable.
46116    # The splitting of arguments from the executable at a space might have been incorrect,
46117    # since paths with space are more likely in Windows. Give it another try with the whole
46118    # argument.
46119    path="$complete"
46120    arguments="EOL"
46121    new_path="$path"
46122
46123  windows_path="$new_path"
46124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46125    unix_path=`$CYGPATH -u "$windows_path"`
46126    new_path="$unix_path"
46127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46129    new_path="$unix_path"
46130  fi
46131
46132
46133    new_path=`$WHICH "$new_path" 2> /dev/null`
46134    # bat and cmd files are not always considered executable in MSYS causing which
46135    # to not find them
46136    if test "x$new_path" = x \
46137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46139      new_path="$path"
46140
46141  windows_path="$new_path"
46142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46143    unix_path=`$CYGPATH -u "$windows_path"`
46144    new_path="$unix_path"
46145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46147    new_path="$unix_path"
46148  fi
46149
46150    fi
46151
46152    if test "x$new_path" = x; then
46153      # It's still not found. Now this is an unrecoverable error.
46154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46155$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46156      has_space=`$ECHO "$complete" | $GREP " "`
46157      if test "x$has_space" != x; then
46158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46160      fi
46161      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46162    fi
46163  fi
46164
46165  # Now new_path has a complete unix path to the binary
46166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46167    # Keep paths in /bin as-is, but remove trailing .exe if any
46168    new_path="${new_path/%.exe/}"
46169    # Do not save /bin paths to all_fixpath_prefixes!
46170  else
46171    # Not in mixed or Windows style, start by that.
46172    new_path=`cmd //c echo $new_path`
46173
46174  input_path="$new_path"
46175  # Check if we need to convert this using DOS-style short mode. If the path
46176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46177  # take no chances and rewrite it.
46178  # Note: m4 eats our [], so we need to use [ and ] instead.
46179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46180  if test "x$has_forbidden_chars" != x; then
46181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46183  fi
46184
46185    # Output is in $new_path
46186
46187  windows_path="$new_path"
46188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46189    unix_path=`$CYGPATH -u "$windows_path"`
46190    new_path="$unix_path"
46191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46193    new_path="$unix_path"
46194  fi
46195
46196    # remove trailing .exe if any
46197    new_path="${new_path/%.exe/}"
46198
46199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46201  fi
46202
46203    else
46204      # We're on a unix platform. Hooray! :)
46205      # First separate the path from the arguments. This will split at the first
46206      # space.
46207      complete="$BUILD_NM"
46208      path="${complete%% *}"
46209      tmp="$complete EOL"
46210      arguments="${tmp#* }"
46211
46212      # Cannot rely on the command "which" here since it doesn't always work.
46213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46214      if test -z "$is_absolute_path"; then
46215        # Path to executable is not absolute. Find it.
46216        IFS_save="$IFS"
46217        IFS=:
46218        for p in $PATH; do
46219          if test -f "$p/$path" && test -x "$p/$path"; then
46220            new_path="$p/$path"
46221            break
46222          fi
46223        done
46224        IFS="$IFS_save"
46225      else
46226        # This is an absolute path, we can use it without further modifications.
46227        new_path="$path"
46228      fi
46229
46230      if test "x$new_path" = x; then
46231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46232$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46233        has_space=`$ECHO "$complete" | $GREP " "`
46234        if test "x$has_space" != x; then
46235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46237        fi
46238        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46239      fi
46240    fi
46241
46242    # Now join together the path and the arguments once again
46243    if test "x$arguments" != xEOL; then
46244      new_complete="$new_path ${arguments% *}"
46245    else
46246      new_complete="$new_path"
46247    fi
46248
46249    if test "x$complete" != "x$new_complete"; then
46250      BUILD_NM="$new_complete"
46251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46252$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46253    fi
46254  fi
46255
46256
46257
46258  # Publish this variable in the help.
46259
46260
46261  if [ -z "${BUILD_AR+x}" ]; then
46262    # The variable is not set by user, try to locate tool using the code snippet
46263    for ac_prog in ar gcc-ar
46264do
46265  # Extract the first word of "$ac_prog", so it can be a program name with args.
46266set dummy $ac_prog; ac_word=$2
46267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46268$as_echo_n "checking for $ac_word... " >&6; }
46269if ${ac_cv_path_BUILD_AR+:} false; then :
46270  $as_echo_n "(cached) " >&6
46271else
46272  case $BUILD_AR in
46273  [\\/]* | ?:[\\/]*)
46274  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46275  ;;
46276  *)
46277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46278for as_dir in $PATH
46279do
46280  IFS=$as_save_IFS
46281  test -z "$as_dir" && as_dir=.
46282    for ac_exec_ext in '' $ac_executable_extensions; do
46283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46284    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46286    break 2
46287  fi
46288done
46289  done
46290IFS=$as_save_IFS
46291
46292  ;;
46293esac
46294fi
46295BUILD_AR=$ac_cv_path_BUILD_AR
46296if test -n "$BUILD_AR"; then
46297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46298$as_echo "$BUILD_AR" >&6; }
46299else
46300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46301$as_echo "no" >&6; }
46302fi
46303
46304
46305  test -n "$BUILD_AR" && break
46306done
46307
46308  else
46309    # The variable is set, but is it from the command line or the environment?
46310
46311    # Try to remove the string !BUILD_AR! from our list.
46312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46314      # If it failed, the variable was not from the command line. Ignore it,
46315      # but warn the user (except for BASH, which is always set by the calling BASH).
46316      if test "xBUILD_AR" != xBASH; then
46317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46318$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46319      fi
46320      # Try to locate tool using the code snippet
46321      for ac_prog in ar gcc-ar
46322do
46323  # Extract the first word of "$ac_prog", so it can be a program name with args.
46324set dummy $ac_prog; ac_word=$2
46325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46326$as_echo_n "checking for $ac_word... " >&6; }
46327if ${ac_cv_path_BUILD_AR+:} false; then :
46328  $as_echo_n "(cached) " >&6
46329else
46330  case $BUILD_AR in
46331  [\\/]* | ?:[\\/]*)
46332  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46333  ;;
46334  *)
46335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46336for as_dir in $PATH
46337do
46338  IFS=$as_save_IFS
46339  test -z "$as_dir" && as_dir=.
46340    for ac_exec_ext in '' $ac_executable_extensions; do
46341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46342    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46344    break 2
46345  fi
46346done
46347  done
46348IFS=$as_save_IFS
46349
46350  ;;
46351esac
46352fi
46353BUILD_AR=$ac_cv_path_BUILD_AR
46354if test -n "$BUILD_AR"; then
46355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46356$as_echo "$BUILD_AR" >&6; }
46357else
46358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46359$as_echo "no" >&6; }
46360fi
46361
46362
46363  test -n "$BUILD_AR" && break
46364done
46365
46366    else
46367      # If it succeeded, then it was overridden by the user. We will use it
46368      # for the tool.
46369
46370      # First remove it from the list of overridden variables, so we can test
46371      # for unknown variables in the end.
46372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46373
46374      # Check if we try to supply an empty value
46375      if test "x$BUILD_AR" = x; then
46376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46377$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46379$as_echo_n "checking for BUILD_AR... " >&6; }
46380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46381$as_echo "disabled" >&6; }
46382      else
46383        # Check if the provided tool contains a complete path.
46384        tool_specified="$BUILD_AR"
46385        tool_basename="${tool_specified##*/}"
46386        if test "x$tool_basename" = "x$tool_specified"; then
46387          # A command without a complete path is provided, search $PATH.
46388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46389$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46390          # Extract the first word of "$tool_basename", so it can be a program name with args.
46391set dummy $tool_basename; ac_word=$2
46392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46393$as_echo_n "checking for $ac_word... " >&6; }
46394if ${ac_cv_path_BUILD_AR+:} false; then :
46395  $as_echo_n "(cached) " >&6
46396else
46397  case $BUILD_AR in
46398  [\\/]* | ?:[\\/]*)
46399  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46400  ;;
46401  *)
46402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46403for as_dir in $PATH
46404do
46405  IFS=$as_save_IFS
46406  test -z "$as_dir" && as_dir=.
46407    for ac_exec_ext in '' $ac_executable_extensions; do
46408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46409    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46411    break 2
46412  fi
46413done
46414  done
46415IFS=$as_save_IFS
46416
46417  ;;
46418esac
46419fi
46420BUILD_AR=$ac_cv_path_BUILD_AR
46421if test -n "$BUILD_AR"; then
46422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46423$as_echo "$BUILD_AR" >&6; }
46424else
46425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46426$as_echo "no" >&6; }
46427fi
46428
46429
46430          if test "x$BUILD_AR" = x; then
46431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46432          fi
46433        else
46434          # Otherwise we believe it is a complete path. Use it as it is.
46435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46436$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46438$as_echo_n "checking for BUILD_AR... " >&6; }
46439          if test ! -x "$tool_specified"; then
46440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46441$as_echo "not found" >&6; }
46442            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46443          fi
46444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46445$as_echo "$tool_specified" >&6; }
46446        fi
46447      fi
46448    fi
46449
46450  fi
46451
46452
46453
46454  # Only process if variable expands to non-empty
46455
46456  if test "x$BUILD_AR" != x; then
46457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46458
46459  # First separate the path from the arguments. This will split at the first
46460  # space.
46461  complete="$BUILD_AR"
46462  path="${complete%% *}"
46463  tmp="$complete EOL"
46464  arguments="${tmp#* }"
46465
46466  # Input might be given as Windows format, start by converting to
46467  # unix format.
46468  new_path=`$CYGPATH -u "$path"`
46469
46470  # Now try to locate executable using which
46471  new_path=`$WHICH "$new_path" 2> /dev/null`
46472  # bat and cmd files are not always considered executable in cygwin causing which
46473  # to not find them
46474  if test "x$new_path" = x \
46475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46477    new_path=`$CYGPATH -u "$path"`
46478  fi
46479  if test "x$new_path" = x; then
46480    # Oops. Which didn't find the executable.
46481    # The splitting of arguments from the executable at a space might have been incorrect,
46482    # since paths with space are more likely in Windows. Give it another try with the whole
46483    # argument.
46484    path="$complete"
46485    arguments="EOL"
46486    new_path=`$CYGPATH -u "$path"`
46487    new_path=`$WHICH "$new_path" 2> /dev/null`
46488    # bat and cmd files are not always considered executable in cygwin causing which
46489    # to not find them
46490    if test "x$new_path" = x \
46491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46493      new_path=`$CYGPATH -u "$path"`
46494    fi
46495    if test "x$new_path" = x; then
46496      # It's still not found. Now this is an unrecoverable error.
46497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46498$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46499      has_space=`$ECHO "$complete" | $GREP " "`
46500      if test "x$has_space" != x; then
46501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46503      fi
46504      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46505    fi
46506  fi
46507
46508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46511  # "foo.exe" is OK but "foo" is an error.
46512  #
46513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46514  # It is also a way to make sure we got the proper file name for the real test later on.
46515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46516  if test "x$test_shortpath" = x; then
46517    # Short path failed, file does not exist as specified.
46518    # Try adding .exe or .cmd
46519    if test -f "${new_path}.exe"; then
46520      input_to_shortpath="${new_path}.exe"
46521    elif test -f "${new_path}.cmd"; then
46522      input_to_shortpath="${new_path}.cmd"
46523    else
46524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46525$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46528      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46529    fi
46530  else
46531    input_to_shortpath="$new_path"
46532  fi
46533
46534  # Call helper function which possibly converts this using DOS-style short mode.
46535  # If so, the updated path is stored in $new_path.
46536  new_path="$input_to_shortpath"
46537
46538  input_path="$input_to_shortpath"
46539  # Check if we need to convert this using DOS-style short mode. If the path
46540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46541  # take no chances and rewrite it.
46542  # Note: m4 eats our [], so we need to use [ and ] instead.
46543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46544  if test "x$has_forbidden_chars" != x; then
46545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46549      # Going to short mode and back again did indeed matter. Since short mode is
46550      # case insensitive, let's make it lowercase to improve readability.
46551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46552      # Now convert it back to Unix-style (cygpath)
46553      input_path=`$CYGPATH -u "$shortmode_path"`
46554      new_path="$input_path"
46555    fi
46556  fi
46557
46558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46559  if test "x$test_cygdrive_prefix" = x; then
46560    # As a simple fix, exclude /usr/bin since it's not a real path.
46561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46563      # a path prefixed by /cygdrive for fixpath to work.
46564      new_path="$CYGWIN_ROOT_PATH$input_path"
46565    fi
46566  fi
46567
46568  # remove trailing .exe if any
46569  new_path="${new_path/%.exe/}"
46570
46571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46572
46573  # First separate the path from the arguments. This will split at the first
46574  # space.
46575  complete="$BUILD_AR"
46576  path="${complete%% *}"
46577  tmp="$complete EOL"
46578  arguments="${tmp#* }"
46579
46580  # Input might be given as Windows format, start by converting to
46581  # unix format.
46582  new_path="$path"
46583
46584  windows_path="$new_path"
46585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46586    unix_path=`$CYGPATH -u "$windows_path"`
46587    new_path="$unix_path"
46588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46590    new_path="$unix_path"
46591  fi
46592
46593
46594  # Now try to locate executable using which
46595  new_path=`$WHICH "$new_path" 2> /dev/null`
46596
46597  if test "x$new_path" = x; then
46598    # Oops. Which didn't find the executable.
46599    # The splitting of arguments from the executable at a space might have been incorrect,
46600    # since paths with space are more likely in Windows. Give it another try with the whole
46601    # argument.
46602    path="$complete"
46603    arguments="EOL"
46604    new_path="$path"
46605
46606  windows_path="$new_path"
46607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46608    unix_path=`$CYGPATH -u "$windows_path"`
46609    new_path="$unix_path"
46610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46612    new_path="$unix_path"
46613  fi
46614
46615
46616    new_path=`$WHICH "$new_path" 2> /dev/null`
46617    # bat and cmd files are not always considered executable in MSYS causing which
46618    # to not find them
46619    if test "x$new_path" = x \
46620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46622      new_path="$path"
46623
46624  windows_path="$new_path"
46625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46626    unix_path=`$CYGPATH -u "$windows_path"`
46627    new_path="$unix_path"
46628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46630    new_path="$unix_path"
46631  fi
46632
46633    fi
46634
46635    if test "x$new_path" = x; then
46636      # It's still not found. Now this is an unrecoverable error.
46637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46638$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46639      has_space=`$ECHO "$complete" | $GREP " "`
46640      if test "x$has_space" != x; then
46641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46643      fi
46644      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46645    fi
46646  fi
46647
46648  # Now new_path has a complete unix path to the binary
46649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46650    # Keep paths in /bin as-is, but remove trailing .exe if any
46651    new_path="${new_path/%.exe/}"
46652    # Do not save /bin paths to all_fixpath_prefixes!
46653  else
46654    # Not in mixed or Windows style, start by that.
46655    new_path=`cmd //c echo $new_path`
46656
46657  input_path="$new_path"
46658  # Check if we need to convert this using DOS-style short mode. If the path
46659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46660  # take no chances and rewrite it.
46661  # Note: m4 eats our [], so we need to use [ and ] instead.
46662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46663  if test "x$has_forbidden_chars" != x; then
46664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46666  fi
46667
46668    # Output is in $new_path
46669
46670  windows_path="$new_path"
46671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46672    unix_path=`$CYGPATH -u "$windows_path"`
46673    new_path="$unix_path"
46674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46676    new_path="$unix_path"
46677  fi
46678
46679    # remove trailing .exe if any
46680    new_path="${new_path/%.exe/}"
46681
46682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46684  fi
46685
46686    else
46687      # We're on a unix platform. Hooray! :)
46688      # First separate the path from the arguments. This will split at the first
46689      # space.
46690      complete="$BUILD_AR"
46691      path="${complete%% *}"
46692      tmp="$complete EOL"
46693      arguments="${tmp#* }"
46694
46695      # Cannot rely on the command "which" here since it doesn't always work.
46696      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46697      if test -z "$is_absolute_path"; then
46698        # Path to executable is not absolute. Find it.
46699        IFS_save="$IFS"
46700        IFS=:
46701        for p in $PATH; do
46702          if test -f "$p/$path" && test -x "$p/$path"; then
46703            new_path="$p/$path"
46704            break
46705          fi
46706        done
46707        IFS="$IFS_save"
46708      else
46709        # This is an absolute path, we can use it without further modifications.
46710        new_path="$path"
46711      fi
46712
46713      if test "x$new_path" = x; then
46714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46715$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46716        has_space=`$ECHO "$complete" | $GREP " "`
46717        if test "x$has_space" != x; then
46718          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46720        fi
46721        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46722      fi
46723    fi
46724
46725    # Now join together the path and the arguments once again
46726    if test "x$arguments" != xEOL; then
46727      new_complete="$new_path ${arguments% *}"
46728    else
46729      new_complete="$new_path"
46730    fi
46731
46732    if test "x$complete" != "x$new_complete"; then
46733      BUILD_AR="$new_complete"
46734      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46735$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46736    fi
46737  fi
46738
46739
46740
46741  # Publish this variable in the help.
46742
46743
46744  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46745    # The variable is not set by user, try to locate tool using the code snippet
46746    for ac_prog in objcopy
46747do
46748  # Extract the first word of "$ac_prog", so it can be a program name with args.
46749set dummy $ac_prog; ac_word=$2
46750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46751$as_echo_n "checking for $ac_word... " >&6; }
46752if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46753  $as_echo_n "(cached) " >&6
46754else
46755  case $BUILD_OBJCOPY in
46756  [\\/]* | ?:[\\/]*)
46757  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46758  ;;
46759  *)
46760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46761for as_dir in $PATH
46762do
46763  IFS=$as_save_IFS
46764  test -z "$as_dir" && as_dir=.
46765    for ac_exec_ext in '' $ac_executable_extensions; do
46766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46767    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46769    break 2
46770  fi
46771done
46772  done
46773IFS=$as_save_IFS
46774
46775  ;;
46776esac
46777fi
46778BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46779if test -n "$BUILD_OBJCOPY"; then
46780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46781$as_echo "$BUILD_OBJCOPY" >&6; }
46782else
46783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46784$as_echo "no" >&6; }
46785fi
46786
46787
46788  test -n "$BUILD_OBJCOPY" && break
46789done
46790
46791  else
46792    # The variable is set, but is it from the command line or the environment?
46793
46794    # Try to remove the string !BUILD_OBJCOPY! from our list.
46795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46797      # If it failed, the variable was not from the command line. Ignore it,
46798      # but warn the user (except for BASH, which is always set by the calling BASH).
46799      if test "xBUILD_OBJCOPY" != xBASH; then
46800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46801$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46802      fi
46803      # Try to locate tool using the code snippet
46804      for ac_prog in objcopy
46805do
46806  # Extract the first word of "$ac_prog", so it can be a program name with args.
46807set dummy $ac_prog; ac_word=$2
46808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46809$as_echo_n "checking for $ac_word... " >&6; }
46810if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46811  $as_echo_n "(cached) " >&6
46812else
46813  case $BUILD_OBJCOPY in
46814  [\\/]* | ?:[\\/]*)
46815  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46816  ;;
46817  *)
46818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46819for as_dir in $PATH
46820do
46821  IFS=$as_save_IFS
46822  test -z "$as_dir" && as_dir=.
46823    for ac_exec_ext in '' $ac_executable_extensions; do
46824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46825    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46827    break 2
46828  fi
46829done
46830  done
46831IFS=$as_save_IFS
46832
46833  ;;
46834esac
46835fi
46836BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46837if test -n "$BUILD_OBJCOPY"; then
46838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46839$as_echo "$BUILD_OBJCOPY" >&6; }
46840else
46841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46842$as_echo "no" >&6; }
46843fi
46844
46845
46846  test -n "$BUILD_OBJCOPY" && break
46847done
46848
46849    else
46850      # If it succeeded, then it was overridden by the user. We will use it
46851      # for the tool.
46852
46853      # First remove it from the list of overridden variables, so we can test
46854      # for unknown variables in the end.
46855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46856
46857      # Check if we try to supply an empty value
46858      if test "x$BUILD_OBJCOPY" = x; then
46859        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46860$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46862$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46864$as_echo "disabled" >&6; }
46865      else
46866        # Check if the provided tool contains a complete path.
46867        tool_specified="$BUILD_OBJCOPY"
46868        tool_basename="${tool_specified##*/}"
46869        if test "x$tool_basename" = "x$tool_specified"; then
46870          # A command without a complete path is provided, search $PATH.
46871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46872$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46873          # Extract the first word of "$tool_basename", so it can be a program name with args.
46874set dummy $tool_basename; ac_word=$2
46875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46876$as_echo_n "checking for $ac_word... " >&6; }
46877if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46878  $as_echo_n "(cached) " >&6
46879else
46880  case $BUILD_OBJCOPY in
46881  [\\/]* | ?:[\\/]*)
46882  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46883  ;;
46884  *)
46885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46886for as_dir in $PATH
46887do
46888  IFS=$as_save_IFS
46889  test -z "$as_dir" && as_dir=.
46890    for ac_exec_ext in '' $ac_executable_extensions; do
46891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46892    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46894    break 2
46895  fi
46896done
46897  done
46898IFS=$as_save_IFS
46899
46900  ;;
46901esac
46902fi
46903BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46904if test -n "$BUILD_OBJCOPY"; then
46905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46906$as_echo "$BUILD_OBJCOPY" >&6; }
46907else
46908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46909$as_echo "no" >&6; }
46910fi
46911
46912
46913          if test "x$BUILD_OBJCOPY" = x; then
46914            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46915          fi
46916        else
46917          # Otherwise we believe it is a complete path. Use it as it is.
46918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46919$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46920          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46921$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46922          if test ! -x "$tool_specified"; then
46923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46924$as_echo "not found" >&6; }
46925            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46926          fi
46927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46928$as_echo "$tool_specified" >&6; }
46929        fi
46930      fi
46931    fi
46932
46933  fi
46934
46935
46936
46937  # Only process if variable expands to non-empty
46938
46939  if test "x$BUILD_OBJCOPY" != x; then
46940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46941
46942  # First separate the path from the arguments. This will split at the first
46943  # space.
46944  complete="$BUILD_OBJCOPY"
46945  path="${complete%% *}"
46946  tmp="$complete EOL"
46947  arguments="${tmp#* }"
46948
46949  # Input might be given as Windows format, start by converting to
46950  # unix format.
46951  new_path=`$CYGPATH -u "$path"`
46952
46953  # Now try to locate executable using which
46954  new_path=`$WHICH "$new_path" 2> /dev/null`
46955  # bat and cmd files are not always considered executable in cygwin causing which
46956  # to not find them
46957  if test "x$new_path" = x \
46958      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46959      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46960    new_path=`$CYGPATH -u "$path"`
46961  fi
46962  if test "x$new_path" = x; then
46963    # Oops. Which didn't find the executable.
46964    # The splitting of arguments from the executable at a space might have been incorrect,
46965    # since paths with space are more likely in Windows. Give it another try with the whole
46966    # argument.
46967    path="$complete"
46968    arguments="EOL"
46969    new_path=`$CYGPATH -u "$path"`
46970    new_path=`$WHICH "$new_path" 2> /dev/null`
46971    # bat and cmd files are not always considered executable in cygwin causing which
46972    # to not find them
46973    if test "x$new_path" = x \
46974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46976      new_path=`$CYGPATH -u "$path"`
46977    fi
46978    if test "x$new_path" = x; then
46979      # It's still not found. Now this is an unrecoverable error.
46980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46981$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46982      has_space=`$ECHO "$complete" | $GREP " "`
46983      if test "x$has_space" != x; then
46984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46986      fi
46987      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46988    fi
46989  fi
46990
46991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46994  # "foo.exe" is OK but "foo" is an error.
46995  #
46996  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46997  # It is also a way to make sure we got the proper file name for the real test later on.
46998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46999  if test "x$test_shortpath" = x; then
47000    # Short path failed, file does not exist as specified.
47001    # Try adding .exe or .cmd
47002    if test -f "${new_path}.exe"; then
47003      input_to_shortpath="${new_path}.exe"
47004    elif test -f "${new_path}.cmd"; then
47005      input_to_shortpath="${new_path}.cmd"
47006    else
47007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47008$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47010$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47011      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47012    fi
47013  else
47014    input_to_shortpath="$new_path"
47015  fi
47016
47017  # Call helper function which possibly converts this using DOS-style short mode.
47018  # If so, the updated path is stored in $new_path.
47019  new_path="$input_to_shortpath"
47020
47021  input_path="$input_to_shortpath"
47022  # Check if we need to convert this using DOS-style short mode. If the path
47023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47024  # take no chances and rewrite it.
47025  # Note: m4 eats our [], so we need to use [ and ] instead.
47026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47027  if test "x$has_forbidden_chars" != x; then
47028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47032      # Going to short mode and back again did indeed matter. Since short mode is
47033      # case insensitive, let's make it lowercase to improve readability.
47034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47035      # Now convert it back to Unix-style (cygpath)
47036      input_path=`$CYGPATH -u "$shortmode_path"`
47037      new_path="$input_path"
47038    fi
47039  fi
47040
47041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47042  if test "x$test_cygdrive_prefix" = x; then
47043    # As a simple fix, exclude /usr/bin since it's not a real path.
47044    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47046      # a path prefixed by /cygdrive for fixpath to work.
47047      new_path="$CYGWIN_ROOT_PATH$input_path"
47048    fi
47049  fi
47050
47051  # remove trailing .exe if any
47052  new_path="${new_path/%.exe/}"
47053
47054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47055
47056  # First separate the path from the arguments. This will split at the first
47057  # space.
47058  complete="$BUILD_OBJCOPY"
47059  path="${complete%% *}"
47060  tmp="$complete EOL"
47061  arguments="${tmp#* }"
47062
47063  # Input might be given as Windows format, start by converting to
47064  # unix format.
47065  new_path="$path"
47066
47067  windows_path="$new_path"
47068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069    unix_path=`$CYGPATH -u "$windows_path"`
47070    new_path="$unix_path"
47071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47073    new_path="$unix_path"
47074  fi
47075
47076
47077  # Now try to locate executable using which
47078  new_path=`$WHICH "$new_path" 2> /dev/null`
47079
47080  if test "x$new_path" = x; then
47081    # Oops. Which didn't find the executable.
47082    # The splitting of arguments from the executable at a space might have been incorrect,
47083    # since paths with space are more likely in Windows. Give it another try with the whole
47084    # argument.
47085    path="$complete"
47086    arguments="EOL"
47087    new_path="$path"
47088
47089  windows_path="$new_path"
47090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47091    unix_path=`$CYGPATH -u "$windows_path"`
47092    new_path="$unix_path"
47093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47095    new_path="$unix_path"
47096  fi
47097
47098
47099    new_path=`$WHICH "$new_path" 2> /dev/null`
47100    # bat and cmd files are not always considered executable in MSYS causing which
47101    # to not find them
47102    if test "x$new_path" = x \
47103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47105      new_path="$path"
47106
47107  windows_path="$new_path"
47108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47109    unix_path=`$CYGPATH -u "$windows_path"`
47110    new_path="$unix_path"
47111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47113    new_path="$unix_path"
47114  fi
47115
47116    fi
47117
47118    if test "x$new_path" = x; then
47119      # It's still not found. Now this is an unrecoverable error.
47120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47121$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47122      has_space=`$ECHO "$complete" | $GREP " "`
47123      if test "x$has_space" != x; then
47124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47126      fi
47127      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47128    fi
47129  fi
47130
47131  # Now new_path has a complete unix path to the binary
47132  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47133    # Keep paths in /bin as-is, but remove trailing .exe if any
47134    new_path="${new_path/%.exe/}"
47135    # Do not save /bin paths to all_fixpath_prefixes!
47136  else
47137    # Not in mixed or Windows style, start by that.
47138    new_path=`cmd //c echo $new_path`
47139
47140  input_path="$new_path"
47141  # Check if we need to convert this using DOS-style short mode. If the path
47142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47143  # take no chances and rewrite it.
47144  # Note: m4 eats our [], so we need to use [ and ] instead.
47145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47146  if test "x$has_forbidden_chars" != x; then
47147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47149  fi
47150
47151    # Output is in $new_path
47152
47153  windows_path="$new_path"
47154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155    unix_path=`$CYGPATH -u "$windows_path"`
47156    new_path="$unix_path"
47157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47159    new_path="$unix_path"
47160  fi
47161
47162    # remove trailing .exe if any
47163    new_path="${new_path/%.exe/}"
47164
47165    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47166    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47167  fi
47168
47169    else
47170      # We're on a unix platform. Hooray! :)
47171      # First separate the path from the arguments. This will split at the first
47172      # space.
47173      complete="$BUILD_OBJCOPY"
47174      path="${complete%% *}"
47175      tmp="$complete EOL"
47176      arguments="${tmp#* }"
47177
47178      # Cannot rely on the command "which" here since it doesn't always work.
47179      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47180      if test -z "$is_absolute_path"; then
47181        # Path to executable is not absolute. Find it.
47182        IFS_save="$IFS"
47183        IFS=:
47184        for p in $PATH; do
47185          if test -f "$p/$path" && test -x "$p/$path"; then
47186            new_path="$p/$path"
47187            break
47188          fi
47189        done
47190        IFS="$IFS_save"
47191      else
47192        # This is an absolute path, we can use it without further modifications.
47193        new_path="$path"
47194      fi
47195
47196      if test "x$new_path" = x; then
47197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47198$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47199        has_space=`$ECHO "$complete" | $GREP " "`
47200        if test "x$has_space" != x; then
47201          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47202$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47203        fi
47204        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47205      fi
47206    fi
47207
47208    # Now join together the path and the arguments once again
47209    if test "x$arguments" != xEOL; then
47210      new_complete="$new_path ${arguments% *}"
47211    else
47212      new_complete="$new_path"
47213    fi
47214
47215    if test "x$complete" != "x$new_complete"; then
47216      BUILD_OBJCOPY="$new_complete"
47217      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47218$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47219    fi
47220  fi
47221
47222
47223
47224  # Publish this variable in the help.
47225
47226
47227  if [ -z "${BUILD_STRIP+x}" ]; then
47228    # The variable is not set by user, try to locate tool using the code snippet
47229    for ac_prog in strip
47230do
47231  # Extract the first word of "$ac_prog", so it can be a program name with args.
47232set dummy $ac_prog; ac_word=$2
47233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47234$as_echo_n "checking for $ac_word... " >&6; }
47235if ${ac_cv_path_BUILD_STRIP+:} false; then :
47236  $as_echo_n "(cached) " >&6
47237else
47238  case $BUILD_STRIP in
47239  [\\/]* | ?:[\\/]*)
47240  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47241  ;;
47242  *)
47243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47244for as_dir in $PATH
47245do
47246  IFS=$as_save_IFS
47247  test -z "$as_dir" && as_dir=.
47248    for ac_exec_ext in '' $ac_executable_extensions; do
47249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47250    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47252    break 2
47253  fi
47254done
47255  done
47256IFS=$as_save_IFS
47257
47258  ;;
47259esac
47260fi
47261BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47262if test -n "$BUILD_STRIP"; then
47263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47264$as_echo "$BUILD_STRIP" >&6; }
47265else
47266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47267$as_echo "no" >&6; }
47268fi
47269
47270
47271  test -n "$BUILD_STRIP" && break
47272done
47273
47274  else
47275    # The variable is set, but is it from the command line or the environment?
47276
47277    # Try to remove the string !BUILD_STRIP! from our list.
47278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47280      # If it failed, the variable was not from the command line. Ignore it,
47281      # but warn the user (except for BASH, which is always set by the calling BASH).
47282      if test "xBUILD_STRIP" != xBASH; then
47283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47284$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47285      fi
47286      # Try to locate tool using the code snippet
47287      for ac_prog in strip
47288do
47289  # Extract the first word of "$ac_prog", so it can be a program name with args.
47290set dummy $ac_prog; ac_word=$2
47291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47292$as_echo_n "checking for $ac_word... " >&6; }
47293if ${ac_cv_path_BUILD_STRIP+:} false; then :
47294  $as_echo_n "(cached) " >&6
47295else
47296  case $BUILD_STRIP in
47297  [\\/]* | ?:[\\/]*)
47298  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47299  ;;
47300  *)
47301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47302for as_dir in $PATH
47303do
47304  IFS=$as_save_IFS
47305  test -z "$as_dir" && as_dir=.
47306    for ac_exec_ext in '' $ac_executable_extensions; do
47307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47308    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47310    break 2
47311  fi
47312done
47313  done
47314IFS=$as_save_IFS
47315
47316  ;;
47317esac
47318fi
47319BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47320if test -n "$BUILD_STRIP"; then
47321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47322$as_echo "$BUILD_STRIP" >&6; }
47323else
47324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47325$as_echo "no" >&6; }
47326fi
47327
47328
47329  test -n "$BUILD_STRIP" && break
47330done
47331
47332    else
47333      # If it succeeded, then it was overridden by the user. We will use it
47334      # for the tool.
47335
47336      # First remove it from the list of overridden variables, so we can test
47337      # for unknown variables in the end.
47338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47339
47340      # Check if we try to supply an empty value
47341      if test "x$BUILD_STRIP" = x; then
47342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47343$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47345$as_echo_n "checking for BUILD_STRIP... " >&6; }
47346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47347$as_echo "disabled" >&6; }
47348      else
47349        # Check if the provided tool contains a complete path.
47350        tool_specified="$BUILD_STRIP"
47351        tool_basename="${tool_specified##*/}"
47352        if test "x$tool_basename" = "x$tool_specified"; then
47353          # A command without a complete path is provided, search $PATH.
47354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47355$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47356          # Extract the first word of "$tool_basename", so it can be a program name with args.
47357set dummy $tool_basename; ac_word=$2
47358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47359$as_echo_n "checking for $ac_word... " >&6; }
47360if ${ac_cv_path_BUILD_STRIP+:} false; then :
47361  $as_echo_n "(cached) " >&6
47362else
47363  case $BUILD_STRIP in
47364  [\\/]* | ?:[\\/]*)
47365  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47366  ;;
47367  *)
47368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47369for as_dir in $PATH
47370do
47371  IFS=$as_save_IFS
47372  test -z "$as_dir" && as_dir=.
47373    for ac_exec_ext in '' $ac_executable_extensions; do
47374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47375    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47377    break 2
47378  fi
47379done
47380  done
47381IFS=$as_save_IFS
47382
47383  ;;
47384esac
47385fi
47386BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47387if test -n "$BUILD_STRIP"; then
47388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47389$as_echo "$BUILD_STRIP" >&6; }
47390else
47391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47392$as_echo "no" >&6; }
47393fi
47394
47395
47396          if test "x$BUILD_STRIP" = x; then
47397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47398          fi
47399        else
47400          # Otherwise we believe it is a complete path. Use it as it is.
47401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47402$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47404$as_echo_n "checking for BUILD_STRIP... " >&6; }
47405          if test ! -x "$tool_specified"; then
47406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47407$as_echo "not found" >&6; }
47408            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47409          fi
47410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47411$as_echo "$tool_specified" >&6; }
47412        fi
47413      fi
47414    fi
47415
47416  fi
47417
47418
47419
47420  # Only process if variable expands to non-empty
47421
47422  if test "x$BUILD_STRIP" != x; then
47423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47424
47425  # First separate the path from the arguments. This will split at the first
47426  # space.
47427  complete="$BUILD_STRIP"
47428  path="${complete%% *}"
47429  tmp="$complete EOL"
47430  arguments="${tmp#* }"
47431
47432  # Input might be given as Windows format, start by converting to
47433  # unix format.
47434  new_path=`$CYGPATH -u "$path"`
47435
47436  # Now try to locate executable using which
47437  new_path=`$WHICH "$new_path" 2> /dev/null`
47438  # bat and cmd files are not always considered executable in cygwin causing which
47439  # to not find them
47440  if test "x$new_path" = x \
47441      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47442      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47443    new_path=`$CYGPATH -u "$path"`
47444  fi
47445  if test "x$new_path" = x; then
47446    # Oops. Which didn't find the executable.
47447    # The splitting of arguments from the executable at a space might have been incorrect,
47448    # since paths with space are more likely in Windows. Give it another try with the whole
47449    # argument.
47450    path="$complete"
47451    arguments="EOL"
47452    new_path=`$CYGPATH -u "$path"`
47453    new_path=`$WHICH "$new_path" 2> /dev/null`
47454    # bat and cmd files are not always considered executable in cygwin causing which
47455    # to not find them
47456    if test "x$new_path" = x \
47457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47459      new_path=`$CYGPATH -u "$path"`
47460    fi
47461    if test "x$new_path" = x; then
47462      # It's still not found. Now this is an unrecoverable error.
47463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47464$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47465      has_space=`$ECHO "$complete" | $GREP " "`
47466      if test "x$has_space" != x; then
47467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47469      fi
47470      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47471    fi
47472  fi
47473
47474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47477  # "foo.exe" is OK but "foo" is an error.
47478  #
47479  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47480  # It is also a way to make sure we got the proper file name for the real test later on.
47481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47482  if test "x$test_shortpath" = x; then
47483    # Short path failed, file does not exist as specified.
47484    # Try adding .exe or .cmd
47485    if test -f "${new_path}.exe"; then
47486      input_to_shortpath="${new_path}.exe"
47487    elif test -f "${new_path}.cmd"; then
47488      input_to_shortpath="${new_path}.cmd"
47489    else
47490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47491$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47493$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47494      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47495    fi
47496  else
47497    input_to_shortpath="$new_path"
47498  fi
47499
47500  # Call helper function which possibly converts this using DOS-style short mode.
47501  # If so, the updated path is stored in $new_path.
47502  new_path="$input_to_shortpath"
47503
47504  input_path="$input_to_shortpath"
47505  # Check if we need to convert this using DOS-style short mode. If the path
47506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47507  # take no chances and rewrite it.
47508  # Note: m4 eats our [], so we need to use [ and ] instead.
47509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47510  if test "x$has_forbidden_chars" != x; then
47511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47512    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47513    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47514    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47515      # Going to short mode and back again did indeed matter. Since short mode is
47516      # case insensitive, let's make it lowercase to improve readability.
47517      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47518      # Now convert it back to Unix-style (cygpath)
47519      input_path=`$CYGPATH -u "$shortmode_path"`
47520      new_path="$input_path"
47521    fi
47522  fi
47523
47524  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47525  if test "x$test_cygdrive_prefix" = x; then
47526    # As a simple fix, exclude /usr/bin since it's not a real path.
47527    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47528      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47529      # a path prefixed by /cygdrive for fixpath to work.
47530      new_path="$CYGWIN_ROOT_PATH$input_path"
47531    fi
47532  fi
47533
47534  # remove trailing .exe if any
47535  new_path="${new_path/%.exe/}"
47536
47537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47538
47539  # First separate the path from the arguments. This will split at the first
47540  # space.
47541  complete="$BUILD_STRIP"
47542  path="${complete%% *}"
47543  tmp="$complete EOL"
47544  arguments="${tmp#* }"
47545
47546  # Input might be given as Windows format, start by converting to
47547  # unix format.
47548  new_path="$path"
47549
47550  windows_path="$new_path"
47551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47552    unix_path=`$CYGPATH -u "$windows_path"`
47553    new_path="$unix_path"
47554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47556    new_path="$unix_path"
47557  fi
47558
47559
47560  # Now try to locate executable using which
47561  new_path=`$WHICH "$new_path" 2> /dev/null`
47562
47563  if test "x$new_path" = x; then
47564    # Oops. Which didn't find the executable.
47565    # The splitting of arguments from the executable at a space might have been incorrect,
47566    # since paths with space are more likely in Windows. Give it another try with the whole
47567    # argument.
47568    path="$complete"
47569    arguments="EOL"
47570    new_path="$path"
47571
47572  windows_path="$new_path"
47573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47574    unix_path=`$CYGPATH -u "$windows_path"`
47575    new_path="$unix_path"
47576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47578    new_path="$unix_path"
47579  fi
47580
47581
47582    new_path=`$WHICH "$new_path" 2> /dev/null`
47583    # bat and cmd files are not always considered executable in MSYS causing which
47584    # to not find them
47585    if test "x$new_path" = x \
47586        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47587        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47588      new_path="$path"
47589
47590  windows_path="$new_path"
47591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47592    unix_path=`$CYGPATH -u "$windows_path"`
47593    new_path="$unix_path"
47594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47596    new_path="$unix_path"
47597  fi
47598
47599    fi
47600
47601    if test "x$new_path" = x; then
47602      # It's still not found. Now this is an unrecoverable error.
47603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47604$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47605      has_space=`$ECHO "$complete" | $GREP " "`
47606      if test "x$has_space" != x; then
47607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47609      fi
47610      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47611    fi
47612  fi
47613
47614  # Now new_path has a complete unix path to the binary
47615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47616    # Keep paths in /bin as-is, but remove trailing .exe if any
47617    new_path="${new_path/%.exe/}"
47618    # Do not save /bin paths to all_fixpath_prefixes!
47619  else
47620    # Not in mixed or Windows style, start by that.
47621    new_path=`cmd //c echo $new_path`
47622
47623  input_path="$new_path"
47624  # Check if we need to convert this using DOS-style short mode. If the path
47625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47626  # take no chances and rewrite it.
47627  # Note: m4 eats our [], so we need to use [ and ] instead.
47628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47629  if test "x$has_forbidden_chars" != x; then
47630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47632  fi
47633
47634    # Output is in $new_path
47635
47636  windows_path="$new_path"
47637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47638    unix_path=`$CYGPATH -u "$windows_path"`
47639    new_path="$unix_path"
47640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47642    new_path="$unix_path"
47643  fi
47644
47645    # remove trailing .exe if any
47646    new_path="${new_path/%.exe/}"
47647
47648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47650  fi
47651
47652    else
47653      # We're on a unix platform. Hooray! :)
47654      # First separate the path from the arguments. This will split at the first
47655      # space.
47656      complete="$BUILD_STRIP"
47657      path="${complete%% *}"
47658      tmp="$complete EOL"
47659      arguments="${tmp#* }"
47660
47661      # Cannot rely on the command "which" here since it doesn't always work.
47662      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47663      if test -z "$is_absolute_path"; then
47664        # Path to executable is not absolute. Find it.
47665        IFS_save="$IFS"
47666        IFS=:
47667        for p in $PATH; do
47668          if test -f "$p/$path" && test -x "$p/$path"; then
47669            new_path="$p/$path"
47670            break
47671          fi
47672        done
47673        IFS="$IFS_save"
47674      else
47675        # This is an absolute path, we can use it without further modifications.
47676        new_path="$path"
47677      fi
47678
47679      if test "x$new_path" = x; then
47680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47681$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47682        has_space=`$ECHO "$complete" | $GREP " "`
47683        if test "x$has_space" != x; then
47684          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47685$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47686        fi
47687        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47688      fi
47689    fi
47690
47691    # Now join together the path and the arguments once again
47692    if test "x$arguments" != xEOL; then
47693      new_complete="$new_path ${arguments% *}"
47694    else
47695      new_complete="$new_path"
47696    fi
47697
47698    if test "x$complete" != "x$new_complete"; then
47699      BUILD_STRIP="$new_complete"
47700      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47701$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47702    fi
47703  fi
47704
47705    # Assume the C compiler is the assembler
47706    BUILD_AS="$BUILD_CC -c"
47707    # Just like for the target compiler, use the compiler as linker
47708    BUILD_LD="$BUILD_CC"
47709    BUILD_LDCXX="$BUILD_CXX"
47710
47711    PATH="$OLDPATH"
47712
47713
47714  COMPILER=$BUILD_CC
47715  COMPILER_NAME=BuildC
47716
47717  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47718    # cc -V output typically looks like
47719    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47720    # or
47721    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47722    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47723    # Check that this is likely to be the Solaris Studio cc.
47724    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47725    if test $? -ne 0; then
47726      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47727      { $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
47728$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47729      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47730$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47731      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47732$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47733      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47734    fi
47735    # Remove usage instructions (if present), and
47736    # collapse compiler output into a single line
47737    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47738        $SED -e 's/ *[Uu]sage:.*//'`
47739    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47740        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47741  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47742    # xlc -qversion output typically looks like
47743    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47744    #     Version: 11.01.0000.0015
47745    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47746    # Check that this is likely to be the IBM XL C compiler.
47747    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47748    if test $? -ne 0; then
47749      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47750      { $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
47751$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47752      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47753$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47754      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47755$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47756      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47757    fi
47758    # Collapse compiler output into a single line
47759    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47760    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47761        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47762  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47763    # There is no specific version flag, but all output starts with a version string.
47764    # First line typically looks something like:
47765    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47766    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47767    # Check that this is likely to be Microsoft CL.EXE.
47768    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47769    if test $? -ne 0; then
47770      { $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
47771$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47772      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47773$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47774      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47775    fi
47776    # Collapse compiler output into a single line
47777    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47778    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47779        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47780  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47781    # gcc --version output typically looks like
47782    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47783    #     Copyright (C) 2013 Free Software Foundation, Inc.
47784    #     This is free software; see the source for copying conditions.  There is NO
47785    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47786    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47787    # Check that this is likely to be GCC.
47788    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47789    if test $? -ne 0; then
47790      { $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
47791$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47792      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47793$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47794      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47795    fi
47796    # Remove Copyright and legalese from version string, and
47797    # collapse into a single line
47798    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47799        $SED -e 's/ *Copyright .*//'`
47800    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47801        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47802  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47803    # clang --version output typically looks like
47804    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47805    #    clang version 3.3 (tags/RELEASE_33/final)
47806    # or
47807    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47808    #    Target: x86_64-pc-linux-gnu
47809    #    Thread model: posix
47810    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47811    # Check that this is likely to be clang
47812    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47813    if test $? -ne 0; then
47814      { $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
47815$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47816      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47817$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47818      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47819    fi
47820    # Collapse compiler output into a single line
47821    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47822    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47823        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47824  else
47825      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47826  fi
47827  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47828  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47829  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47830  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47831
47832  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47833$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47834
47835
47836  COMPILER=$BUILD_CXX
47837  COMPILER_NAME=BuildC++
47838
47839  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47840    # cc -V output typically looks like
47841    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47842    # or
47843    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47844    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47845    # Check that this is likely to be the Solaris Studio cc.
47846    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47847    if test $? -ne 0; then
47848      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47849      { $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
47850$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47851      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47852$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47853      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47854$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47855      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47856    fi
47857    # Remove usage instructions (if present), and
47858    # collapse compiler output into a single line
47859    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47860        $SED -e 's/ *[Uu]sage:.*//'`
47861    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47862        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47863  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47864    # xlc -qversion output typically looks like
47865    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47866    #     Version: 11.01.0000.0015
47867    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47868    # Check that this is likely to be the IBM XL C compiler.
47869    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47870    if test $? -ne 0; then
47871      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47872      { $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
47873$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47874      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47875$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47876      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47877$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47878      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47879    fi
47880    # Collapse compiler output into a single line
47881    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47882    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47883        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47884  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47885    # There is no specific version flag, but all output starts with a version string.
47886    # First line typically looks something like:
47887    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47888    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47889    # Check that this is likely to be Microsoft CL.EXE.
47890    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47891    if test $? -ne 0; then
47892      { $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
47893$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47894      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47895$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47896      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47897    fi
47898    # Collapse compiler output into a single line
47899    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47900    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47901        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47902  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47903    # gcc --version output typically looks like
47904    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47905    #     Copyright (C) 2013 Free Software Foundation, Inc.
47906    #     This is free software; see the source for copying conditions.  There is NO
47907    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47908    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47909    # Check that this is likely to be GCC.
47910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47911    if test $? -ne 0; then
47912      { $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
47913$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47915$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47916      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47917    fi
47918    # Remove Copyright and legalese from version string, and
47919    # collapse into a single line
47920    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47921        $SED -e 's/ *Copyright .*//'`
47922    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47923        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47924  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47925    # clang --version output typically looks like
47926    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47927    #    clang version 3.3 (tags/RELEASE_33/final)
47928    # or
47929    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47930    #    Target: x86_64-pc-linux-gnu
47931    #    Thread model: posix
47932    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47933    # Check that this is likely to be clang
47934    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47935    if test $? -ne 0; then
47936      { $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
47937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47939$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47940      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47941    fi
47942    # Collapse compiler output into a single line
47943    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47944    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47945        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47946  else
47947      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47948  fi
47949  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47950  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47951  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47952  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47953
47954  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47955$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47956
47957
47958  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47959    { $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
47960$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47962$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47963  fi
47964
47965  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47966  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47967    { $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
47968$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;}
47969  fi
47970
47971  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47972    { $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
47973$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47974  fi
47975
47976  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47977
47978  else
47979    # If we are not cross compiling, use the normal target compilers for
47980    # building the build platform executables.
47981    BUILD_CC="$CC"
47982    BUILD_CXX="$CXX"
47983    BUILD_LD="$LD"
47984    BUILD_LDCXX="$LDCXX"
47985    BUILD_NM="$NM"
47986    BUILD_AS="$AS"
47987    BUILD_OBJCOPY="$OBJCOPY"
47988    BUILD_STRIP="$STRIP"
47989    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47990    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47991    BUILD_AR="$AR"
47992
47993
47994  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47995    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47996$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47997    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47998$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47999  fi
48000
48001  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48002  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48003    { $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
48004$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;}
48005  fi
48006
48007  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48008    { $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
48009$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48010  fi
48011
48012  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48013
48014  fi
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029  # The package path is used only on macosx?
48030  # FIXME: clean this up, and/or move it elsewhere.
48031  PACKAGE_PATH=/opt/local
48032
48033
48034  # Check for extra potential brokenness.
48035  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48036    # On Windows, double-check that we got the right compiler.
48037    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48038    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48039    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48040      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48041        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
48042      fi
48043    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48044      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48045        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48046      fi
48047    fi
48048  fi
48049
48050  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48051    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48052    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48053    # This is later checked when setting flags.
48054
48055    # "-Og" suppported for GCC 4.8 and later
48056    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
48102
48103
48104    # Execute function body
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
48151
48152
48153    # Execute function body
48154
48155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48156$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48157  supports=yes
48158
48159  saved_cflags="$CFLAGS"
48160  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48161  ac_ext=c
48162ac_cpp='$CPP $CPPFLAGS'
48163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48165ac_compiler_gnu=$ac_cv_c_compiler_gnu
48166
48167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48168/* end confdefs.h.  */
48169int i;
48170_ACEOF
48171if ac_fn_c_try_compile "$LINENO"; then :
48172
48173else
48174  supports=no
48175fi
48176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48177  ac_ext=cpp
48178ac_cpp='$CXXCPP $CPPFLAGS'
48179ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48180ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48181ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48182
48183  CFLAGS="$saved_cflags"
48184
48185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48186$as_echo "$supports" >&6; }
48187  if test "x$supports" = "xyes" ; then
48188    :
48189    C_COMP_SUPPORTS="yes"
48190  else
48191    :
48192    C_COMP_SUPPORTS="no"
48193  fi
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
48251
48252
48253    # Execute function body
48254
48255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48256$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48257  supports=yes
48258
48259  saved_cxxflags="$CXXFLAGS"
48260  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48261  ac_ext=cpp
48262ac_cpp='$CXXCPP $CPPFLAGS'
48263ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48264ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48265ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48266
48267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48268/* end confdefs.h.  */
48269int i;
48270_ACEOF
48271if ac_fn_cxx_try_compile "$LINENO"; then :
48272
48273else
48274  supports=no
48275fi
48276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48277  ac_ext=cpp
48278ac_cpp='$CXXCPP $CPPFLAGS'
48279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48282
48283  CXXFLAGS="$saved_cxxflags"
48284
48285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48286$as_echo "$supports" >&6; }
48287  if test "x$supports" = "xyes" ; then
48288    :
48289    CXX_COMP_SUPPORTS="yes"
48290  else
48291    :
48292    CXX_COMP_SUPPORTS="no"
48293  fi
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48308$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48309  supports=no
48310  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48311
48312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48313$as_echo "$supports" >&6; }
48314  if test "x$supports" = "xyes" ; then
48315    :
48316    HAS_CFLAG_OPTIMIZE_DEBUG=true
48317  else
48318    :
48319    HAS_CFLAG_OPTIMIZE_DEBUG=false
48320  fi
48321
48322
48323
48324
48325
48326
48327
48328    # "-z relro" supported in GNU binutils 2.17 and later
48329    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
48375
48376
48377    # Execute function body
48378
48379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48380$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48381  supports=yes
48382
48383  saved_ldflags="$LDFLAGS"
48384  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48385  ac_ext=c
48386ac_cpp='$CPP $CPPFLAGS'
48387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48389ac_compiler_gnu=$ac_cv_c_compiler_gnu
48390
48391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48392/* end confdefs.h.  */
48393
48394int
48395main ()
48396{
48397
48398  ;
48399  return 0;
48400}
48401_ACEOF
48402if ac_fn_c_try_link "$LINENO"; then :
48403
48404else
48405  supports=no
48406fi
48407rm -f core conftest.err conftest.$ac_objext \
48408    conftest$ac_exeext conftest.$ac_ext
48409  ac_ext=cpp
48410ac_cpp='$CXXCPP $CPPFLAGS'
48411ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48412ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48413ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48414
48415  LDFLAGS="$saved_ldflags"
48416
48417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48418$as_echo "$supports" >&6; }
48419  if test "x$supports" = "xyes" ; then
48420    :
48421    HAS_LINKER_RELRO=true
48422  else
48423    :
48424    HAS_LINKER_RELRO=false
48425  fi
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439    # "-z now" supported in GNU binutils 2.11 and later
48440    LINKER_NOW_FLAG="-Wl,-z,now"
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
48486
48487
48488    # Execute function body
48489
48490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48491$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48492  supports=yes
48493
48494  saved_ldflags="$LDFLAGS"
48495  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48496  ac_ext=c
48497ac_cpp='$CPP $CPPFLAGS'
48498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48500ac_compiler_gnu=$ac_cv_c_compiler_gnu
48501
48502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48503/* end confdefs.h.  */
48504
48505int
48506main ()
48507{
48508
48509  ;
48510  return 0;
48511}
48512_ACEOF
48513if ac_fn_c_try_link "$LINENO"; then :
48514
48515else
48516  supports=no
48517fi
48518rm -f core conftest.err conftest.$ac_objext \
48519    conftest$ac_exeext conftest.$ac_ext
48520  ac_ext=cpp
48521ac_cpp='$CXXCPP $CPPFLAGS'
48522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48525
48526  LDFLAGS="$saved_ldflags"
48527
48528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48529$as_echo "$supports" >&6; }
48530  if test "x$supports" = "xyes" ; then
48531    :
48532    HAS_LINKER_NOW=true
48533  else
48534    :
48535    HAS_LINKER_NOW=false
48536  fi
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549  fi
48550
48551  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48552  # in executable.'
48553  USING_BROKEN_SUSE_LD=no
48554  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48556$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48557    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48558    $ECHO "int main() { }" > main.c
48559    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48561$as_echo "no" >&6; }
48562      USING_BROKEN_SUSE_LD=no
48563    else
48564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48565$as_echo "yes" >&6; }
48566      USING_BROKEN_SUSE_LD=yes
48567    fi
48568    $RM version-script.map main.c a.out
48569  fi
48570
48571
48572  # Setup hotspot lecagy names for toolchains
48573  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48574  if test "x$TOOLCHAIN_TYPE" = xclang; then
48575    HOTSPOT_TOOLCHAIN_TYPE=gcc
48576  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48577    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48578  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48579    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48580  fi
48581
48582
48583
48584# Setup the JTReg Regression Test Harness.
48585
48586
48587# Check whether --with-jtreg was given.
48588if test "${with_jtreg+set}" = set; then :
48589  withval=$with_jtreg;
48590else
48591  with_jtreg=no
48592fi
48593
48594
48595  if test "x$with_jtreg" = xno; then
48596    # jtreg disabled
48597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48598$as_echo_n "checking for jtreg... " >&6; }
48599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48600$as_echo "no" >&6; }
48601  else
48602    if test "x$with_jtreg" != xyes; then
48603      # with path specified.
48604      JT_HOME="$with_jtreg"
48605    fi
48606
48607    if test "x$JT_HOME" != x; then
48608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48609$as_echo_n "checking for jtreg... " >&6; }
48610
48611      # use JT_HOME enviroment var.
48612
48613  # Only process if variable expands to non-empty
48614
48615  if test "x$JT_HOME" != x; then
48616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48617
48618  # Input might be given as Windows format, start by converting to
48619  # unix format.
48620  path="$JT_HOME"
48621  new_path=`$CYGPATH -u "$path"`
48622
48623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48626  # "foo.exe" is OK but "foo" is an error.
48627  #
48628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48629  # It is also a way to make sure we got the proper file name for the real test later on.
48630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48631  if test "x$test_shortpath" = x; then
48632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48633$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48634    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48635  fi
48636
48637  # Call helper function which possibly converts this using DOS-style short mode.
48638  # If so, the updated path is stored in $new_path.
48639
48640  input_path="$new_path"
48641  # Check if we need to convert this using DOS-style short mode. If the path
48642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48643  # take no chances and rewrite it.
48644  # Note: m4 eats our [], so we need to use [ and ] instead.
48645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48646  if test "x$has_forbidden_chars" != x; then
48647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48651      # Going to short mode and back again did indeed matter. Since short mode is
48652      # case insensitive, let's make it lowercase to improve readability.
48653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48654      # Now convert it back to Unix-style (cygpath)
48655      input_path=`$CYGPATH -u "$shortmode_path"`
48656      new_path="$input_path"
48657    fi
48658  fi
48659
48660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48661  if test "x$test_cygdrive_prefix" = x; then
48662    # As a simple fix, exclude /usr/bin since it's not a real path.
48663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48665      # a path prefixed by /cygdrive for fixpath to work.
48666      new_path="$CYGWIN_ROOT_PATH$input_path"
48667    fi
48668  fi
48669
48670
48671  if test "x$path" != "x$new_path"; then
48672    JT_HOME="$new_path"
48673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48674$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48675  fi
48676
48677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48678
48679  path="$JT_HOME"
48680  has_colon=`$ECHO $path | $GREP ^.:`
48681  new_path="$path"
48682  if test "x$has_colon" = x; then
48683    # Not in mixed or Windows style, start by that.
48684    new_path=`cmd //c echo $path`
48685  fi
48686
48687
48688  input_path="$new_path"
48689  # Check if we need to convert this using DOS-style short mode. If the path
48690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48691  # take no chances and rewrite it.
48692  # Note: m4 eats our [], so we need to use [ and ] instead.
48693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48694  if test "x$has_forbidden_chars" != x; then
48695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48697  fi
48698
48699
48700  windows_path="$new_path"
48701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48702    unix_path=`$CYGPATH -u "$windows_path"`
48703    new_path="$unix_path"
48704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48706    new_path="$unix_path"
48707  fi
48708
48709  if test "x$path" != "x$new_path"; then
48710    JT_HOME="$new_path"
48711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48712$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48713  fi
48714
48715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48717
48718    else
48719      # We're on a unix platform. Hooray! :)
48720      path="$JT_HOME"
48721      has_space=`$ECHO "$path" | $GREP " "`
48722      if test "x$has_space" != x; then
48723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48724$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48726      fi
48727
48728      # Use eval to expand a potential ~
48729      eval path="$path"
48730      if test ! -f "$path" && test ! -d "$path"; then
48731        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48732      fi
48733
48734      if test -d "$path"; then
48735        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48736      else
48737        dir="`$DIRNAME "$path"`"
48738        base="`$BASENAME "$path"`"
48739        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48740      fi
48741    fi
48742  fi
48743
48744
48745      # jtreg win32 script works for everybody
48746      JTREGEXE="$JT_HOME/bin/jtreg"
48747
48748      if test ! -f "$JTREGEXE"; then
48749        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48750      fi
48751
48752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48753$as_echo "$JTREGEXE" >&6; }
48754    else
48755      # try to find jtreg on path
48756
48757
48758
48759  # Publish this variable in the help.
48760
48761
48762  if [ -z "${JTREGEXE+x}" ]; then
48763    # The variable is not set by user, try to locate tool using the code snippet
48764    for ac_prog in jtreg
48765do
48766  # Extract the first word of "$ac_prog", so it can be a program name with args.
48767set dummy $ac_prog; ac_word=$2
48768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48769$as_echo_n "checking for $ac_word... " >&6; }
48770if ${ac_cv_path_JTREGEXE+:} false; then :
48771  $as_echo_n "(cached) " >&6
48772else
48773  case $JTREGEXE in
48774  [\\/]* | ?:[\\/]*)
48775  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48776  ;;
48777  *)
48778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48779for as_dir in $PATH
48780do
48781  IFS=$as_save_IFS
48782  test -z "$as_dir" && as_dir=.
48783    for ac_exec_ext in '' $ac_executable_extensions; do
48784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48785    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48787    break 2
48788  fi
48789done
48790  done
48791IFS=$as_save_IFS
48792
48793  ;;
48794esac
48795fi
48796JTREGEXE=$ac_cv_path_JTREGEXE
48797if test -n "$JTREGEXE"; then
48798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48799$as_echo "$JTREGEXE" >&6; }
48800else
48801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48802$as_echo "no" >&6; }
48803fi
48804
48805
48806  test -n "$JTREGEXE" && break
48807done
48808
48809  else
48810    # The variable is set, but is it from the command line or the environment?
48811
48812    # Try to remove the string !JTREGEXE! from our list.
48813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48815      # If it failed, the variable was not from the command line. Ignore it,
48816      # but warn the user (except for BASH, which is always set by the calling BASH).
48817      if test "xJTREGEXE" != xBASH; then
48818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48819$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48820      fi
48821      # Try to locate tool using the code snippet
48822      for ac_prog in jtreg
48823do
48824  # Extract the first word of "$ac_prog", so it can be a program name with args.
48825set dummy $ac_prog; ac_word=$2
48826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48827$as_echo_n "checking for $ac_word... " >&6; }
48828if ${ac_cv_path_JTREGEXE+:} false; then :
48829  $as_echo_n "(cached) " >&6
48830else
48831  case $JTREGEXE in
48832  [\\/]* | ?:[\\/]*)
48833  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48834  ;;
48835  *)
48836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48837for as_dir in $PATH
48838do
48839  IFS=$as_save_IFS
48840  test -z "$as_dir" && as_dir=.
48841    for ac_exec_ext in '' $ac_executable_extensions; do
48842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48843    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48845    break 2
48846  fi
48847done
48848  done
48849IFS=$as_save_IFS
48850
48851  ;;
48852esac
48853fi
48854JTREGEXE=$ac_cv_path_JTREGEXE
48855if test -n "$JTREGEXE"; then
48856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48857$as_echo "$JTREGEXE" >&6; }
48858else
48859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48860$as_echo "no" >&6; }
48861fi
48862
48863
48864  test -n "$JTREGEXE" && break
48865done
48866
48867    else
48868      # If it succeeded, then it was overridden by the user. We will use it
48869      # for the tool.
48870
48871      # First remove it from the list of overridden variables, so we can test
48872      # for unknown variables in the end.
48873      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48874
48875      # Check if we try to supply an empty value
48876      if test "x$JTREGEXE" = x; then
48877        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48878$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48879        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48880$as_echo_n "checking for JTREGEXE... " >&6; }
48881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48882$as_echo "disabled" >&6; }
48883      else
48884        # Check if the provided tool contains a complete path.
48885        tool_specified="$JTREGEXE"
48886        tool_basename="${tool_specified##*/}"
48887        if test "x$tool_basename" = "x$tool_specified"; then
48888          # A command without a complete path is provided, search $PATH.
48889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48890$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48891          # Extract the first word of "$tool_basename", so it can be a program name with args.
48892set dummy $tool_basename; ac_word=$2
48893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48894$as_echo_n "checking for $ac_word... " >&6; }
48895if ${ac_cv_path_JTREGEXE+:} false; then :
48896  $as_echo_n "(cached) " >&6
48897else
48898  case $JTREGEXE in
48899  [\\/]* | ?:[\\/]*)
48900  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48901  ;;
48902  *)
48903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48904for as_dir in $PATH
48905do
48906  IFS=$as_save_IFS
48907  test -z "$as_dir" && as_dir=.
48908    for ac_exec_ext in '' $ac_executable_extensions; do
48909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48910    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48912    break 2
48913  fi
48914done
48915  done
48916IFS=$as_save_IFS
48917
48918  ;;
48919esac
48920fi
48921JTREGEXE=$ac_cv_path_JTREGEXE
48922if test -n "$JTREGEXE"; then
48923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48924$as_echo "$JTREGEXE" >&6; }
48925else
48926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48927$as_echo "no" >&6; }
48928fi
48929
48930
48931          if test "x$JTREGEXE" = x; then
48932            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48933          fi
48934        else
48935          # Otherwise we believe it is a complete path. Use it as it is.
48936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48937$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48938          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48939$as_echo_n "checking for JTREGEXE... " >&6; }
48940          if test ! -x "$tool_specified"; then
48941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48942$as_echo "not found" >&6; }
48943            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48944          fi
48945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48946$as_echo "$tool_specified" >&6; }
48947        fi
48948      fi
48949    fi
48950
48951  fi
48952
48953
48954
48955  if test "x$JTREGEXE" = x; then
48956    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48957  fi
48958
48959
48960      JT_HOME="`$DIRNAME $JTREGEXE`"
48961    fi
48962  fi
48963
48964
48965
48966
48967
48968
48969  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48970  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48971  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48972  #                              commands produced by the link step (currently AIX only)
48973  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48974    COMPILER_TARGET_BITS_FLAG="-q"
48975    COMPILER_COMMAND_FILE_FLAG="-f"
48976    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48977  else
48978    COMPILER_TARGET_BITS_FLAG="-m"
48979    COMPILER_COMMAND_FILE_FLAG="@"
48980    COMPILER_BINDCMD_FILE_FLAG=""
48981
48982    # The solstudio linker does not support @-files.
48983    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48984      COMPILER_COMMAND_FILE_FLAG=
48985    fi
48986
48987    # Check if @file is supported by gcc
48988    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48990$as_echo_n "checking if @file is supported by gcc... " >&6; }
48991      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48992      $ECHO "" "--version" > command.file
48993      if $CXX @command.file 2>&5 >&5; then
48994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48995$as_echo "yes" >&6; }
48996        COMPILER_COMMAND_FILE_FLAG="@"
48997      else
48998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48999$as_echo "no" >&6; }
49000        COMPILER_COMMAND_FILE_FLAG=
49001      fi
49002      $RM command.file
49003    fi
49004  fi
49005
49006
49007
49008
49009  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49010  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49011    ARFLAGS="-r"
49012  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49013    ARFLAGS="-X64"
49014  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49015    # lib.exe is used as AR to create static libraries.
49016    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49017  else
49018    ARFLAGS=""
49019  fi
49020
49021
49022  ## Setup strip.
49023  # FIXME: should this really be per platform, or should it be per toolchain type?
49024  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49025  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49026  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49027    STRIPFLAGS="-g"
49028  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49029    STRIPFLAGS="-x"
49030  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49031    STRIPFLAGS="-S"
49032  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49033    STRIPFLAGS="-X32_64"
49034  fi
49035
49036
49037
49038  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49039    CC_OUT_OPTION=-Fo
49040    EXE_OUT_OPTION=-out:
49041    LD_OUT_OPTION=-out:
49042    AR_OUT_OPTION=-out:
49043  else
49044    # The option used to specify the target .o,.a or .so file.
49045    # When compiling, how to specify the to be created object file.
49046    CC_OUT_OPTION='-o$(SPACE)'
49047    # When linking, how to specify the to be created executable.
49048    EXE_OUT_OPTION='-o$(SPACE)'
49049    # When linking, how to specify the to be created dynamically linkable library.
49050    LD_OUT_OPTION='-o$(SPACE)'
49051    # When archiving, how to specify the to be create static archive for object files.
49052    AR_OUT_OPTION='rcs$(SPACE)'
49053  fi
49054
49055
49056
49057
49058
49059  # On Windows, we need to set RC flags.
49060  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49061    RC_FLAGS="-nologo -l0x409"
49062    JVM_RCFLAGS="-nologo"
49063    if test "x$DEBUG_LEVEL" = xrelease; then
49064      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49065      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49066    fi
49067
49068    # The version variables used to create RC_FLAGS may be overridden
49069    # in a custom configure script, or possibly the command line.
49070    # Let those variables be expanded at make time in spec.gmk.
49071    # The \$ are escaped to the shell, and the $(...) variables
49072    # are evaluated by make.
49073    RC_FLAGS="$RC_FLAGS \
49074        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49075        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49076        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49077        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49078        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49079        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49080        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49081
49082    JVM_RCFLAGS="$JVM_RCFLAGS \
49083        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49084        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49085        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49086        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49087        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49088        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49089        -D\"HS_FNAME=jvm.dll\" \
49090        -D\"HS_INTERNAL_NAME=jvm\""
49091  fi
49092
49093
49094
49095  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49096    # silence copyright notice and other headers.
49097    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49098  fi
49099
49100
49101# Now we can test some aspects on the target using configure macros.
49102
49103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49104$as_echo_n "checking for ANSI C header files... " >&6; }
49105if ${ac_cv_header_stdc+:} false; then :
49106  $as_echo_n "(cached) " >&6
49107else
49108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49109/* end confdefs.h.  */
49110#include <stdlib.h>
49111#include <stdarg.h>
49112#include <string.h>
49113#include <float.h>
49114
49115int
49116main ()
49117{
49118
49119  ;
49120  return 0;
49121}
49122_ACEOF
49123if ac_fn_cxx_try_compile "$LINENO"; then :
49124  ac_cv_header_stdc=yes
49125else
49126  ac_cv_header_stdc=no
49127fi
49128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49129
49130if test $ac_cv_header_stdc = yes; then
49131  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49133/* end confdefs.h.  */
49134#include <string.h>
49135
49136_ACEOF
49137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49138  $EGREP "memchr" >/dev/null 2>&1; then :
49139
49140else
49141  ac_cv_header_stdc=no
49142fi
49143rm -f conftest*
49144
49145fi
49146
49147if test $ac_cv_header_stdc = yes; then
49148  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49150/* end confdefs.h.  */
49151#include <stdlib.h>
49152
49153_ACEOF
49154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49155  $EGREP "free" >/dev/null 2>&1; then :
49156
49157else
49158  ac_cv_header_stdc=no
49159fi
49160rm -f conftest*
49161
49162fi
49163
49164if test $ac_cv_header_stdc = yes; then
49165  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49166  if test "$cross_compiling" = yes; then :
49167  :
49168else
49169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49170/* end confdefs.h.  */
49171#include <ctype.h>
49172#include <stdlib.h>
49173#if ((' ' & 0x0FF) == 0x020)
49174# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49175# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49176#else
49177# define ISLOWER(c) \
49178		   (('a' <= (c) && (c) <= 'i') \
49179		     || ('j' <= (c) && (c) <= 'r') \
49180		     || ('s' <= (c) && (c) <= 'z'))
49181# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49182#endif
49183
49184#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49185int
49186main ()
49187{
49188  int i;
49189  for (i = 0; i < 256; i++)
49190    if (XOR (islower (i), ISLOWER (i))
49191	|| toupper (i) != TOUPPER (i))
49192      return 2;
49193  return 0;
49194}
49195_ACEOF
49196if ac_fn_cxx_try_run "$LINENO"; then :
49197
49198else
49199  ac_cv_header_stdc=no
49200fi
49201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49202  conftest.$ac_objext conftest.beam conftest.$ac_ext
49203fi
49204
49205fi
49206fi
49207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49208$as_echo "$ac_cv_header_stdc" >&6; }
49209if test $ac_cv_header_stdc = yes; then
49210
49211$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49212
49213fi
49214
49215# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49216for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49217		  inttypes.h stdint.h unistd.h
49218do :
49219  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49220ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49221"
49222if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49223  cat >>confdefs.h <<_ACEOF
49224#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49225_ACEOF
49226
49227fi
49228
49229done
49230
49231
49232
49233  ###############################################################################
49234  #
49235  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49236  # (The JVM can use 32 or 64 bit Java pointers but that decision
49237  # is made at runtime.)
49238  #
49239
49240  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49241    # Always specify -m flag on Solaris
49242    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49243
49244  # When we add flags to the "official" CFLAGS etc, we need to
49245  # keep track of these additions in ADDED_CFLAGS etc. These
49246  # will later be checked to make sure only controlled additions
49247  # have been made to CFLAGS etc.
49248  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49249  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49250  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49251
49252  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49253  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49254  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49255
49256  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49257  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49258  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49259
49260  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49261  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49262  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49263
49264  elif test "x$COMPILE_TYPE" = xreduced; then
49265    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49266      # Specify -m if running reduced on unix platforms
49267
49268  # When we add flags to the "official" CFLAGS etc, we need to
49269  # keep track of these additions in ADDED_CFLAGS etc. These
49270  # will later be checked to make sure only controlled additions
49271  # have been made to CFLAGS etc.
49272  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49273  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49274  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49275
49276  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49277  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49278  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49279
49280  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49281  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49282  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49283
49284  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49285  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49286  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49287
49288    fi
49289  fi
49290  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49291    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49292    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49293    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49294  fi
49295
49296  # Make compilation sanity check
49297  for ac_header in stdio.h
49298do :
49299  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49300if test "x$ac_cv_header_stdio_h" = xyes; then :
49301  cat >>confdefs.h <<_ACEOF
49302#define HAVE_STDIO_H 1
49303_ACEOF
49304
49305else
49306
49307    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49308$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49309    if test "x$COMPILE_TYPE" = xreduced; then
49310
49311  # Print a helpful message on how to acquire the necessary build dependency.
49312  # reduced is the help tag: freetype, cups, alsa etc
49313  MISSING_DEPENDENCY=reduced
49314
49315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49316    cygwin_help $MISSING_DEPENDENCY
49317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49318    msys_help $MISSING_DEPENDENCY
49319  else
49320    PKGHANDLER_COMMAND=
49321
49322    case $PKGHANDLER in
49323      apt-get)
49324        apt_help     $MISSING_DEPENDENCY ;;
49325      yum)
49326        yum_help     $MISSING_DEPENDENCY ;;
49327      brew)
49328        brew_help    $MISSING_DEPENDENCY ;;
49329      port)
49330        port_help    $MISSING_DEPENDENCY ;;
49331      pkgutil)
49332        pkgutil_help $MISSING_DEPENDENCY ;;
49333      pkgadd)
49334        pkgadd_help  $MISSING_DEPENDENCY ;;
49335    esac
49336
49337    if test "x$PKGHANDLER_COMMAND" != x; then
49338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49339    fi
49340  fi
49341
49342      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49343$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49344    elif test "x$COMPILE_TYPE" = xcross; then
49345      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49346$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49347    fi
49348    as_fn_error $? "Cannot continue." "$LINENO" 5
49349
49350fi
49351
49352done
49353
49354
49355  # The cast to long int works around a bug in the HP C Compiler
49356# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49357# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49358# This bug is HP SR number 8606223364.
49359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49360$as_echo_n "checking size of int *... " >&6; }
49361if ${ac_cv_sizeof_int_p+:} false; then :
49362  $as_echo_n "(cached) " >&6
49363else
49364  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49365
49366else
49367  if test "$ac_cv_type_int_p" = yes; then
49368     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49369$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49370as_fn_error 77 "cannot compute sizeof (int *)
49371See \`config.log' for more details" "$LINENO" 5; }
49372   else
49373     ac_cv_sizeof_int_p=0
49374   fi
49375fi
49376
49377fi
49378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49379$as_echo "$ac_cv_sizeof_int_p" >&6; }
49380
49381
49382
49383cat >>confdefs.h <<_ACEOF
49384#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49385_ACEOF
49386
49387
49388
49389  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49390  if test "x$ac_cv_sizeof_int_p" = x; then
49391    # The test failed, lets stick to the assumed value.
49392    { $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
49393$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49394  else
49395    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49396
49397    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49398      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49399      # Let's try to implicitely set the compilers target architecture and retry the test
49400      { $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
49401$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;}
49402      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49403$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49404
49405  # When we add flags to the "official" CFLAGS etc, we need to
49406  # keep track of these additions in ADDED_CFLAGS etc. These
49407  # will later be checked to make sure only controlled additions
49408  # have been made to CFLAGS etc.
49409  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49410  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49411  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49412
49413  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49414  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49415  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49416
49417  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49418  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49419  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49420
49421  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49422  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49423  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49424
49425
49426      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49427      unset ac_cv_sizeof_int_p
49428      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49429      cat >>confdefs.h <<_ACEOF
49430#undef SIZEOF_INT_P
49431_ACEOF
49432
49433      # The cast to long int works around a bug in the HP C Compiler
49434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49436# This bug is HP SR number 8606223364.
49437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49438$as_echo_n "checking size of int *... " >&6; }
49439if ${ac_cv_sizeof_int_p+:} false; then :
49440  $as_echo_n "(cached) " >&6
49441else
49442  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49443
49444else
49445  if test "$ac_cv_type_int_p" = yes; then
49446     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49448as_fn_error 77 "cannot compute sizeof (int *)
49449See \`config.log' for more details" "$LINENO" 5; }
49450   else
49451     ac_cv_sizeof_int_p=0
49452   fi
49453fi
49454
49455fi
49456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49457$as_echo "$ac_cv_sizeof_int_p" >&6; }
49458
49459
49460
49461cat >>confdefs.h <<_ACEOF
49462#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49463_ACEOF
49464
49465
49466
49467      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49468
49469      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49470        { $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
49471$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;}
49472        if test "x$COMPILE_TYPE" = xreduced; then
49473
49474  # Print a helpful message on how to acquire the necessary build dependency.
49475  # reduced is the help tag: freetype, cups, alsa etc
49476  MISSING_DEPENDENCY=reduced
49477
49478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49479    cygwin_help $MISSING_DEPENDENCY
49480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49481    msys_help $MISSING_DEPENDENCY
49482  else
49483    PKGHANDLER_COMMAND=
49484
49485    case $PKGHANDLER in
49486      apt-get)
49487        apt_help     $MISSING_DEPENDENCY ;;
49488      yum)
49489        yum_help     $MISSING_DEPENDENCY ;;
49490      brew)
49491        brew_help    $MISSING_DEPENDENCY ;;
49492      port)
49493        port_help    $MISSING_DEPENDENCY ;;
49494      pkgutil)
49495        pkgutil_help $MISSING_DEPENDENCY ;;
49496      pkgadd)
49497        pkgadd_help  $MISSING_DEPENDENCY ;;
49498    esac
49499
49500    if test "x$PKGHANDLER_COMMAND" != x; then
49501      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49502    fi
49503  fi
49504
49505          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49506$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49507        elif test "x$COMPILE_TYPE" = xcross; then
49508          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49509$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49510        fi
49511        as_fn_error $? "Cannot continue." "$LINENO" 5
49512      fi
49513    fi
49514  fi
49515
49516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49517$as_echo_n "checking for target address size... " >&6; }
49518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49519$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49520
49521
49522  ###############################################################################
49523  #
49524  # Is the target little of big endian?
49525  #
49526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49527$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49528if ${ac_cv_c_bigendian+:} false; then :
49529  $as_echo_n "(cached) " >&6
49530else
49531  ac_cv_c_bigendian=unknown
49532    # See if we're dealing with a universal compiler.
49533    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49534/* end confdefs.h.  */
49535#ifndef __APPLE_CC__
49536	       not a universal capable compiler
49537	     #endif
49538	     typedef int dummy;
49539
49540_ACEOF
49541if ac_fn_cxx_try_compile "$LINENO"; then :
49542
49543	# Check for potential -arch flags.  It is not universal unless
49544	# there are at least two -arch flags with different values.
49545	ac_arch=
49546	ac_prev=
49547	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49548	 if test -n "$ac_prev"; then
49549	   case $ac_word in
49550	     i?86 | x86_64 | ppc | ppc64)
49551	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49552		 ac_arch=$ac_word
49553	       else
49554		 ac_cv_c_bigendian=universal
49555		 break
49556	       fi
49557	       ;;
49558	   esac
49559	   ac_prev=
49560	 elif test "x$ac_word" = "x-arch"; then
49561	   ac_prev=arch
49562	 fi
49563       done
49564fi
49565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49566    if test $ac_cv_c_bigendian = unknown; then
49567      # See if sys/param.h defines the BYTE_ORDER macro.
49568      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49569/* end confdefs.h.  */
49570#include <sys/types.h>
49571	     #include <sys/param.h>
49572
49573int
49574main ()
49575{
49576#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49577		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49578		     && LITTLE_ENDIAN)
49579	      bogus endian macros
49580	     #endif
49581
49582  ;
49583  return 0;
49584}
49585_ACEOF
49586if ac_fn_cxx_try_compile "$LINENO"; then :
49587  # It does; now see whether it defined to BIG_ENDIAN or not.
49588	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49589/* end confdefs.h.  */
49590#include <sys/types.h>
49591		#include <sys/param.h>
49592
49593int
49594main ()
49595{
49596#if BYTE_ORDER != BIG_ENDIAN
49597		 not big endian
49598		#endif
49599
49600  ;
49601  return 0;
49602}
49603_ACEOF
49604if ac_fn_cxx_try_compile "$LINENO"; then :
49605  ac_cv_c_bigendian=yes
49606else
49607  ac_cv_c_bigendian=no
49608fi
49609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49610fi
49611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49612    fi
49613    if test $ac_cv_c_bigendian = unknown; then
49614      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49615      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49616/* end confdefs.h.  */
49617#include <limits.h>
49618
49619int
49620main ()
49621{
49622#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49623	      bogus endian macros
49624	     #endif
49625
49626  ;
49627  return 0;
49628}
49629_ACEOF
49630if ac_fn_cxx_try_compile "$LINENO"; then :
49631  # It does; now see whether it defined to _BIG_ENDIAN or not.
49632	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49633/* end confdefs.h.  */
49634#include <limits.h>
49635
49636int
49637main ()
49638{
49639#ifndef _BIG_ENDIAN
49640		 not big endian
49641		#endif
49642
49643  ;
49644  return 0;
49645}
49646_ACEOF
49647if ac_fn_cxx_try_compile "$LINENO"; then :
49648  ac_cv_c_bigendian=yes
49649else
49650  ac_cv_c_bigendian=no
49651fi
49652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49653fi
49654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49655    fi
49656    if test $ac_cv_c_bigendian = unknown; then
49657      # Compile a test program.
49658      if test "$cross_compiling" = yes; then :
49659  # Try to guess by grepping values from an object file.
49660	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49661/* end confdefs.h.  */
49662short int ascii_mm[] =
49663		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49664		short int ascii_ii[] =
49665		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49666		int use_ascii (int i) {
49667		  return ascii_mm[i] + ascii_ii[i];
49668		}
49669		short int ebcdic_ii[] =
49670		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49671		short int ebcdic_mm[] =
49672		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49673		int use_ebcdic (int i) {
49674		  return ebcdic_mm[i] + ebcdic_ii[i];
49675		}
49676		extern int foo;
49677
49678int
49679main ()
49680{
49681return use_ascii (foo) == use_ebcdic (foo);
49682  ;
49683  return 0;
49684}
49685_ACEOF
49686if ac_fn_cxx_try_compile "$LINENO"; then :
49687  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49688	      ac_cv_c_bigendian=yes
49689	    fi
49690	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49691	      if test "$ac_cv_c_bigendian" = unknown; then
49692		ac_cv_c_bigendian=no
49693	      else
49694		# finding both strings is unlikely to happen, but who knows?
49695		ac_cv_c_bigendian=unknown
49696	      fi
49697	    fi
49698fi
49699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49700else
49701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49702/* end confdefs.h.  */
49703$ac_includes_default
49704int
49705main ()
49706{
49707
49708	     /* Are we little or big endian?  From Harbison&Steele.  */
49709	     union
49710	     {
49711	       long int l;
49712	       char c[sizeof (long int)];
49713	     } u;
49714	     u.l = 1;
49715	     return u.c[sizeof (long int) - 1] == 1;
49716
49717  ;
49718  return 0;
49719}
49720_ACEOF
49721if ac_fn_cxx_try_run "$LINENO"; then :
49722  ac_cv_c_bigendian=no
49723else
49724  ac_cv_c_bigendian=yes
49725fi
49726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49727  conftest.$ac_objext conftest.beam conftest.$ac_ext
49728fi
49729
49730    fi
49731fi
49732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49733$as_echo "$ac_cv_c_bigendian" >&6; }
49734 case $ac_cv_c_bigendian in #(
49735   yes)
49736     ENDIAN="big";; #(
49737   no)
49738     ENDIAN="little" ;; #(
49739   universal)
49740     ENDIAN="universal_endianness"
49741     ;; #(
49742   *)
49743     ENDIAN="unknown" ;;
49744 esac
49745
49746
49747  if test "x$ENDIAN" = xuniversal_endianness; then
49748    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49749  fi
49750  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49751    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
49752  fi
49753
49754
49755# Configure flags for the tools
49756
49757  ###############################################################################
49758  #
49759  # How to compile shared libraries.
49760  #
49761
49762  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49763    PICFLAG="-fPIC"
49764    C_FLAG_REORDER=''
49765    CXX_FLAG_REORDER=''
49766
49767    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49768      # Linking is different on MacOSX
49769      if test "x$STATIC_BUILD" = xtrue; then
49770        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49771      else
49772        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49773        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49774      fi
49775      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49776      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49777      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49778      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49779    else
49780      # Default works for linux, might work on other platforms as well.
49781      SHARED_LIBRARY_FLAGS='-shared'
49782      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49783      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49784      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49785      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49786    fi
49787  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49788    C_FLAG_REORDER=''
49789    CXX_FLAG_REORDER=''
49790
49791    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49792      # Linking is different on MacOSX
49793      PICFLAG=''
49794      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49795      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49796      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49797      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49798      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49799
49800      if test "x$STATIC_BUILD" = xfalse; then
49801        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49802      fi
49803    else
49804      # Default works for linux, might work on other platforms as well.
49805      PICFLAG='-fPIC'
49806      SHARED_LIBRARY_FLAGS='-shared'
49807      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49808      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49809      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49810
49811      # arm specific settings
49812      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49813        # '-Wl,-z,origin' isn't used on arm.
49814        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49815      else
49816        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49817      fi
49818
49819    fi
49820  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49821    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49822      PICFLAG="-xcode=pic32"
49823    else
49824      PICFLAG="-KPIC"
49825    fi
49826    C_FLAG_REORDER='-xF'
49827    CXX_FLAG_REORDER='-xF'
49828    SHARED_LIBRARY_FLAGS="-G"
49829    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49830    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49831    SET_SHARED_LIBRARY_NAME='-h $1'
49832    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49833  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49834    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49835    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49836    # will have to patch this single instruction with a call to some out-of-order code which
49837    # does the load from the TOC. This is of course slow. But in that case we also would have
49838    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49839    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49840    # can be patched directly by the linker and does not require a jump to out-of-order code.
49841    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49842    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49843    # loads for accessing a global variable). But there are rumors that this may be seen as a
49844    # 'performance feature' because of improved code locality of the symbols used in a
49845    # compilation unit.
49846    PICFLAG="-qpic"
49847    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49848    C_FLAG_REORDER=''
49849    CXX_FLAG_REORDER=''
49850    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49851    SET_EXECUTABLE_ORIGIN=""
49852    SET_SHARED_LIBRARY_ORIGIN=''
49853    SET_SHARED_LIBRARY_NAME=''
49854    SET_SHARED_LIBRARY_MAPFILE=''
49855  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49856    PICFLAG=""
49857    C_FLAG_REORDER=''
49858    CXX_FLAG_REORDER=''
49859    SHARED_LIBRARY_FLAGS="-dll"
49860    SET_EXECUTABLE_ORIGIN=''
49861    SET_SHARED_LIBRARY_ORIGIN=''
49862    SET_SHARED_LIBRARY_NAME=''
49863    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49864  fi
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874  # The (cross) compiler is now configured, we can now test capabilities
49875  # of the target platform.
49876
49877
49878
49879  ###############################################################################
49880  #
49881  # Setup the opt flags for different compilers
49882  # and different operating systems.
49883  #
49884
49885  # FIXME: this was indirectly the old default, but just inherited.
49886  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49887  #   C_FLAG_DEPS="-MMD -MF"
49888  # fi
49889
49890  # Generate make dependency files
49891  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49892    C_FLAG_DEPS="-MMD -MF"
49893  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49894    C_FLAG_DEPS="-MMD -MF"
49895  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49896    C_FLAG_DEPS="-xMMD -xMF"
49897  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49898    C_FLAG_DEPS="-qmakedep=gcc -MF"
49899  fi
49900  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49901
49902
49903
49904  # Debug symbols
49905  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49906    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49907      # reduce from default "-g2" option to save space
49908      CFLAGS_DEBUG_SYMBOLS="-g1"
49909      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49910    else
49911      CFLAGS_DEBUG_SYMBOLS="-g"
49912      CXXFLAGS_DEBUG_SYMBOLS="-g"
49913    fi
49914  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49915    CFLAGS_DEBUG_SYMBOLS="-g"
49916    CXXFLAGS_DEBUG_SYMBOLS="-g"
49917  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49918    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49919    # -g0 enables debug symbols without disabling inlining.
49920    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49921  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49922    CFLAGS_DEBUG_SYMBOLS="-g"
49923    CXXFLAGS_DEBUG_SYMBOLS="-g"
49924  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49925    CFLAGS_DEBUG_SYMBOLS="-Zi"
49926    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49927  fi
49928
49929
49930
49931  # Debug symbols for JVM_CFLAGS
49932  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49933    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49934    if test "x$DEBUG_LEVEL" = xslowdebug; then
49935      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49936    else
49937      # -g0 does not disable inlining, which -g does.
49938      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49939    fi
49940  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49941    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49942  else
49943    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49944  fi
49945
49946
49947  # bounds, memory and behavior checking options
49948  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49949    case $DEBUG_LEVEL in
49950    release )
49951      # no adjustment
49952      ;;
49953    fastdebug )
49954      # no adjustment
49955      ;;
49956    slowdebug )
49957      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49958      # get's added conditionally on whether we produce debug symbols or not.
49959      # This is most likely not really correct.
49960
49961      # Add runtime stack smashing and undefined behavior checks.
49962      # Not all versions of gcc support -fstack-protector
49963      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
50004
50005
50006    # Execute function body
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
50053
50054
50055    # Execute function body
50056
50057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50058$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50059  supports=yes
50060
50061  saved_cflags="$CFLAGS"
50062  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50063  ac_ext=c
50064ac_cpp='$CPP $CPPFLAGS'
50065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50067ac_compiler_gnu=$ac_cv_c_compiler_gnu
50068
50069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50070/* end confdefs.h.  */
50071int i;
50072_ACEOF
50073if ac_fn_c_try_compile "$LINENO"; then :
50074
50075else
50076  supports=no
50077fi
50078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50079  ac_ext=cpp
50080ac_cpp='$CXXCPP $CPPFLAGS'
50081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50084
50085  CFLAGS="$saved_cflags"
50086
50087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50088$as_echo "$supports" >&6; }
50089  if test "x$supports" = "xyes" ; then
50090    :
50091    C_COMP_SUPPORTS="yes"
50092  else
50093    :
50094    C_COMP_SUPPORTS="no"
50095  fi
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
50153
50154
50155    # Execute function body
50156
50157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50158$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50159  supports=yes
50160
50161  saved_cxxflags="$CXXFLAGS"
50162  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50163  ac_ext=cpp
50164ac_cpp='$CXXCPP $CPPFLAGS'
50165ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50166ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50167ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50168
50169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50170/* end confdefs.h.  */
50171int i;
50172_ACEOF
50173if ac_fn_cxx_try_compile "$LINENO"; then :
50174
50175else
50176  supports=no
50177fi
50178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50179  ac_ext=cpp
50180ac_cpp='$CXXCPP $CPPFLAGS'
50181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50184
50185  CXXFLAGS="$saved_cxxflags"
50186
50187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50188$as_echo "$supports" >&6; }
50189  if test "x$supports" = "xyes" ; then
50190    :
50191    CXX_COMP_SUPPORTS="yes"
50192  else
50193    :
50194    CXX_COMP_SUPPORTS="no"
50195  fi
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50210$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50211  supports=no
50212  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50213
50214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50215$as_echo "$supports" >&6; }
50216  if test "x$supports" = "xyes" ; then
50217    :
50218
50219  else
50220    :
50221    STACK_PROTECTOR_CFLAG=""
50222  fi
50223
50224
50225
50226
50227
50228
50229
50230      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50231      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50232      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50233        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50234      fi
50235      ;;
50236    esac
50237  fi
50238
50239  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50240    if test "x$DEBUG_LEVEL" != xrelease; then
50241      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50242        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50243      fi
50244    fi
50245  fi
50246
50247  # Optimization levels
50248  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50249    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50250
50251    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50252      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50253      C_O_FLAG_HIGHEST_JVM="-xO4"
50254      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50255      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50256      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50257      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50258      C_O_FLAG_DEBUG_JVM=""
50259      C_O_FLAG_NONE="-xregs=no%frameptr"
50260      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50261      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50262      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50263      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50264      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50265      CXX_O_FLAG_DEBUG_JVM=""
50266      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50267      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50268        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50269        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50270      fi
50271    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50272      C_O_FLAG_HIGHEST_JVM="-xO4"
50273      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50274      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50275      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50276      C_O_FLAG_DEBUG=""
50277      C_O_FLAG_DEBUG_JVM=""
50278      C_O_FLAG_NONE=""
50279      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50280      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50281      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50282      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50283      CXX_O_FLAG_DEBUG=""
50284      CXX_O_FLAG_DEBUG_JVM=""
50285      CXX_O_FLAG_NONE=""
50286    fi
50287  else
50288    # The remaining toolchains share opt flags between CC and CXX;
50289    # setup for C and duplicate afterwards.
50290    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50291      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50292        # On MacOSX we optimize for size, something
50293        # we should do for all platforms?
50294        C_O_FLAG_HIGHEST_JVM="-Os"
50295        C_O_FLAG_HIGHEST="-Os"
50296        C_O_FLAG_HI="-Os"
50297        C_O_FLAG_NORM="-Os"
50298        C_O_FLAG_SIZE="-Os"
50299      else
50300        C_O_FLAG_HIGHEST_JVM="-O3"
50301        C_O_FLAG_HIGHEST="-O3"
50302        C_O_FLAG_HI="-O3"
50303        C_O_FLAG_NORM="-O2"
50304        C_O_FLAG_SIZE="-Os"
50305      fi
50306      C_O_FLAG_DEBUG="-O0"
50307      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50308        C_O_FLAG_DEBUG_JVM=""
50309      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50310        C_O_FLAG_DEBUG_JVM="-O0"
50311      fi
50312      C_O_FLAG_NONE="-O0"
50313    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50314      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50315        # On MacOSX we optimize for size, something
50316        # we should do for all platforms?
50317        C_O_FLAG_HIGHEST_JVM="-Os"
50318        C_O_FLAG_HIGHEST="-Os"
50319        C_O_FLAG_HI="-Os"
50320        C_O_FLAG_NORM="-Os"
50321        C_O_FLAG_SIZE="-Os"
50322      else
50323        C_O_FLAG_HIGHEST_JVM="-O3"
50324        C_O_FLAG_HIGHEST="-O3"
50325        C_O_FLAG_HI="-O3"
50326        C_O_FLAG_NORM="-O2"
50327        C_O_FLAG_SIZE="-Os"
50328      fi
50329      C_O_FLAG_DEBUG="-O0"
50330      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50331        C_O_FLAG_DEBUG_JVM=""
50332      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50333        C_O_FLAG_DEBUG_JVM="-O0"
50334      fi
50335      C_O_FLAG_NONE="-O0"
50336    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50337      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50338      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50339      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50340      C_O_FLAG_NORM="-O2"
50341      C_O_FLAG_DEBUG="-qnoopt"
50342      # FIXME: Value below not verified.
50343      C_O_FLAG_DEBUG_JVM=""
50344      C_O_FLAG_NONE="-qnoopt"
50345    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50346      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50347      C_O_FLAG_HIGHEST="-O2"
50348      C_O_FLAG_HI="-O1"
50349      C_O_FLAG_NORM="-O1"
50350      C_O_FLAG_DEBUG="-Od"
50351      C_O_FLAG_DEBUG_JVM=""
50352      C_O_FLAG_NONE="-Od"
50353      C_O_FLAG_SIZE="-Os"
50354    fi
50355    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50356    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50357    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50358    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50359    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50360    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50361    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50362    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50363  fi
50364
50365  # Adjust optimization flags according to debug level.
50366  case $DEBUG_LEVEL in
50367    release )
50368      # no adjustment
50369      ;;
50370    fastdebug )
50371      # Not quite so much optimization
50372      C_O_FLAG_HI="$C_O_FLAG_NORM"
50373      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50374      ;;
50375    slowdebug )
50376      # Disable optimization
50377      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50378      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50379      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50380      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50381      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50382      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50383      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50384      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50385      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50386      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50387      ;;
50388  esac
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409# Check whether --with-abi-profile was given.
50410if test "${with_abi_profile+set}" = set; then :
50411  withval=$with_abi_profile;
50412fi
50413
50414
50415  if test "x$with_abi_profile" != x; then
50416    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50417        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50418      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50419    fi
50420
50421    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50423$as_echo_n "checking for ABI profle... " >&6; }
50424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50425$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50426
50427    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50428      ARM_FLOAT_TYPE=vfp-sflt
50429      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50430    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50431      ARM_FLOAT_TYPE=vfp-hflt
50432      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50433    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50434      ARM_FLOAT_TYPE=sflt
50435      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50436    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50437      ARM_FLOAT_TYPE=vfp-sflt
50438      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50439    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50440      ARM_FLOAT_TYPE=vfp-hflt
50441      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50442    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50443      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50444      ARM_FLOAT_TYPE=
50445      ARM_ARCH_TYPE_FLAGS=
50446    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50447      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50448      ARM_FLOAT_TYPE=
50449      ARM_ARCH_TYPE_FLAGS=
50450    else
50451      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50452    fi
50453
50454    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50455      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50456    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50457      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50458    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50459      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50460    fi
50461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50462$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50464$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50465
50466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50467$as_echo_n "checking for arch type flags... " >&6; }
50468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50469$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50470
50471    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50472    # autoconf target triplet.
50473     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50474    # Sanity check that it is a known ABI.
50475    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50476        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50477        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50478          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50479$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50480    fi
50481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50482$as_echo_n "checking for ABI property name... " >&6; }
50483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50484$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50485
50486
50487    # Pass these on to the open part of configure as if they were set using
50488    # --with-extra-c[xx]flags.
50489    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50490    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50491    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50492    # FIXME: This should not really be set using extra_cflags.
50493    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50494        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50495        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50496    fi
50497    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50498    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50499    # And pass the architecture flags to the linker as well
50500    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50501  fi
50502
50503  # When building with an abi profile, the name of that profile is appended on the
50504  # bundle platform, which is used in bundle names.
50505  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50506    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50507  fi
50508
50509
50510  # Special extras...
50511  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50512    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50513      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50514      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50515    fi
50516    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50517    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50518  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50519    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50520    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50521  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50522    CXXSTD_CXXFLAG="-std=gnu++98"
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
50563
50564
50565    # Execute function body
50566
50567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50568$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50569  supports=yes
50570
50571  saved_cxxflags="$CXXFLAGS"
50572  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50573  ac_ext=cpp
50574ac_cpp='$CXXCPP $CPPFLAGS'
50575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50578
50579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50580/* end confdefs.h.  */
50581int i;
50582_ACEOF
50583if ac_fn_cxx_try_compile "$LINENO"; then :
50584
50585else
50586  supports=no
50587fi
50588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50589  ac_ext=cpp
50590ac_cpp='$CXXCPP $CPPFLAGS'
50591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50594
50595  CXXFLAGS="$saved_cxxflags"
50596
50597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50598$as_echo "$supports" >&6; }
50599  if test "x$supports" = "xyes" ; then
50600    :
50601
50602  else
50603    :
50604    CXXSTD_CXXFLAG=""
50605  fi
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50619    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50620
50621  fi
50622  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50623    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50624    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50625  fi
50626
50627  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50628  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50629  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50630
50631  ###############################################################################
50632  #
50633  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50634  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50635  #
50636
50637  # Setup compiler/platform specific flags into
50638  #    CFLAGS_JDK    - C Compiler flags
50639  #    CXXFLAGS_JDK  - C++ Compiler flags
50640  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50641  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50642    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50643    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50644    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50645    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50646      # Force compatibility with i586 on 32 bit intel platforms.
50647      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50648      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50649    fi
50650    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50651        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50652    case $OPENJDK_TARGET_CPU_ARCH in
50653      arm )
50654        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50655        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50656        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50657        ;;
50658      ppc )
50659        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50660        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50661        ;;
50662      s390 )
50663        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50664        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50665        ;;
50666      * )
50667        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50668        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50669        ;;
50670    esac
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725    # Execute function body
50726
50727  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50728  REFERENCE_VERSION=6
50729
50730  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50731    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50732  fi
50733
50734  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50735    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50736  fi
50737
50738  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50739  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50740
50741  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50742    :
50743
50744  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50745  # runs afoul of the more aggressive versions of these optimisations.
50746  # Notably, value range propagation now assumes that the this pointer of C++
50747  # member functions is non-null.
50748  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50749        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50750        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50751$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50752  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50753  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50754
50755  else
50756    :
50757
50758  fi
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50774    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50775
50776    # Restrict the debug information created by Clang to avoid
50777    # too big object files and speed the build up a little bit
50778    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50779    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50780    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50781      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50782        # Force compatibility with i586 on 32 bit intel platforms.
50783        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50784        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50785      fi
50786      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50787      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50788          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50789      case $OPENJDK_TARGET_CPU_ARCH in
50790        ppc )
50791          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50792          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50793          ;;
50794        * )
50795          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50796          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50797          ;;
50798      esac
50799    fi
50800  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50801    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50802    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50803    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50804      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50805    fi
50806
50807    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50808    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50809  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50810    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50811    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50812    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50813  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50814    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50815        -MD -Zc:wchar_t- -W3 -wd4800 \
50816        -DWIN32_LEAN_AND_MEAN \
50817        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50818        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50819        -DWIN32 -DIAL"
50820    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50821      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50822    else
50823      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50824    fi
50825    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50826    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50827    # studio.
50828    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50829      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50830      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50831      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50832    fi
50833  fi
50834
50835  ###############################################################################
50836
50837  # Adjust flags according to debug level.
50838  case $DEBUG_LEVEL in
50839    fastdebug | slowdebug )
50840      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50841      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50842      ;;
50843    release )
50844      ;;
50845    * )
50846      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50847      ;;
50848  esac
50849
50850  # Set some common defines. These works for all compilers, but assume
50851  # -D is universally accepted.
50852
50853  # Setup endianness
50854  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50855    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50856    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50857    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50858    #   Note: -Dmacro         is the same as    #define macro 1
50859    #         -Dmacro=        is the same as    #define macro
50860    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50861      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50862    else
50863      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50864    fi
50865  else
50866    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50867    # are defined in the system?
50868    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50869      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50870    else
50871      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50872    fi
50873  fi
50874
50875  # Setup target OS define. Use OS target name but in upper case.
50876  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50877  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50878
50879  # Setup target CPU
50880  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50881      $OPENJDK_TARGET_ADD_LP64 \
50882      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50883
50884  # Setup debug/release defines
50885  if test "x$DEBUG_LEVEL" = xrelease; then
50886    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50887    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50888      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50889    fi
50890  else
50891    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50892  fi
50893
50894  # Set some additional per-OS defines.
50895  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50896    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50897    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50898        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50899  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50900    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50901    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50902        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50903  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50904    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50905    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50906    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50907    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50908        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50909        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50910        -fno-omit-frame-pointer"
50911  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50912    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50913    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50914    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50915        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50916        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50917  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50918    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50919  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50920    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50921    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50922  fi
50923
50924  # Set some additional per-CPU defines.
50925  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50926    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50927  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50928    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50929  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50930    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50931      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50932      # fixes `relocation truncated to fit' error for gcc 4.1.
50933      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50934      # Use ppc64 instructions, but schedule for power5
50935      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50936    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50937      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50938    fi
50939  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50940    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50941      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50942      # Little endian machine uses ELFv2 ABI.
50943      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50944      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50945      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50946    fi
50947  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50948    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50949      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50950    fi
50951  fi
50952
50953  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50954    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50955  fi
50956
50957  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50958    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50959      # Solaris does not have _LP64=1 in the old build.
50960      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50961      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50962    fi
50963  fi
50964
50965  # Set JVM_CFLAGS warning handling
50966  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50967    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50968        -Wunused-value -Woverloaded-virtual"
50969
50970    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025    # Execute function body
51026
51027  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51028  REFERENCE_VERSION=4.8
51029
51030  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51031    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51032  fi
51033
51034  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51035    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51036  fi
51037
51038  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51039  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51040
51041  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51042    :
51043
51044            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51045            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51046
51047
51048  else
51049    :
51050
51051  fi
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066    fi
51067    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51068      # Non-zero builds have stricter warnings
51069      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51070    else
51071      if test "x$TOOLCHAIN_TYPE" = xclang; then
51072        # Some versions of llvm do not like -Wundef
51073        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51074      fi
51075    fi
51076  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51077    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51078        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51079  fi
51080
51081  # Additional macosx handling
51082  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51083    # Setting these parameters makes it an error to link to macosx APIs that are
51084    # newer than the given OS version and makes the linked binaries compatible
51085    # even if built on a newer version of the OS.
51086    # The expected format is X.Y.Z
51087    MACOSX_VERSION_MIN=10.7.0
51088
51089
51090    # The macro takes the version with no dots, ex: 1070
51091    # Let the flags variables get resolved in make for easier override on make
51092    # command line.
51093    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51094    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51095  fi
51096
51097  # Setup some hard coded includes
51098  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51099      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51100      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51101      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51102      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51103      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51104      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51105
51106  # The shared libraries are compiled using the picflag.
51107  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51108      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51109  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51110      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51111
51112  # Executable flags
51113  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51114  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51115
51116
51117
51118
51119
51120
51121  # Setup LDFLAGS et al.
51122  #
51123
51124  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51125    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51126    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51127    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51128    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51129      LDFLAGS_SAFESH="-safeseh"
51130      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51131      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51132      # NOTE: Old build added -machine. Probably not needed.
51133      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51134    else
51135      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51136    fi
51137  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51138      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51139      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51140        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51141        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51142    fi
51143  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51144    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51145    # We have previously set HAS_GNU_HASH if this is the case
51146    if test -n "$HAS_GNU_HASH"; then
51147      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51148      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51149      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51150    fi
51151      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51152        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51153    fi
51154    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51155      # And since we now know that the linker is gnu, then add -z defs, to forbid
51156      # undefined symbols in object files.
51157      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51158      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51159      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51160      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51161      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51162      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51163        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51164      fi
51165      case $DEBUG_LEVEL in
51166        release )
51167          # tell linker to optimize libraries.
51168          # Should this be supplied to the OSS linker as well?
51169          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51170          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51171          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51172          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51173            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51174          fi
51175          ;;
51176        slowdebug )
51177          # Hotspot always let the linker optimize
51178          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51179          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51180            # do relocations at load
51181            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51182            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51183            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51184          fi
51185          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51186            # mark relocations read only
51187            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51188            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51189            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51190          fi
51191          ;;
51192        fastdebug )
51193          # Hotspot always let the linker optimize
51194          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51195          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51196            # mark relocations read only
51197            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51198            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51199            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51200          fi
51201          ;;
51202        * )
51203          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51204          ;;
51205        esac
51206    fi
51207  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51208    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51209    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51210    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51211    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51212    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51213    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51214      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51215    fi
51216  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51217    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51218    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51219    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51220  fi
51221
51222  # Customize LDFLAGS for executables
51223
51224  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51225
51226  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51227    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51228      LDFLAGS_STACK_SIZE=1048576
51229    else
51230      LDFLAGS_STACK_SIZE=327680
51231    fi
51232    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51233  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51234    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51235  fi
51236
51237  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51238
51239  # Customize LDFLAGS for libs
51240  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51241
51242  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51243  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51244    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51245        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51246    JDKLIB_LIBS=""
51247  else
51248    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51249        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51250
51251    if test "xTARGET" = "xTARGET"; then
51252      # On some platforms (mac) the linker warns about non existing -L dirs.
51253      # For any of the variants server, client or minimal, the dir matches the
51254      # variant name. The "main" variant should be used for linking. For the
51255      # rest, the dir is just server.
51256      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51257          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51258        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51259            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51260      else
51261        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51262            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51263      fi
51264    elif test "xTARGET" = "xBUILD"; then
51265      # When building a buildjdk, it's always only the server variant
51266      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51267          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51268    fi
51269
51270    JDKLIB_LIBS="-ljava -ljvm"
51271    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51272      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51273    fi
51274
51275  fi
51276
51277LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51278
51279  # Set JVM_LIBS (per os)
51280  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51281    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51282  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51283    # FIXME: This hard-coded path is not really proper.
51284    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51285      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51286    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51287      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51288    fi
51289    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51290        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51291  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51292    JVM_LIBS="$JVM_LIBS -lm"
51293  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51294    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51295  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51296    JVM_LIBS="$JVM_LIBS -lm"
51297  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51298    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51299        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51300        wsock32.lib winmm.lib version.lib psapi.lib"
51301    fi
51302
51303  # Set JVM_ASFLAGS
51304  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51305    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51306      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51307    fi
51308  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51309    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51310  fi
51311
51312  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328  # Special extras...
51329  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51330    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51331      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51332      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51333    fi
51334    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51335    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51336  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51337    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51338    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51339  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51340    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383    # Execute function body
51384
51385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51386$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51387  supports=yes
51388
51389  saved_cxxflags="$CXXFLAGS"
51390  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51391  ac_ext=cpp
51392ac_cpp='$CXXCPP $CPPFLAGS'
51393ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51394ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51395ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51396
51397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51398/* end confdefs.h.  */
51399int i;
51400_ACEOF
51401if ac_fn_cxx_try_compile "$LINENO"; then :
51402
51403else
51404  supports=no
51405fi
51406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51407  ac_ext=cpp
51408ac_cpp='$CXXCPP $CPPFLAGS'
51409ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51410ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51411ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51412
51413  CXXFLAGS="$saved_cxxflags"
51414
51415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51416$as_echo "$supports" >&6; }
51417  if test "x$supports" = "xyes" ; then
51418    :
51419
51420  else
51421    :
51422    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51423  fi
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51437    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51438
51439  fi
51440  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51441    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51442    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51443  fi
51444
51445  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51446  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51447  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51448
51449  ###############################################################################
51450  #
51451  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51452  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51453  #
51454
51455  # Setup compiler/platform specific flags into
51456  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51457  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51458  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51459  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51460    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51461    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51462    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51463    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51464      # Force compatibility with i586 on 32 bit intel platforms.
51465      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51466      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51467    fi
51468    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51469        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51470    case $OPENJDK_BUILD_CPU_ARCH in
51471      arm )
51472        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51473        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51474        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51475        ;;
51476      ppc )
51477        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51478        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51479        ;;
51480      s390 )
51481        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51482        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51483        ;;
51484      * )
51485        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51486        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51487        ;;
51488    esac
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
51541
51542
51543    # Execute function body
51544
51545  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51546  REFERENCE_VERSION=6
51547
51548  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51549    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51550  fi
51551
51552  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51553    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51554  fi
51555
51556  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51557  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51558
51559  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51560    :
51561
51562  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51563  # runs afoul of the more aggressive versions of these optimisations.
51564  # Notably, value range propagation now assumes that the this pointer of C++
51565  # member functions is non-null.
51566  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51567        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51568        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51569$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51570  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51571  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51572
51573  else
51574    :
51575
51576  fi
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51592    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51593
51594    # Restrict the debug information created by Clang to avoid
51595    # too big object files and speed the build up a little bit
51596    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51597    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51598    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51599      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51600        # Force compatibility with i586 on 32 bit intel platforms.
51601        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51602        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51603      fi
51604      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51605      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51606          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51607      case $OPENJDK_BUILD_CPU_ARCH in
51608        ppc )
51609          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51610          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51611          ;;
51612        * )
51613          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51614          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51615          ;;
51616      esac
51617    fi
51618  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51619    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51620    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51621    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51622      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51623    fi
51624
51625    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51626    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51627  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51628    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51629    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51630    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51631  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51632    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51633        -MD -Zc:wchar_t- -W3 -wd4800 \
51634        -DWIN32_LEAN_AND_MEAN \
51635        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51636        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51637        -DWIN32 -DIAL"
51638    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51639      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51640    else
51641      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51642    fi
51643    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51644    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51645    # studio.
51646    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51647      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51648      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51649      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51650    fi
51651  fi
51652
51653  ###############################################################################
51654
51655  # Adjust flags according to debug level.
51656  case $DEBUG_LEVEL in
51657    fastdebug | slowdebug )
51658      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51659      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51660      ;;
51661    release )
51662      ;;
51663    * )
51664      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51665      ;;
51666  esac
51667
51668  # Set some common defines. These works for all compilers, but assume
51669  # -D is universally accepted.
51670
51671  # Setup endianness
51672  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51673    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51674    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51675    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51676    #   Note: -Dmacro         is the same as    #define macro 1
51677    #         -Dmacro=        is the same as    #define macro
51678    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51679      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51680    else
51681      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51682    fi
51683  else
51684    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51685    # are defined in the system?
51686    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51687      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51688    else
51689      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51690    fi
51691  fi
51692
51693  # Setup target OS define. Use OS target name but in upper case.
51694  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51695  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51696
51697  # Setup target CPU
51698  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51699      $OPENJDK_BUILD_ADD_LP64 \
51700      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51701
51702  # Setup debug/release defines
51703  if test "x$DEBUG_LEVEL" = xrelease; then
51704    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51705    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51706      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51707    fi
51708  else
51709    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51710  fi
51711
51712  # Set some additional per-OS defines.
51713  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51714    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51715    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51716        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51717  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51718    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51719    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51720        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51721  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51722    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51723    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51724    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51725    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51726        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51727        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51728        -fno-omit-frame-pointer"
51729  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51730    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51731    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51732    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51733        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51734        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51735  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51736    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51737  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51738    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51739    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51740  fi
51741
51742  # Set some additional per-CPU defines.
51743  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51744    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51745  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51746    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51747  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51748    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51749      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51750      # fixes `relocation truncated to fit' error for gcc 4.1.
51751      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51752      # Use ppc64 instructions, but schedule for power5
51753      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51754    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51755      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51756    fi
51757  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51758    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51759      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51760      # Little endian machine uses ELFv2 ABI.
51761      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51762      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51763      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51764    fi
51765  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51766    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51767      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51768    fi
51769  fi
51770
51771  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51772    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51773  fi
51774
51775  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51776    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51777      # Solaris does not have _LP64=1 in the old build.
51778      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51779      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51780    fi
51781  fi
51782
51783  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51784  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51785    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51786        -Wunused-value -Woverloaded-virtual"
51787
51788    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
51841
51842
51843    # Execute function body
51844
51845  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51846  REFERENCE_VERSION=4.8
51847
51848  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51849    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51850  fi
51851
51852  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51853    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51854  fi
51855
51856  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51857  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51858
51859  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51860    :
51861
51862            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51863            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51864
51865
51866  else
51867    :
51868
51869  fi
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884    fi
51885    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51886      # Non-zero builds have stricter warnings
51887      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51888    else
51889      if test "x$TOOLCHAIN_TYPE" = xclang; then
51890        # Some versions of llvm do not like -Wundef
51891        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51892      fi
51893    fi
51894  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51895    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51896        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51897  fi
51898
51899  # Additional macosx handling
51900  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51901    # Setting these parameters makes it an error to link to macosx APIs that are
51902    # newer than the given OS version and makes the linked binaries compatible
51903    # even if built on a newer version of the OS.
51904    # The expected format is X.Y.Z
51905    MACOSX_VERSION_MIN=10.7.0
51906
51907
51908    # The macro takes the version with no dots, ex: 1070
51909    # Let the flags variables get resolved in make for easier override on make
51910    # command line.
51911    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)"
51912    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51913  fi
51914
51915  # Setup some hard coded includes
51916  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51917      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51918      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51919      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51920      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51921      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51922      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51923
51924  # The shared libraries are compiled using the picflag.
51925  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51926      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51927  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51928      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51929
51930  # Executable flags
51931  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51932  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51933
51934
51935
51936
51937
51938
51939  # Setup LDFLAGS et al.
51940  #
51941
51942  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51943    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51944    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51945    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51946    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51947      LDFLAGS_SAFESH="-safeseh"
51948      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51949      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51950      # NOTE: Old build added -machine. Probably not needed.
51951      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51952    else
51953      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51954    fi
51955  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51956      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51957      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51958        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51959        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51960    fi
51961  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51962    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51963    # We have previously set HAS_GNU_HASH if this is the case
51964    if test -n "$HAS_GNU_HASH"; then
51965      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51966      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51967      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51968    fi
51969      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51970        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51971    fi
51972    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51973      # And since we now know that the linker is gnu, then add -z defs, to forbid
51974      # undefined symbols in object files.
51975      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51976      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51977      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51978      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51979      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51980      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51981        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51982      fi
51983      case $DEBUG_LEVEL in
51984        release )
51985          # tell linker to optimize libraries.
51986          # Should this be supplied to the OSS linker as well?
51987          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51988          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51989          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51990          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51991            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51992          fi
51993          ;;
51994        slowdebug )
51995          # Hotspot always let the linker optimize
51996          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51997          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51998            # do relocations at load
51999            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52000            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52001            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52002          fi
52003          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52004            # mark relocations read only
52005            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52006            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52007            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52008          fi
52009          ;;
52010        fastdebug )
52011          # Hotspot always let the linker optimize
52012          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52013          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52014            # mark relocations read only
52015            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52016            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52017            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52018          fi
52019          ;;
52020        * )
52021          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52022          ;;
52023        esac
52024    fi
52025  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52026    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52027    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52028    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52029    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52030    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52031    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52032      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52033    fi
52034  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52035    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52036    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52037    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52038  fi
52039
52040  # Customize LDFLAGS for executables
52041
52042  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52043
52044  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52045    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52046      LDFLAGS_STACK_SIZE=1048576
52047    else
52048      LDFLAGS_STACK_SIZE=327680
52049    fi
52050    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52051  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52052    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52053  fi
52054
52055  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52056
52057  # Customize LDFLAGS for libs
52058  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52059
52060  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52061  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52062    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52063        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52064    OPENJDK_BUILD_JDKLIB_LIBS=""
52065  else
52066    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52067        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52068
52069    if test "xBUILD" = "xTARGET"; then
52070      # On some platforms (mac) the linker warns about non existing -L dirs.
52071      # For any of the variants server, client or minimal, the dir matches the
52072      # variant name. The "main" variant should be used for linking. For the
52073      # rest, the dir is just server.
52074      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52075          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52076        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52077            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52078      else
52079        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52080            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52081      fi
52082    elif test "xBUILD" = "xBUILD"; then
52083      # When building a buildjdk, it's always only the server variant
52084      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52085          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52086    fi
52087
52088    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52089    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52090      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52091    fi
52092
52093  fi
52094
52095OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52096
52097  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52098  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52099    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52100  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52101    # FIXME: This hard-coded path is not really proper.
52102    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52103      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52104    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52105      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52106    fi
52107    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52108        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52109  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52110    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52111  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52112    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52113  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52114    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52115  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52116    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52117        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52118        wsock32.lib winmm.lib version.lib psapi.lib"
52119    fi
52120
52121  # Set OPENJDK_BUILD_JVM_ASFLAGS
52122  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52123    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52124      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52125    fi
52126  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52127    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52128  fi
52129
52130  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146  # Tests are only ever compiled for TARGET
52147  # Flags for compiling test libraries
52148  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52149  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52150
52151  # Flags for compiling test executables
52152  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52153  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52154
52155
52156
52157
52158
52159
52160  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52161  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52162
52163
52164
52165
52166
52167
52168  # Check that the compiler supports -mX (or -qX on AIX) flags
52169  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
52215
52216
52217    # Execute function body
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
52264
52265
52266    # Execute function body
52267
52268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52269$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52270  supports=yes
52271
52272  saved_cflags="$CFLAGS"
52273  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52274  ac_ext=c
52275ac_cpp='$CPP $CPPFLAGS'
52276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52278ac_compiler_gnu=$ac_cv_c_compiler_gnu
52279
52280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52281/* end confdefs.h.  */
52282int i;
52283_ACEOF
52284if ac_fn_c_try_compile "$LINENO"; then :
52285
52286else
52287  supports=no
52288fi
52289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52290  ac_ext=cpp
52291ac_cpp='$CXXCPP $CPPFLAGS'
52292ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52293ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52294ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52295
52296  CFLAGS="$saved_cflags"
52297
52298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52299$as_echo "$supports" >&6; }
52300  if test "x$supports" = "xyes" ; then
52301    :
52302    C_COMP_SUPPORTS="yes"
52303  else
52304    :
52305    C_COMP_SUPPORTS="no"
52306  fi
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
52364
52365
52366    # Execute function body
52367
52368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52369$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52370  supports=yes
52371
52372  saved_cxxflags="$CXXFLAGS"
52373  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52374  ac_ext=cpp
52375ac_cpp='$CXXCPP $CPPFLAGS'
52376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52379
52380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52381/* end confdefs.h.  */
52382int i;
52383_ACEOF
52384if ac_fn_cxx_try_compile "$LINENO"; then :
52385
52386else
52387  supports=no
52388fi
52389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52390  ac_ext=cpp
52391ac_cpp='$CXXCPP $CPPFLAGS'
52392ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52393ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52394ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52395
52396  CXXFLAGS="$saved_cxxflags"
52397
52398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52399$as_echo "$supports" >&6; }
52400  if test "x$supports" = "xyes" ; then
52401    :
52402    CXX_COMP_SUPPORTS="yes"
52403  else
52404    :
52405    CXX_COMP_SUPPORTS="no"
52406  fi
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52421$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52422  supports=no
52423  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52424
52425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52426$as_echo "$supports" >&6; }
52427  if test "x$supports" = "xyes" ; then
52428    :
52429    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52430  else
52431    :
52432    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52433  fi
52434
52435
52436
52437
52438
52439
52440
52441
52442  # Check whether --enable-warnings-as-errors was given.
52443if test "${enable_warnings_as_errors+set}" = set; then :
52444  enableval=$enable_warnings_as_errors;
52445fi
52446
52447
52448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52449$as_echo_n "checking if native warnings are errors... " >&6; }
52450  if test "x$enable_warnings_as_errors" = "xyes"; then
52451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52452$as_echo "yes (explicitly set)" >&6; }
52453    WARNINGS_AS_ERRORS=true
52454  elif test "x$enable_warnings_as_errors" = "xno"; then
52455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52456$as_echo "no" >&6; }
52457    WARNINGS_AS_ERRORS=false
52458  elif test "x$enable_warnings_as_errors" = "x"; then
52459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52460$as_echo "yes (default)" >&6; }
52461    WARNINGS_AS_ERRORS=true
52462  else
52463    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52464  fi
52465
52466
52467
52468  case "${TOOLCHAIN_TYPE}" in
52469    microsoft)
52470      DISABLE_WARNING_PREFIX="-wd"
52471      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52472      ;;
52473    solstudio)
52474      DISABLE_WARNING_PREFIX="-erroff="
52475      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52476      ;;
52477    gcc)
52478      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52524
52525
52526    # Execute function body
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
52573
52574
52575    # Execute function body
52576
52577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52578$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52579  supports=yes
52580
52581  saved_cflags="$CFLAGS"
52582  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52583  ac_ext=c
52584ac_cpp='$CPP $CPPFLAGS'
52585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52587ac_compiler_gnu=$ac_cv_c_compiler_gnu
52588
52589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52590/* end confdefs.h.  */
52591int i;
52592_ACEOF
52593if ac_fn_c_try_compile "$LINENO"; then :
52594
52595else
52596  supports=no
52597fi
52598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52599  ac_ext=cpp
52600ac_cpp='$CXXCPP $CPPFLAGS'
52601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52604
52605  CFLAGS="$saved_cflags"
52606
52607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52608$as_echo "$supports" >&6; }
52609  if test "x$supports" = "xyes" ; then
52610    :
52611    C_COMP_SUPPORTS="yes"
52612  else
52613    :
52614    C_COMP_SUPPORTS="no"
52615  fi
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
52673
52674
52675    # Execute function body
52676
52677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52678$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52679  supports=yes
52680
52681  saved_cxxflags="$CXXFLAGS"
52682  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52683  ac_ext=cpp
52684ac_cpp='$CXXCPP $CPPFLAGS'
52685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52686ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52688
52689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52690/* end confdefs.h.  */
52691int i;
52692_ACEOF
52693if ac_fn_cxx_try_compile "$LINENO"; then :
52694
52695else
52696  supports=no
52697fi
52698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52699  ac_ext=cpp
52700ac_cpp='$CXXCPP $CPPFLAGS'
52701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52704
52705  CXXFLAGS="$saved_cxxflags"
52706
52707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52708$as_echo "$supports" >&6; }
52709  if test "x$supports" = "xyes" ; then
52710    :
52711    CXX_COMP_SUPPORTS="yes"
52712  else
52713    :
52714    CXX_COMP_SUPPORTS="no"
52715  fi
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52730$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52731  supports=no
52732  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52733
52734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52735$as_echo "$supports" >&6; }
52736  if test "x$supports" = "xyes" ; then
52737    :
52738    GCC_CAN_DISABLE_WARNINGS=true
52739  else
52740    :
52741    GCC_CAN_DISABLE_WARNINGS=false
52742
52743  fi
52744
52745
52746
52747
52748
52749
52750      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52751        DISABLE_WARNING_PREFIX="-Wno-"
52752      else
52753        DISABLE_WARNING_PREFIX=
52754      fi
52755      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52756      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52757      # CFLAGS since any target specific flags will likely not work with the
52758      # build compiler
52759      CC_OLD="$CC"
52760      CXX_OLD="$CXX"
52761      CC="$BUILD_CC"
52762      CXX="$BUILD_CXX"
52763      CFLAGS_OLD="$CFLAGS"
52764      CFLAGS=""
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
52810
52811
52812    # Execute function body
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
52859
52860
52861    # Execute function body
52862
52863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52864$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52865  supports=yes
52866
52867  saved_cflags="$CFLAGS"
52868  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52869  ac_ext=c
52870ac_cpp='$CPP $CPPFLAGS'
52871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52873ac_compiler_gnu=$ac_cv_c_compiler_gnu
52874
52875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52876/* end confdefs.h.  */
52877int i;
52878_ACEOF
52879if ac_fn_c_try_compile "$LINENO"; then :
52880
52881else
52882  supports=no
52883fi
52884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52885  ac_ext=cpp
52886ac_cpp='$CXXCPP $CPPFLAGS'
52887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52890
52891  CFLAGS="$saved_cflags"
52892
52893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52894$as_echo "$supports" >&6; }
52895  if test "x$supports" = "xyes" ; then
52896    :
52897    C_COMP_SUPPORTS="yes"
52898  else
52899    :
52900    C_COMP_SUPPORTS="no"
52901  fi
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
52959
52960
52961    # Execute function body
52962
52963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52964$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52965  supports=yes
52966
52967  saved_cxxflags="$CXXFLAGS"
52968  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52969  ac_ext=cpp
52970ac_cpp='$CXXCPP $CPPFLAGS'
52971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52974
52975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52976/* end confdefs.h.  */
52977int i;
52978_ACEOF
52979if ac_fn_cxx_try_compile "$LINENO"; then :
52980
52981else
52982  supports=no
52983fi
52984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52985  ac_ext=cpp
52986ac_cpp='$CXXCPP $CPPFLAGS'
52987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52990
52991  CXXFLAGS="$saved_cxxflags"
52992
52993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52994$as_echo "$supports" >&6; }
52995  if test "x$supports" = "xyes" ; then
52996    :
52997    CXX_COMP_SUPPORTS="yes"
52998  else
52999    :
53000    CXX_COMP_SUPPORTS="no"
53001  fi
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53016$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53017  supports=no
53018  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53019
53020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53021$as_echo "$supports" >&6; }
53022  if test "x$supports" = "xyes" ; then
53023    :
53024    BUILD_CC_CAN_DISABLE_WARNINGS=true
53025  else
53026    :
53027    BUILD_CC_CAN_DISABLE_WARNINGS=false
53028
53029  fi
53030
53031
53032
53033
53034
53035
53036      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53037        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53038      else
53039        BUILD_CC_DISABLE_WARNING_PREFIX=
53040      fi
53041      CC="$CC_OLD"
53042      CXX="$CXX_OLD"
53043      CFLAGS="$CFLAGS_OLD"
53044      ;;
53045    clang)
53046      DISABLE_WARNING_PREFIX="-Wno-"
53047      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53048      ;;
53049    xlc)
53050      DISABLE_WARNING_PREFIX="-qsuppress="
53051      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53052      ;;
53053  esac
53054
53055
53056
53057
53058
53059# Setup debug symbols (need objcopy from the toolchain for that)
53060
53061  #
53062  # NATIVE_DEBUG_SYMBOLS
53063  # This must be done after the toolchain is setup, since we're looking at objcopy.
53064  #
53065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53066$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53067
53068# Check whether --with-native-debug-symbols was given.
53069if test "${with_native_debug_symbols+set}" = set; then :
53070  withval=$with_native_debug_symbols;
53071        if test "x$OPENJDK_TARGET_OS" = xaix; then
53072          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53073            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53074          fi
53075        fi
53076
53077else
53078
53079        if test "x$OPENJDK_TARGET_OS" = xaix; then
53080          # AIX doesn't support 'zipped' so use 'internal' as default
53081          with_native_debug_symbols="internal"
53082        else
53083          if test "x$STATIC_BUILD" = xtrue; then
53084            with_native_debug_symbols="none"
53085          else
53086            with_native_debug_symbols="zipped"
53087          fi
53088        fi
53089
53090fi
53091
53092  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53094$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53095
53096  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53097
53098    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53099      if test "x$OBJCOPY" = x; then
53100        # enabling of enable-debug-symbols and can't find objcopy
53101        # this is an error
53102        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53103      fi
53104    fi
53105
53106    COMPILE_WITH_DEBUG_SYMBOLS=true
53107    COPY_DEBUG_SYMBOLS=true
53108    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53109  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53110    COMPILE_WITH_DEBUG_SYMBOLS=false
53111    COPY_DEBUG_SYMBOLS=false
53112    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53113  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53114    COMPILE_WITH_DEBUG_SYMBOLS=true
53115    COPY_DEBUG_SYMBOLS=false
53116    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53117  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53118
53119    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53120      if test "x$OBJCOPY" = x; then
53121        # enabling of enable-debug-symbols and can't find objcopy
53122        # this is an error
53123        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53124      fi
53125    fi
53126
53127    COMPILE_WITH_DEBUG_SYMBOLS=true
53128    COPY_DEBUG_SYMBOLS=true
53129    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53130  else
53131    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53132  fi
53133
53134  # --enable-debug-symbols is deprecated.
53135  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53136
53137  # Check whether --enable-debug-symbols was given.
53138if test "${enable_debug_symbols+set}" = set; then :
53139  enableval=$enable_debug_symbols;
53140fi
53141
53142  if test "x$enable_debug_symbols" != x; then
53143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53144$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53145
53146    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53147      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53148$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53149    fi
53150
53151  fi
53152
53153
53154  # --enable-zip-debug-info is deprecated.
53155  # Please use --with-native-debug-symbols=zipped .
53156
53157  # Check whether --enable-zip-debug-info was given.
53158if test "${enable_zip_debug_info+set}" = set; then :
53159  enableval=$enable_zip_debug_info;
53160fi
53161
53162  if test "x$enable_zip_debug_info" != x; then
53163    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53164$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53165
53166    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53167      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53168$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53169    fi
53170
53171  fi
53172
53173
53174
53175
53176
53177
53178
53179  # Check whether --enable-native-coverage was given.
53180if test "${enable_native_coverage+set}" = set; then :
53181  enableval=$enable_native_coverage;
53182fi
53183
53184  GCOV_ENABLED="false"
53185  if test "x$enable_native_coverage" = "xyes"; then
53186    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53188$as_echo_n "checking if native coverage is enabled... " >&6; }
53189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53190$as_echo "yes" >&6; }
53191      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53192      GCOV_LDFLAGS="-fprofile-arcs"
53193      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53194      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53195      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53196      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53197      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53198      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53199      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53200      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53201      GCOV_ENABLED="true"
53202    else
53203      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53204    fi
53205  elif test "x$enable_native_coverage" = "xno"; then
53206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53207$as_echo_n "checking if native coverage is enabled... " >&6; }
53208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53209$as_echo "no" >&6; }
53210  elif test "x$enable_native_coverage" != "x"; then
53211    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53212  fi
53213
53214
53215
53216
53217# Need toolchain to setup dtrace
53218
53219  # Test for dtrace dependencies
53220  # Check whether --enable-dtrace was given.
53221if test "${enable_dtrace+set}" = set; then :
53222  enableval=$enable_dtrace;
53223fi
53224
53225
53226  DTRACE_DEP_MISSING=false
53227
53228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53229$as_echo_n "checking for dtrace tool... " >&6; }
53230  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53232$as_echo "$DTRACE" >&6; }
53233  else
53234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53235$as_echo "not found, cannot build dtrace" >&6; }
53236    DTRACE_DEP_MISSING=true
53237  fi
53238
53239  for ac_header in sys/sdt.h
53240do :
53241  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53242if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53243  cat >>confdefs.h <<_ACEOF
53244#define HAVE_SYS_SDT_H 1
53245_ACEOF
53246 DTRACE_HEADERS_OK=yes
53247else
53248  DTRACE_HEADERS_OK=no
53249fi
53250
53251done
53252
53253  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53254    DTRACE_DEP_MISSING=true
53255  fi
53256
53257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53258$as_echo_n "checking if dtrace should be built... " >&6; }
53259  if test "x$enable_dtrace" = "xyes"; then
53260    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53262$as_echo "no, missing dependencies" >&6; }
53263
53264  # Print a helpful message on how to acquire the necessary build dependency.
53265  # dtrace is the help tag: freetype, cups, alsa etc
53266  MISSING_DEPENDENCY=dtrace
53267
53268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53269    cygwin_help $MISSING_DEPENDENCY
53270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53271    msys_help $MISSING_DEPENDENCY
53272  else
53273    PKGHANDLER_COMMAND=
53274
53275    case $PKGHANDLER in
53276      apt-get)
53277        apt_help     $MISSING_DEPENDENCY ;;
53278      yum)
53279        yum_help     $MISSING_DEPENDENCY ;;
53280      brew)
53281        brew_help    $MISSING_DEPENDENCY ;;
53282      port)
53283        port_help    $MISSING_DEPENDENCY ;;
53284      pkgutil)
53285        pkgutil_help $MISSING_DEPENDENCY ;;
53286      pkgadd)
53287        pkgadd_help  $MISSING_DEPENDENCY ;;
53288    esac
53289
53290    if test "x$PKGHANDLER_COMMAND" != x; then
53291      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53292    fi
53293  fi
53294
53295      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53296    else
53297      INCLUDE_DTRACE=true
53298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53299$as_echo "yes, forced" >&6; }
53300    fi
53301  elif test "x$enable_dtrace" = "xno"; then
53302    INCLUDE_DTRACE=false
53303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53304$as_echo "no, forced" >&6; }
53305  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53306    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53307      INCLUDE_DTRACE=false
53308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53309$as_echo "no, missing dependencies" >&6; }
53310    else
53311      INCLUDE_DTRACE=true
53312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53313$as_echo "yes, dependencies present" >&6; }
53314    fi
53315  else
53316    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53317  fi
53318
53319
53320  # Check whether --enable-aot was given.
53321if test "${enable_aot+set}" = set; then :
53322  enableval=$enable_aot;
53323fi
53324
53325
53326  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53327    ENABLE_AOT="true"
53328  elif test "x$enable_aot" = "xyes"; then
53329    ENABLE_AOT="true"
53330  elif test "x$enable_aot" = "xno"; then
53331    ENABLE_AOT="false"
53332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53333$as_echo_n "checking if aot should be enabled... " >&6; }
53334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53335$as_echo "no, forced" >&6; }
53336  else
53337    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53338  fi
53339
53340  if test "x$ENABLE_AOT" = "xtrue"; then
53341    # Only enable AOT on linux-X64.
53342    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53343      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53344        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53345          ENABLE_AOT="true"
53346        else
53347          ENABLE_AOT="false"
53348          if test "x$enable_aot" = "xyes"; then
53349            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53350          fi
53351        fi
53352      else
53353        ENABLE_AOT="false"
53354        if test "x$enable_aot" = "xyes"; then
53355          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53356        fi
53357      fi
53358    else
53359      ENABLE_AOT="false"
53360      if test "x$enable_aot" = "xyes"; then
53361        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53362      fi
53363    fi
53364  fi
53365
53366
53367
53368
53369  # Check whether --enable-hotspot-gtest was given.
53370if test "${enable_hotspot_gtest+set}" = set; then :
53371  enableval=$enable_hotspot_gtest;
53372fi
53373
53374
53375  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53376    GTEST_DIR_EXISTS="true"
53377  else
53378    GTEST_DIR_EXISTS="false"
53379  fi
53380
53381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53382$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53383  if test "x$enable_hotspot_gtest" = "xyes"; then
53384    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53386$as_echo "yes, forced" >&6; }
53387      BUILD_GTEST="true"
53388    else
53389      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53390    fi
53391  elif test "x$enable_hotspot_gtest" = "xno"; then
53392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53393$as_echo "no, forced" >&6; }
53394    BUILD_GTEST="false"
53395  elif test "x$enable_hotspot_gtest" = "x"; then
53396    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53397      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53398$as_echo "yes" >&6; }
53399      BUILD_GTEST="true"
53400    else
53401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53402$as_echo "no" >&6; }
53403      BUILD_GTEST="false"
53404    fi
53405  else
53406    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53407  fi
53408
53409
53410
53411
53412###############################################################################
53413#
53414# Check dependencies for external and internal libraries.
53415#
53416###############################################################################
53417
53418# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53419
53420  # When using cygwin or msys, we need a wrapper binary that renames
53421  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53422  # @files and rewrites these too! This wrapper binary is
53423  # called fixpath.
53424  FIXPATH=
53425  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53427$as_echo_n "checking if fixpath can be created... " >&6; }
53428    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53429    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53430    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53431    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53432      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53433      FIXPATH="$FIXPATH_BIN -c"
53434    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53435      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53436      # @ was chosen as separator to minimize risk of other tools messing around with it
53437      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53438          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53439      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53440      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53441    fi
53442    FIXPATH_SRC_W="$FIXPATH_SRC"
53443    FIXPATH_BIN_W="$FIXPATH_BIN"
53444
53445  unix_path="$FIXPATH_SRC_W"
53446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53447    windows_path=`$CYGPATH -m "$unix_path"`
53448    FIXPATH_SRC_W="$windows_path"
53449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53450    windows_path=`cmd //c echo $unix_path`
53451    FIXPATH_SRC_W="$windows_path"
53452  fi
53453
53454
53455  unix_path="$FIXPATH_BIN_W"
53456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53457    windows_path=`$CYGPATH -m "$unix_path"`
53458    FIXPATH_BIN_W="$windows_path"
53459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53460    windows_path=`cmd //c echo $unix_path`
53461    FIXPATH_BIN_W="$windows_path"
53462  fi
53463
53464    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53465    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53466    cd $FIXPATH_DIR
53467    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53468    cd $CURDIR
53469
53470    if test ! -x $FIXPATH_BIN; then
53471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53472$as_echo "no" >&6; }
53473      cat $FIXPATH_DIR/fixpath1.log
53474      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53475    fi
53476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53477$as_echo "yes" >&6; }
53478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53479$as_echo_n "checking if fixpath.exe works... " >&6; }
53480    cd $FIXPATH_DIR
53481    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53482        > $FIXPATH_DIR/fixpath2.log 2>&1
53483    cd $CURDIR
53484    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53486$as_echo "no" >&6; }
53487      cat $FIXPATH_DIR/fixpath2.log
53488      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53489    fi
53490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53491$as_echo "yes" >&6; }
53492
53493    FIXPATH_DETACH_FLAG="--detach"
53494  fi
53495
53496
53497
53498
53499
53500
53501  # Check if X11 is needed
53502  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53503    # No X11 support on windows or macosx
53504    NEEDS_LIB_X11=false
53505  else
53506    # All other instances need X11, even if building headless only, libawt still
53507    # needs X11 headers.
53508    NEEDS_LIB_X11=true
53509  fi
53510
53511  # Check if cups is needed
53512  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53513    # Windows have a separate print system
53514    NEEDS_LIB_CUPS=false
53515  else
53516    NEEDS_LIB_CUPS=true
53517  fi
53518
53519  # A custom hook may have set this already
53520  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53521    NEEDS_LIB_FREETYPE=true
53522  fi
53523
53524  # Check if alsa is needed
53525  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53526    NEEDS_LIB_ALSA=true
53527  else
53528    NEEDS_LIB_ALSA=false
53529  fi
53530
53531  # Check if ffi is needed
53532  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53533    NEEDS_LIB_FFI=true
53534  else
53535    NEEDS_LIB_FFI=false
53536  fi
53537
53538
53539  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53540  # dynamic build is configured on command line.
53541
53542# Check whether --with-stdc++lib was given.
53543if test "${with_stdc__lib+set}" = set; then :
53544  withval=$with_stdc__lib;
53545        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53546                && test "x$with_stdc__lib" != xdefault; then
53547          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53548        fi
53549
53550else
53551  with_stdc__lib=default
53552
53553fi
53554
53555
53556  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53557    # Test if stdc++ can be linked statically.
53558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53559$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53560    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53561    ac_ext=cpp
53562ac_cpp='$CXXCPP $CPPFLAGS'
53563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53566
53567    OLD_LIBS="$LIBS"
53568    LIBS="$STATIC_STDCXX_FLAGS"
53569    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53570/* end confdefs.h.  */
53571
53572int
53573main ()
53574{
53575return 0;
53576  ;
53577  return 0;
53578}
53579_ACEOF
53580if ac_fn_cxx_try_link "$LINENO"; then :
53581  has_static_libstdcxx=yes
53582else
53583  has_static_libstdcxx=no
53584fi
53585rm -f core conftest.err conftest.$ac_objext \
53586    conftest$ac_exeext conftest.$ac_ext
53587    LIBS="$OLD_LIBS"
53588    ac_ext=cpp
53589ac_cpp='$CXXCPP $CPPFLAGS'
53590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53593
53594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53595$as_echo "$has_static_libstdcxx" >&6; }
53596
53597    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53598      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53599    fi
53600
53601    # If dynamic was requested, it's available since it would fail above otherwise.
53602    # If dynamic wasn't requested, go with static unless it isn't available.
53603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53604$as_echo_n "checking how to link with libstdc++... " >&6; }
53605    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53606        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53608$as_echo "dynamic" >&6; }
53609    else
53610      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53611      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53612      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53613      # just use the same setting as for the TARGET toolchain.
53614      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53616$as_echo "static" >&6; }
53617    fi
53618  fi
53619
53620  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53621  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53622    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53623  fi
53624
53625
53626
53627  # Setup Windows runtime dlls
53628  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53629
53630
53631# Check whether --with-msvcr-dll was given.
53632if test "${with_msvcr_dll+set}" = set; then :
53633  withval=$with_msvcr_dll;
53634fi
53635
53636
53637  if test "x$with_msvcr_dll" != x; then
53638    # If given explicitly by user, do not probe. If not present, fail directly.
53639
53640  DLL_NAME="$MSVCR_NAME"
53641  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53642  METHOD="--with-msvcr-dll"
53643  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53645$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53646
53647    # Need to check if the found msvcr is correct architecture
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53649$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53650    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53652      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53653      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53654      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53655        CORRECT_MSVCR_ARCH="PE32 executable"
53656      else
53657        CORRECT_MSVCR_ARCH="PE32+ executable"
53658      fi
53659    else
53660      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53661        CORRECT_MSVCR_ARCH=386
53662      else
53663        CORRECT_MSVCR_ARCH=x86-64
53664      fi
53665    fi
53666    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53668$as_echo "ok" >&6; }
53669      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53670
53671  # Only process if variable expands to non-empty
53672
53673  if test "x$MSVC_DLL" != x; then
53674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53675
53676  # Input might be given as Windows format, start by converting to
53677  # unix format.
53678  path="$MSVC_DLL"
53679  new_path=`$CYGPATH -u "$path"`
53680
53681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53684  # "foo.exe" is OK but "foo" is an error.
53685  #
53686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53687  # It is also a way to make sure we got the proper file name for the real test later on.
53688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53689  if test "x$test_shortpath" = x; then
53690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53692    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53693  fi
53694
53695  # Call helper function which possibly converts this using DOS-style short mode.
53696  # If so, the updated path is stored in $new_path.
53697
53698  input_path="$new_path"
53699  # Check if we need to convert this using DOS-style short mode. If the path
53700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53701  # take no chances and rewrite it.
53702  # Note: m4 eats our [], so we need to use [ and ] instead.
53703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53704  if test "x$has_forbidden_chars" != x; then
53705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53709      # Going to short mode and back again did indeed matter. Since short mode is
53710      # case insensitive, let's make it lowercase to improve readability.
53711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53712      # Now convert it back to Unix-style (cygpath)
53713      input_path=`$CYGPATH -u "$shortmode_path"`
53714      new_path="$input_path"
53715    fi
53716  fi
53717
53718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53719  if test "x$test_cygdrive_prefix" = x; then
53720    # As a simple fix, exclude /usr/bin since it's not a real path.
53721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53723      # a path prefixed by /cygdrive for fixpath to work.
53724      new_path="$CYGWIN_ROOT_PATH$input_path"
53725    fi
53726  fi
53727
53728
53729  if test "x$path" != "x$new_path"; then
53730    MSVC_DLL="$new_path"
53731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53732$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53733  fi
53734
53735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53736
53737  path="$MSVC_DLL"
53738  has_colon=`$ECHO $path | $GREP ^.:`
53739  new_path="$path"
53740  if test "x$has_colon" = x; then
53741    # Not in mixed or Windows style, start by that.
53742    new_path=`cmd //c echo $path`
53743  fi
53744
53745
53746  input_path="$new_path"
53747  # Check if we need to convert this using DOS-style short mode. If the path
53748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53749  # take no chances and rewrite it.
53750  # Note: m4 eats our [], so we need to use [ and ] instead.
53751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53752  if test "x$has_forbidden_chars" != x; then
53753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53755  fi
53756
53757
53758  windows_path="$new_path"
53759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53760    unix_path=`$CYGPATH -u "$windows_path"`
53761    new_path="$unix_path"
53762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53764    new_path="$unix_path"
53765  fi
53766
53767  if test "x$path" != "x$new_path"; then
53768    MSVC_DLL="$new_path"
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53771  fi
53772
53773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53775
53776    else
53777      # We're on a unix platform. Hooray! :)
53778      path="$MSVC_DLL"
53779      has_space=`$ECHO "$path" | $GREP " "`
53780      if test "x$has_space" != x; then
53781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53784      fi
53785
53786      # Use eval to expand a potential ~
53787      eval path="$path"
53788      if test ! -f "$path" && test ! -d "$path"; then
53789        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53790      fi
53791
53792      if test -d "$path"; then
53793        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53794      else
53795        dir="`$DIRNAME "$path"`"
53796        base="`$BASENAME "$path"`"
53797        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53798      fi
53799    fi
53800  fi
53801
53802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53803$as_echo_n "checking for $DLL_NAME... " >&6; }
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53805$as_echo "$MSVC_DLL" >&6; }
53806    else
53807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53808$as_echo "incorrect, ignoring" >&6; }
53809      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53810$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53811    fi
53812  fi
53813
53814    if test "x$MSVC_DLL" = x; then
53815      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53816    fi
53817    MSVCR_DLL="$MSVC_DLL"
53818  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53819
53820  DLL_NAME="$MSVCR_NAME"
53821  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53822  METHOD="devkit"
53823  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53825$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53826
53827    # Need to check if the found msvcr is correct architecture
53828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53829$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53830    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53832      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53833      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53834      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53835        CORRECT_MSVCR_ARCH="PE32 executable"
53836      else
53837        CORRECT_MSVCR_ARCH="PE32+ executable"
53838      fi
53839    else
53840      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53841        CORRECT_MSVCR_ARCH=386
53842      else
53843        CORRECT_MSVCR_ARCH=x86-64
53844      fi
53845    fi
53846    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53848$as_echo "ok" >&6; }
53849      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53850
53851  # Only process if variable expands to non-empty
53852
53853  if test "x$MSVC_DLL" != x; then
53854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53855
53856  # Input might be given as Windows format, start by converting to
53857  # unix format.
53858  path="$MSVC_DLL"
53859  new_path=`$CYGPATH -u "$path"`
53860
53861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53864  # "foo.exe" is OK but "foo" is an error.
53865  #
53866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53867  # It is also a way to make sure we got the proper file name for the real test later on.
53868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53869  if test "x$test_shortpath" = x; then
53870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53871$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53872    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53873  fi
53874
53875  # Call helper function which possibly converts this using DOS-style short mode.
53876  # If so, the updated path is stored in $new_path.
53877
53878  input_path="$new_path"
53879  # Check if we need to convert this using DOS-style short mode. If the path
53880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53881  # take no chances and rewrite it.
53882  # Note: m4 eats our [], so we need to use [ and ] instead.
53883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53884  if test "x$has_forbidden_chars" != x; then
53885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53889      # Going to short mode and back again did indeed matter. Since short mode is
53890      # case insensitive, let's make it lowercase to improve readability.
53891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53892      # Now convert it back to Unix-style (cygpath)
53893      input_path=`$CYGPATH -u "$shortmode_path"`
53894      new_path="$input_path"
53895    fi
53896  fi
53897
53898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53899  if test "x$test_cygdrive_prefix" = x; then
53900    # As a simple fix, exclude /usr/bin since it's not a real path.
53901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53903      # a path prefixed by /cygdrive for fixpath to work.
53904      new_path="$CYGWIN_ROOT_PATH$input_path"
53905    fi
53906  fi
53907
53908
53909  if test "x$path" != "x$new_path"; then
53910    MSVC_DLL="$new_path"
53911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53912$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53913  fi
53914
53915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53916
53917  path="$MSVC_DLL"
53918  has_colon=`$ECHO $path | $GREP ^.:`
53919  new_path="$path"
53920  if test "x$has_colon" = x; then
53921    # Not in mixed or Windows style, start by that.
53922    new_path=`cmd //c echo $path`
53923  fi
53924
53925
53926  input_path="$new_path"
53927  # Check if we need to convert this using DOS-style short mode. If the path
53928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53929  # take no chances and rewrite it.
53930  # Note: m4 eats our [], so we need to use [ and ] instead.
53931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53932  if test "x$has_forbidden_chars" != x; then
53933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53935  fi
53936
53937
53938  windows_path="$new_path"
53939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53940    unix_path=`$CYGPATH -u "$windows_path"`
53941    new_path="$unix_path"
53942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53944    new_path="$unix_path"
53945  fi
53946
53947  if test "x$path" != "x$new_path"; then
53948    MSVC_DLL="$new_path"
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53950$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53951  fi
53952
53953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53955
53956    else
53957      # We're on a unix platform. Hooray! :)
53958      path="$MSVC_DLL"
53959      has_space=`$ECHO "$path" | $GREP " "`
53960      if test "x$has_space" != x; then
53961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53962$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53964      fi
53965
53966      # Use eval to expand a potential ~
53967      eval path="$path"
53968      if test ! -f "$path" && test ! -d "$path"; then
53969        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53970      fi
53971
53972      if test -d "$path"; then
53973        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53974      else
53975        dir="`$DIRNAME "$path"`"
53976        base="`$BASENAME "$path"`"
53977        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53978      fi
53979    fi
53980  fi
53981
53982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53983$as_echo_n "checking for $DLL_NAME... " >&6; }
53984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53985$as_echo "$MSVC_DLL" >&6; }
53986    else
53987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53988$as_echo "incorrect, ignoring" >&6; }
53989      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53990$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53991    fi
53992  fi
53993
53994    if test "x$MSVC_DLL" = x; then
53995      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53996    fi
53997    MSVCR_DLL="$MSVC_DLL"
53998  else
53999
54000  DLL_NAME="${MSVCR_NAME}"
54001  MSVC_DLL=
54002
54003  if test "x$MSVC_DLL" = x; then
54004    # Probe: Using well-known location from Visual Studio 10.0
54005    if test "x$VCINSTALLDIR" != x; then
54006      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54007
54008  windows_path="$CYGWIN_VC_INSTALL_DIR"
54009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54010    unix_path=`$CYGPATH -u "$windows_path"`
54011    CYGWIN_VC_INSTALL_DIR="$unix_path"
54012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54014    CYGWIN_VC_INSTALL_DIR="$unix_path"
54015  fi
54016
54017      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54018        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54019      else
54020        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54021      fi
54022      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54023
54024  DLL_NAME="$DLL_NAME"
54025  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54026  METHOD="well-known location in VCINSTALLDIR"
54027  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54028    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54029$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54030
54031    # Need to check if the found msvcr is correct architecture
54032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54033$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54034    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54036      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54037      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54038      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54039        CORRECT_MSVCR_ARCH="PE32 executable"
54040      else
54041        CORRECT_MSVCR_ARCH="PE32+ executable"
54042      fi
54043    else
54044      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54045        CORRECT_MSVCR_ARCH=386
54046      else
54047        CORRECT_MSVCR_ARCH=x86-64
54048      fi
54049    fi
54050    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54052$as_echo "ok" >&6; }
54053      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54054
54055  # Only process if variable expands to non-empty
54056
54057  if test "x$MSVC_DLL" != x; then
54058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54059
54060  # Input might be given as Windows format, start by converting to
54061  # unix format.
54062  path="$MSVC_DLL"
54063  new_path=`$CYGPATH -u "$path"`
54064
54065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54068  # "foo.exe" is OK but "foo" is an error.
54069  #
54070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54071  # It is also a way to make sure we got the proper file name for the real test later on.
54072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54073  if test "x$test_shortpath" = x; then
54074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54076    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54077  fi
54078
54079  # Call helper function which possibly converts this using DOS-style short mode.
54080  # If so, the updated path is stored in $new_path.
54081
54082  input_path="$new_path"
54083  # Check if we need to convert this using DOS-style short mode. If the path
54084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54085  # take no chances and rewrite it.
54086  # Note: m4 eats our [], so we need to use [ and ] instead.
54087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54088  if test "x$has_forbidden_chars" != x; then
54089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54093      # Going to short mode and back again did indeed matter. Since short mode is
54094      # case insensitive, let's make it lowercase to improve readability.
54095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54096      # Now convert it back to Unix-style (cygpath)
54097      input_path=`$CYGPATH -u "$shortmode_path"`
54098      new_path="$input_path"
54099    fi
54100  fi
54101
54102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54103  if test "x$test_cygdrive_prefix" = x; then
54104    # As a simple fix, exclude /usr/bin since it's not a real path.
54105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54107      # a path prefixed by /cygdrive for fixpath to work.
54108      new_path="$CYGWIN_ROOT_PATH$input_path"
54109    fi
54110  fi
54111
54112
54113  if test "x$path" != "x$new_path"; then
54114    MSVC_DLL="$new_path"
54115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54117  fi
54118
54119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54120
54121  path="$MSVC_DLL"
54122  has_colon=`$ECHO $path | $GREP ^.:`
54123  new_path="$path"
54124  if test "x$has_colon" = x; then
54125    # Not in mixed or Windows style, start by that.
54126    new_path=`cmd //c echo $path`
54127  fi
54128
54129
54130  input_path="$new_path"
54131  # Check if we need to convert this using DOS-style short mode. If the path
54132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54133  # take no chances and rewrite it.
54134  # Note: m4 eats our [], so we need to use [ and ] instead.
54135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54136  if test "x$has_forbidden_chars" != x; then
54137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54139  fi
54140
54141
54142  windows_path="$new_path"
54143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54144    unix_path=`$CYGPATH -u "$windows_path"`
54145    new_path="$unix_path"
54146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54148    new_path="$unix_path"
54149  fi
54150
54151  if test "x$path" != "x$new_path"; then
54152    MSVC_DLL="$new_path"
54153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54154$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54155  fi
54156
54157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54159
54160    else
54161      # We're on a unix platform. Hooray! :)
54162      path="$MSVC_DLL"
54163      has_space=`$ECHO "$path" | $GREP " "`
54164      if test "x$has_space" != x; then
54165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54166$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54167        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54168      fi
54169
54170      # Use eval to expand a potential ~
54171      eval path="$path"
54172      if test ! -f "$path" && test ! -d "$path"; then
54173        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54174      fi
54175
54176      if test -d "$path"; then
54177        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54178      else
54179        dir="`$DIRNAME "$path"`"
54180        base="`$BASENAME "$path"`"
54181        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54182      fi
54183    fi
54184  fi
54185
54186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54187$as_echo_n "checking for $DLL_NAME... " >&6; }
54188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54189$as_echo "$MSVC_DLL" >&6; }
54190    else
54191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54192$as_echo "incorrect, ignoring" >&6; }
54193      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54194$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54195    fi
54196  fi
54197
54198    fi
54199  fi
54200
54201  if test "x$MSVC_DLL" = x; then
54202    # Probe: Check in the Boot JDK directory.
54203    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54204
54205  DLL_NAME="$DLL_NAME"
54206  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54207  METHOD="well-known location in Boot JDK"
54208  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54209    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54210$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54211
54212    # Need to check if the found msvcr is correct architecture
54213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54214$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54215    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54217      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54218      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54219      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54220        CORRECT_MSVCR_ARCH="PE32 executable"
54221      else
54222        CORRECT_MSVCR_ARCH="PE32+ executable"
54223      fi
54224    else
54225      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54226        CORRECT_MSVCR_ARCH=386
54227      else
54228        CORRECT_MSVCR_ARCH=x86-64
54229      fi
54230    fi
54231    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54233$as_echo "ok" >&6; }
54234      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54235
54236  # Only process if variable expands to non-empty
54237
54238  if test "x$MSVC_DLL" != x; then
54239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54240
54241  # Input might be given as Windows format, start by converting to
54242  # unix format.
54243  path="$MSVC_DLL"
54244  new_path=`$CYGPATH -u "$path"`
54245
54246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54249  # "foo.exe" is OK but "foo" is an error.
54250  #
54251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54252  # It is also a way to make sure we got the proper file name for the real test later on.
54253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54254  if test "x$test_shortpath" = x; then
54255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54256$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54257    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54258  fi
54259
54260  # Call helper function which possibly converts this using DOS-style short mode.
54261  # If so, the updated path is stored in $new_path.
54262
54263  input_path="$new_path"
54264  # Check if we need to convert this using DOS-style short mode. If the path
54265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54266  # take no chances and rewrite it.
54267  # Note: m4 eats our [], so we need to use [ and ] instead.
54268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54269  if test "x$has_forbidden_chars" != x; then
54270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54274      # Going to short mode and back again did indeed matter. Since short mode is
54275      # case insensitive, let's make it lowercase to improve readability.
54276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54277      # Now convert it back to Unix-style (cygpath)
54278      input_path=`$CYGPATH -u "$shortmode_path"`
54279      new_path="$input_path"
54280    fi
54281  fi
54282
54283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54284  if test "x$test_cygdrive_prefix" = x; then
54285    # As a simple fix, exclude /usr/bin since it's not a real path.
54286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54288      # a path prefixed by /cygdrive for fixpath to work.
54289      new_path="$CYGWIN_ROOT_PATH$input_path"
54290    fi
54291  fi
54292
54293
54294  if test "x$path" != "x$new_path"; then
54295    MSVC_DLL="$new_path"
54296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54297$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54298  fi
54299
54300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54301
54302  path="$MSVC_DLL"
54303  has_colon=`$ECHO $path | $GREP ^.:`
54304  new_path="$path"
54305  if test "x$has_colon" = x; then
54306    # Not in mixed or Windows style, start by that.
54307    new_path=`cmd //c echo $path`
54308  fi
54309
54310
54311  input_path="$new_path"
54312  # Check if we need to convert this using DOS-style short mode. If the path
54313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54314  # take no chances and rewrite it.
54315  # Note: m4 eats our [], so we need to use [ and ] instead.
54316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54317  if test "x$has_forbidden_chars" != x; then
54318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54320  fi
54321
54322
54323  windows_path="$new_path"
54324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54325    unix_path=`$CYGPATH -u "$windows_path"`
54326    new_path="$unix_path"
54327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54329    new_path="$unix_path"
54330  fi
54331
54332  if test "x$path" != "x$new_path"; then
54333    MSVC_DLL="$new_path"
54334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54335$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54336  fi
54337
54338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54340
54341    else
54342      # We're on a unix platform. Hooray! :)
54343      path="$MSVC_DLL"
54344      has_space=`$ECHO "$path" | $GREP " "`
54345      if test "x$has_space" != x; then
54346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54347$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54348        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54349      fi
54350
54351      # Use eval to expand a potential ~
54352      eval path="$path"
54353      if test ! -f "$path" && test ! -d "$path"; then
54354        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54355      fi
54356
54357      if test -d "$path"; then
54358        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54359      else
54360        dir="`$DIRNAME "$path"`"
54361        base="`$BASENAME "$path"`"
54362        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54363      fi
54364    fi
54365  fi
54366
54367      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54368$as_echo_n "checking for $DLL_NAME... " >&6; }
54369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54370$as_echo "$MSVC_DLL" >&6; }
54371    else
54372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54373$as_echo "incorrect, ignoring" >&6; }
54374      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54375$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54376    fi
54377  fi
54378
54379  fi
54380
54381  if test "x$MSVC_DLL" = x; then
54382    # Probe: Look in the Windows system32 directory
54383    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54384
54385  windows_path="$CYGWIN_SYSTEMROOT"
54386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54387    unix_path=`$CYGPATH -u "$windows_path"`
54388    CYGWIN_SYSTEMROOT="$unix_path"
54389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54391    CYGWIN_SYSTEMROOT="$unix_path"
54392  fi
54393
54394    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54395
54396  DLL_NAME="$DLL_NAME"
54397  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54398  METHOD="well-known location in SYSTEMROOT"
54399  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54400    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54401$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54402
54403    # Need to check if the found msvcr is correct architecture
54404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54405$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54406    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54408      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54409      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54410      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54411        CORRECT_MSVCR_ARCH="PE32 executable"
54412      else
54413        CORRECT_MSVCR_ARCH="PE32+ executable"
54414      fi
54415    else
54416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54417        CORRECT_MSVCR_ARCH=386
54418      else
54419        CORRECT_MSVCR_ARCH=x86-64
54420      fi
54421    fi
54422    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54424$as_echo "ok" >&6; }
54425      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54426
54427  # Only process if variable expands to non-empty
54428
54429  if test "x$MSVC_DLL" != x; then
54430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54431
54432  # Input might be given as Windows format, start by converting to
54433  # unix format.
54434  path="$MSVC_DLL"
54435  new_path=`$CYGPATH -u "$path"`
54436
54437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54440  # "foo.exe" is OK but "foo" is an error.
54441  #
54442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54443  # It is also a way to make sure we got the proper file name for the real test later on.
54444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54445  if test "x$test_shortpath" = x; then
54446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54448    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54449  fi
54450
54451  # Call helper function which possibly converts this using DOS-style short mode.
54452  # If so, the updated path is stored in $new_path.
54453
54454  input_path="$new_path"
54455  # Check if we need to convert this using DOS-style short mode. If the path
54456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54457  # take no chances and rewrite it.
54458  # Note: m4 eats our [], so we need to use [ and ] instead.
54459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54460  if test "x$has_forbidden_chars" != x; then
54461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54465      # Going to short mode and back again did indeed matter. Since short mode is
54466      # case insensitive, let's make it lowercase to improve readability.
54467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54468      # Now convert it back to Unix-style (cygpath)
54469      input_path=`$CYGPATH -u "$shortmode_path"`
54470      new_path="$input_path"
54471    fi
54472  fi
54473
54474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54475  if test "x$test_cygdrive_prefix" = x; then
54476    # As a simple fix, exclude /usr/bin since it's not a real path.
54477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54479      # a path prefixed by /cygdrive for fixpath to work.
54480      new_path="$CYGWIN_ROOT_PATH$input_path"
54481    fi
54482  fi
54483
54484
54485  if test "x$path" != "x$new_path"; then
54486    MSVC_DLL="$new_path"
54487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54488$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54489  fi
54490
54491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54492
54493  path="$MSVC_DLL"
54494  has_colon=`$ECHO $path | $GREP ^.:`
54495  new_path="$path"
54496  if test "x$has_colon" = x; then
54497    # Not in mixed or Windows style, start by that.
54498    new_path=`cmd //c echo $path`
54499  fi
54500
54501
54502  input_path="$new_path"
54503  # Check if we need to convert this using DOS-style short mode. If the path
54504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54505  # take no chances and rewrite it.
54506  # Note: m4 eats our [], so we need to use [ and ] instead.
54507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54508  if test "x$has_forbidden_chars" != x; then
54509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54511  fi
54512
54513
54514  windows_path="$new_path"
54515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54516    unix_path=`$CYGPATH -u "$windows_path"`
54517    new_path="$unix_path"
54518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54520    new_path="$unix_path"
54521  fi
54522
54523  if test "x$path" != "x$new_path"; then
54524    MSVC_DLL="$new_path"
54525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54526$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54527  fi
54528
54529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54531
54532    else
54533      # We're on a unix platform. Hooray! :)
54534      path="$MSVC_DLL"
54535      has_space=`$ECHO "$path" | $GREP " "`
54536      if test "x$has_space" != x; then
54537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54538$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54540      fi
54541
54542      # Use eval to expand a potential ~
54543      eval path="$path"
54544      if test ! -f "$path" && test ! -d "$path"; then
54545        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54546      fi
54547
54548      if test -d "$path"; then
54549        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54550      else
54551        dir="`$DIRNAME "$path"`"
54552        base="`$BASENAME "$path"`"
54553        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54554      fi
54555    fi
54556  fi
54557
54558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54559$as_echo_n "checking for $DLL_NAME... " >&6; }
54560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54561$as_echo "$MSVC_DLL" >&6; }
54562    else
54563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54564$as_echo "incorrect, ignoring" >&6; }
54565      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54566$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54567    fi
54568  fi
54569
54570  fi
54571
54572  if test "x$MSVC_DLL" = x; then
54573    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54574    if test "x$VS100COMNTOOLS" != x; then
54575      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54576
54577  windows_path="$CYGWIN_VS_TOOLS_DIR"
54578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54579    unix_path=`$CYGPATH -u "$windows_path"`
54580    CYGWIN_VS_TOOLS_DIR="$unix_path"
54581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54583    CYGWIN_VS_TOOLS_DIR="$unix_path"
54584  fi
54585
54586      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54587        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54588	    | $GREP -i /x64/ | $HEAD --lines 1`
54589      else
54590        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54591	    | $GREP -i /x86/ | $HEAD --lines 1`
54592      fi
54593
54594  DLL_NAME="$DLL_NAME"
54595  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54596  METHOD="search of VS100COMNTOOLS"
54597  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54599$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54600
54601    # Need to check if the found msvcr is correct architecture
54602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54603$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54604    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54606      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54607      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54608      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54609        CORRECT_MSVCR_ARCH="PE32 executable"
54610      else
54611        CORRECT_MSVCR_ARCH="PE32+ executable"
54612      fi
54613    else
54614      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54615        CORRECT_MSVCR_ARCH=386
54616      else
54617        CORRECT_MSVCR_ARCH=x86-64
54618      fi
54619    fi
54620    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54622$as_echo "ok" >&6; }
54623      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54624
54625  # Only process if variable expands to non-empty
54626
54627  if test "x$MSVC_DLL" != x; then
54628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54629
54630  # Input might be given as Windows format, start by converting to
54631  # unix format.
54632  path="$MSVC_DLL"
54633  new_path=`$CYGPATH -u "$path"`
54634
54635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54638  # "foo.exe" is OK but "foo" is an error.
54639  #
54640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54641  # It is also a way to make sure we got the proper file name for the real test later on.
54642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54643  if test "x$test_shortpath" = x; then
54644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54645$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54646    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54647  fi
54648
54649  # Call helper function which possibly converts this using DOS-style short mode.
54650  # If so, the updated path is stored in $new_path.
54651
54652  input_path="$new_path"
54653  # Check if we need to convert this using DOS-style short mode. If the path
54654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54655  # take no chances and rewrite it.
54656  # Note: m4 eats our [], so we need to use [ and ] instead.
54657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54658  if test "x$has_forbidden_chars" != x; then
54659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54663      # Going to short mode and back again did indeed matter. Since short mode is
54664      # case insensitive, let's make it lowercase to improve readability.
54665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54666      # Now convert it back to Unix-style (cygpath)
54667      input_path=`$CYGPATH -u "$shortmode_path"`
54668      new_path="$input_path"
54669    fi
54670  fi
54671
54672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54673  if test "x$test_cygdrive_prefix" = x; then
54674    # As a simple fix, exclude /usr/bin since it's not a real path.
54675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54677      # a path prefixed by /cygdrive for fixpath to work.
54678      new_path="$CYGWIN_ROOT_PATH$input_path"
54679    fi
54680  fi
54681
54682
54683  if test "x$path" != "x$new_path"; then
54684    MSVC_DLL="$new_path"
54685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54686$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54687  fi
54688
54689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54690
54691  path="$MSVC_DLL"
54692  has_colon=`$ECHO $path | $GREP ^.:`
54693  new_path="$path"
54694  if test "x$has_colon" = x; then
54695    # Not in mixed or Windows style, start by that.
54696    new_path=`cmd //c echo $path`
54697  fi
54698
54699
54700  input_path="$new_path"
54701  # Check if we need to convert this using DOS-style short mode. If the path
54702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54703  # take no chances and rewrite it.
54704  # Note: m4 eats our [], so we need to use [ and ] instead.
54705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54706  if test "x$has_forbidden_chars" != x; then
54707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54709  fi
54710
54711
54712  windows_path="$new_path"
54713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54714    unix_path=`$CYGPATH -u "$windows_path"`
54715    new_path="$unix_path"
54716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54718    new_path="$unix_path"
54719  fi
54720
54721  if test "x$path" != "x$new_path"; then
54722    MSVC_DLL="$new_path"
54723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54724$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54725  fi
54726
54727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54729
54730    else
54731      # We're on a unix platform. Hooray! :)
54732      path="$MSVC_DLL"
54733      has_space=`$ECHO "$path" | $GREP " "`
54734      if test "x$has_space" != x; then
54735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54736$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54738      fi
54739
54740      # Use eval to expand a potential ~
54741      eval path="$path"
54742      if test ! -f "$path" && test ! -d "$path"; then
54743        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54744      fi
54745
54746      if test -d "$path"; then
54747        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54748      else
54749        dir="`$DIRNAME "$path"`"
54750        base="`$BASENAME "$path"`"
54751        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54752      fi
54753    fi
54754  fi
54755
54756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54757$as_echo_n "checking for $DLL_NAME... " >&6; }
54758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54759$as_echo "$MSVC_DLL" >&6; }
54760    else
54761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54762$as_echo "incorrect, ignoring" >&6; }
54763      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54764$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54765    fi
54766  fi
54767
54768    fi
54769  fi
54770
54771  if test "x$MSVC_DLL" = x; then
54772    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54773    # (This was the original behaviour; kept since it might turn something up)
54774    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54775      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54776        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54777	    | $GREP x64 | $HEAD --lines 1`
54778      else
54779        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54780	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54781        if test "x$POSSIBLE_MSVC_DLL" = x; then
54782          # We're grasping at straws now...
54783          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54784	      | $HEAD --lines 1`
54785        fi
54786      fi
54787
54788
54789  DLL_NAME="$DLL_NAME"
54790  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54791  METHOD="search of VCINSTALLDIR"
54792  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54794$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54795
54796    # Need to check if the found msvcr is correct architecture
54797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54798$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54799    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54801      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54802      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54803      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54804        CORRECT_MSVCR_ARCH="PE32 executable"
54805      else
54806        CORRECT_MSVCR_ARCH="PE32+ executable"
54807      fi
54808    else
54809      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54810        CORRECT_MSVCR_ARCH=386
54811      else
54812        CORRECT_MSVCR_ARCH=x86-64
54813      fi
54814    fi
54815    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54817$as_echo "ok" >&6; }
54818      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54819
54820  # Only process if variable expands to non-empty
54821
54822  if test "x$MSVC_DLL" != x; then
54823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54824
54825  # Input might be given as Windows format, start by converting to
54826  # unix format.
54827  path="$MSVC_DLL"
54828  new_path=`$CYGPATH -u "$path"`
54829
54830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54833  # "foo.exe" is OK but "foo" is an error.
54834  #
54835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54836  # It is also a way to make sure we got the proper file name for the real test later on.
54837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54838  if test "x$test_shortpath" = x; then
54839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54840$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54841    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54842  fi
54843
54844  # Call helper function which possibly converts this using DOS-style short mode.
54845  # If so, the updated path is stored in $new_path.
54846
54847  input_path="$new_path"
54848  # Check if we need to convert this using DOS-style short mode. If the path
54849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54850  # take no chances and rewrite it.
54851  # Note: m4 eats our [], so we need to use [ and ] instead.
54852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54853  if test "x$has_forbidden_chars" != x; then
54854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54858      # Going to short mode and back again did indeed matter. Since short mode is
54859      # case insensitive, let's make it lowercase to improve readability.
54860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54861      # Now convert it back to Unix-style (cygpath)
54862      input_path=`$CYGPATH -u "$shortmode_path"`
54863      new_path="$input_path"
54864    fi
54865  fi
54866
54867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54868  if test "x$test_cygdrive_prefix" = x; then
54869    # As a simple fix, exclude /usr/bin since it's not a real path.
54870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54872      # a path prefixed by /cygdrive for fixpath to work.
54873      new_path="$CYGWIN_ROOT_PATH$input_path"
54874    fi
54875  fi
54876
54877
54878  if test "x$path" != "x$new_path"; then
54879    MSVC_DLL="$new_path"
54880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54881$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54882  fi
54883
54884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54885
54886  path="$MSVC_DLL"
54887  has_colon=`$ECHO $path | $GREP ^.:`
54888  new_path="$path"
54889  if test "x$has_colon" = x; then
54890    # Not in mixed or Windows style, start by that.
54891    new_path=`cmd //c echo $path`
54892  fi
54893
54894
54895  input_path="$new_path"
54896  # Check if we need to convert this using DOS-style short mode. If the path
54897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54898  # take no chances and rewrite it.
54899  # Note: m4 eats our [], so we need to use [ and ] instead.
54900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54901  if test "x$has_forbidden_chars" != x; then
54902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54904  fi
54905
54906
54907  windows_path="$new_path"
54908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54909    unix_path=`$CYGPATH -u "$windows_path"`
54910    new_path="$unix_path"
54911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54913    new_path="$unix_path"
54914  fi
54915
54916  if test "x$path" != "x$new_path"; then
54917    MSVC_DLL="$new_path"
54918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54919$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54920  fi
54921
54922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54924
54925    else
54926      # We're on a unix platform. Hooray! :)
54927      path="$MSVC_DLL"
54928      has_space=`$ECHO "$path" | $GREP " "`
54929      if test "x$has_space" != x; then
54930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54931$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54933      fi
54934
54935      # Use eval to expand a potential ~
54936      eval path="$path"
54937      if test ! -f "$path" && test ! -d "$path"; then
54938        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54939      fi
54940
54941      if test -d "$path"; then
54942        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54943      else
54944        dir="`$DIRNAME "$path"`"
54945        base="`$BASENAME "$path"`"
54946        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54947      fi
54948    fi
54949  fi
54950
54951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54952$as_echo_n "checking for $DLL_NAME... " >&6; }
54953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54954$as_echo "$MSVC_DLL" >&6; }
54955    else
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54957$as_echo "incorrect, ignoring" >&6; }
54958      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54959$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54960    fi
54961  fi
54962
54963    fi
54964  fi
54965
54966  if test "x$MSVC_DLL" = x; then
54967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54968$as_echo_n "checking for $DLL_NAME... " >&6; }
54969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54970$as_echo "no" >&6; }
54971    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54972  fi
54973
54974    MSVCR_DLL="$MSVC_DLL"
54975  fi
54976
54977
54978
54979# Check whether --with-msvcp-dll was given.
54980if test "${with_msvcp_dll+set}" = set; then :
54981  withval=$with_msvcp_dll;
54982fi
54983
54984
54985  if test "x$MSVCP_NAME" != "x"; then
54986    if test "x$with_msvcp_dll" != x; then
54987      # If given explicitly by user, do not probe. If not present, fail directly.
54988
54989  DLL_NAME="$MSVCP_NAME"
54990  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54991  METHOD="--with-msvcp-dll"
54992  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54993    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54994$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54995
54996    # Need to check if the found msvcr is correct architecture
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54998$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54999    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55002      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55004        CORRECT_MSVCR_ARCH="PE32 executable"
55005      else
55006        CORRECT_MSVCR_ARCH="PE32+ executable"
55007      fi
55008    else
55009      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55010        CORRECT_MSVCR_ARCH=386
55011      else
55012        CORRECT_MSVCR_ARCH=x86-64
55013      fi
55014    fi
55015    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55017$as_echo "ok" >&6; }
55018      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55019
55020  # Only process if variable expands to non-empty
55021
55022  if test "x$MSVC_DLL" != x; then
55023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55024
55025  # Input might be given as Windows format, start by converting to
55026  # unix format.
55027  path="$MSVC_DLL"
55028  new_path=`$CYGPATH -u "$path"`
55029
55030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55033  # "foo.exe" is OK but "foo" is an error.
55034  #
55035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55036  # It is also a way to make sure we got the proper file name for the real test later on.
55037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55038  if test "x$test_shortpath" = x; then
55039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55040$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55041    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55042  fi
55043
55044  # Call helper function which possibly converts this using DOS-style short mode.
55045  # If so, the updated path is stored in $new_path.
55046
55047  input_path="$new_path"
55048  # Check if we need to convert this using DOS-style short mode. If the path
55049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55050  # take no chances and rewrite it.
55051  # Note: m4 eats our [], so we need to use [ and ] instead.
55052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55053  if test "x$has_forbidden_chars" != x; then
55054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55058      # Going to short mode and back again did indeed matter. Since short mode is
55059      # case insensitive, let's make it lowercase to improve readability.
55060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55061      # Now convert it back to Unix-style (cygpath)
55062      input_path=`$CYGPATH -u "$shortmode_path"`
55063      new_path="$input_path"
55064    fi
55065  fi
55066
55067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55068  if test "x$test_cygdrive_prefix" = x; then
55069    # As a simple fix, exclude /usr/bin since it's not a real path.
55070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55072      # a path prefixed by /cygdrive for fixpath to work.
55073      new_path="$CYGWIN_ROOT_PATH$input_path"
55074    fi
55075  fi
55076
55077
55078  if test "x$path" != "x$new_path"; then
55079    MSVC_DLL="$new_path"
55080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55082  fi
55083
55084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085
55086  path="$MSVC_DLL"
55087  has_colon=`$ECHO $path | $GREP ^.:`
55088  new_path="$path"
55089  if test "x$has_colon" = x; then
55090    # Not in mixed or Windows style, start by that.
55091    new_path=`cmd //c echo $path`
55092  fi
55093
55094
55095  input_path="$new_path"
55096  # Check if we need to convert this using DOS-style short mode. If the path
55097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55098  # take no chances and rewrite it.
55099  # Note: m4 eats our [], so we need to use [ and ] instead.
55100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55101  if test "x$has_forbidden_chars" != x; then
55102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55104  fi
55105
55106
55107  windows_path="$new_path"
55108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55109    unix_path=`$CYGPATH -u "$windows_path"`
55110    new_path="$unix_path"
55111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55113    new_path="$unix_path"
55114  fi
55115
55116  if test "x$path" != "x$new_path"; then
55117    MSVC_DLL="$new_path"
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55120  fi
55121
55122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55124
55125    else
55126      # We're on a unix platform. Hooray! :)
55127      path="$MSVC_DLL"
55128      has_space=`$ECHO "$path" | $GREP " "`
55129      if test "x$has_space" != x; then
55130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55131$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55133      fi
55134
55135      # Use eval to expand a potential ~
55136      eval path="$path"
55137      if test ! -f "$path" && test ! -d "$path"; then
55138        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55139      fi
55140
55141      if test -d "$path"; then
55142        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55143      else
55144        dir="`$DIRNAME "$path"`"
55145        base="`$BASENAME "$path"`"
55146        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55147      fi
55148    fi
55149  fi
55150
55151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55152$as_echo_n "checking for $DLL_NAME... " >&6; }
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55154$as_echo "$MSVC_DLL" >&6; }
55155    else
55156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55157$as_echo "incorrect, ignoring" >&6; }
55158      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55159$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55160    fi
55161  fi
55162
55163      if test "x$MSVC_DLL" = x; then
55164        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55165      fi
55166      MSVCP_DLL="$MSVC_DLL"
55167    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55168
55169  DLL_NAME="$MSVCP_NAME"
55170  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55171  METHOD="devkit"
55172  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55174$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55175
55176    # Need to check if the found msvcr is correct architecture
55177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55178$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55179    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55181      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55182      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55183      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55184        CORRECT_MSVCR_ARCH="PE32 executable"
55185      else
55186        CORRECT_MSVCR_ARCH="PE32+ executable"
55187      fi
55188    else
55189      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55190        CORRECT_MSVCR_ARCH=386
55191      else
55192        CORRECT_MSVCR_ARCH=x86-64
55193      fi
55194    fi
55195    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55197$as_echo "ok" >&6; }
55198      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55199
55200  # Only process if variable expands to non-empty
55201
55202  if test "x$MSVC_DLL" != x; then
55203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55204
55205  # Input might be given as Windows format, start by converting to
55206  # unix format.
55207  path="$MSVC_DLL"
55208  new_path=`$CYGPATH -u "$path"`
55209
55210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55213  # "foo.exe" is OK but "foo" is an error.
55214  #
55215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55216  # It is also a way to make sure we got the proper file name for the real test later on.
55217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55218  if test "x$test_shortpath" = x; then
55219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55220$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55221    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55222  fi
55223
55224  # Call helper function which possibly converts this using DOS-style short mode.
55225  # If so, the updated path is stored in $new_path.
55226
55227  input_path="$new_path"
55228  # Check if we need to convert this using DOS-style short mode. If the path
55229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55230  # take no chances and rewrite it.
55231  # Note: m4 eats our [], so we need to use [ and ] instead.
55232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55233  if test "x$has_forbidden_chars" != x; then
55234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55238      # Going to short mode and back again did indeed matter. Since short mode is
55239      # case insensitive, let's make it lowercase to improve readability.
55240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55241      # Now convert it back to Unix-style (cygpath)
55242      input_path=`$CYGPATH -u "$shortmode_path"`
55243      new_path="$input_path"
55244    fi
55245  fi
55246
55247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55248  if test "x$test_cygdrive_prefix" = x; then
55249    # As a simple fix, exclude /usr/bin since it's not a real path.
55250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55252      # a path prefixed by /cygdrive for fixpath to work.
55253      new_path="$CYGWIN_ROOT_PATH$input_path"
55254    fi
55255  fi
55256
55257
55258  if test "x$path" != "x$new_path"; then
55259    MSVC_DLL="$new_path"
55260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55261$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55262  fi
55263
55264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55265
55266  path="$MSVC_DLL"
55267  has_colon=`$ECHO $path | $GREP ^.:`
55268  new_path="$path"
55269  if test "x$has_colon" = x; then
55270    # Not in mixed or Windows style, start by that.
55271    new_path=`cmd //c echo $path`
55272  fi
55273
55274
55275  input_path="$new_path"
55276  # Check if we need to convert this using DOS-style short mode. If the path
55277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55278  # take no chances and rewrite it.
55279  # Note: m4 eats our [], so we need to use [ and ] instead.
55280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55281  if test "x$has_forbidden_chars" != x; then
55282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55284  fi
55285
55286
55287  windows_path="$new_path"
55288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55289    unix_path=`$CYGPATH -u "$windows_path"`
55290    new_path="$unix_path"
55291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55293    new_path="$unix_path"
55294  fi
55295
55296  if test "x$path" != "x$new_path"; then
55297    MSVC_DLL="$new_path"
55298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55299$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55300  fi
55301
55302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55304
55305    else
55306      # We're on a unix platform. Hooray! :)
55307      path="$MSVC_DLL"
55308      has_space=`$ECHO "$path" | $GREP " "`
55309      if test "x$has_space" != x; then
55310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55311$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55313      fi
55314
55315      # Use eval to expand a potential ~
55316      eval path="$path"
55317      if test ! -f "$path" && test ! -d "$path"; then
55318        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55319      fi
55320
55321      if test -d "$path"; then
55322        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55323      else
55324        dir="`$DIRNAME "$path"`"
55325        base="`$BASENAME "$path"`"
55326        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55327      fi
55328    fi
55329  fi
55330
55331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55332$as_echo_n "checking for $DLL_NAME... " >&6; }
55333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55334$as_echo "$MSVC_DLL" >&6; }
55335    else
55336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55337$as_echo "incorrect, ignoring" >&6; }
55338      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55339$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55340    fi
55341  fi
55342
55343      if test "x$MSVC_DLL" = x; then
55344        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55345      fi
55346      MSVCP_DLL="$MSVC_DLL"
55347    else
55348
55349  DLL_NAME="${MSVCP_NAME}"
55350  MSVC_DLL=
55351
55352  if test "x$MSVC_DLL" = x; then
55353    # Probe: Using well-known location from Visual Studio 10.0
55354    if test "x$VCINSTALLDIR" != x; then
55355      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55356
55357  windows_path="$CYGWIN_VC_INSTALL_DIR"
55358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55359    unix_path=`$CYGPATH -u "$windows_path"`
55360    CYGWIN_VC_INSTALL_DIR="$unix_path"
55361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55363    CYGWIN_VC_INSTALL_DIR="$unix_path"
55364  fi
55365
55366      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55367        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55368      else
55369        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55370      fi
55371      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55372
55373  DLL_NAME="$DLL_NAME"
55374  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55375  METHOD="well-known location in VCINSTALLDIR"
55376  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55377    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55378$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55379
55380    # Need to check if the found msvcr is correct architecture
55381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55382$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55383    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55385      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55386      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55387      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55388        CORRECT_MSVCR_ARCH="PE32 executable"
55389      else
55390        CORRECT_MSVCR_ARCH="PE32+ executable"
55391      fi
55392    else
55393      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55394        CORRECT_MSVCR_ARCH=386
55395      else
55396        CORRECT_MSVCR_ARCH=x86-64
55397      fi
55398    fi
55399    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55401$as_echo "ok" >&6; }
55402      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55403
55404  # Only process if variable expands to non-empty
55405
55406  if test "x$MSVC_DLL" != x; then
55407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55408
55409  # Input might be given as Windows format, start by converting to
55410  # unix format.
55411  path="$MSVC_DLL"
55412  new_path=`$CYGPATH -u "$path"`
55413
55414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55417  # "foo.exe" is OK but "foo" is an error.
55418  #
55419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55420  # It is also a way to make sure we got the proper file name for the real test later on.
55421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55422  if test "x$test_shortpath" = x; then
55423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55424$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55425    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55426  fi
55427
55428  # Call helper function which possibly converts this using DOS-style short mode.
55429  # If so, the updated path is stored in $new_path.
55430
55431  input_path="$new_path"
55432  # Check if we need to convert this using DOS-style short mode. If the path
55433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55434  # take no chances and rewrite it.
55435  # Note: m4 eats our [], so we need to use [ and ] instead.
55436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55437  if test "x$has_forbidden_chars" != x; then
55438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55442      # Going to short mode and back again did indeed matter. Since short mode is
55443      # case insensitive, let's make it lowercase to improve readability.
55444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55445      # Now convert it back to Unix-style (cygpath)
55446      input_path=`$CYGPATH -u "$shortmode_path"`
55447      new_path="$input_path"
55448    fi
55449  fi
55450
55451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55452  if test "x$test_cygdrive_prefix" = x; then
55453    # As a simple fix, exclude /usr/bin since it's not a real path.
55454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55456      # a path prefixed by /cygdrive for fixpath to work.
55457      new_path="$CYGWIN_ROOT_PATH$input_path"
55458    fi
55459  fi
55460
55461
55462  if test "x$path" != "x$new_path"; then
55463    MSVC_DLL="$new_path"
55464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55465$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55466  fi
55467
55468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55469
55470  path="$MSVC_DLL"
55471  has_colon=`$ECHO $path | $GREP ^.:`
55472  new_path="$path"
55473  if test "x$has_colon" = x; then
55474    # Not in mixed or Windows style, start by that.
55475    new_path=`cmd //c echo $path`
55476  fi
55477
55478
55479  input_path="$new_path"
55480  # Check if we need to convert this using DOS-style short mode. If the path
55481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55482  # take no chances and rewrite it.
55483  # Note: m4 eats our [], so we need to use [ and ] instead.
55484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55485  if test "x$has_forbidden_chars" != x; then
55486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55488  fi
55489
55490
55491  windows_path="$new_path"
55492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55493    unix_path=`$CYGPATH -u "$windows_path"`
55494    new_path="$unix_path"
55495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55497    new_path="$unix_path"
55498  fi
55499
55500  if test "x$path" != "x$new_path"; then
55501    MSVC_DLL="$new_path"
55502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55503$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55504  fi
55505
55506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55508
55509    else
55510      # We're on a unix platform. Hooray! :)
55511      path="$MSVC_DLL"
55512      has_space=`$ECHO "$path" | $GREP " "`
55513      if test "x$has_space" != x; then
55514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55515$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55517      fi
55518
55519      # Use eval to expand a potential ~
55520      eval path="$path"
55521      if test ! -f "$path" && test ! -d "$path"; then
55522        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55523      fi
55524
55525      if test -d "$path"; then
55526        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55527      else
55528        dir="`$DIRNAME "$path"`"
55529        base="`$BASENAME "$path"`"
55530        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55531      fi
55532    fi
55533  fi
55534
55535      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55536$as_echo_n "checking for $DLL_NAME... " >&6; }
55537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55538$as_echo "$MSVC_DLL" >&6; }
55539    else
55540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55541$as_echo "incorrect, ignoring" >&6; }
55542      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55543$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55544    fi
55545  fi
55546
55547    fi
55548  fi
55549
55550  if test "x$MSVC_DLL" = x; then
55551    # Probe: Check in the Boot JDK directory.
55552    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55553
55554  DLL_NAME="$DLL_NAME"
55555  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55556  METHOD="well-known location in Boot JDK"
55557  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55559$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55560
55561    # Need to check if the found msvcr is correct architecture
55562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55563$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55564    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55566      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55567      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55568      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55569        CORRECT_MSVCR_ARCH="PE32 executable"
55570      else
55571        CORRECT_MSVCR_ARCH="PE32+ executable"
55572      fi
55573    else
55574      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55575        CORRECT_MSVCR_ARCH=386
55576      else
55577        CORRECT_MSVCR_ARCH=x86-64
55578      fi
55579    fi
55580    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55582$as_echo "ok" >&6; }
55583      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55584
55585  # Only process if variable expands to non-empty
55586
55587  if test "x$MSVC_DLL" != x; then
55588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55589
55590  # Input might be given as Windows format, start by converting to
55591  # unix format.
55592  path="$MSVC_DLL"
55593  new_path=`$CYGPATH -u "$path"`
55594
55595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55598  # "foo.exe" is OK but "foo" is an error.
55599  #
55600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55601  # It is also a way to make sure we got the proper file name for the real test later on.
55602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55603  if test "x$test_shortpath" = x; then
55604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55605$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55606    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55607  fi
55608
55609  # Call helper function which possibly converts this using DOS-style short mode.
55610  # If so, the updated path is stored in $new_path.
55611
55612  input_path="$new_path"
55613  # Check if we need to convert this using DOS-style short mode. If the path
55614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55615  # take no chances and rewrite it.
55616  # Note: m4 eats our [], so we need to use [ and ] instead.
55617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55618  if test "x$has_forbidden_chars" != x; then
55619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55623      # Going to short mode and back again did indeed matter. Since short mode is
55624      # case insensitive, let's make it lowercase to improve readability.
55625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55626      # Now convert it back to Unix-style (cygpath)
55627      input_path=`$CYGPATH -u "$shortmode_path"`
55628      new_path="$input_path"
55629    fi
55630  fi
55631
55632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55633  if test "x$test_cygdrive_prefix" = x; then
55634    # As a simple fix, exclude /usr/bin since it's not a real path.
55635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55637      # a path prefixed by /cygdrive for fixpath to work.
55638      new_path="$CYGWIN_ROOT_PATH$input_path"
55639    fi
55640  fi
55641
55642
55643  if test "x$path" != "x$new_path"; then
55644    MSVC_DLL="$new_path"
55645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55646$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55647  fi
55648
55649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55650
55651  path="$MSVC_DLL"
55652  has_colon=`$ECHO $path | $GREP ^.:`
55653  new_path="$path"
55654  if test "x$has_colon" = x; then
55655    # Not in mixed or Windows style, start by that.
55656    new_path=`cmd //c echo $path`
55657  fi
55658
55659
55660  input_path="$new_path"
55661  # Check if we need to convert this using DOS-style short mode. If the path
55662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55663  # take no chances and rewrite it.
55664  # Note: m4 eats our [], so we need to use [ and ] instead.
55665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55666  if test "x$has_forbidden_chars" != x; then
55667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55669  fi
55670
55671
55672  windows_path="$new_path"
55673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55674    unix_path=`$CYGPATH -u "$windows_path"`
55675    new_path="$unix_path"
55676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55678    new_path="$unix_path"
55679  fi
55680
55681  if test "x$path" != "x$new_path"; then
55682    MSVC_DLL="$new_path"
55683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55684$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55685  fi
55686
55687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55689
55690    else
55691      # We're on a unix platform. Hooray! :)
55692      path="$MSVC_DLL"
55693      has_space=`$ECHO "$path" | $GREP " "`
55694      if test "x$has_space" != x; then
55695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55696$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55698      fi
55699
55700      # Use eval to expand a potential ~
55701      eval path="$path"
55702      if test ! -f "$path" && test ! -d "$path"; then
55703        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55704      fi
55705
55706      if test -d "$path"; then
55707        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55708      else
55709        dir="`$DIRNAME "$path"`"
55710        base="`$BASENAME "$path"`"
55711        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55712      fi
55713    fi
55714  fi
55715
55716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55717$as_echo_n "checking for $DLL_NAME... " >&6; }
55718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55719$as_echo "$MSVC_DLL" >&6; }
55720    else
55721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55722$as_echo "incorrect, ignoring" >&6; }
55723      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55724$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55725    fi
55726  fi
55727
55728  fi
55729
55730  if test "x$MSVC_DLL" = x; then
55731    # Probe: Look in the Windows system32 directory
55732    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55733
55734  windows_path="$CYGWIN_SYSTEMROOT"
55735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55736    unix_path=`$CYGPATH -u "$windows_path"`
55737    CYGWIN_SYSTEMROOT="$unix_path"
55738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55740    CYGWIN_SYSTEMROOT="$unix_path"
55741  fi
55742
55743    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55744
55745  DLL_NAME="$DLL_NAME"
55746  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55747  METHOD="well-known location in SYSTEMROOT"
55748  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55750$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55751
55752    # Need to check if the found msvcr is correct architecture
55753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55754$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55755    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55757      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55758      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55759      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55760        CORRECT_MSVCR_ARCH="PE32 executable"
55761      else
55762        CORRECT_MSVCR_ARCH="PE32+ executable"
55763      fi
55764    else
55765      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55766        CORRECT_MSVCR_ARCH=386
55767      else
55768        CORRECT_MSVCR_ARCH=x86-64
55769      fi
55770    fi
55771    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55773$as_echo "ok" >&6; }
55774      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55775
55776  # Only process if variable expands to non-empty
55777
55778  if test "x$MSVC_DLL" != x; then
55779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55780
55781  # Input might be given as Windows format, start by converting to
55782  # unix format.
55783  path="$MSVC_DLL"
55784  new_path=`$CYGPATH -u "$path"`
55785
55786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55789  # "foo.exe" is OK but "foo" is an error.
55790  #
55791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55792  # It is also a way to make sure we got the proper file name for the real test later on.
55793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55794  if test "x$test_shortpath" = x; then
55795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55796$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55797    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55798  fi
55799
55800  # Call helper function which possibly converts this using DOS-style short mode.
55801  # If so, the updated path is stored in $new_path.
55802
55803  input_path="$new_path"
55804  # Check if we need to convert this using DOS-style short mode. If the path
55805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55806  # take no chances and rewrite it.
55807  # Note: m4 eats our [], so we need to use [ and ] instead.
55808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55809  if test "x$has_forbidden_chars" != x; then
55810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55814      # Going to short mode and back again did indeed matter. Since short mode is
55815      # case insensitive, let's make it lowercase to improve readability.
55816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55817      # Now convert it back to Unix-style (cygpath)
55818      input_path=`$CYGPATH -u "$shortmode_path"`
55819      new_path="$input_path"
55820    fi
55821  fi
55822
55823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55824  if test "x$test_cygdrive_prefix" = x; then
55825    # As a simple fix, exclude /usr/bin since it's not a real path.
55826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55828      # a path prefixed by /cygdrive for fixpath to work.
55829      new_path="$CYGWIN_ROOT_PATH$input_path"
55830    fi
55831  fi
55832
55833
55834  if test "x$path" != "x$new_path"; then
55835    MSVC_DLL="$new_path"
55836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55837$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55838  fi
55839
55840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55841
55842  path="$MSVC_DLL"
55843  has_colon=`$ECHO $path | $GREP ^.:`
55844  new_path="$path"
55845  if test "x$has_colon" = x; then
55846    # Not in mixed or Windows style, start by that.
55847    new_path=`cmd //c echo $path`
55848  fi
55849
55850
55851  input_path="$new_path"
55852  # Check if we need to convert this using DOS-style short mode. If the path
55853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55854  # take no chances and rewrite it.
55855  # Note: m4 eats our [], so we need to use [ and ] instead.
55856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55857  if test "x$has_forbidden_chars" != x; then
55858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55860  fi
55861
55862
55863  windows_path="$new_path"
55864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55865    unix_path=`$CYGPATH -u "$windows_path"`
55866    new_path="$unix_path"
55867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55869    new_path="$unix_path"
55870  fi
55871
55872  if test "x$path" != "x$new_path"; then
55873    MSVC_DLL="$new_path"
55874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55875$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55876  fi
55877
55878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55880
55881    else
55882      # We're on a unix platform. Hooray! :)
55883      path="$MSVC_DLL"
55884      has_space=`$ECHO "$path" | $GREP " "`
55885      if test "x$has_space" != x; then
55886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55887$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55889      fi
55890
55891      # Use eval to expand a potential ~
55892      eval path="$path"
55893      if test ! -f "$path" && test ! -d "$path"; then
55894        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55895      fi
55896
55897      if test -d "$path"; then
55898        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55899      else
55900        dir="`$DIRNAME "$path"`"
55901        base="`$BASENAME "$path"`"
55902        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55903      fi
55904    fi
55905  fi
55906
55907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55908$as_echo_n "checking for $DLL_NAME... " >&6; }
55909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55910$as_echo "$MSVC_DLL" >&6; }
55911    else
55912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55913$as_echo "incorrect, ignoring" >&6; }
55914      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55915$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55916    fi
55917  fi
55918
55919  fi
55920
55921  if test "x$MSVC_DLL" = x; then
55922    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55923    if test "x$VS100COMNTOOLS" != x; then
55924      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55925
55926  windows_path="$CYGWIN_VS_TOOLS_DIR"
55927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55928    unix_path=`$CYGPATH -u "$windows_path"`
55929    CYGWIN_VS_TOOLS_DIR="$unix_path"
55930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55932    CYGWIN_VS_TOOLS_DIR="$unix_path"
55933  fi
55934
55935      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55936        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55937	    | $GREP -i /x64/ | $HEAD --lines 1`
55938      else
55939        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55940	    | $GREP -i /x86/ | $HEAD --lines 1`
55941      fi
55942
55943  DLL_NAME="$DLL_NAME"
55944  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55945  METHOD="search of VS100COMNTOOLS"
55946  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55948$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55949
55950    # Need to check if the found msvcr is correct architecture
55951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55952$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55953    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55955      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55956      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55957      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55958        CORRECT_MSVCR_ARCH="PE32 executable"
55959      else
55960        CORRECT_MSVCR_ARCH="PE32+ executable"
55961      fi
55962    else
55963      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55964        CORRECT_MSVCR_ARCH=386
55965      else
55966        CORRECT_MSVCR_ARCH=x86-64
55967      fi
55968    fi
55969    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55971$as_echo "ok" >&6; }
55972      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55973
55974  # Only process if variable expands to non-empty
55975
55976  if test "x$MSVC_DLL" != x; then
55977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55978
55979  # Input might be given as Windows format, start by converting to
55980  # unix format.
55981  path="$MSVC_DLL"
55982  new_path=`$CYGPATH -u "$path"`
55983
55984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55987  # "foo.exe" is OK but "foo" is an error.
55988  #
55989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55990  # It is also a way to make sure we got the proper file name for the real test later on.
55991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55992  if test "x$test_shortpath" = x; then
55993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55994$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55995    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55996  fi
55997
55998  # Call helper function which possibly converts this using DOS-style short mode.
55999  # If so, the updated path is stored in $new_path.
56000
56001  input_path="$new_path"
56002  # Check if we need to convert this using DOS-style short mode. If the path
56003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56004  # take no chances and rewrite it.
56005  # Note: m4 eats our [], so we need to use [ and ] instead.
56006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56007  if test "x$has_forbidden_chars" != x; then
56008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56012      # Going to short mode and back again did indeed matter. Since short mode is
56013      # case insensitive, let's make it lowercase to improve readability.
56014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56015      # Now convert it back to Unix-style (cygpath)
56016      input_path=`$CYGPATH -u "$shortmode_path"`
56017      new_path="$input_path"
56018    fi
56019  fi
56020
56021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56022  if test "x$test_cygdrive_prefix" = x; then
56023    # As a simple fix, exclude /usr/bin since it's not a real path.
56024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56026      # a path prefixed by /cygdrive for fixpath to work.
56027      new_path="$CYGWIN_ROOT_PATH$input_path"
56028    fi
56029  fi
56030
56031
56032  if test "x$path" != "x$new_path"; then
56033    MSVC_DLL="$new_path"
56034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56035$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56036  fi
56037
56038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56039
56040  path="$MSVC_DLL"
56041  has_colon=`$ECHO $path | $GREP ^.:`
56042  new_path="$path"
56043  if test "x$has_colon" = x; then
56044    # Not in mixed or Windows style, start by that.
56045    new_path=`cmd //c echo $path`
56046  fi
56047
56048
56049  input_path="$new_path"
56050  # Check if we need to convert this using DOS-style short mode. If the path
56051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56052  # take no chances and rewrite it.
56053  # Note: m4 eats our [], so we need to use [ and ] instead.
56054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56055  if test "x$has_forbidden_chars" != x; then
56056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56058  fi
56059
56060
56061  windows_path="$new_path"
56062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56063    unix_path=`$CYGPATH -u "$windows_path"`
56064    new_path="$unix_path"
56065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56067    new_path="$unix_path"
56068  fi
56069
56070  if test "x$path" != "x$new_path"; then
56071    MSVC_DLL="$new_path"
56072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56073$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56074  fi
56075
56076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56078
56079    else
56080      # We're on a unix platform. Hooray! :)
56081      path="$MSVC_DLL"
56082      has_space=`$ECHO "$path" | $GREP " "`
56083      if test "x$has_space" != x; then
56084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56085$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56087      fi
56088
56089      # Use eval to expand a potential ~
56090      eval path="$path"
56091      if test ! -f "$path" && test ! -d "$path"; then
56092        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56093      fi
56094
56095      if test -d "$path"; then
56096        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56097      else
56098        dir="`$DIRNAME "$path"`"
56099        base="`$BASENAME "$path"`"
56100        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56101      fi
56102    fi
56103  fi
56104
56105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56106$as_echo_n "checking for $DLL_NAME... " >&6; }
56107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56108$as_echo "$MSVC_DLL" >&6; }
56109    else
56110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56111$as_echo "incorrect, ignoring" >&6; }
56112      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56113$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56114    fi
56115  fi
56116
56117    fi
56118  fi
56119
56120  if test "x$MSVC_DLL" = x; then
56121    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56122    # (This was the original behaviour; kept since it might turn something up)
56123    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56124      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56125        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56126	    | $GREP x64 | $HEAD --lines 1`
56127      else
56128        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56129	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56130        if test "x$POSSIBLE_MSVC_DLL" = x; then
56131          # We're grasping at straws now...
56132          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56133	      | $HEAD --lines 1`
56134        fi
56135      fi
56136
56137
56138  DLL_NAME="$DLL_NAME"
56139  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56140  METHOD="search of VCINSTALLDIR"
56141  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56143$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56144
56145    # Need to check if the found msvcr is correct architecture
56146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56147$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56148    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56150      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56151      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56153        CORRECT_MSVCR_ARCH="PE32 executable"
56154      else
56155        CORRECT_MSVCR_ARCH="PE32+ executable"
56156      fi
56157    else
56158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56159        CORRECT_MSVCR_ARCH=386
56160      else
56161        CORRECT_MSVCR_ARCH=x86-64
56162      fi
56163    fi
56164    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56166$as_echo "ok" >&6; }
56167      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56168
56169  # Only process if variable expands to non-empty
56170
56171  if test "x$MSVC_DLL" != x; then
56172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56173
56174  # Input might be given as Windows format, start by converting to
56175  # unix format.
56176  path="$MSVC_DLL"
56177  new_path=`$CYGPATH -u "$path"`
56178
56179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56182  # "foo.exe" is OK but "foo" is an error.
56183  #
56184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56185  # It is also a way to make sure we got the proper file name for the real test later on.
56186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56187  if test "x$test_shortpath" = x; then
56188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56190    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56191  fi
56192
56193  # Call helper function which possibly converts this using DOS-style short mode.
56194  # If so, the updated path is stored in $new_path.
56195
56196  input_path="$new_path"
56197  # Check if we need to convert this using DOS-style short mode. If the path
56198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56199  # take no chances and rewrite it.
56200  # Note: m4 eats our [], so we need to use [ and ] instead.
56201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56202  if test "x$has_forbidden_chars" != x; then
56203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56207      # Going to short mode and back again did indeed matter. Since short mode is
56208      # case insensitive, let's make it lowercase to improve readability.
56209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56210      # Now convert it back to Unix-style (cygpath)
56211      input_path=`$CYGPATH -u "$shortmode_path"`
56212      new_path="$input_path"
56213    fi
56214  fi
56215
56216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56217  if test "x$test_cygdrive_prefix" = x; then
56218    # As a simple fix, exclude /usr/bin since it's not a real path.
56219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56221      # a path prefixed by /cygdrive for fixpath to work.
56222      new_path="$CYGWIN_ROOT_PATH$input_path"
56223    fi
56224  fi
56225
56226
56227  if test "x$path" != "x$new_path"; then
56228    MSVC_DLL="$new_path"
56229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56231  fi
56232
56233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56234
56235  path="$MSVC_DLL"
56236  has_colon=`$ECHO $path | $GREP ^.:`
56237  new_path="$path"
56238  if test "x$has_colon" = x; then
56239    # Not in mixed or Windows style, start by that.
56240    new_path=`cmd //c echo $path`
56241  fi
56242
56243
56244  input_path="$new_path"
56245  # Check if we need to convert this using DOS-style short mode. If the path
56246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56247  # take no chances and rewrite it.
56248  # Note: m4 eats our [], so we need to use [ and ] instead.
56249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56250  if test "x$has_forbidden_chars" != x; then
56251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56253  fi
56254
56255
56256  windows_path="$new_path"
56257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56258    unix_path=`$CYGPATH -u "$windows_path"`
56259    new_path="$unix_path"
56260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56262    new_path="$unix_path"
56263  fi
56264
56265  if test "x$path" != "x$new_path"; then
56266    MSVC_DLL="$new_path"
56267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56269  fi
56270
56271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56273
56274    else
56275      # We're on a unix platform. Hooray! :)
56276      path="$MSVC_DLL"
56277      has_space=`$ECHO "$path" | $GREP " "`
56278      if test "x$has_space" != x; then
56279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56282      fi
56283
56284      # Use eval to expand a potential ~
56285      eval path="$path"
56286      if test ! -f "$path" && test ! -d "$path"; then
56287        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56288      fi
56289
56290      if test -d "$path"; then
56291        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56292      else
56293        dir="`$DIRNAME "$path"`"
56294        base="`$BASENAME "$path"`"
56295        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56296      fi
56297    fi
56298  fi
56299
56300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56301$as_echo_n "checking for $DLL_NAME... " >&6; }
56302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56303$as_echo "$MSVC_DLL" >&6; }
56304    else
56305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56306$as_echo "incorrect, ignoring" >&6; }
56307      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56308$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56309    fi
56310  fi
56311
56312    fi
56313  fi
56314
56315  if test "x$MSVC_DLL" = x; then
56316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56317$as_echo_n "checking for $DLL_NAME... " >&6; }
56318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56319$as_echo "no" >&6; }
56320    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56321  fi
56322
56323      MSVCP_DLL="$MSVC_DLL"
56324    fi
56325
56326  fi
56327
56328  fi
56329
56330
56331  if test "x$NEEDS_LIB_X11" = xfalse; then
56332    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56333      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56334$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56335    fi
56336    X_CFLAGS=
56337    X_LIBS=
56338  else
56339
56340    if test "x${with_x}" = xno; then
56341      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56342    fi
56343
56344    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56345      # The user has specified a X11 base directory. Use it for includes and
56346      # libraries, unless explicitly overridden.
56347      if test "x$x_includes" = xNONE; then
56348        x_includes="${with_x}/include"
56349      fi
56350      if test "x$x_libraries" = xNONE; then
56351        x_libraries="${with_x}/lib"
56352      fi
56353    else
56354      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56355      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56356      # --x-libraries for the sysroot, if that seems to be correct.
56357      if test "x$SYSROOT" != "x"; then
56358        if test "x$x_includes" = xNONE; then
56359          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56360            x_includes="$SYSROOT/usr/X11R6/include"
56361          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56362            x_includes="$SYSROOT/usr/include"
56363          fi
56364        fi
56365        if test "x$x_libraries" = xNONE; then
56366          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56367            x_libraries="$SYSROOT/usr/X11R6/lib"
56368          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56369            x_libraries="$SYSROOT/usr/lib64"
56370          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56371            x_libraries="$SYSROOT/usr/lib"
56372          fi
56373        fi
56374      fi
56375    fi
56376
56377    # Now let autoconf do it's magic
56378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56379$as_echo_n "checking for X... " >&6; }
56380
56381
56382# Check whether --with-x was given.
56383if test "${with_x+set}" = set; then :
56384  withval=$with_x;
56385fi
56386
56387# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56388if test "x$with_x" = xno; then
56389  # The user explicitly disabled X.
56390  have_x=disabled
56391else
56392  case $x_includes,$x_libraries in #(
56393    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56394    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56395  $as_echo_n "(cached) " >&6
56396else
56397  # One or both of the vars are not set, and there is no cached value.
56398ac_x_includes=no ac_x_libraries=no
56399rm -f -r conftest.dir
56400if mkdir conftest.dir; then
56401  cd conftest.dir
56402  cat >Imakefile <<'_ACEOF'
56403incroot:
56404	@echo incroot='${INCROOT}'
56405usrlibdir:
56406	@echo usrlibdir='${USRLIBDIR}'
56407libdir:
56408	@echo libdir='${LIBDIR}'
56409_ACEOF
56410  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56411    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56412    for ac_var in incroot usrlibdir libdir; do
56413      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56414    done
56415    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56416    for ac_extension in a so sl dylib la dll; do
56417      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56418	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56419	ac_im_usrlibdir=$ac_im_libdir; break
56420      fi
56421    done
56422    # Screen out bogus values from the imake configuration.  They are
56423    # bogus both because they are the default anyway, and because
56424    # using them would break gcc on systems where it needs fixed includes.
56425    case $ac_im_incroot in
56426	/usr/include) ac_x_includes= ;;
56427	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56428    esac
56429    case $ac_im_usrlibdir in
56430	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56431	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56432    esac
56433  fi
56434  cd ..
56435  rm -f -r conftest.dir
56436fi
56437
56438# Standard set of common directories for X headers.
56439# Check X11 before X11Rn because it is often a symlink to the current release.
56440ac_x_header_dirs='
56441/usr/X11/include
56442/usr/X11R7/include
56443/usr/X11R6/include
56444/usr/X11R5/include
56445/usr/X11R4/include
56446
56447/usr/include/X11
56448/usr/include/X11R7
56449/usr/include/X11R6
56450/usr/include/X11R5
56451/usr/include/X11R4
56452
56453/usr/local/X11/include
56454/usr/local/X11R7/include
56455/usr/local/X11R6/include
56456/usr/local/X11R5/include
56457/usr/local/X11R4/include
56458
56459/usr/local/include/X11
56460/usr/local/include/X11R7
56461/usr/local/include/X11R6
56462/usr/local/include/X11R5
56463/usr/local/include/X11R4
56464
56465/usr/X386/include
56466/usr/x386/include
56467/usr/XFree86/include/X11
56468
56469/usr/include
56470/usr/local/include
56471/usr/unsupported/include
56472/usr/athena/include
56473/usr/local/x11r5/include
56474/usr/lpp/Xamples/include
56475
56476/usr/openwin/include
56477/usr/openwin/share/include'
56478
56479if test "$ac_x_includes" = no; then
56480  # Guess where to find include files, by looking for Xlib.h.
56481  # First, try using that file with no special directory specified.
56482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56483/* end confdefs.h.  */
56484#include <X11/Xlib.h>
56485_ACEOF
56486if ac_fn_cxx_try_cpp "$LINENO"; then :
56487  # We can compile using X headers with no special include directory.
56488ac_x_includes=
56489else
56490  for ac_dir in $ac_x_header_dirs; do
56491  if test -r "$ac_dir/X11/Xlib.h"; then
56492    ac_x_includes=$ac_dir
56493    break
56494  fi
56495done
56496fi
56497rm -f conftest.err conftest.i conftest.$ac_ext
56498fi # $ac_x_includes = no
56499
56500if test "$ac_x_libraries" = no; then
56501  # Check for the libraries.
56502  # See if we find them without any special options.
56503  # Don't add to $LIBS permanently.
56504  ac_save_LIBS=$LIBS
56505  LIBS="-lX11 $LIBS"
56506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56507/* end confdefs.h.  */
56508#include <X11/Xlib.h>
56509int
56510main ()
56511{
56512XrmInitialize ()
56513  ;
56514  return 0;
56515}
56516_ACEOF
56517if ac_fn_cxx_try_link "$LINENO"; then :
56518  LIBS=$ac_save_LIBS
56519# We can link X programs with no special library path.
56520ac_x_libraries=
56521else
56522  LIBS=$ac_save_LIBS
56523for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56524do
56525  # Don't even attempt the hair of trying to link an X program!
56526  for ac_extension in a so sl dylib la dll; do
56527    if test -r "$ac_dir/libX11.$ac_extension"; then
56528      ac_x_libraries=$ac_dir
56529      break 2
56530    fi
56531  done
56532done
56533fi
56534rm -f core conftest.err conftest.$ac_objext \
56535    conftest$ac_exeext conftest.$ac_ext
56536fi # $ac_x_libraries = no
56537
56538case $ac_x_includes,$ac_x_libraries in #(
56539  no,* | *,no | *\'*)
56540    # Didn't find X, or a directory has "'" in its name.
56541    ac_cv_have_x="have_x=no";; #(
56542  *)
56543    # Record where we found X for the cache.
56544    ac_cv_have_x="have_x=yes\
56545	ac_x_includes='$ac_x_includes'\
56546	ac_x_libraries='$ac_x_libraries'"
56547esac
56548fi
56549;; #(
56550    *) have_x=yes;;
56551  esac
56552  eval "$ac_cv_have_x"
56553fi # $with_x != no
56554
56555if test "$have_x" != yes; then
56556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56557$as_echo "$have_x" >&6; }
56558  no_x=yes
56559else
56560  # If each of the values was on the command line, it overrides each guess.
56561  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56562  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56563  # Update the cache value to reflect the command line values.
56564  ac_cv_have_x="have_x=yes\
56565	ac_x_includes='$x_includes'\
56566	ac_x_libraries='$x_libraries'"
56567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56568$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56569fi
56570
56571    if test "$no_x" = yes; then
56572  # Not all programs may use this symbol, but it does not hurt to define it.
56573
56574$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56575
56576  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56577else
56578  if test -n "$x_includes"; then
56579    X_CFLAGS="$X_CFLAGS -I$x_includes"
56580  fi
56581
56582  # It would also be nice to do this for all -L options, not just this one.
56583  if test -n "$x_libraries"; then
56584    X_LIBS="$X_LIBS -L$x_libraries"
56585    # For Solaris; some versions of Sun CC require a space after -R and
56586    # others require no space.  Words are not sufficient . . . .
56587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56588$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56589    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56590    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56591    ac_cxx_werror_flag=yes
56592    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56593/* end confdefs.h.  */
56594
56595int
56596main ()
56597{
56598
56599  ;
56600  return 0;
56601}
56602_ACEOF
56603if ac_fn_cxx_try_link "$LINENO"; then :
56604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56605$as_echo "no" >&6; }
56606       X_LIBS="$X_LIBS -R$x_libraries"
56607else
56608  LIBS="$ac_xsave_LIBS -R $x_libraries"
56609       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56610/* end confdefs.h.  */
56611
56612int
56613main ()
56614{
56615
56616  ;
56617  return 0;
56618}
56619_ACEOF
56620if ac_fn_cxx_try_link "$LINENO"; then :
56621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56622$as_echo "yes" >&6; }
56623	  X_LIBS="$X_LIBS -R $x_libraries"
56624else
56625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56626$as_echo "neither works" >&6; }
56627fi
56628rm -f core conftest.err conftest.$ac_objext \
56629    conftest$ac_exeext conftest.$ac_ext
56630fi
56631rm -f core conftest.err conftest.$ac_objext \
56632    conftest$ac_exeext conftest.$ac_ext
56633    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56634    LIBS=$ac_xsave_LIBS
56635  fi
56636
56637  # Check for system-dependent libraries X programs must link with.
56638  # Do this before checking for the system-independent R6 libraries
56639  # (-lICE), since we may need -lsocket or whatever for X linking.
56640
56641  if test "$ISC" = yes; then
56642    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56643  else
56644    # Martyn Johnson says this is needed for Ultrix, if the X
56645    # libraries were built with DECnet support.  And Karl Berry says
56646    # the Alpha needs dnet_stub (dnet does not exist).
56647    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56648    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56649/* end confdefs.h.  */
56650
56651/* Override any GCC internal prototype to avoid an error.
56652   Use char because int might match the return type of a GCC
56653   builtin and then its argument prototype would still apply.  */
56654#ifdef __cplusplus
56655extern "C"
56656#endif
56657char XOpenDisplay ();
56658int
56659main ()
56660{
56661return XOpenDisplay ();
56662  ;
56663  return 0;
56664}
56665_ACEOF
56666if ac_fn_cxx_try_link "$LINENO"; then :
56667
56668else
56669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56670$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56671if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56672  $as_echo_n "(cached) " >&6
56673else
56674  ac_check_lib_save_LIBS=$LIBS
56675LIBS="-ldnet  $LIBS"
56676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56677/* end confdefs.h.  */
56678
56679/* Override any GCC internal prototype to avoid an error.
56680   Use char because int might match the return type of a GCC
56681   builtin and then its argument prototype would still apply.  */
56682#ifdef __cplusplus
56683extern "C"
56684#endif
56685char dnet_ntoa ();
56686int
56687main ()
56688{
56689return dnet_ntoa ();
56690  ;
56691  return 0;
56692}
56693_ACEOF
56694if ac_fn_cxx_try_link "$LINENO"; then :
56695  ac_cv_lib_dnet_dnet_ntoa=yes
56696else
56697  ac_cv_lib_dnet_dnet_ntoa=no
56698fi
56699rm -f core conftest.err conftest.$ac_objext \
56700    conftest$ac_exeext conftest.$ac_ext
56701LIBS=$ac_check_lib_save_LIBS
56702fi
56703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56704$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56705if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56706  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56707fi
56708
56709    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56711$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56712if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56713  $as_echo_n "(cached) " >&6
56714else
56715  ac_check_lib_save_LIBS=$LIBS
56716LIBS="-ldnet_stub  $LIBS"
56717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56718/* end confdefs.h.  */
56719
56720/* Override any GCC internal prototype to avoid an error.
56721   Use char because int might match the return type of a GCC
56722   builtin and then its argument prototype would still apply.  */
56723#ifdef __cplusplus
56724extern "C"
56725#endif
56726char dnet_ntoa ();
56727int
56728main ()
56729{
56730return dnet_ntoa ();
56731  ;
56732  return 0;
56733}
56734_ACEOF
56735if ac_fn_cxx_try_link "$LINENO"; then :
56736  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56737else
56738  ac_cv_lib_dnet_stub_dnet_ntoa=no
56739fi
56740rm -f core conftest.err conftest.$ac_objext \
56741    conftest$ac_exeext conftest.$ac_ext
56742LIBS=$ac_check_lib_save_LIBS
56743fi
56744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56745$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56746if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56747  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56748fi
56749
56750    fi
56751fi
56752rm -f core conftest.err conftest.$ac_objext \
56753    conftest$ac_exeext conftest.$ac_ext
56754    LIBS="$ac_xsave_LIBS"
56755
56756    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56757    # to get the SysV transport functions.
56758    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56759    # needs -lnsl.
56760    # The nsl library prevents programs from opening the X display
56761    # on Irix 5.2, according to T.E. Dickey.
56762    # The functions gethostbyname, getservbyname, and inet_addr are
56763    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56764    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56765if test "x$ac_cv_func_gethostbyname" = xyes; then :
56766
56767fi
56768
56769    if test $ac_cv_func_gethostbyname = no; then
56770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56771$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56772if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56773  $as_echo_n "(cached) " >&6
56774else
56775  ac_check_lib_save_LIBS=$LIBS
56776LIBS="-lnsl  $LIBS"
56777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56778/* end confdefs.h.  */
56779
56780/* Override any GCC internal prototype to avoid an error.
56781   Use char because int might match the return type of a GCC
56782   builtin and then its argument prototype would still apply.  */
56783#ifdef __cplusplus
56784extern "C"
56785#endif
56786char gethostbyname ();
56787int
56788main ()
56789{
56790return gethostbyname ();
56791  ;
56792  return 0;
56793}
56794_ACEOF
56795if ac_fn_cxx_try_link "$LINENO"; then :
56796  ac_cv_lib_nsl_gethostbyname=yes
56797else
56798  ac_cv_lib_nsl_gethostbyname=no
56799fi
56800rm -f core conftest.err conftest.$ac_objext \
56801    conftest$ac_exeext conftest.$ac_ext
56802LIBS=$ac_check_lib_save_LIBS
56803fi
56804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56805$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56806if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56807  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56808fi
56809
56810      if test $ac_cv_lib_nsl_gethostbyname = no; then
56811	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56812$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56813if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56814  $as_echo_n "(cached) " >&6
56815else
56816  ac_check_lib_save_LIBS=$LIBS
56817LIBS="-lbsd  $LIBS"
56818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56819/* end confdefs.h.  */
56820
56821/* Override any GCC internal prototype to avoid an error.
56822   Use char because int might match the return type of a GCC
56823   builtin and then its argument prototype would still apply.  */
56824#ifdef __cplusplus
56825extern "C"
56826#endif
56827char gethostbyname ();
56828int
56829main ()
56830{
56831return gethostbyname ();
56832  ;
56833  return 0;
56834}
56835_ACEOF
56836if ac_fn_cxx_try_link "$LINENO"; then :
56837  ac_cv_lib_bsd_gethostbyname=yes
56838else
56839  ac_cv_lib_bsd_gethostbyname=no
56840fi
56841rm -f core conftest.err conftest.$ac_objext \
56842    conftest$ac_exeext conftest.$ac_ext
56843LIBS=$ac_check_lib_save_LIBS
56844fi
56845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56846$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56847if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56848  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56849fi
56850
56851      fi
56852    fi
56853
56854    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56855    # socket/setsockopt and other routines are undefined under SCO ODT
56856    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56857    # on later versions), says Simon Leinen: it contains gethostby*
56858    # variants that don't use the name server (or something).  -lsocket
56859    # must be given before -lnsl if both are needed.  We assume that
56860    # if connect needs -lnsl, so does gethostbyname.
56861    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56862if test "x$ac_cv_func_connect" = xyes; then :
56863
56864fi
56865
56866    if test $ac_cv_func_connect = no; then
56867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56868$as_echo_n "checking for connect in -lsocket... " >&6; }
56869if ${ac_cv_lib_socket_connect+:} false; then :
56870  $as_echo_n "(cached) " >&6
56871else
56872  ac_check_lib_save_LIBS=$LIBS
56873LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56875/* end confdefs.h.  */
56876
56877/* Override any GCC internal prototype to avoid an error.
56878   Use char because int might match the return type of a GCC
56879   builtin and then its argument prototype would still apply.  */
56880#ifdef __cplusplus
56881extern "C"
56882#endif
56883char connect ();
56884int
56885main ()
56886{
56887return connect ();
56888  ;
56889  return 0;
56890}
56891_ACEOF
56892if ac_fn_cxx_try_link "$LINENO"; then :
56893  ac_cv_lib_socket_connect=yes
56894else
56895  ac_cv_lib_socket_connect=no
56896fi
56897rm -f core conftest.err conftest.$ac_objext \
56898    conftest$ac_exeext conftest.$ac_ext
56899LIBS=$ac_check_lib_save_LIBS
56900fi
56901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56902$as_echo "$ac_cv_lib_socket_connect" >&6; }
56903if test "x$ac_cv_lib_socket_connect" = xyes; then :
56904  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56905fi
56906
56907    fi
56908
56909    # Guillermo Gomez says -lposix is necessary on A/UX.
56910    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56911if test "x$ac_cv_func_remove" = xyes; then :
56912
56913fi
56914
56915    if test $ac_cv_func_remove = no; then
56916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56917$as_echo_n "checking for remove in -lposix... " >&6; }
56918if ${ac_cv_lib_posix_remove+:} false; then :
56919  $as_echo_n "(cached) " >&6
56920else
56921  ac_check_lib_save_LIBS=$LIBS
56922LIBS="-lposix  $LIBS"
56923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56924/* end confdefs.h.  */
56925
56926/* Override any GCC internal prototype to avoid an error.
56927   Use char because int might match the return type of a GCC
56928   builtin and then its argument prototype would still apply.  */
56929#ifdef __cplusplus
56930extern "C"
56931#endif
56932char remove ();
56933int
56934main ()
56935{
56936return remove ();
56937  ;
56938  return 0;
56939}
56940_ACEOF
56941if ac_fn_cxx_try_link "$LINENO"; then :
56942  ac_cv_lib_posix_remove=yes
56943else
56944  ac_cv_lib_posix_remove=no
56945fi
56946rm -f core conftest.err conftest.$ac_objext \
56947    conftest$ac_exeext conftest.$ac_ext
56948LIBS=$ac_check_lib_save_LIBS
56949fi
56950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56951$as_echo "$ac_cv_lib_posix_remove" >&6; }
56952if test "x$ac_cv_lib_posix_remove" = xyes; then :
56953  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56954fi
56955
56956    fi
56957
56958    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56959    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56960if test "x$ac_cv_func_shmat" = xyes; then :
56961
56962fi
56963
56964    if test $ac_cv_func_shmat = no; then
56965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56966$as_echo_n "checking for shmat in -lipc... " >&6; }
56967if ${ac_cv_lib_ipc_shmat+:} false; then :
56968  $as_echo_n "(cached) " >&6
56969else
56970  ac_check_lib_save_LIBS=$LIBS
56971LIBS="-lipc  $LIBS"
56972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56973/* end confdefs.h.  */
56974
56975/* Override any GCC internal prototype to avoid an error.
56976   Use char because int might match the return type of a GCC
56977   builtin and then its argument prototype would still apply.  */
56978#ifdef __cplusplus
56979extern "C"
56980#endif
56981char shmat ();
56982int
56983main ()
56984{
56985return shmat ();
56986  ;
56987  return 0;
56988}
56989_ACEOF
56990if ac_fn_cxx_try_link "$LINENO"; then :
56991  ac_cv_lib_ipc_shmat=yes
56992else
56993  ac_cv_lib_ipc_shmat=no
56994fi
56995rm -f core conftest.err conftest.$ac_objext \
56996    conftest$ac_exeext conftest.$ac_ext
56997LIBS=$ac_check_lib_save_LIBS
56998fi
56999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57000$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57001if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57002  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57003fi
57004
57005    fi
57006  fi
57007
57008  # Check for libraries that X11R6 Xt/Xaw programs need.
57009  ac_save_LDFLAGS=$LDFLAGS
57010  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57011  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57012  # check for ICE first), but we must link in the order -lSM -lICE or
57013  # we get undefined symbols.  So assume we have SM if we have ICE.
57014  # These have to be linked with before -lX11, unlike the other
57015  # libraries we check for below, so use a different variable.
57016  # John Interrante, Karl Berry
57017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57018$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57019if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57020  $as_echo_n "(cached) " >&6
57021else
57022  ac_check_lib_save_LIBS=$LIBS
57023LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57025/* end confdefs.h.  */
57026
57027/* Override any GCC internal prototype to avoid an error.
57028   Use char because int might match the return type of a GCC
57029   builtin and then its argument prototype would still apply.  */
57030#ifdef __cplusplus
57031extern "C"
57032#endif
57033char IceConnectionNumber ();
57034int
57035main ()
57036{
57037return IceConnectionNumber ();
57038  ;
57039  return 0;
57040}
57041_ACEOF
57042if ac_fn_cxx_try_link "$LINENO"; then :
57043  ac_cv_lib_ICE_IceConnectionNumber=yes
57044else
57045  ac_cv_lib_ICE_IceConnectionNumber=no
57046fi
57047rm -f core conftest.err conftest.$ac_objext \
57048    conftest$ac_exeext conftest.$ac_ext
57049LIBS=$ac_check_lib_save_LIBS
57050fi
57051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57052$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57053if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57054  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57055fi
57056
57057  LDFLAGS=$ac_save_LDFLAGS
57058
57059fi
57060
57061
57062    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57063    # this doesn't make sense so we remove it.
57064    if test "x$COMPILE_TYPE" = xcross; then
57065      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57066    fi
57067
57068    if test "x$no_x" = xyes; then
57069
57070  # Print a helpful message on how to acquire the necessary build dependency.
57071  # x11 is the help tag: freetype, cups, alsa etc
57072  MISSING_DEPENDENCY=x11
57073
57074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57075    cygwin_help $MISSING_DEPENDENCY
57076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57077    msys_help $MISSING_DEPENDENCY
57078  else
57079    PKGHANDLER_COMMAND=
57080
57081    case $PKGHANDLER in
57082      apt-get)
57083        apt_help     $MISSING_DEPENDENCY ;;
57084      yum)
57085        yum_help     $MISSING_DEPENDENCY ;;
57086      brew)
57087        brew_help    $MISSING_DEPENDENCY ;;
57088      port)
57089        port_help    $MISSING_DEPENDENCY ;;
57090      pkgutil)
57091        pkgutil_help $MISSING_DEPENDENCY ;;
57092      pkgadd)
57093        pkgadd_help  $MISSING_DEPENDENCY ;;
57094    esac
57095
57096    if test "x$PKGHANDLER_COMMAND" != x; then
57097      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57098    fi
57099  fi
57100
57101      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57102    fi
57103
57104    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57105      OPENWIN_HOME="/usr/openwin"
57106      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57107      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57108          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57109    fi
57110
57111    ac_ext=c
57112ac_cpp='$CPP $CPPFLAGS'
57113ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57114ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57115ac_compiler_gnu=$ac_cv_c_compiler_gnu
57116
57117    OLD_CFLAGS="$CFLAGS"
57118    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57119
57120    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57121    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57122do :
57123  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57124ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57125          # include <X11/Xlib.h>
57126          # include <X11/Xutil.h>
57127
57128
57129"
57130if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57131  cat >>confdefs.h <<_ACEOF
57132#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57133_ACEOF
57134 X11_HEADERS_OK=yes
57135else
57136  X11_HEADERS_OK=no; break
57137fi
57138
57139done
57140
57141
57142    if test "x$X11_HEADERS_OK" = xno; then
57143
57144  # Print a helpful message on how to acquire the necessary build dependency.
57145  # x11 is the help tag: freetype, cups, alsa etc
57146  MISSING_DEPENDENCY=x11
57147
57148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57149    cygwin_help $MISSING_DEPENDENCY
57150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57151    msys_help $MISSING_DEPENDENCY
57152  else
57153    PKGHANDLER_COMMAND=
57154
57155    case $PKGHANDLER in
57156      apt-get)
57157        apt_help     $MISSING_DEPENDENCY ;;
57158      yum)
57159        yum_help     $MISSING_DEPENDENCY ;;
57160      brew)
57161        brew_help    $MISSING_DEPENDENCY ;;
57162      port)
57163        port_help    $MISSING_DEPENDENCY ;;
57164      pkgutil)
57165        pkgutil_help $MISSING_DEPENDENCY ;;
57166      pkgadd)
57167        pkgadd_help  $MISSING_DEPENDENCY ;;
57168    esac
57169
57170    if test "x$PKGHANDLER_COMMAND" != x; then
57171      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57172    fi
57173  fi
57174
57175      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57176    fi
57177
57178    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57179    # defined in libawt_xawt.
57180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57181$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57182    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57183/* end confdefs.h.  */
57184#include <X11/extensions/Xrender.h>
57185int
57186main ()
57187{
57188XLinearGradient x;
57189  ;
57190  return 0;
57191}
57192_ACEOF
57193if ac_fn_c_try_compile "$LINENO"; then :
57194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57195$as_echo "yes" >&6; }
57196else
57197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57198$as_echo "no" >&6; }
57199         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57200fi
57201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57202
57203    CFLAGS="$OLD_CFLAGS"
57204    ac_ext=cpp
57205ac_cpp='$CXXCPP $CPPFLAGS'
57206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57209
57210  fi # NEEDS_LIB_X11
57211
57212
57213
57214
57215
57216
57217# Check whether --with-cups was given.
57218if test "${with_cups+set}" = set; then :
57219  withval=$with_cups;
57220fi
57221
57222
57223# Check whether --with-cups-include was given.
57224if test "${with_cups_include+set}" = set; then :
57225  withval=$with_cups_include;
57226fi
57227
57228
57229  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57230    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57231        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57232      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57233$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57234    fi
57235    CUPS_CFLAGS=
57236  else
57237    CUPS_FOUND=no
57238
57239    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57240      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57241    fi
57242
57243    if test "x${with_cups}" != x; then
57244      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57245$as_echo_n "checking for cups headers... " >&6; }
57246      if test -s "${with_cups}/include/cups/cups.h"; then
57247        CUPS_CFLAGS="-I${with_cups}/include"
57248        CUPS_FOUND=yes
57249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57250$as_echo "$CUPS_FOUND" >&6; }
57251      else
57252        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57253      fi
57254    fi
57255    if test "x${with_cups_include}" != x; then
57256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57257$as_echo_n "checking for cups headers... " >&6; }
57258      if test -s "${with_cups_include}/cups/cups.h"; then
57259        CUPS_CFLAGS="-I${with_cups_include}"
57260        CUPS_FOUND=yes
57261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57262$as_echo "$CUPS_FOUND" >&6; }
57263      else
57264        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57265      fi
57266    fi
57267    if test "x$CUPS_FOUND" = xno; then
57268      # Are the cups headers installed in the default /usr/include location?
57269      for ac_header in cups/cups.h cups/ppd.h
57270do :
57271  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57272ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57274  cat >>confdefs.h <<_ACEOF
57275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57276_ACEOF
57277
57278          CUPS_FOUND=yes
57279          CUPS_CFLAGS=
57280          DEFAULT_CUPS=yes
57281
57282fi
57283
57284done
57285
57286    fi
57287    if test "x$CUPS_FOUND" = xno; then
57288
57289  # Print a helpful message on how to acquire the necessary build dependency.
57290  # cups is the help tag: freetype, cups, alsa etc
57291  MISSING_DEPENDENCY=cups
57292
57293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57294    cygwin_help $MISSING_DEPENDENCY
57295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57296    msys_help $MISSING_DEPENDENCY
57297  else
57298    PKGHANDLER_COMMAND=
57299
57300    case $PKGHANDLER in
57301      apt-get)
57302        apt_help     $MISSING_DEPENDENCY ;;
57303      yum)
57304        yum_help     $MISSING_DEPENDENCY ;;
57305      brew)
57306        brew_help    $MISSING_DEPENDENCY ;;
57307      port)
57308        port_help    $MISSING_DEPENDENCY ;;
57309      pkgutil)
57310        pkgutil_help $MISSING_DEPENDENCY ;;
57311      pkgadd)
57312        pkgadd_help  $MISSING_DEPENDENCY ;;
57313    esac
57314
57315    if test "x$PKGHANDLER_COMMAND" != x; then
57316      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57317    fi
57318  fi
57319
57320      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57321    fi
57322  fi
57323
57324
57325
57326
57327
57328# Check whether --with-freetype was given.
57329if test "${with_freetype+set}" = set; then :
57330  withval=$with_freetype;
57331fi
57332
57333
57334# Check whether --with-freetype-include was given.
57335if test "${with_freetype_include+set}" = set; then :
57336  withval=$with_freetype_include;
57337fi
57338
57339
57340# Check whether --with-freetype-lib was given.
57341if test "${with_freetype_lib+set}" = set; then :
57342  withval=$with_freetype_lib;
57343fi
57344
57345
57346# Check whether --with-freetype-src was given.
57347if test "${with_freetype_src+set}" = set; then :
57348  withval=$with_freetype_src;
57349fi
57350
57351  # Check whether --enable-freetype-bundling was given.
57352if test "${enable_freetype_bundling+set}" = set; then :
57353  enableval=$enable_freetype_bundling;
57354fi
57355
57356
57357  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57358  FREETYPE_BASE_NAME=freetype
57359  FREETYPE_CFLAGS=
57360  FREETYPE_LIBS=
57361  FREETYPE_BUNDLE_LIB_PATH=
57362
57363  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57364    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57365        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57366        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57367        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57368      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57369$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57370    fi
57371    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57372      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57373$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57374    fi
57375  else
57376    # freetype is needed to build; go get it!
57377
57378    BUNDLE_FREETYPE="$enable_freetype_bundling"
57379
57380    if  test "x$with_freetype_src" != x; then
57381      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57382        # Try to build freetype if --with-freetype-src was given on Windows
57383
57384  FREETYPE_SRC_PATH="$with_freetype_src"
57385  BUILD_FREETYPE=yes
57386
57387  # Check if the freetype sources are acessible..
57388  if ! test -d $FREETYPE_SRC_PATH; then
57389    { $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
57390$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57391    BUILD_FREETYPE=no
57392  fi
57393  # ..and contain a vc2010 project file
57394  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57395  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57396    { $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
57397$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57398    BUILD_FREETYPE=no
57399  fi
57400  # Now check if configure found a version of 'msbuild.exe'
57401  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57402    { $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
57403$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;}
57404    BUILD_FREETYPE=no
57405  fi
57406
57407  # Ready to go..
57408  if test "x$BUILD_FREETYPE" = xyes; then
57409    # msbuild requires trailing slashes for output directories
57410    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57411    freetype_lib_path_unix="$freetype_lib_path"
57412    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57413
57414  unix_path="$vcxproj_path"
57415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57416    windows_path=`$CYGPATH -m "$unix_path"`
57417    vcxproj_path="$windows_path"
57418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57419    windows_path=`cmd //c echo $unix_path`
57420    vcxproj_path="$windows_path"
57421  fi
57422
57423
57424  unix_path="$freetype_lib_path"
57425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57426    windows_path=`$CYGPATH -m "$unix_path"`
57427    freetype_lib_path="$windows_path"
57428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57429    windows_path=`cmd //c echo $unix_path`
57430    freetype_lib_path="$windows_path"
57431  fi
57432
57433
57434  unix_path="$freetype_obj_path"
57435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57436    windows_path=`$CYGPATH -m "$unix_path"`
57437    freetype_obj_path="$windows_path"
57438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57439    windows_path=`cmd //c echo $unix_path`
57440    freetype_obj_path="$windows_path"
57441  fi
57442
57443    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57444      freetype_platform=x64
57445    else
57446      freetype_platform=win32
57447    fi
57448
57449    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57450    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57451    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57452    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57453    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57454$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57455
57456    # First we try to build the freetype.dll
57457    $ECHO -e "@echo off\n"\
57458        "$MSBUILD $vcxproj_path "\
57459        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57460        "/p:Configuration=\"Release Multithreaded\" "\
57461        "/p:Platform=$freetype_platform "\
57462        "/p:ConfigurationType=DynamicLibrary "\
57463        "/p:TargetName=freetype "\
57464        "/p:OutDir=\"$freetype_lib_path\" "\
57465        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57466    cmd /c freetype.bat
57467
57468    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57469      # If that succeeds we also build freetype.lib
57470      $ECHO -e "@echo off\n"\
57471          "$MSBUILD $vcxproj_path "\
57472          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57473          "/p:Configuration=\"Release Multithreaded\" "\
57474          "/p:Platform=$freetype_platform "\
57475          "/p:ConfigurationType=StaticLibrary "\
57476          "/p:TargetName=freetype "\
57477          "/p:OutDir=\"$freetype_lib_path\" "\
57478          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57479      cmd /c freetype.bat
57480
57481      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57482        # Once we build both, lib and dll, set freetype lib and include path appropriately
57483        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57484        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57485        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57486$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57487      else
57488        BUILD_FREETYPE=no
57489      fi
57490    else
57491      BUILD_FREETYPE=no
57492    fi
57493  fi
57494
57495        if test "x$BUILD_FREETYPE" = xyes; then
57496          # Okay, we built it. Check that it works.
57497
57498  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57499  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57500  METHOD="--with-freetype-src"
57501
57502  # Let's start with an optimistic view of the world :-)
57503  FOUND_FREETYPE=yes
57504
57505  # First look for the canonical freetype main include file ft2build.h.
57506  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57507    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57508    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57509    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57510      # Fail.
57511      FOUND_FREETYPE=no
57512    fi
57513  fi
57514
57515  if test "x$FOUND_FREETYPE" = xyes; then
57516    # Include file found, let's continue the sanity check.
57517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57518$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57519
57520    # Reset to default value
57521    FREETYPE_BASE_NAME=freetype
57522    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57523    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57524      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57526        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57527        # for the .6 version explicitly.
57528        FREETYPE_BASE_NAME=freetype.6
57529        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57530        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57531$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57532      else
57533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57535        FOUND_FREETYPE=no
57536      fi
57537    else
57538      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57539        # On Windows, we will need both .lib and .dll file.
57540        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57541          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57542$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57543          FOUND_FREETYPE=no
57544        fi
57545      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57546          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57547        # Found lib in isa dir, use that instead.
57548        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57549        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57550$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57551      fi
57552    fi
57553  fi
57554
57555  if test "x$FOUND_FREETYPE" = xyes; then
57556
57557  # Only process if variable expands to non-empty
57558
57559  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57561
57562  # Input might be given as Windows format, start by converting to
57563  # unix format.
57564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57565  new_path=`$CYGPATH -u "$path"`
57566
57567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57570  # "foo.exe" is OK but "foo" is an error.
57571  #
57572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57573  # It is also a way to make sure we got the proper file name for the real test later on.
57574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57575  if test "x$test_shortpath" = x; then
57576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57578    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57579  fi
57580
57581  # Call helper function which possibly converts this using DOS-style short mode.
57582  # If so, the updated path is stored in $new_path.
57583
57584  input_path="$new_path"
57585  # Check if we need to convert this using DOS-style short mode. If the path
57586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57587  # take no chances and rewrite it.
57588  # Note: m4 eats our [], so we need to use [ and ] instead.
57589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57590  if test "x$has_forbidden_chars" != x; then
57591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57595      # Going to short mode and back again did indeed matter. Since short mode is
57596      # case insensitive, let's make it lowercase to improve readability.
57597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57598      # Now convert it back to Unix-style (cygpath)
57599      input_path=`$CYGPATH -u "$shortmode_path"`
57600      new_path="$input_path"
57601    fi
57602  fi
57603
57604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57605  if test "x$test_cygdrive_prefix" = x; then
57606    # As a simple fix, exclude /usr/bin since it's not a real path.
57607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57609      # a path prefixed by /cygdrive for fixpath to work.
57610      new_path="$CYGWIN_ROOT_PATH$input_path"
57611    fi
57612  fi
57613
57614
57615  if test "x$path" != "x$new_path"; then
57616    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57619  fi
57620
57621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57622
57623  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57624  has_colon=`$ECHO $path | $GREP ^.:`
57625  new_path="$path"
57626  if test "x$has_colon" = x; then
57627    # Not in mixed or Windows style, start by that.
57628    new_path=`cmd //c echo $path`
57629  fi
57630
57631
57632  input_path="$new_path"
57633  # Check if we need to convert this using DOS-style short mode. If the path
57634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57635  # take no chances and rewrite it.
57636  # Note: m4 eats our [], so we need to use [ and ] instead.
57637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57638  if test "x$has_forbidden_chars" != x; then
57639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57641  fi
57642
57643
57644  windows_path="$new_path"
57645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57646    unix_path=`$CYGPATH -u "$windows_path"`
57647    new_path="$unix_path"
57648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57650    new_path="$unix_path"
57651  fi
57652
57653  if test "x$path" != "x$new_path"; then
57654    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57657  fi
57658
57659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57661
57662    else
57663      # We're on a unix platform. Hooray! :)
57664      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57665      has_space=`$ECHO "$path" | $GREP " "`
57666      if test "x$has_space" != x; then
57667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57670      fi
57671
57672      # Use eval to expand a potential ~
57673      eval path="$path"
57674      if test ! -f "$path" && test ! -d "$path"; then
57675        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57676      fi
57677
57678      if test -d "$path"; then
57679        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57680      else
57681        dir="`$DIRNAME "$path"`"
57682        base="`$BASENAME "$path"`"
57683        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57684      fi
57685    fi
57686  fi
57687
57688
57689  # Only process if variable expands to non-empty
57690
57691  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57693
57694  # Input might be given as Windows format, start by converting to
57695  # unix format.
57696  path="$POTENTIAL_FREETYPE_LIB_PATH"
57697  new_path=`$CYGPATH -u "$path"`
57698
57699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57702  # "foo.exe" is OK but "foo" is an error.
57703  #
57704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57705  # It is also a way to make sure we got the proper file name for the real test later on.
57706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57707  if test "x$test_shortpath" = x; then
57708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57710    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57711  fi
57712
57713  # Call helper function which possibly converts this using DOS-style short mode.
57714  # If so, the updated path is stored in $new_path.
57715
57716  input_path="$new_path"
57717  # Check if we need to convert this using DOS-style short mode. If the path
57718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57719  # take no chances and rewrite it.
57720  # Note: m4 eats our [], so we need to use [ and ] instead.
57721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57722  if test "x$has_forbidden_chars" != x; then
57723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57727      # Going to short mode and back again did indeed matter. Since short mode is
57728      # case insensitive, let's make it lowercase to improve readability.
57729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57730      # Now convert it back to Unix-style (cygpath)
57731      input_path=`$CYGPATH -u "$shortmode_path"`
57732      new_path="$input_path"
57733    fi
57734  fi
57735
57736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57737  if test "x$test_cygdrive_prefix" = x; then
57738    # As a simple fix, exclude /usr/bin since it's not a real path.
57739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57741      # a path prefixed by /cygdrive for fixpath to work.
57742      new_path="$CYGWIN_ROOT_PATH$input_path"
57743    fi
57744  fi
57745
57746
57747  if test "x$path" != "x$new_path"; then
57748    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57751  fi
57752
57753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57754
57755  path="$POTENTIAL_FREETYPE_LIB_PATH"
57756  has_colon=`$ECHO $path | $GREP ^.:`
57757  new_path="$path"
57758  if test "x$has_colon" = x; then
57759    # Not in mixed or Windows style, start by that.
57760    new_path=`cmd //c echo $path`
57761  fi
57762
57763
57764  input_path="$new_path"
57765  # Check if we need to convert this using DOS-style short mode. If the path
57766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57767  # take no chances and rewrite it.
57768  # Note: m4 eats our [], so we need to use [ and ] instead.
57769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57770  if test "x$has_forbidden_chars" != x; then
57771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57773  fi
57774
57775
57776  windows_path="$new_path"
57777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57778    unix_path=`$CYGPATH -u "$windows_path"`
57779    new_path="$unix_path"
57780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57782    new_path="$unix_path"
57783  fi
57784
57785  if test "x$path" != "x$new_path"; then
57786    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57788$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57789  fi
57790
57791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57793
57794    else
57795      # We're on a unix platform. Hooray! :)
57796      path="$POTENTIAL_FREETYPE_LIB_PATH"
57797      has_space=`$ECHO "$path" | $GREP " "`
57798      if test "x$has_space" != x; then
57799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57800$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57802      fi
57803
57804      # Use eval to expand a potential ~
57805      eval path="$path"
57806      if test ! -f "$path" && test ! -d "$path"; then
57807        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57808      fi
57809
57810      if test -d "$path"; then
57811        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57812      else
57813        dir="`$DIRNAME "$path"`"
57814        base="`$BASENAME "$path"`"
57815        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57816      fi
57817    fi
57818  fi
57819
57820
57821    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57823$as_echo_n "checking for freetype includes... " >&6; }
57824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57825$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57826    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57828$as_echo_n "checking for freetype libraries... " >&6; }
57829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57830$as_echo "$FREETYPE_LIB_PATH" >&6; }
57831  fi
57832
57833          if test "x$FOUND_FREETYPE" != xyes; then
57834            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57835          fi
57836        else
57837          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57838$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57839          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57840        fi
57841      else
57842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57843$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57844      fi
57845    fi
57846
57847    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57848      # User has specified settings
57849
57850      if test "x$BUNDLE_FREETYPE" = x; then
57851        # If not specified, default is to bundle freetype
57852        BUNDLE_FREETYPE=yes
57853      fi
57854
57855      if test "x$with_freetype" != x; then
57856        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57857        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57858      fi
57859
57860      # Allow --with-freetype-lib and --with-freetype-include to override
57861      if test "x$with_freetype_include" != x; then
57862        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57863      fi
57864      if test "x$with_freetype_lib" != x; then
57865        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57866      fi
57867
57868      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57869        # Okay, we got it. Check that it works.
57870
57871  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57872  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57873  METHOD="--with-freetype"
57874
57875  # Let's start with an optimistic view of the world :-)
57876  FOUND_FREETYPE=yes
57877
57878  # First look for the canonical freetype main include file ft2build.h.
57879  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57880    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57881    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57882    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57883      # Fail.
57884      FOUND_FREETYPE=no
57885    fi
57886  fi
57887
57888  if test "x$FOUND_FREETYPE" = xyes; then
57889    # Include file found, let's continue the sanity check.
57890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57891$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57892
57893    # Reset to default value
57894    FREETYPE_BASE_NAME=freetype
57895    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57896    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57897      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57898          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57899        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57900        # for the .6 version explicitly.
57901        FREETYPE_BASE_NAME=freetype.6
57902        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57903        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57904$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57905      else
57906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57907$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57908        FOUND_FREETYPE=no
57909      fi
57910    else
57911      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57912        # On Windows, we will need both .lib and .dll file.
57913        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57914          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57915$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57916          FOUND_FREETYPE=no
57917        fi
57918      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57919          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57920        # Found lib in isa dir, use that instead.
57921        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57922        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57923$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57924      fi
57925    fi
57926  fi
57927
57928  if test "x$FOUND_FREETYPE" = xyes; then
57929
57930  # Only process if variable expands to non-empty
57931
57932  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57934
57935  # Input might be given as Windows format, start by converting to
57936  # unix format.
57937  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57938  new_path=`$CYGPATH -u "$path"`
57939
57940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57943  # "foo.exe" is OK but "foo" is an error.
57944  #
57945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57946  # It is also a way to make sure we got the proper file name for the real test later on.
57947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57948  if test "x$test_shortpath" = x; then
57949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57951    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57952  fi
57953
57954  # Call helper function which possibly converts this using DOS-style short mode.
57955  # If so, the updated path is stored in $new_path.
57956
57957  input_path="$new_path"
57958  # Check if we need to convert this using DOS-style short mode. If the path
57959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57960  # take no chances and rewrite it.
57961  # Note: m4 eats our [], so we need to use [ and ] instead.
57962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57963  if test "x$has_forbidden_chars" != x; then
57964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57968      # Going to short mode and back again did indeed matter. Since short mode is
57969      # case insensitive, let's make it lowercase to improve readability.
57970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57971      # Now convert it back to Unix-style (cygpath)
57972      input_path=`$CYGPATH -u "$shortmode_path"`
57973      new_path="$input_path"
57974    fi
57975  fi
57976
57977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57978  if test "x$test_cygdrive_prefix" = x; then
57979    # As a simple fix, exclude /usr/bin since it's not a real path.
57980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57982      # a path prefixed by /cygdrive for fixpath to work.
57983      new_path="$CYGWIN_ROOT_PATH$input_path"
57984    fi
57985  fi
57986
57987
57988  if test "x$path" != "x$new_path"; then
57989    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57992  fi
57993
57994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57995
57996  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57997  has_colon=`$ECHO $path | $GREP ^.:`
57998  new_path="$path"
57999  if test "x$has_colon" = x; then
58000    # Not in mixed or Windows style, start by that.
58001    new_path=`cmd //c echo $path`
58002  fi
58003
58004
58005  input_path="$new_path"
58006  # Check if we need to convert this using DOS-style short mode. If the path
58007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58008  # take no chances and rewrite it.
58009  # Note: m4 eats our [], so we need to use [ and ] instead.
58010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58011  if test "x$has_forbidden_chars" != x; then
58012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58014  fi
58015
58016
58017  windows_path="$new_path"
58018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58019    unix_path=`$CYGPATH -u "$windows_path"`
58020    new_path="$unix_path"
58021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58023    new_path="$unix_path"
58024  fi
58025
58026  if test "x$path" != "x$new_path"; then
58027    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58030  fi
58031
58032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58034
58035    else
58036      # We're on a unix platform. Hooray! :)
58037      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58038      has_space=`$ECHO "$path" | $GREP " "`
58039      if test "x$has_space" != x; then
58040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58043      fi
58044
58045      # Use eval to expand a potential ~
58046      eval path="$path"
58047      if test ! -f "$path" && test ! -d "$path"; then
58048        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58049      fi
58050
58051      if test -d "$path"; then
58052        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58053      else
58054        dir="`$DIRNAME "$path"`"
58055        base="`$BASENAME "$path"`"
58056        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58057      fi
58058    fi
58059  fi
58060
58061
58062  # Only process if variable expands to non-empty
58063
58064  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58066
58067  # Input might be given as Windows format, start by converting to
58068  # unix format.
58069  path="$POTENTIAL_FREETYPE_LIB_PATH"
58070  new_path=`$CYGPATH -u "$path"`
58071
58072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58075  # "foo.exe" is OK but "foo" is an error.
58076  #
58077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58078  # It is also a way to make sure we got the proper file name for the real test later on.
58079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58080  if test "x$test_shortpath" = x; then
58081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58084  fi
58085
58086  # Call helper function which possibly converts this using DOS-style short mode.
58087  # If so, the updated path is stored in $new_path.
58088
58089  input_path="$new_path"
58090  # Check if we need to convert this using DOS-style short mode. If the path
58091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58092  # take no chances and rewrite it.
58093  # Note: m4 eats our [], so we need to use [ and ] instead.
58094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58095  if test "x$has_forbidden_chars" != x; then
58096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58100      # Going to short mode and back again did indeed matter. Since short mode is
58101      # case insensitive, let's make it lowercase to improve readability.
58102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58103      # Now convert it back to Unix-style (cygpath)
58104      input_path=`$CYGPATH -u "$shortmode_path"`
58105      new_path="$input_path"
58106    fi
58107  fi
58108
58109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58110  if test "x$test_cygdrive_prefix" = x; then
58111    # As a simple fix, exclude /usr/bin since it's not a real path.
58112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58114      # a path prefixed by /cygdrive for fixpath to work.
58115      new_path="$CYGWIN_ROOT_PATH$input_path"
58116    fi
58117  fi
58118
58119
58120  if test "x$path" != "x$new_path"; then
58121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58124  fi
58125
58126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58127
58128  path="$POTENTIAL_FREETYPE_LIB_PATH"
58129  has_colon=`$ECHO $path | $GREP ^.:`
58130  new_path="$path"
58131  if test "x$has_colon" = x; then
58132    # Not in mixed or Windows style, start by that.
58133    new_path=`cmd //c echo $path`
58134  fi
58135
58136
58137  input_path="$new_path"
58138  # Check if we need to convert this using DOS-style short mode. If the path
58139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58140  # take no chances and rewrite it.
58141  # Note: m4 eats our [], so we need to use [ and ] instead.
58142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58143  if test "x$has_forbidden_chars" != x; then
58144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58146  fi
58147
58148
58149  windows_path="$new_path"
58150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58151    unix_path=`$CYGPATH -u "$windows_path"`
58152    new_path="$unix_path"
58153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58155    new_path="$unix_path"
58156  fi
58157
58158  if test "x$path" != "x$new_path"; then
58159    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58162  fi
58163
58164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58166
58167    else
58168      # We're on a unix platform. Hooray! :)
58169      path="$POTENTIAL_FREETYPE_LIB_PATH"
58170      has_space=`$ECHO "$path" | $GREP " "`
58171      if test "x$has_space" != x; then
58172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58175      fi
58176
58177      # Use eval to expand a potential ~
58178      eval path="$path"
58179      if test ! -f "$path" && test ! -d "$path"; then
58180        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58181      fi
58182
58183      if test -d "$path"; then
58184        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58185      else
58186        dir="`$DIRNAME "$path"`"
58187        base="`$BASENAME "$path"`"
58188        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58189      fi
58190    fi
58191  fi
58192
58193
58194    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58196$as_echo_n "checking for freetype includes... " >&6; }
58197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58198$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58199    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58201$as_echo_n "checking for freetype libraries... " >&6; }
58202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58203$as_echo "$FREETYPE_LIB_PATH" >&6; }
58204  fi
58205
58206        if test "x$FOUND_FREETYPE" != xyes; then
58207          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58208        fi
58209      else
58210        # User specified only one of lib or include. This is an error.
58211        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58212          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58213$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58214          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58215        else
58216          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58217$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58218          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58219        fi
58220      fi
58221    else
58222      # User did not specify settings, but we need freetype. Try to locate it.
58223
58224      if test "x$BUNDLE_FREETYPE" = x; then
58225        # If not specified, default is to bundle freetype only on windows
58226        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58227          BUNDLE_FREETYPE=yes
58228        else
58229          BUNDLE_FREETYPE=no
58230        fi
58231      fi
58232
58233      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58234      if test "x$SYSROOT" = x; then
58235        if test "x$FOUND_FREETYPE" != xyes; then
58236          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58237          if test "x$PKG_CONFIG" != x; then
58238
58239pkg_failed=no
58240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58241$as_echo_n "checking for FREETYPE... " >&6; }
58242
58243if test -n "$FREETYPE_CFLAGS"; then
58244    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58245 elif test -n "$PKG_CONFIG"; then
58246    if test -n "$PKG_CONFIG" && \
58247    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58248  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58249  ac_status=$?
58250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58251  test $ac_status = 0; }; then
58252  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58253else
58254  pkg_failed=yes
58255fi
58256 else
58257    pkg_failed=untried
58258fi
58259if test -n "$FREETYPE_LIBS"; then
58260    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58261 elif test -n "$PKG_CONFIG"; then
58262    if test -n "$PKG_CONFIG" && \
58263    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58264  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58265  ac_status=$?
58266  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58267  test $ac_status = 0; }; then
58268  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58269else
58270  pkg_failed=yes
58271fi
58272 else
58273    pkg_failed=untried
58274fi
58275
58276
58277
58278if test $pkg_failed = yes; then
58279
58280if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58281        _pkg_short_errors_supported=yes
58282else
58283        _pkg_short_errors_supported=no
58284fi
58285        if test $_pkg_short_errors_supported = yes; then
58286	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58287        else
58288	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58289        fi
58290	# Put the nasty error message in config.log where it belongs
58291	echo "$FREETYPE_PKG_ERRORS" >&5
58292
58293	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58294$as_echo "no" >&6; }
58295                FOUND_FREETYPE=no
58296elif test $pkg_failed = untried; then
58297	FOUND_FREETYPE=no
58298else
58299	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58300	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58302$as_echo "yes" >&6; }
58303	FOUND_FREETYPE=yes
58304fi
58305            if test "x$FOUND_FREETYPE" = xyes; then
58306              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58307              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58308              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58309              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58310                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58311              fi
58312              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58313              if test "x$BUNDLE_FREETYPE" = xyes; then
58314                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58315$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58316                FOUND_FREETYPE=no
58317              else
58318                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58319$as_echo_n "checking for freetype... " >&6; }
58320                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58321$as_echo "yes (using pkg-config)" >&6; }
58322              fi
58323            fi
58324          fi
58325        fi
58326      fi
58327
58328      if test "x$FOUND_FREETYPE" != xyes; then
58329        # Check in well-known locations
58330        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58331          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58332
58333  windows_path="$FREETYPE_BASE_DIR"
58334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58335    unix_path=`$CYGPATH -u "$windows_path"`
58336    FREETYPE_BASE_DIR="$unix_path"
58337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58339    FREETYPE_BASE_DIR="$unix_path"
58340  fi
58341
58342
58343  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58344  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58345  METHOD="well-known location"
58346
58347  # Let's start with an optimistic view of the world :-)
58348  FOUND_FREETYPE=yes
58349
58350  # First look for the canonical freetype main include file ft2build.h.
58351  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58352    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58353    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58354    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58355      # Fail.
58356      FOUND_FREETYPE=no
58357    fi
58358  fi
58359
58360  if test "x$FOUND_FREETYPE" = xyes; then
58361    # Include file found, let's continue the sanity check.
58362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58363$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58364
58365    # Reset to default value
58366    FREETYPE_BASE_NAME=freetype
58367    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58368    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58369      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58370          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58371        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58372        # for the .6 version explicitly.
58373        FREETYPE_BASE_NAME=freetype.6
58374        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58375        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58376$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58377      else
58378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58380        FOUND_FREETYPE=no
58381      fi
58382    else
58383      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58384        # On Windows, we will need both .lib and .dll file.
58385        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58386          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58387$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58388          FOUND_FREETYPE=no
58389        fi
58390      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58391          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58392        # Found lib in isa dir, use that instead.
58393        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58394        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58395$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58396      fi
58397    fi
58398  fi
58399
58400  if test "x$FOUND_FREETYPE" = xyes; then
58401
58402  # Only process if variable expands to non-empty
58403
58404  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58406
58407  # Input might be given as Windows format, start by converting to
58408  # unix format.
58409  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58410  new_path=`$CYGPATH -u "$path"`
58411
58412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58415  # "foo.exe" is OK but "foo" is an error.
58416  #
58417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58418  # It is also a way to make sure we got the proper file name for the real test later on.
58419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58420  if test "x$test_shortpath" = x; then
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58423    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58424  fi
58425
58426  # Call helper function which possibly converts this using DOS-style short mode.
58427  # If so, the updated path is stored in $new_path.
58428
58429  input_path="$new_path"
58430  # Check if we need to convert this using DOS-style short mode. If the path
58431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58432  # take no chances and rewrite it.
58433  # Note: m4 eats our [], so we need to use [ and ] instead.
58434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58435  if test "x$has_forbidden_chars" != x; then
58436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58440      # Going to short mode and back again did indeed matter. Since short mode is
58441      # case insensitive, let's make it lowercase to improve readability.
58442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58443      # Now convert it back to Unix-style (cygpath)
58444      input_path=`$CYGPATH -u "$shortmode_path"`
58445      new_path="$input_path"
58446    fi
58447  fi
58448
58449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58450  if test "x$test_cygdrive_prefix" = x; then
58451    # As a simple fix, exclude /usr/bin since it's not a real path.
58452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58454      # a path prefixed by /cygdrive for fixpath to work.
58455      new_path="$CYGWIN_ROOT_PATH$input_path"
58456    fi
58457  fi
58458
58459
58460  if test "x$path" != "x$new_path"; then
58461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58464  fi
58465
58466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58467
58468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58469  has_colon=`$ECHO $path | $GREP ^.:`
58470  new_path="$path"
58471  if test "x$has_colon" = x; then
58472    # Not in mixed or Windows style, start by that.
58473    new_path=`cmd //c echo $path`
58474  fi
58475
58476
58477  input_path="$new_path"
58478  # Check if we need to convert this using DOS-style short mode. If the path
58479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58480  # take no chances and rewrite it.
58481  # Note: m4 eats our [], so we need to use [ and ] instead.
58482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58483  if test "x$has_forbidden_chars" != x; then
58484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58486  fi
58487
58488
58489  windows_path="$new_path"
58490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58491    unix_path=`$CYGPATH -u "$windows_path"`
58492    new_path="$unix_path"
58493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58495    new_path="$unix_path"
58496  fi
58497
58498  if test "x$path" != "x$new_path"; then
58499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58502  fi
58503
58504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58506
58507    else
58508      # We're on a unix platform. Hooray! :)
58509      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58510      has_space=`$ECHO "$path" | $GREP " "`
58511      if test "x$has_space" != x; then
58512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58514        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58515      fi
58516
58517      # Use eval to expand a potential ~
58518      eval path="$path"
58519      if test ! -f "$path" && test ! -d "$path"; then
58520        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58521      fi
58522
58523      if test -d "$path"; then
58524        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58525      else
58526        dir="`$DIRNAME "$path"`"
58527        base="`$BASENAME "$path"`"
58528        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58529      fi
58530    fi
58531  fi
58532
58533
58534  # Only process if variable expands to non-empty
58535
58536  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58538
58539  # Input might be given as Windows format, start by converting to
58540  # unix format.
58541  path="$POTENTIAL_FREETYPE_LIB_PATH"
58542  new_path=`$CYGPATH -u "$path"`
58543
58544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58547  # "foo.exe" is OK but "foo" is an error.
58548  #
58549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58550  # It is also a way to make sure we got the proper file name for the real test later on.
58551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58552  if test "x$test_shortpath" = x; then
58553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58556  fi
58557
58558  # Call helper function which possibly converts this using DOS-style short mode.
58559  # If so, the updated path is stored in $new_path.
58560
58561  input_path="$new_path"
58562  # Check if we need to convert this using DOS-style short mode. If the path
58563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58564  # take no chances and rewrite it.
58565  # Note: m4 eats our [], so we need to use [ and ] instead.
58566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58567  if test "x$has_forbidden_chars" != x; then
58568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58572      # Going to short mode and back again did indeed matter. Since short mode is
58573      # case insensitive, let's make it lowercase to improve readability.
58574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58575      # Now convert it back to Unix-style (cygpath)
58576      input_path=`$CYGPATH -u "$shortmode_path"`
58577      new_path="$input_path"
58578    fi
58579  fi
58580
58581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58582  if test "x$test_cygdrive_prefix" = x; then
58583    # As a simple fix, exclude /usr/bin since it's not a real path.
58584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58586      # a path prefixed by /cygdrive for fixpath to work.
58587      new_path="$CYGWIN_ROOT_PATH$input_path"
58588    fi
58589  fi
58590
58591
58592  if test "x$path" != "x$new_path"; then
58593    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58596  fi
58597
58598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58599
58600  path="$POTENTIAL_FREETYPE_LIB_PATH"
58601  has_colon=`$ECHO $path | $GREP ^.:`
58602  new_path="$path"
58603  if test "x$has_colon" = x; then
58604    # Not in mixed or Windows style, start by that.
58605    new_path=`cmd //c echo $path`
58606  fi
58607
58608
58609  input_path="$new_path"
58610  # Check if we need to convert this using DOS-style short mode. If the path
58611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58612  # take no chances and rewrite it.
58613  # Note: m4 eats our [], so we need to use [ and ] instead.
58614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58615  if test "x$has_forbidden_chars" != x; then
58616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58618  fi
58619
58620
58621  windows_path="$new_path"
58622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58623    unix_path=`$CYGPATH -u "$windows_path"`
58624    new_path="$unix_path"
58625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58627    new_path="$unix_path"
58628  fi
58629
58630  if test "x$path" != "x$new_path"; then
58631    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58634  fi
58635
58636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58638
58639    else
58640      # We're on a unix platform. Hooray! :)
58641      path="$POTENTIAL_FREETYPE_LIB_PATH"
58642      has_space=`$ECHO "$path" | $GREP " "`
58643      if test "x$has_space" != x; then
58644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58647      fi
58648
58649      # Use eval to expand a potential ~
58650      eval path="$path"
58651      if test ! -f "$path" && test ! -d "$path"; then
58652        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58653      fi
58654
58655      if test -d "$path"; then
58656        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58657      else
58658        dir="`$DIRNAME "$path"`"
58659        base="`$BASENAME "$path"`"
58660        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58661      fi
58662    fi
58663  fi
58664
58665
58666    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58668$as_echo_n "checking for freetype includes... " >&6; }
58669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58670$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58671    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58673$as_echo_n "checking for freetype libraries... " >&6; }
58674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58675$as_echo "$FREETYPE_LIB_PATH" >&6; }
58676  fi
58677
58678          if test "x$FOUND_FREETYPE" != xyes; then
58679            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58680
58681  windows_path="$FREETYPE_BASE_DIR"
58682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58683    unix_path=`$CYGPATH -u "$windows_path"`
58684    FREETYPE_BASE_DIR="$unix_path"
58685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58687    FREETYPE_BASE_DIR="$unix_path"
58688  fi
58689
58690
58691  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58692  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58693  METHOD="well-known location"
58694
58695  # Let's start with an optimistic view of the world :-)
58696  FOUND_FREETYPE=yes
58697
58698  # First look for the canonical freetype main include file ft2build.h.
58699  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58700    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58701    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58702    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58703      # Fail.
58704      FOUND_FREETYPE=no
58705    fi
58706  fi
58707
58708  if test "x$FOUND_FREETYPE" = xyes; then
58709    # Include file found, let's continue the sanity check.
58710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58711$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58712
58713    # Reset to default value
58714    FREETYPE_BASE_NAME=freetype
58715    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58716    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58717      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58718          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58719        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58720        # for the .6 version explicitly.
58721        FREETYPE_BASE_NAME=freetype.6
58722        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58723        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58724$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58725      else
58726        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58727$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58728        FOUND_FREETYPE=no
58729      fi
58730    else
58731      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58732        # On Windows, we will need both .lib and .dll file.
58733        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58734          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58735$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58736          FOUND_FREETYPE=no
58737        fi
58738      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58739          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58740        # Found lib in isa dir, use that instead.
58741        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58742        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58743$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58744      fi
58745    fi
58746  fi
58747
58748  if test "x$FOUND_FREETYPE" = xyes; then
58749
58750  # Only process if variable expands to non-empty
58751
58752  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58754
58755  # Input might be given as Windows format, start by converting to
58756  # unix format.
58757  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58758  new_path=`$CYGPATH -u "$path"`
58759
58760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58763  # "foo.exe" is OK but "foo" is an error.
58764  #
58765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58766  # It is also a way to make sure we got the proper file name for the real test later on.
58767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58768  if test "x$test_shortpath" = x; then
58769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58771    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58772  fi
58773
58774  # Call helper function which possibly converts this using DOS-style short mode.
58775  # If so, the updated path is stored in $new_path.
58776
58777  input_path="$new_path"
58778  # Check if we need to convert this using DOS-style short mode. If the path
58779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58780  # take no chances and rewrite it.
58781  # Note: m4 eats our [], so we need to use [ and ] instead.
58782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58783  if test "x$has_forbidden_chars" != x; then
58784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58788      # Going to short mode and back again did indeed matter. Since short mode is
58789      # case insensitive, let's make it lowercase to improve readability.
58790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58791      # Now convert it back to Unix-style (cygpath)
58792      input_path=`$CYGPATH -u "$shortmode_path"`
58793      new_path="$input_path"
58794    fi
58795  fi
58796
58797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58798  if test "x$test_cygdrive_prefix" = x; then
58799    # As a simple fix, exclude /usr/bin since it's not a real path.
58800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58802      # a path prefixed by /cygdrive for fixpath to work.
58803      new_path="$CYGWIN_ROOT_PATH$input_path"
58804    fi
58805  fi
58806
58807
58808  if test "x$path" != "x$new_path"; then
58809    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58811$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58812  fi
58813
58814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58815
58816  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58817  has_colon=`$ECHO $path | $GREP ^.:`
58818  new_path="$path"
58819  if test "x$has_colon" = x; then
58820    # Not in mixed or Windows style, start by that.
58821    new_path=`cmd //c echo $path`
58822  fi
58823
58824
58825  input_path="$new_path"
58826  # Check if we need to convert this using DOS-style short mode. If the path
58827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58828  # take no chances and rewrite it.
58829  # Note: m4 eats our [], so we need to use [ and ] instead.
58830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58831  if test "x$has_forbidden_chars" != x; then
58832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58834  fi
58835
58836
58837  windows_path="$new_path"
58838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58839    unix_path=`$CYGPATH -u "$windows_path"`
58840    new_path="$unix_path"
58841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58843    new_path="$unix_path"
58844  fi
58845
58846  if test "x$path" != "x$new_path"; then
58847    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58850  fi
58851
58852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58854
58855    else
58856      # We're on a unix platform. Hooray! :)
58857      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58858      has_space=`$ECHO "$path" | $GREP " "`
58859      if test "x$has_space" != x; then
58860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58863      fi
58864
58865      # Use eval to expand a potential ~
58866      eval path="$path"
58867      if test ! -f "$path" && test ! -d "$path"; then
58868        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58869      fi
58870
58871      if test -d "$path"; then
58872        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58873      else
58874        dir="`$DIRNAME "$path"`"
58875        base="`$BASENAME "$path"`"
58876        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58877      fi
58878    fi
58879  fi
58880
58881
58882  # Only process if variable expands to non-empty
58883
58884  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58886
58887  # Input might be given as Windows format, start by converting to
58888  # unix format.
58889  path="$POTENTIAL_FREETYPE_LIB_PATH"
58890  new_path=`$CYGPATH -u "$path"`
58891
58892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58895  # "foo.exe" is OK but "foo" is an error.
58896  #
58897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58898  # It is also a way to make sure we got the proper file name for the real test later on.
58899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58900  if test "x$test_shortpath" = x; then
58901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58903    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58904  fi
58905
58906  # Call helper function which possibly converts this using DOS-style short mode.
58907  # If so, the updated path is stored in $new_path.
58908
58909  input_path="$new_path"
58910  # Check if we need to convert this using DOS-style short mode. If the path
58911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58912  # take no chances and rewrite it.
58913  # Note: m4 eats our [], so we need to use [ and ] instead.
58914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58915  if test "x$has_forbidden_chars" != x; then
58916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58920      # Going to short mode and back again did indeed matter. Since short mode is
58921      # case insensitive, let's make it lowercase to improve readability.
58922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58923      # Now convert it back to Unix-style (cygpath)
58924      input_path=`$CYGPATH -u "$shortmode_path"`
58925      new_path="$input_path"
58926    fi
58927  fi
58928
58929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58930  if test "x$test_cygdrive_prefix" = x; then
58931    # As a simple fix, exclude /usr/bin since it's not a real path.
58932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58934      # a path prefixed by /cygdrive for fixpath to work.
58935      new_path="$CYGWIN_ROOT_PATH$input_path"
58936    fi
58937  fi
58938
58939
58940  if test "x$path" != "x$new_path"; then
58941    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58944  fi
58945
58946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58947
58948  path="$POTENTIAL_FREETYPE_LIB_PATH"
58949  has_colon=`$ECHO $path | $GREP ^.:`
58950  new_path="$path"
58951  if test "x$has_colon" = x; then
58952    # Not in mixed or Windows style, start by that.
58953    new_path=`cmd //c echo $path`
58954  fi
58955
58956
58957  input_path="$new_path"
58958  # Check if we need to convert this using DOS-style short mode. If the path
58959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58960  # take no chances and rewrite it.
58961  # Note: m4 eats our [], so we need to use [ and ] instead.
58962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58963  if test "x$has_forbidden_chars" != x; then
58964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58966  fi
58967
58968
58969  windows_path="$new_path"
58970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58971    unix_path=`$CYGPATH -u "$windows_path"`
58972    new_path="$unix_path"
58973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58975    new_path="$unix_path"
58976  fi
58977
58978  if test "x$path" != "x$new_path"; then
58979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58982  fi
58983
58984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58986
58987    else
58988      # We're on a unix platform. Hooray! :)
58989      path="$POTENTIAL_FREETYPE_LIB_PATH"
58990      has_space=`$ECHO "$path" | $GREP " "`
58991      if test "x$has_space" != x; then
58992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58993$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58995      fi
58996
58997      # Use eval to expand a potential ~
58998      eval path="$path"
58999      if test ! -f "$path" && test ! -d "$path"; then
59000        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59001      fi
59002
59003      if test -d "$path"; then
59004        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59005      else
59006        dir="`$DIRNAME "$path"`"
59007        base="`$BASENAME "$path"`"
59008        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59009      fi
59010    fi
59011  fi
59012
59013
59014    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59016$as_echo_n "checking for freetype includes... " >&6; }
59017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59018$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59019    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59021$as_echo_n "checking for freetype libraries... " >&6; }
59022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59023$as_echo "$FREETYPE_LIB_PATH" >&6; }
59024  fi
59025
59026          fi
59027          if test "x$FOUND_FREETYPE" != xyes; then
59028            FREETYPE_BASE_DIR="$HOME/freetype"
59029
59030  windows_path="$FREETYPE_BASE_DIR"
59031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59032    unix_path=`$CYGPATH -u "$windows_path"`
59033    FREETYPE_BASE_DIR="$unix_path"
59034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59036    FREETYPE_BASE_DIR="$unix_path"
59037  fi
59038
59039            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59040
59041  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59042  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59043  METHOD="well-known location"
59044
59045  # Let's start with an optimistic view of the world :-)
59046  FOUND_FREETYPE=yes
59047
59048  # First look for the canonical freetype main include file ft2build.h.
59049  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59050    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59051    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59052    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59053      # Fail.
59054      FOUND_FREETYPE=no
59055    fi
59056  fi
59057
59058  if test "x$FOUND_FREETYPE" = xyes; then
59059    # Include file found, let's continue the sanity check.
59060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59061$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59062
59063    # Reset to default value
59064    FREETYPE_BASE_NAME=freetype
59065    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59066    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59067      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59068          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59069        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59070        # for the .6 version explicitly.
59071        FREETYPE_BASE_NAME=freetype.6
59072        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59074$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59075      else
59076        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59078        FOUND_FREETYPE=no
59079      fi
59080    else
59081      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59082        # On Windows, we will need both .lib and .dll file.
59083        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59084          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59085$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59086          FOUND_FREETYPE=no
59087        fi
59088      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59089          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59090        # Found lib in isa dir, use that instead.
59091        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59092        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59093$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59094      fi
59095    fi
59096  fi
59097
59098  if test "x$FOUND_FREETYPE" = xyes; then
59099
59100  # Only process if variable expands to non-empty
59101
59102  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59104
59105  # Input might be given as Windows format, start by converting to
59106  # unix format.
59107  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59108  new_path=`$CYGPATH -u "$path"`
59109
59110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59113  # "foo.exe" is OK but "foo" is an error.
59114  #
59115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59116  # It is also a way to make sure we got the proper file name for the real test later on.
59117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59118  if test "x$test_shortpath" = x; then
59119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59121    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59122  fi
59123
59124  # Call helper function which possibly converts this using DOS-style short mode.
59125  # If so, the updated path is stored in $new_path.
59126
59127  input_path="$new_path"
59128  # Check if we need to convert this using DOS-style short mode. If the path
59129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59130  # take no chances and rewrite it.
59131  # Note: m4 eats our [], so we need to use [ and ] instead.
59132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59133  if test "x$has_forbidden_chars" != x; then
59134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59138      # Going to short mode and back again did indeed matter. Since short mode is
59139      # case insensitive, let's make it lowercase to improve readability.
59140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59141      # Now convert it back to Unix-style (cygpath)
59142      input_path=`$CYGPATH -u "$shortmode_path"`
59143      new_path="$input_path"
59144    fi
59145  fi
59146
59147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59148  if test "x$test_cygdrive_prefix" = x; then
59149    # As a simple fix, exclude /usr/bin since it's not a real path.
59150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59152      # a path prefixed by /cygdrive for fixpath to work.
59153      new_path="$CYGWIN_ROOT_PATH$input_path"
59154    fi
59155  fi
59156
59157
59158  if test "x$path" != "x$new_path"; then
59159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59162  fi
59163
59164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59165
59166  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59167  has_colon=`$ECHO $path | $GREP ^.:`
59168  new_path="$path"
59169  if test "x$has_colon" = x; then
59170    # Not in mixed or Windows style, start by that.
59171    new_path=`cmd //c echo $path`
59172  fi
59173
59174
59175  input_path="$new_path"
59176  # Check if we need to convert this using DOS-style short mode. If the path
59177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59178  # take no chances and rewrite it.
59179  # Note: m4 eats our [], so we need to use [ and ] instead.
59180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59181  if test "x$has_forbidden_chars" != x; then
59182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59184  fi
59185
59186
59187  windows_path="$new_path"
59188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59189    unix_path=`$CYGPATH -u "$windows_path"`
59190    new_path="$unix_path"
59191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59193    new_path="$unix_path"
59194  fi
59195
59196  if test "x$path" != "x$new_path"; then
59197    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59200  fi
59201
59202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59204
59205    else
59206      # We're on a unix platform. Hooray! :)
59207      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59208      has_space=`$ECHO "$path" | $GREP " "`
59209      if test "x$has_space" != x; then
59210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59211$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59213      fi
59214
59215      # Use eval to expand a potential ~
59216      eval path="$path"
59217      if test ! -f "$path" && test ! -d "$path"; then
59218        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59219      fi
59220
59221      if test -d "$path"; then
59222        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59223      else
59224        dir="`$DIRNAME "$path"`"
59225        base="`$BASENAME "$path"`"
59226        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59227      fi
59228    fi
59229  fi
59230
59231
59232  # Only process if variable expands to non-empty
59233
59234  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59236
59237  # Input might be given as Windows format, start by converting to
59238  # unix format.
59239  path="$POTENTIAL_FREETYPE_LIB_PATH"
59240  new_path=`$CYGPATH -u "$path"`
59241
59242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59245  # "foo.exe" is OK but "foo" is an error.
59246  #
59247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59248  # It is also a way to make sure we got the proper file name for the real test later on.
59249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59250  if test "x$test_shortpath" = x; then
59251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59253    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59254  fi
59255
59256  # Call helper function which possibly converts this using DOS-style short mode.
59257  # If so, the updated path is stored in $new_path.
59258
59259  input_path="$new_path"
59260  # Check if we need to convert this using DOS-style short mode. If the path
59261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59262  # take no chances and rewrite it.
59263  # Note: m4 eats our [], so we need to use [ and ] instead.
59264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59265  if test "x$has_forbidden_chars" != x; then
59266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59270      # Going to short mode and back again did indeed matter. Since short mode is
59271      # case insensitive, let's make it lowercase to improve readability.
59272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59273      # Now convert it back to Unix-style (cygpath)
59274      input_path=`$CYGPATH -u "$shortmode_path"`
59275      new_path="$input_path"
59276    fi
59277  fi
59278
59279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59280  if test "x$test_cygdrive_prefix" = x; then
59281    # As a simple fix, exclude /usr/bin since it's not a real path.
59282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59284      # a path prefixed by /cygdrive for fixpath to work.
59285      new_path="$CYGWIN_ROOT_PATH$input_path"
59286    fi
59287  fi
59288
59289
59290  if test "x$path" != "x$new_path"; then
59291    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59294  fi
59295
59296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59297
59298  path="$POTENTIAL_FREETYPE_LIB_PATH"
59299  has_colon=`$ECHO $path | $GREP ^.:`
59300  new_path="$path"
59301  if test "x$has_colon" = x; then
59302    # Not in mixed or Windows style, start by that.
59303    new_path=`cmd //c echo $path`
59304  fi
59305
59306
59307  input_path="$new_path"
59308  # Check if we need to convert this using DOS-style short mode. If the path
59309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59310  # take no chances and rewrite it.
59311  # Note: m4 eats our [], so we need to use [ and ] instead.
59312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59313  if test "x$has_forbidden_chars" != x; then
59314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59316  fi
59317
59318
59319  windows_path="$new_path"
59320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59321    unix_path=`$CYGPATH -u "$windows_path"`
59322    new_path="$unix_path"
59323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59325    new_path="$unix_path"
59326  fi
59327
59328  if test "x$path" != "x$new_path"; then
59329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59332  fi
59333
59334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59336
59337    else
59338      # We're on a unix platform. Hooray! :)
59339      path="$POTENTIAL_FREETYPE_LIB_PATH"
59340      has_space=`$ECHO "$path" | $GREP " "`
59341      if test "x$has_space" != x; then
59342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59345      fi
59346
59347      # Use eval to expand a potential ~
59348      eval path="$path"
59349      if test ! -f "$path" && test ! -d "$path"; then
59350        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59351      fi
59352
59353      if test -d "$path"; then
59354        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59355      else
59356        dir="`$DIRNAME "$path"`"
59357        base="`$BASENAME "$path"`"
59358        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59359      fi
59360    fi
59361  fi
59362
59363
59364    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59366$as_echo_n "checking for freetype includes... " >&6; }
59367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59368$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59369    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59371$as_echo_n "checking for freetype libraries... " >&6; }
59372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59373$as_echo "$FREETYPE_LIB_PATH" >&6; }
59374  fi
59375
59376            else
59377
59378  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59379  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59380  METHOD="well-known location"
59381
59382  # Let's start with an optimistic view of the world :-)
59383  FOUND_FREETYPE=yes
59384
59385  # First look for the canonical freetype main include file ft2build.h.
59386  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59387    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59388    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59389    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59390      # Fail.
59391      FOUND_FREETYPE=no
59392    fi
59393  fi
59394
59395  if test "x$FOUND_FREETYPE" = xyes; then
59396    # Include file found, let's continue the sanity check.
59397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59398$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59399
59400    # Reset to default value
59401    FREETYPE_BASE_NAME=freetype
59402    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59403    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59404      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59405          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59406        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59407        # for the .6 version explicitly.
59408        FREETYPE_BASE_NAME=freetype.6
59409        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59410        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59411$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59412      else
59413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59414$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59415        FOUND_FREETYPE=no
59416      fi
59417    else
59418      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59419        # On Windows, we will need both .lib and .dll file.
59420        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59421          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59422$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59423          FOUND_FREETYPE=no
59424        fi
59425      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59426          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59427        # Found lib in isa dir, use that instead.
59428        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59429        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59430$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59431      fi
59432    fi
59433  fi
59434
59435  if test "x$FOUND_FREETYPE" = xyes; then
59436
59437  # Only process if variable expands to non-empty
59438
59439  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59441
59442  # Input might be given as Windows format, start by converting to
59443  # unix format.
59444  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59445  new_path=`$CYGPATH -u "$path"`
59446
59447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59450  # "foo.exe" is OK but "foo" is an error.
59451  #
59452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59453  # It is also a way to make sure we got the proper file name for the real test later on.
59454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59455  if test "x$test_shortpath" = x; then
59456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59458    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59459  fi
59460
59461  # Call helper function which possibly converts this using DOS-style short mode.
59462  # If so, the updated path is stored in $new_path.
59463
59464  input_path="$new_path"
59465  # Check if we need to convert this using DOS-style short mode. If the path
59466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59467  # take no chances and rewrite it.
59468  # Note: m4 eats our [], so we need to use [ and ] instead.
59469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59470  if test "x$has_forbidden_chars" != x; then
59471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59475      # Going to short mode and back again did indeed matter. Since short mode is
59476      # case insensitive, let's make it lowercase to improve readability.
59477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59478      # Now convert it back to Unix-style (cygpath)
59479      input_path=`$CYGPATH -u "$shortmode_path"`
59480      new_path="$input_path"
59481    fi
59482  fi
59483
59484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59485  if test "x$test_cygdrive_prefix" = x; then
59486    # As a simple fix, exclude /usr/bin since it's not a real path.
59487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59489      # a path prefixed by /cygdrive for fixpath to work.
59490      new_path="$CYGWIN_ROOT_PATH$input_path"
59491    fi
59492  fi
59493
59494
59495  if test "x$path" != "x$new_path"; then
59496    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59499  fi
59500
59501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59502
59503  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59504  has_colon=`$ECHO $path | $GREP ^.:`
59505  new_path="$path"
59506  if test "x$has_colon" = x; then
59507    # Not in mixed or Windows style, start by that.
59508    new_path=`cmd //c echo $path`
59509  fi
59510
59511
59512  input_path="$new_path"
59513  # Check if we need to convert this using DOS-style short mode. If the path
59514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59515  # take no chances and rewrite it.
59516  # Note: m4 eats our [], so we need to use [ and ] instead.
59517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59518  if test "x$has_forbidden_chars" != x; then
59519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59521  fi
59522
59523
59524  windows_path="$new_path"
59525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59526    unix_path=`$CYGPATH -u "$windows_path"`
59527    new_path="$unix_path"
59528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59530    new_path="$unix_path"
59531  fi
59532
59533  if test "x$path" != "x$new_path"; then
59534    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59537  fi
59538
59539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59541
59542    else
59543      # We're on a unix platform. Hooray! :)
59544      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59545      has_space=`$ECHO "$path" | $GREP " "`
59546      if test "x$has_space" != x; then
59547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59548$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59550      fi
59551
59552      # Use eval to expand a potential ~
59553      eval path="$path"
59554      if test ! -f "$path" && test ! -d "$path"; then
59555        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59556      fi
59557
59558      if test -d "$path"; then
59559        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59560      else
59561        dir="`$DIRNAME "$path"`"
59562        base="`$BASENAME "$path"`"
59563        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59564      fi
59565    fi
59566  fi
59567
59568
59569  # Only process if variable expands to non-empty
59570
59571  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59573
59574  # Input might be given as Windows format, start by converting to
59575  # unix format.
59576  path="$POTENTIAL_FREETYPE_LIB_PATH"
59577  new_path=`$CYGPATH -u "$path"`
59578
59579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59582  # "foo.exe" is OK but "foo" is an error.
59583  #
59584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59585  # It is also a way to make sure we got the proper file name for the real test later on.
59586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59587  if test "x$test_shortpath" = x; then
59588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59590    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59591  fi
59592
59593  # Call helper function which possibly converts this using DOS-style short mode.
59594  # If so, the updated path is stored in $new_path.
59595
59596  input_path="$new_path"
59597  # Check if we need to convert this using DOS-style short mode. If the path
59598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59599  # take no chances and rewrite it.
59600  # Note: m4 eats our [], so we need to use [ and ] instead.
59601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59602  if test "x$has_forbidden_chars" != x; then
59603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59607      # Going to short mode and back again did indeed matter. Since short mode is
59608      # case insensitive, let's make it lowercase to improve readability.
59609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59610      # Now convert it back to Unix-style (cygpath)
59611      input_path=`$CYGPATH -u "$shortmode_path"`
59612      new_path="$input_path"
59613    fi
59614  fi
59615
59616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59617  if test "x$test_cygdrive_prefix" = x; then
59618    # As a simple fix, exclude /usr/bin since it's not a real path.
59619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59621      # a path prefixed by /cygdrive for fixpath to work.
59622      new_path="$CYGWIN_ROOT_PATH$input_path"
59623    fi
59624  fi
59625
59626
59627  if test "x$path" != "x$new_path"; then
59628    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59631  fi
59632
59633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59634
59635  path="$POTENTIAL_FREETYPE_LIB_PATH"
59636  has_colon=`$ECHO $path | $GREP ^.:`
59637  new_path="$path"
59638  if test "x$has_colon" = x; then
59639    # Not in mixed or Windows style, start by that.
59640    new_path=`cmd //c echo $path`
59641  fi
59642
59643
59644  input_path="$new_path"
59645  # Check if we need to convert this using DOS-style short mode. If the path
59646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59647  # take no chances and rewrite it.
59648  # Note: m4 eats our [], so we need to use [ and ] instead.
59649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59650  if test "x$has_forbidden_chars" != x; then
59651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59653  fi
59654
59655
59656  windows_path="$new_path"
59657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59658    unix_path=`$CYGPATH -u "$windows_path"`
59659    new_path="$unix_path"
59660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59662    new_path="$unix_path"
59663  fi
59664
59665  if test "x$path" != "x$new_path"; then
59666    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59669  fi
59670
59671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59673
59674    else
59675      # We're on a unix platform. Hooray! :)
59676      path="$POTENTIAL_FREETYPE_LIB_PATH"
59677      has_space=`$ECHO "$path" | $GREP " "`
59678      if test "x$has_space" != x; then
59679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59682      fi
59683
59684      # Use eval to expand a potential ~
59685      eval path="$path"
59686      if test ! -f "$path" && test ! -d "$path"; then
59687        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59688      fi
59689
59690      if test -d "$path"; then
59691        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59692      else
59693        dir="`$DIRNAME "$path"`"
59694        base="`$BASENAME "$path"`"
59695        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59696      fi
59697    fi
59698  fi
59699
59700
59701    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59703$as_echo_n "checking for freetype includes... " >&6; }
59704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59705$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59706    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59708$as_echo_n "checking for freetype libraries... " >&6; }
59709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59710$as_echo "$FREETYPE_LIB_PATH" >&6; }
59711  fi
59712
59713            fi
59714            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59715                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59716              # Source is available, as a last resort try to build freetype in default location
59717
59718  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59719  BUILD_FREETYPE=yes
59720
59721  # Check if the freetype sources are acessible..
59722  if ! test -d $FREETYPE_SRC_PATH; then
59723    { $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
59724$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59725    BUILD_FREETYPE=no
59726  fi
59727  # ..and contain a vc2010 project file
59728  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59729  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59730    { $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
59731$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59732    BUILD_FREETYPE=no
59733  fi
59734  # Now check if configure found a version of 'msbuild.exe'
59735  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59736    { $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
59737$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;}
59738    BUILD_FREETYPE=no
59739  fi
59740
59741  # Ready to go..
59742  if test "x$BUILD_FREETYPE" = xyes; then
59743    # msbuild requires trailing slashes for output directories
59744    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59745    freetype_lib_path_unix="$freetype_lib_path"
59746    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59747
59748  unix_path="$vcxproj_path"
59749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59750    windows_path=`$CYGPATH -m "$unix_path"`
59751    vcxproj_path="$windows_path"
59752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59753    windows_path=`cmd //c echo $unix_path`
59754    vcxproj_path="$windows_path"
59755  fi
59756
59757
59758  unix_path="$freetype_lib_path"
59759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59760    windows_path=`$CYGPATH -m "$unix_path"`
59761    freetype_lib_path="$windows_path"
59762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59763    windows_path=`cmd //c echo $unix_path`
59764    freetype_lib_path="$windows_path"
59765  fi
59766
59767
59768  unix_path="$freetype_obj_path"
59769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59770    windows_path=`$CYGPATH -m "$unix_path"`
59771    freetype_obj_path="$windows_path"
59772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59773    windows_path=`cmd //c echo $unix_path`
59774    freetype_obj_path="$windows_path"
59775  fi
59776
59777    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59778      freetype_platform=x64
59779    else
59780      freetype_platform=win32
59781    fi
59782
59783    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59784    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59785    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59786    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59787    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59788$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59789
59790    # First we try to build the freetype.dll
59791    $ECHO -e "@echo off\n"\
59792        "$MSBUILD $vcxproj_path "\
59793        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59794        "/p:Configuration=\"Release Multithreaded\" "\
59795        "/p:Platform=$freetype_platform "\
59796        "/p:ConfigurationType=DynamicLibrary "\
59797        "/p:TargetName=freetype "\
59798        "/p:OutDir=\"$freetype_lib_path\" "\
59799        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59800    cmd /c freetype.bat
59801
59802    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59803      # If that succeeds we also build freetype.lib
59804      $ECHO -e "@echo off\n"\
59805          "$MSBUILD $vcxproj_path "\
59806          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59807          "/p:Configuration=\"Release Multithreaded\" "\
59808          "/p:Platform=$freetype_platform "\
59809          "/p:ConfigurationType=StaticLibrary "\
59810          "/p:TargetName=freetype "\
59811          "/p:OutDir=\"$freetype_lib_path\" "\
59812          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59813      cmd /c freetype.bat
59814
59815      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59816        # Once we build both, lib and dll, set freetype lib and include path appropriately
59817        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59818        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59819        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59820$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59821      else
59822        BUILD_FREETYPE=no
59823      fi
59824    else
59825      BUILD_FREETYPE=no
59826    fi
59827  fi
59828
59829              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59830
59831  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59832  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59833  METHOD="well-known location"
59834
59835  # Let's start with an optimistic view of the world :-)
59836  FOUND_FREETYPE=yes
59837
59838  # First look for the canonical freetype main include file ft2build.h.
59839  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59840    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59841    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59842    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59843      # Fail.
59844      FOUND_FREETYPE=no
59845    fi
59846  fi
59847
59848  if test "x$FOUND_FREETYPE" = xyes; then
59849    # Include file found, let's continue the sanity check.
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59851$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59852
59853    # Reset to default value
59854    FREETYPE_BASE_NAME=freetype
59855    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59856    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59857      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59858          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59859        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59860        # for the .6 version explicitly.
59861        FREETYPE_BASE_NAME=freetype.6
59862        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59864$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59865      else
59866        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59867$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59868        FOUND_FREETYPE=no
59869      fi
59870    else
59871      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59872        # On Windows, we will need both .lib and .dll file.
59873        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59874          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59875$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59876          FOUND_FREETYPE=no
59877        fi
59878      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59879          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59880        # Found lib in isa dir, use that instead.
59881        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59882        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59883$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59884      fi
59885    fi
59886  fi
59887
59888  if test "x$FOUND_FREETYPE" = xyes; then
59889
59890  # Only process if variable expands to non-empty
59891
59892  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59894
59895  # Input might be given as Windows format, start by converting to
59896  # unix format.
59897  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59898  new_path=`$CYGPATH -u "$path"`
59899
59900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59903  # "foo.exe" is OK but "foo" is an error.
59904  #
59905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59906  # It is also a way to make sure we got the proper file name for the real test later on.
59907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59908  if test "x$test_shortpath" = x; then
59909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59910$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59911    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59912  fi
59913
59914  # Call helper function which possibly converts this using DOS-style short mode.
59915  # If so, the updated path is stored in $new_path.
59916
59917  input_path="$new_path"
59918  # Check if we need to convert this using DOS-style short mode. If the path
59919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59920  # take no chances and rewrite it.
59921  # Note: m4 eats our [], so we need to use [ and ] instead.
59922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59923  if test "x$has_forbidden_chars" != x; then
59924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59928      # Going to short mode and back again did indeed matter. Since short mode is
59929      # case insensitive, let's make it lowercase to improve readability.
59930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59931      # Now convert it back to Unix-style (cygpath)
59932      input_path=`$CYGPATH -u "$shortmode_path"`
59933      new_path="$input_path"
59934    fi
59935  fi
59936
59937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59938  if test "x$test_cygdrive_prefix" = x; then
59939    # As a simple fix, exclude /usr/bin since it's not a real path.
59940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59942      # a path prefixed by /cygdrive for fixpath to work.
59943      new_path="$CYGWIN_ROOT_PATH$input_path"
59944    fi
59945  fi
59946
59947
59948  if test "x$path" != "x$new_path"; then
59949    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59952  fi
59953
59954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59955
59956  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59957  has_colon=`$ECHO $path | $GREP ^.:`
59958  new_path="$path"
59959  if test "x$has_colon" = x; then
59960    # Not in mixed or Windows style, start by that.
59961    new_path=`cmd //c echo $path`
59962  fi
59963
59964
59965  input_path="$new_path"
59966  # Check if we need to convert this using DOS-style short mode. If the path
59967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59968  # take no chances and rewrite it.
59969  # Note: m4 eats our [], so we need to use [ and ] instead.
59970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59971  if test "x$has_forbidden_chars" != x; then
59972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59974  fi
59975
59976
59977  windows_path="$new_path"
59978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59979    unix_path=`$CYGPATH -u "$windows_path"`
59980    new_path="$unix_path"
59981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59983    new_path="$unix_path"
59984  fi
59985
59986  if test "x$path" != "x$new_path"; then
59987    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59989$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59990  fi
59991
59992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59994
59995    else
59996      # We're on a unix platform. Hooray! :)
59997      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59998      has_space=`$ECHO "$path" | $GREP " "`
59999      if test "x$has_space" != x; then
60000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60003      fi
60004
60005      # Use eval to expand a potential ~
60006      eval path="$path"
60007      if test ! -f "$path" && test ! -d "$path"; then
60008        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60009      fi
60010
60011      if test -d "$path"; then
60012        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60013      else
60014        dir="`$DIRNAME "$path"`"
60015        base="`$BASENAME "$path"`"
60016        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60017      fi
60018    fi
60019  fi
60020
60021
60022  # Only process if variable expands to non-empty
60023
60024  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60026
60027  # Input might be given as Windows format, start by converting to
60028  # unix format.
60029  path="$POTENTIAL_FREETYPE_LIB_PATH"
60030  new_path=`$CYGPATH -u "$path"`
60031
60032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60035  # "foo.exe" is OK but "foo" is an error.
60036  #
60037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60038  # It is also a way to make sure we got the proper file name for the real test later on.
60039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60040  if test "x$test_shortpath" = x; then
60041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60044  fi
60045
60046  # Call helper function which possibly converts this using DOS-style short mode.
60047  # If so, the updated path is stored in $new_path.
60048
60049  input_path="$new_path"
60050  # Check if we need to convert this using DOS-style short mode. If the path
60051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60052  # take no chances and rewrite it.
60053  # Note: m4 eats our [], so we need to use [ and ] instead.
60054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60055  if test "x$has_forbidden_chars" != x; then
60056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60060      # Going to short mode and back again did indeed matter. Since short mode is
60061      # case insensitive, let's make it lowercase to improve readability.
60062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60063      # Now convert it back to Unix-style (cygpath)
60064      input_path=`$CYGPATH -u "$shortmode_path"`
60065      new_path="$input_path"
60066    fi
60067  fi
60068
60069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60070  if test "x$test_cygdrive_prefix" = x; then
60071    # As a simple fix, exclude /usr/bin since it's not a real path.
60072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60074      # a path prefixed by /cygdrive for fixpath to work.
60075      new_path="$CYGWIN_ROOT_PATH$input_path"
60076    fi
60077  fi
60078
60079
60080  if test "x$path" != "x$new_path"; then
60081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60084  fi
60085
60086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60087
60088  path="$POTENTIAL_FREETYPE_LIB_PATH"
60089  has_colon=`$ECHO $path | $GREP ^.:`
60090  new_path="$path"
60091  if test "x$has_colon" = x; then
60092    # Not in mixed or Windows style, start by that.
60093    new_path=`cmd //c echo $path`
60094  fi
60095
60096
60097  input_path="$new_path"
60098  # Check if we need to convert this using DOS-style short mode. If the path
60099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60100  # take no chances and rewrite it.
60101  # Note: m4 eats our [], so we need to use [ and ] instead.
60102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60103  if test "x$has_forbidden_chars" != x; then
60104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60106  fi
60107
60108
60109  windows_path="$new_path"
60110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60111    unix_path=`$CYGPATH -u "$windows_path"`
60112    new_path="$unix_path"
60113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60115    new_path="$unix_path"
60116  fi
60117
60118  if test "x$path" != "x$new_path"; then
60119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60122  fi
60123
60124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60126
60127    else
60128      # We're on a unix platform. Hooray! :)
60129      path="$POTENTIAL_FREETYPE_LIB_PATH"
60130      has_space=`$ECHO "$path" | $GREP " "`
60131      if test "x$has_space" != x; then
60132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60135      fi
60136
60137      # Use eval to expand a potential ~
60138      eval path="$path"
60139      if test ! -f "$path" && test ! -d "$path"; then
60140        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60141      fi
60142
60143      if test -d "$path"; then
60144        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60145      else
60146        dir="`$DIRNAME "$path"`"
60147        base="`$BASENAME "$path"`"
60148        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60149      fi
60150    fi
60151  fi
60152
60153
60154    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60156$as_echo_n "checking for freetype includes... " >&6; }
60157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60158$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60159    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60161$as_echo_n "checking for freetype libraries... " >&6; }
60162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60163$as_echo "$FREETYPE_LIB_PATH" >&6; }
60164  fi
60165
60166              else
60167
60168  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60169  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60170  METHOD="well-known location"
60171
60172  # Let's start with an optimistic view of the world :-)
60173  FOUND_FREETYPE=yes
60174
60175  # First look for the canonical freetype main include file ft2build.h.
60176  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60177    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60178    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60179    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60180      # Fail.
60181      FOUND_FREETYPE=no
60182    fi
60183  fi
60184
60185  if test "x$FOUND_FREETYPE" = xyes; then
60186    # Include file found, let's continue the sanity check.
60187    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60188$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60189
60190    # Reset to default value
60191    FREETYPE_BASE_NAME=freetype
60192    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60193    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60194      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60195          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60196        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60197        # for the .6 version explicitly.
60198        FREETYPE_BASE_NAME=freetype.6
60199        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60200        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60201$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60202      else
60203        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60204$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60205        FOUND_FREETYPE=no
60206      fi
60207    else
60208      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60209        # On Windows, we will need both .lib and .dll file.
60210        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60211          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60212$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60213          FOUND_FREETYPE=no
60214        fi
60215      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60216          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60217        # Found lib in isa dir, use that instead.
60218        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60219        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60220$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60221      fi
60222    fi
60223  fi
60224
60225  if test "x$FOUND_FREETYPE" = xyes; then
60226
60227  # Only process if variable expands to non-empty
60228
60229  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60231
60232  # Input might be given as Windows format, start by converting to
60233  # unix format.
60234  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60235  new_path=`$CYGPATH -u "$path"`
60236
60237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60240  # "foo.exe" is OK but "foo" is an error.
60241  #
60242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60243  # It is also a way to make sure we got the proper file name for the real test later on.
60244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60245  if test "x$test_shortpath" = x; then
60246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60248    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60249  fi
60250
60251  # Call helper function which possibly converts this using DOS-style short mode.
60252  # If so, the updated path is stored in $new_path.
60253
60254  input_path="$new_path"
60255  # Check if we need to convert this using DOS-style short mode. If the path
60256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60257  # take no chances and rewrite it.
60258  # Note: m4 eats our [], so we need to use [ and ] instead.
60259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60260  if test "x$has_forbidden_chars" != x; then
60261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60265      # Going to short mode and back again did indeed matter. Since short mode is
60266      # case insensitive, let's make it lowercase to improve readability.
60267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60268      # Now convert it back to Unix-style (cygpath)
60269      input_path=`$CYGPATH -u "$shortmode_path"`
60270      new_path="$input_path"
60271    fi
60272  fi
60273
60274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60275  if test "x$test_cygdrive_prefix" = x; then
60276    # As a simple fix, exclude /usr/bin since it's not a real path.
60277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60279      # a path prefixed by /cygdrive for fixpath to work.
60280      new_path="$CYGWIN_ROOT_PATH$input_path"
60281    fi
60282  fi
60283
60284
60285  if test "x$path" != "x$new_path"; then
60286    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60289  fi
60290
60291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60292
60293  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60294  has_colon=`$ECHO $path | $GREP ^.:`
60295  new_path="$path"
60296  if test "x$has_colon" = x; then
60297    # Not in mixed or Windows style, start by that.
60298    new_path=`cmd //c echo $path`
60299  fi
60300
60301
60302  input_path="$new_path"
60303  # Check if we need to convert this using DOS-style short mode. If the path
60304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60305  # take no chances and rewrite it.
60306  # Note: m4 eats our [], so we need to use [ and ] instead.
60307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60308  if test "x$has_forbidden_chars" != x; then
60309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60311  fi
60312
60313
60314  windows_path="$new_path"
60315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60316    unix_path=`$CYGPATH -u "$windows_path"`
60317    new_path="$unix_path"
60318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60320    new_path="$unix_path"
60321  fi
60322
60323  if test "x$path" != "x$new_path"; then
60324    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60326$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60327  fi
60328
60329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60331
60332    else
60333      # We're on a unix platform. Hooray! :)
60334      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60335      has_space=`$ECHO "$path" | $GREP " "`
60336      if test "x$has_space" != x; then
60337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60340      fi
60341
60342      # Use eval to expand a potential ~
60343      eval path="$path"
60344      if test ! -f "$path" && test ! -d "$path"; then
60345        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60346      fi
60347
60348      if test -d "$path"; then
60349        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60350      else
60351        dir="`$DIRNAME "$path"`"
60352        base="`$BASENAME "$path"`"
60353        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60354      fi
60355    fi
60356  fi
60357
60358
60359  # Only process if variable expands to non-empty
60360
60361  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60363
60364  # Input might be given as Windows format, start by converting to
60365  # unix format.
60366  path="$POTENTIAL_FREETYPE_LIB_PATH"
60367  new_path=`$CYGPATH -u "$path"`
60368
60369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60372  # "foo.exe" is OK but "foo" is an error.
60373  #
60374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60375  # It is also a way to make sure we got the proper file name for the real test later on.
60376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60377  if test "x$test_shortpath" = x; then
60378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60381  fi
60382
60383  # Call helper function which possibly converts this using DOS-style short mode.
60384  # If so, the updated path is stored in $new_path.
60385
60386  input_path="$new_path"
60387  # Check if we need to convert this using DOS-style short mode. If the path
60388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60389  # take no chances and rewrite it.
60390  # Note: m4 eats our [], so we need to use [ and ] instead.
60391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60392  if test "x$has_forbidden_chars" != x; then
60393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60397      # Going to short mode and back again did indeed matter. Since short mode is
60398      # case insensitive, let's make it lowercase to improve readability.
60399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60400      # Now convert it back to Unix-style (cygpath)
60401      input_path=`$CYGPATH -u "$shortmode_path"`
60402      new_path="$input_path"
60403    fi
60404  fi
60405
60406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60407  if test "x$test_cygdrive_prefix" = x; then
60408    # As a simple fix, exclude /usr/bin since it's not a real path.
60409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60411      # a path prefixed by /cygdrive for fixpath to work.
60412      new_path="$CYGWIN_ROOT_PATH$input_path"
60413    fi
60414  fi
60415
60416
60417  if test "x$path" != "x$new_path"; then
60418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60421  fi
60422
60423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60424
60425  path="$POTENTIAL_FREETYPE_LIB_PATH"
60426  has_colon=`$ECHO $path | $GREP ^.:`
60427  new_path="$path"
60428  if test "x$has_colon" = x; then
60429    # Not in mixed or Windows style, start by that.
60430    new_path=`cmd //c echo $path`
60431  fi
60432
60433
60434  input_path="$new_path"
60435  # Check if we need to convert this using DOS-style short mode. If the path
60436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60437  # take no chances and rewrite it.
60438  # Note: m4 eats our [], so we need to use [ and ] instead.
60439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60440  if test "x$has_forbidden_chars" != x; then
60441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60443  fi
60444
60445
60446  windows_path="$new_path"
60447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60448    unix_path=`$CYGPATH -u "$windows_path"`
60449    new_path="$unix_path"
60450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60452    new_path="$unix_path"
60453  fi
60454
60455  if test "x$path" != "x$new_path"; then
60456    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60459  fi
60460
60461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60463
60464    else
60465      # We're on a unix platform. Hooray! :)
60466      path="$POTENTIAL_FREETYPE_LIB_PATH"
60467      has_space=`$ECHO "$path" | $GREP " "`
60468      if test "x$has_space" != x; then
60469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60472      fi
60473
60474      # Use eval to expand a potential ~
60475      eval path="$path"
60476      if test ! -f "$path" && test ! -d "$path"; then
60477        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60478      fi
60479
60480      if test -d "$path"; then
60481        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60482      else
60483        dir="`$DIRNAME "$path"`"
60484        base="`$BASENAME "$path"`"
60485        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60486      fi
60487    fi
60488  fi
60489
60490
60491    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60493$as_echo_n "checking for freetype includes... " >&6; }
60494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60495$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60496    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60498$as_echo_n "checking for freetype libraries... " >&6; }
60499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60500$as_echo "$FREETYPE_LIB_PATH" >&6; }
60501  fi
60502
60503              fi
60504            fi
60505          fi
60506        else
60507          FREETYPE_BASE_DIR="$SYSROOT/usr"
60508
60509  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60510  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60511  METHOD="well-known location"
60512
60513  # Let's start with an optimistic view of the world :-)
60514  FOUND_FREETYPE=yes
60515
60516  # First look for the canonical freetype main include file ft2build.h.
60517  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60518    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60519    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60520    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60521      # Fail.
60522      FOUND_FREETYPE=no
60523    fi
60524  fi
60525
60526  if test "x$FOUND_FREETYPE" = xyes; then
60527    # Include file found, let's continue the sanity check.
60528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60529$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60530
60531    # Reset to default value
60532    FREETYPE_BASE_NAME=freetype
60533    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60534    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60535      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60536          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60537        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60538        # for the .6 version explicitly.
60539        FREETYPE_BASE_NAME=freetype.6
60540        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60541        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60542$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60543      else
60544        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60545$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60546        FOUND_FREETYPE=no
60547      fi
60548    else
60549      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60550        # On Windows, we will need both .lib and .dll file.
60551        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60552          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60553$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60554          FOUND_FREETYPE=no
60555        fi
60556      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60557          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60558        # Found lib in isa dir, use that instead.
60559        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60560        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60561$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60562      fi
60563    fi
60564  fi
60565
60566  if test "x$FOUND_FREETYPE" = xyes; then
60567
60568  # Only process if variable expands to non-empty
60569
60570  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60572
60573  # Input might be given as Windows format, start by converting to
60574  # unix format.
60575  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60576  new_path=`$CYGPATH -u "$path"`
60577
60578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60581  # "foo.exe" is OK but "foo" is an error.
60582  #
60583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60584  # It is also a way to make sure we got the proper file name for the real test later on.
60585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60586  if test "x$test_shortpath" = x; then
60587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60588$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60589    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60590  fi
60591
60592  # Call helper function which possibly converts this using DOS-style short mode.
60593  # If so, the updated path is stored in $new_path.
60594
60595  input_path="$new_path"
60596  # Check if we need to convert this using DOS-style short mode. If the path
60597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60598  # take no chances and rewrite it.
60599  # Note: m4 eats our [], so we need to use [ and ] instead.
60600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60601  if test "x$has_forbidden_chars" != x; then
60602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60606      # Going to short mode and back again did indeed matter. Since short mode is
60607      # case insensitive, let's make it lowercase to improve readability.
60608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60609      # Now convert it back to Unix-style (cygpath)
60610      input_path=`$CYGPATH -u "$shortmode_path"`
60611      new_path="$input_path"
60612    fi
60613  fi
60614
60615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60616  if test "x$test_cygdrive_prefix" = x; then
60617    # As a simple fix, exclude /usr/bin since it's not a real path.
60618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60620      # a path prefixed by /cygdrive for fixpath to work.
60621      new_path="$CYGWIN_ROOT_PATH$input_path"
60622    fi
60623  fi
60624
60625
60626  if test "x$path" != "x$new_path"; then
60627    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60629$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60630  fi
60631
60632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60633
60634  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60635  has_colon=`$ECHO $path | $GREP ^.:`
60636  new_path="$path"
60637  if test "x$has_colon" = x; then
60638    # Not in mixed or Windows style, start by that.
60639    new_path=`cmd //c echo $path`
60640  fi
60641
60642
60643  input_path="$new_path"
60644  # Check if we need to convert this using DOS-style short mode. If the path
60645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60646  # take no chances and rewrite it.
60647  # Note: m4 eats our [], so we need to use [ and ] instead.
60648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60649  if test "x$has_forbidden_chars" != x; then
60650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60652  fi
60653
60654
60655  windows_path="$new_path"
60656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60657    unix_path=`$CYGPATH -u "$windows_path"`
60658    new_path="$unix_path"
60659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60661    new_path="$unix_path"
60662  fi
60663
60664  if test "x$path" != "x$new_path"; then
60665    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60667$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60668  fi
60669
60670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60672
60673    else
60674      # We're on a unix platform. Hooray! :)
60675      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60676      has_space=`$ECHO "$path" | $GREP " "`
60677      if test "x$has_space" != x; then
60678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60679$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60680        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60681      fi
60682
60683      # Use eval to expand a potential ~
60684      eval path="$path"
60685      if test ! -f "$path" && test ! -d "$path"; then
60686        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60687      fi
60688
60689      if test -d "$path"; then
60690        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60691      else
60692        dir="`$DIRNAME "$path"`"
60693        base="`$BASENAME "$path"`"
60694        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60695      fi
60696    fi
60697  fi
60698
60699
60700  # Only process if variable expands to non-empty
60701
60702  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60704
60705  # Input might be given as Windows format, start by converting to
60706  # unix format.
60707  path="$POTENTIAL_FREETYPE_LIB_PATH"
60708  new_path=`$CYGPATH -u "$path"`
60709
60710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60713  # "foo.exe" is OK but "foo" is an error.
60714  #
60715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60716  # It is also a way to make sure we got the proper file name for the real test later on.
60717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60718  if test "x$test_shortpath" = x; then
60719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60721    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60722  fi
60723
60724  # Call helper function which possibly converts this using DOS-style short mode.
60725  # If so, the updated path is stored in $new_path.
60726
60727  input_path="$new_path"
60728  # Check if we need to convert this using DOS-style short mode. If the path
60729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60730  # take no chances and rewrite it.
60731  # Note: m4 eats our [], so we need to use [ and ] instead.
60732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60733  if test "x$has_forbidden_chars" != x; then
60734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60738      # Going to short mode and back again did indeed matter. Since short mode is
60739      # case insensitive, let's make it lowercase to improve readability.
60740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60741      # Now convert it back to Unix-style (cygpath)
60742      input_path=`$CYGPATH -u "$shortmode_path"`
60743      new_path="$input_path"
60744    fi
60745  fi
60746
60747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60748  if test "x$test_cygdrive_prefix" = x; then
60749    # As a simple fix, exclude /usr/bin since it's not a real path.
60750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60752      # a path prefixed by /cygdrive for fixpath to work.
60753      new_path="$CYGWIN_ROOT_PATH$input_path"
60754    fi
60755  fi
60756
60757
60758  if test "x$path" != "x$new_path"; then
60759    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60761$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60762  fi
60763
60764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60765
60766  path="$POTENTIAL_FREETYPE_LIB_PATH"
60767  has_colon=`$ECHO $path | $GREP ^.:`
60768  new_path="$path"
60769  if test "x$has_colon" = x; then
60770    # Not in mixed or Windows style, start by that.
60771    new_path=`cmd //c echo $path`
60772  fi
60773
60774
60775  input_path="$new_path"
60776  # Check if we need to convert this using DOS-style short mode. If the path
60777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60778  # take no chances and rewrite it.
60779  # Note: m4 eats our [], so we need to use [ and ] instead.
60780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60781  if test "x$has_forbidden_chars" != x; then
60782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60784  fi
60785
60786
60787  windows_path="$new_path"
60788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60789    unix_path=`$CYGPATH -u "$windows_path"`
60790    new_path="$unix_path"
60791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60793    new_path="$unix_path"
60794  fi
60795
60796  if test "x$path" != "x$new_path"; then
60797    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60799$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60800  fi
60801
60802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60804
60805    else
60806      # We're on a unix platform. Hooray! :)
60807      path="$POTENTIAL_FREETYPE_LIB_PATH"
60808      has_space=`$ECHO "$path" | $GREP " "`
60809      if test "x$has_space" != x; then
60810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60813      fi
60814
60815      # Use eval to expand a potential ~
60816      eval path="$path"
60817      if test ! -f "$path" && test ! -d "$path"; then
60818        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60819      fi
60820
60821      if test -d "$path"; then
60822        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60823      else
60824        dir="`$DIRNAME "$path"`"
60825        base="`$BASENAME "$path"`"
60826        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60827      fi
60828    fi
60829  fi
60830
60831
60832    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60834$as_echo_n "checking for freetype includes... " >&6; }
60835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60836$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60837    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60839$as_echo_n "checking for freetype libraries... " >&6; }
60840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60841$as_echo "$FREETYPE_LIB_PATH" >&6; }
60842  fi
60843
60844
60845          if test "x$FOUND_FREETYPE" != xyes; then
60846            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60847
60848  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60849  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60850  METHOD="well-known location"
60851
60852  # Let's start with an optimistic view of the world :-)
60853  FOUND_FREETYPE=yes
60854
60855  # First look for the canonical freetype main include file ft2build.h.
60856  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60857    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60858    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60859    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60860      # Fail.
60861      FOUND_FREETYPE=no
60862    fi
60863  fi
60864
60865  if test "x$FOUND_FREETYPE" = xyes; then
60866    # Include file found, let's continue the sanity check.
60867    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60868$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60869
60870    # Reset to default value
60871    FREETYPE_BASE_NAME=freetype
60872    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60873    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60874      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60875          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60876        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60877        # for the .6 version explicitly.
60878        FREETYPE_BASE_NAME=freetype.6
60879        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60880        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60881$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60882      else
60883        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60884$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60885        FOUND_FREETYPE=no
60886      fi
60887    else
60888      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60889        # On Windows, we will need both .lib and .dll file.
60890        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60891          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60892$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60893          FOUND_FREETYPE=no
60894        fi
60895      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60896          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60897        # Found lib in isa dir, use that instead.
60898        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60899        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60900$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60901      fi
60902    fi
60903  fi
60904
60905  if test "x$FOUND_FREETYPE" = xyes; then
60906
60907  # Only process if variable expands to non-empty
60908
60909  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60911
60912  # Input might be given as Windows format, start by converting to
60913  # unix format.
60914  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60915  new_path=`$CYGPATH -u "$path"`
60916
60917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60920  # "foo.exe" is OK but "foo" is an error.
60921  #
60922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60923  # It is also a way to make sure we got the proper file name for the real test later on.
60924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60925  if test "x$test_shortpath" = x; then
60926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60928    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60929  fi
60930
60931  # Call helper function which possibly converts this using DOS-style short mode.
60932  # If so, the updated path is stored in $new_path.
60933
60934  input_path="$new_path"
60935  # Check if we need to convert this using DOS-style short mode. If the path
60936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60937  # take no chances and rewrite it.
60938  # Note: m4 eats our [], so we need to use [ and ] instead.
60939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60940  if test "x$has_forbidden_chars" != x; then
60941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60945      # Going to short mode and back again did indeed matter. Since short mode is
60946      # case insensitive, let's make it lowercase to improve readability.
60947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60948      # Now convert it back to Unix-style (cygpath)
60949      input_path=`$CYGPATH -u "$shortmode_path"`
60950      new_path="$input_path"
60951    fi
60952  fi
60953
60954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60955  if test "x$test_cygdrive_prefix" = x; then
60956    # As a simple fix, exclude /usr/bin since it's not a real path.
60957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60959      # a path prefixed by /cygdrive for fixpath to work.
60960      new_path="$CYGWIN_ROOT_PATH$input_path"
60961    fi
60962  fi
60963
60964
60965  if test "x$path" != "x$new_path"; then
60966    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60968$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60969  fi
60970
60971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60972
60973  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60974  has_colon=`$ECHO $path | $GREP ^.:`
60975  new_path="$path"
60976  if test "x$has_colon" = x; then
60977    # Not in mixed or Windows style, start by that.
60978    new_path=`cmd //c echo $path`
60979  fi
60980
60981
60982  input_path="$new_path"
60983  # Check if we need to convert this using DOS-style short mode. If the path
60984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60985  # take no chances and rewrite it.
60986  # Note: m4 eats our [], so we need to use [ and ] instead.
60987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60988  if test "x$has_forbidden_chars" != x; then
60989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60991  fi
60992
60993
60994  windows_path="$new_path"
60995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60996    unix_path=`$CYGPATH -u "$windows_path"`
60997    new_path="$unix_path"
60998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61000    new_path="$unix_path"
61001  fi
61002
61003  if test "x$path" != "x$new_path"; then
61004    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61007  fi
61008
61009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61011
61012    else
61013      # We're on a unix platform. Hooray! :)
61014      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61015      has_space=`$ECHO "$path" | $GREP " "`
61016      if test "x$has_space" != x; then
61017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61020      fi
61021
61022      # Use eval to expand a potential ~
61023      eval path="$path"
61024      if test ! -f "$path" && test ! -d "$path"; then
61025        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61026      fi
61027
61028      if test -d "$path"; then
61029        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61030      else
61031        dir="`$DIRNAME "$path"`"
61032        base="`$BASENAME "$path"`"
61033        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61034      fi
61035    fi
61036  fi
61037
61038
61039  # Only process if variable expands to non-empty
61040
61041  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61043
61044  # Input might be given as Windows format, start by converting to
61045  # unix format.
61046  path="$POTENTIAL_FREETYPE_LIB_PATH"
61047  new_path=`$CYGPATH -u "$path"`
61048
61049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61052  # "foo.exe" is OK but "foo" is an error.
61053  #
61054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61055  # It is also a way to make sure we got the proper file name for the real test later on.
61056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61057  if test "x$test_shortpath" = x; then
61058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61060    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61061  fi
61062
61063  # Call helper function which possibly converts this using DOS-style short mode.
61064  # If so, the updated path is stored in $new_path.
61065
61066  input_path="$new_path"
61067  # Check if we need to convert this using DOS-style short mode. If the path
61068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61069  # take no chances and rewrite it.
61070  # Note: m4 eats our [], so we need to use [ and ] instead.
61071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61072  if test "x$has_forbidden_chars" != x; then
61073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61077      # Going to short mode and back again did indeed matter. Since short mode is
61078      # case insensitive, let's make it lowercase to improve readability.
61079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61080      # Now convert it back to Unix-style (cygpath)
61081      input_path=`$CYGPATH -u "$shortmode_path"`
61082      new_path="$input_path"
61083    fi
61084  fi
61085
61086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61087  if test "x$test_cygdrive_prefix" = x; then
61088    # As a simple fix, exclude /usr/bin since it's not a real path.
61089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61091      # a path prefixed by /cygdrive for fixpath to work.
61092      new_path="$CYGWIN_ROOT_PATH$input_path"
61093    fi
61094  fi
61095
61096
61097  if test "x$path" != "x$new_path"; then
61098    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61101  fi
61102
61103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61104
61105  path="$POTENTIAL_FREETYPE_LIB_PATH"
61106  has_colon=`$ECHO $path | $GREP ^.:`
61107  new_path="$path"
61108  if test "x$has_colon" = x; then
61109    # Not in mixed or Windows style, start by that.
61110    new_path=`cmd //c echo $path`
61111  fi
61112
61113
61114  input_path="$new_path"
61115  # Check if we need to convert this using DOS-style short mode. If the path
61116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61117  # take no chances and rewrite it.
61118  # Note: m4 eats our [], so we need to use [ and ] instead.
61119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61120  if test "x$has_forbidden_chars" != x; then
61121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61123  fi
61124
61125
61126  windows_path="$new_path"
61127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61128    unix_path=`$CYGPATH -u "$windows_path"`
61129    new_path="$unix_path"
61130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61132    new_path="$unix_path"
61133  fi
61134
61135  if test "x$path" != "x$new_path"; then
61136    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61138$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61139  fi
61140
61141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61143
61144    else
61145      # We're on a unix platform. Hooray! :)
61146      path="$POTENTIAL_FREETYPE_LIB_PATH"
61147      has_space=`$ECHO "$path" | $GREP " "`
61148      if test "x$has_space" != x; then
61149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61152      fi
61153
61154      # Use eval to expand a potential ~
61155      eval path="$path"
61156      if test ! -f "$path" && test ! -d "$path"; then
61157        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61158      fi
61159
61160      if test -d "$path"; then
61161        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61162      else
61163        dir="`$DIRNAME "$path"`"
61164        base="`$BASENAME "$path"`"
61165        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61166      fi
61167    fi
61168  fi
61169
61170
61171    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61173$as_echo_n "checking for freetype includes... " >&6; }
61174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61175$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61176    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61178$as_echo_n "checking for freetype libraries... " >&6; }
61179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61180$as_echo "$FREETYPE_LIB_PATH" >&6; }
61181  fi
61182
61183          fi
61184          if test "x$FOUND_FREETYPE" != xyes; then
61185            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61186
61187  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61188  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61189  METHOD="well-known location"
61190
61191  # Let's start with an optimistic view of the world :-)
61192  FOUND_FREETYPE=yes
61193
61194  # First look for the canonical freetype main include file ft2build.h.
61195  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61196    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61197    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61198    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61199      # Fail.
61200      FOUND_FREETYPE=no
61201    fi
61202  fi
61203
61204  if test "x$FOUND_FREETYPE" = xyes; then
61205    # Include file found, let's continue the sanity check.
61206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61207$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61208
61209    # Reset to default value
61210    FREETYPE_BASE_NAME=freetype
61211    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61212    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61213      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61214          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61215        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61216        # for the .6 version explicitly.
61217        FREETYPE_BASE_NAME=freetype.6
61218        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61219        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61220$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61221      else
61222        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61223$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61224        FOUND_FREETYPE=no
61225      fi
61226    else
61227      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61228        # On Windows, we will need both .lib and .dll file.
61229        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61230          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61231$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61232          FOUND_FREETYPE=no
61233        fi
61234      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61235          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61236        # Found lib in isa dir, use that instead.
61237        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61238        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61239$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61240      fi
61241    fi
61242  fi
61243
61244  if test "x$FOUND_FREETYPE" = xyes; then
61245
61246  # Only process if variable expands to non-empty
61247
61248  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61250
61251  # Input might be given as Windows format, start by converting to
61252  # unix format.
61253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61254  new_path=`$CYGPATH -u "$path"`
61255
61256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61259  # "foo.exe" is OK but "foo" is an error.
61260  #
61261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61262  # It is also a way to make sure we got the proper file name for the real test later on.
61263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61264  if test "x$test_shortpath" = x; then
61265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61267    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61268  fi
61269
61270  # Call helper function which possibly converts this using DOS-style short mode.
61271  # If so, the updated path is stored in $new_path.
61272
61273  input_path="$new_path"
61274  # Check if we need to convert this using DOS-style short mode. If the path
61275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61276  # take no chances and rewrite it.
61277  # Note: m4 eats our [], so we need to use [ and ] instead.
61278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61279  if test "x$has_forbidden_chars" != x; then
61280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61284      # Going to short mode and back again did indeed matter. Since short mode is
61285      # case insensitive, let's make it lowercase to improve readability.
61286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61287      # Now convert it back to Unix-style (cygpath)
61288      input_path=`$CYGPATH -u "$shortmode_path"`
61289      new_path="$input_path"
61290    fi
61291  fi
61292
61293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61294  if test "x$test_cygdrive_prefix" = x; then
61295    # As a simple fix, exclude /usr/bin since it's not a real path.
61296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61298      # a path prefixed by /cygdrive for fixpath to work.
61299      new_path="$CYGWIN_ROOT_PATH$input_path"
61300    fi
61301  fi
61302
61303
61304  if test "x$path" != "x$new_path"; then
61305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61308  fi
61309
61310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61311
61312  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61313  has_colon=`$ECHO $path | $GREP ^.:`
61314  new_path="$path"
61315  if test "x$has_colon" = x; then
61316    # Not in mixed or Windows style, start by that.
61317    new_path=`cmd //c echo $path`
61318  fi
61319
61320
61321  input_path="$new_path"
61322  # Check if we need to convert this using DOS-style short mode. If the path
61323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61324  # take no chances and rewrite it.
61325  # Note: m4 eats our [], so we need to use [ and ] instead.
61326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61327  if test "x$has_forbidden_chars" != x; then
61328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61330  fi
61331
61332
61333  windows_path="$new_path"
61334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61335    unix_path=`$CYGPATH -u "$windows_path"`
61336    new_path="$unix_path"
61337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61339    new_path="$unix_path"
61340  fi
61341
61342  if test "x$path" != "x$new_path"; then
61343    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61346  fi
61347
61348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61350
61351    else
61352      # We're on a unix platform. Hooray! :)
61353      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61354      has_space=`$ECHO "$path" | $GREP " "`
61355      if test "x$has_space" != x; then
61356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61358        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61359      fi
61360
61361      # Use eval to expand a potential ~
61362      eval path="$path"
61363      if test ! -f "$path" && test ! -d "$path"; then
61364        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61365      fi
61366
61367      if test -d "$path"; then
61368        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61369      else
61370        dir="`$DIRNAME "$path"`"
61371        base="`$BASENAME "$path"`"
61372        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61373      fi
61374    fi
61375  fi
61376
61377
61378  # Only process if variable expands to non-empty
61379
61380  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61382
61383  # Input might be given as Windows format, start by converting to
61384  # unix format.
61385  path="$POTENTIAL_FREETYPE_LIB_PATH"
61386  new_path=`$CYGPATH -u "$path"`
61387
61388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61391  # "foo.exe" is OK but "foo" is an error.
61392  #
61393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61394  # It is also a way to make sure we got the proper file name for the real test later on.
61395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61396  if test "x$test_shortpath" = x; then
61397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61399    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61400  fi
61401
61402  # Call helper function which possibly converts this using DOS-style short mode.
61403  # If so, the updated path is stored in $new_path.
61404
61405  input_path="$new_path"
61406  # Check if we need to convert this using DOS-style short mode. If the path
61407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61408  # take no chances and rewrite it.
61409  # Note: m4 eats our [], so we need to use [ and ] instead.
61410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61411  if test "x$has_forbidden_chars" != x; then
61412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61416      # Going to short mode and back again did indeed matter. Since short mode is
61417      # case insensitive, let's make it lowercase to improve readability.
61418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61419      # Now convert it back to Unix-style (cygpath)
61420      input_path=`$CYGPATH -u "$shortmode_path"`
61421      new_path="$input_path"
61422    fi
61423  fi
61424
61425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61426  if test "x$test_cygdrive_prefix" = x; then
61427    # As a simple fix, exclude /usr/bin since it's not a real path.
61428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61430      # a path prefixed by /cygdrive for fixpath to work.
61431      new_path="$CYGWIN_ROOT_PATH$input_path"
61432    fi
61433  fi
61434
61435
61436  if test "x$path" != "x$new_path"; then
61437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61440  fi
61441
61442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61443
61444  path="$POTENTIAL_FREETYPE_LIB_PATH"
61445  has_colon=`$ECHO $path | $GREP ^.:`
61446  new_path="$path"
61447  if test "x$has_colon" = x; then
61448    # Not in mixed or Windows style, start by that.
61449    new_path=`cmd //c echo $path`
61450  fi
61451
61452
61453  input_path="$new_path"
61454  # Check if we need to convert this using DOS-style short mode. If the path
61455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61456  # take no chances and rewrite it.
61457  # Note: m4 eats our [], so we need to use [ and ] instead.
61458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61459  if test "x$has_forbidden_chars" != x; then
61460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61462  fi
61463
61464
61465  windows_path="$new_path"
61466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61467    unix_path=`$CYGPATH -u "$windows_path"`
61468    new_path="$unix_path"
61469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61471    new_path="$unix_path"
61472  fi
61473
61474  if test "x$path" != "x$new_path"; then
61475    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61478  fi
61479
61480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61482
61483    else
61484      # We're on a unix platform. Hooray! :)
61485      path="$POTENTIAL_FREETYPE_LIB_PATH"
61486      has_space=`$ECHO "$path" | $GREP " "`
61487      if test "x$has_space" != x; then
61488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61491      fi
61492
61493      # Use eval to expand a potential ~
61494      eval path="$path"
61495      if test ! -f "$path" && test ! -d "$path"; then
61496        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61497      fi
61498
61499      if test -d "$path"; then
61500        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61501      else
61502        dir="`$DIRNAME "$path"`"
61503        base="`$BASENAME "$path"`"
61504        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61505      fi
61506    fi
61507  fi
61508
61509
61510    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61512$as_echo_n "checking for freetype includes... " >&6; }
61513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61514$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61515    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61517$as_echo_n "checking for freetype libraries... " >&6; }
61518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61519$as_echo "$FREETYPE_LIB_PATH" >&6; }
61520  fi
61521
61522          fi
61523
61524          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61525            if test "x$FOUND_FREETYPE" != xyes; then
61526              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61527              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61528
61529  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61530  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61531  METHOD="well-known location"
61532
61533  # Let's start with an optimistic view of the world :-)
61534  FOUND_FREETYPE=yes
61535
61536  # First look for the canonical freetype main include file ft2build.h.
61537  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61538    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61539    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61540    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61541      # Fail.
61542      FOUND_FREETYPE=no
61543    fi
61544  fi
61545
61546  if test "x$FOUND_FREETYPE" = xyes; then
61547    # Include file found, let's continue the sanity check.
61548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61549$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61550
61551    # Reset to default value
61552    FREETYPE_BASE_NAME=freetype
61553    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61554    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61555      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61556          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61557        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61558        # for the .6 version explicitly.
61559        FREETYPE_BASE_NAME=freetype.6
61560        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61561        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61562$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61563      else
61564        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61565$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61566        FOUND_FREETYPE=no
61567      fi
61568    else
61569      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61570        # On Windows, we will need both .lib and .dll file.
61571        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61572          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61573$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61574          FOUND_FREETYPE=no
61575        fi
61576      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61577          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61578        # Found lib in isa dir, use that instead.
61579        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61580        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61581$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61582      fi
61583    fi
61584  fi
61585
61586  if test "x$FOUND_FREETYPE" = xyes; then
61587
61588  # Only process if variable expands to non-empty
61589
61590  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61592
61593  # Input might be given as Windows format, start by converting to
61594  # unix format.
61595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61596  new_path=`$CYGPATH -u "$path"`
61597
61598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61601  # "foo.exe" is OK but "foo" is an error.
61602  #
61603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61604  # It is also a way to make sure we got the proper file name for the real test later on.
61605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61606  if test "x$test_shortpath" = x; then
61607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61610  fi
61611
61612  # Call helper function which possibly converts this using DOS-style short mode.
61613  # If so, the updated path is stored in $new_path.
61614
61615  input_path="$new_path"
61616  # Check if we need to convert this using DOS-style short mode. If the path
61617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61618  # take no chances and rewrite it.
61619  # Note: m4 eats our [], so we need to use [ and ] instead.
61620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61621  if test "x$has_forbidden_chars" != x; then
61622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61626      # Going to short mode and back again did indeed matter. Since short mode is
61627      # case insensitive, let's make it lowercase to improve readability.
61628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61629      # Now convert it back to Unix-style (cygpath)
61630      input_path=`$CYGPATH -u "$shortmode_path"`
61631      new_path="$input_path"
61632    fi
61633  fi
61634
61635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61636  if test "x$test_cygdrive_prefix" = x; then
61637    # As a simple fix, exclude /usr/bin since it's not a real path.
61638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61640      # a path prefixed by /cygdrive for fixpath to work.
61641      new_path="$CYGWIN_ROOT_PATH$input_path"
61642    fi
61643  fi
61644
61645
61646  if test "x$path" != "x$new_path"; then
61647    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61650  fi
61651
61652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61653
61654  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61655  has_colon=`$ECHO $path | $GREP ^.:`
61656  new_path="$path"
61657  if test "x$has_colon" = x; then
61658    # Not in mixed or Windows style, start by that.
61659    new_path=`cmd //c echo $path`
61660  fi
61661
61662
61663  input_path="$new_path"
61664  # Check if we need to convert this using DOS-style short mode. If the path
61665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61666  # take no chances and rewrite it.
61667  # Note: m4 eats our [], so we need to use [ and ] instead.
61668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61669  if test "x$has_forbidden_chars" != x; then
61670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61672  fi
61673
61674
61675  windows_path="$new_path"
61676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61677    unix_path=`$CYGPATH -u "$windows_path"`
61678    new_path="$unix_path"
61679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61681    new_path="$unix_path"
61682  fi
61683
61684  if test "x$path" != "x$new_path"; then
61685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61688  fi
61689
61690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61692
61693    else
61694      # We're on a unix platform. Hooray! :)
61695      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61696      has_space=`$ECHO "$path" | $GREP " "`
61697      if test "x$has_space" != x; then
61698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61701      fi
61702
61703      # Use eval to expand a potential ~
61704      eval path="$path"
61705      if test ! -f "$path" && test ! -d "$path"; then
61706        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61707      fi
61708
61709      if test -d "$path"; then
61710        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61711      else
61712        dir="`$DIRNAME "$path"`"
61713        base="`$BASENAME "$path"`"
61714        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61715      fi
61716    fi
61717  fi
61718
61719
61720  # Only process if variable expands to non-empty
61721
61722  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61724
61725  # Input might be given as Windows format, start by converting to
61726  # unix format.
61727  path="$POTENTIAL_FREETYPE_LIB_PATH"
61728  new_path=`$CYGPATH -u "$path"`
61729
61730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61733  # "foo.exe" is OK but "foo" is an error.
61734  #
61735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61736  # It is also a way to make sure we got the proper file name for the real test later on.
61737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61738  if test "x$test_shortpath" = x; then
61739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61740$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61741    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61742  fi
61743
61744  # Call helper function which possibly converts this using DOS-style short mode.
61745  # If so, the updated path is stored in $new_path.
61746
61747  input_path="$new_path"
61748  # Check if we need to convert this using DOS-style short mode. If the path
61749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61750  # take no chances and rewrite it.
61751  # Note: m4 eats our [], so we need to use [ and ] instead.
61752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61753  if test "x$has_forbidden_chars" != x; then
61754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61758      # Going to short mode and back again did indeed matter. Since short mode is
61759      # case insensitive, let's make it lowercase to improve readability.
61760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61761      # Now convert it back to Unix-style (cygpath)
61762      input_path=`$CYGPATH -u "$shortmode_path"`
61763      new_path="$input_path"
61764    fi
61765  fi
61766
61767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61768  if test "x$test_cygdrive_prefix" = x; then
61769    # As a simple fix, exclude /usr/bin since it's not a real path.
61770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61772      # a path prefixed by /cygdrive for fixpath to work.
61773      new_path="$CYGWIN_ROOT_PATH$input_path"
61774    fi
61775  fi
61776
61777
61778  if test "x$path" != "x$new_path"; then
61779    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61782  fi
61783
61784    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61785
61786  path="$POTENTIAL_FREETYPE_LIB_PATH"
61787  has_colon=`$ECHO $path | $GREP ^.:`
61788  new_path="$path"
61789  if test "x$has_colon" = x; then
61790    # Not in mixed or Windows style, start by that.
61791    new_path=`cmd //c echo $path`
61792  fi
61793
61794
61795  input_path="$new_path"
61796  # Check if we need to convert this using DOS-style short mode. If the path
61797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61798  # take no chances and rewrite it.
61799  # Note: m4 eats our [], so we need to use [ and ] instead.
61800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61801  if test "x$has_forbidden_chars" != x; then
61802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61804  fi
61805
61806
61807  windows_path="$new_path"
61808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61809    unix_path=`$CYGPATH -u "$windows_path"`
61810    new_path="$unix_path"
61811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61813    new_path="$unix_path"
61814  fi
61815
61816  if test "x$path" != "x$new_path"; then
61817    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61820  fi
61821
61822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61824
61825    else
61826      # We're on a unix platform. Hooray! :)
61827      path="$POTENTIAL_FREETYPE_LIB_PATH"
61828      has_space=`$ECHO "$path" | $GREP " "`
61829      if test "x$has_space" != x; then
61830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61832        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61833      fi
61834
61835      # Use eval to expand a potential ~
61836      eval path="$path"
61837      if test ! -f "$path" && test ! -d "$path"; then
61838        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61839      fi
61840
61841      if test -d "$path"; then
61842        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61843      else
61844        dir="`$DIRNAME "$path"`"
61845        base="`$BASENAME "$path"`"
61846        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61847      fi
61848    fi
61849  fi
61850
61851
61852    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61854$as_echo_n "checking for freetype includes... " >&6; }
61855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61856$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61857    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61859$as_echo_n "checking for freetype libraries... " >&6; }
61860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61861$as_echo "$FREETYPE_LIB_PATH" >&6; }
61862  fi
61863
61864            fi
61865          fi
61866
61867          if test "x$FOUND_FREETYPE" != xyes; then
61868            FREETYPE_BASE_DIR="$SYSROOT/usr"
61869            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61870
61871  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61872  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61873  METHOD="well-known location"
61874
61875  # Let's start with an optimistic view of the world :-)
61876  FOUND_FREETYPE=yes
61877
61878  # First look for the canonical freetype main include file ft2build.h.
61879  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61880    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61881    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61882    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61883      # Fail.
61884      FOUND_FREETYPE=no
61885    fi
61886  fi
61887
61888  if test "x$FOUND_FREETYPE" = xyes; then
61889    # Include file found, let's continue the sanity check.
61890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61891$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61892
61893    # Reset to default value
61894    FREETYPE_BASE_NAME=freetype
61895    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61896    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61897      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61898          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61899        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61900        # for the .6 version explicitly.
61901        FREETYPE_BASE_NAME=freetype.6
61902        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61903        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61904$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61905      else
61906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61907$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61908        FOUND_FREETYPE=no
61909      fi
61910    else
61911      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61912        # On Windows, we will need both .lib and .dll file.
61913        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61914          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61915$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61916          FOUND_FREETYPE=no
61917        fi
61918      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61919          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61920        # Found lib in isa dir, use that instead.
61921        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61922        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61923$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61924      fi
61925    fi
61926  fi
61927
61928  if test "x$FOUND_FREETYPE" = xyes; then
61929
61930  # Only process if variable expands to non-empty
61931
61932  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61934
61935  # Input might be given as Windows format, start by converting to
61936  # unix format.
61937  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61938  new_path=`$CYGPATH -u "$path"`
61939
61940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61943  # "foo.exe" is OK but "foo" is an error.
61944  #
61945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61946  # It is also a way to make sure we got the proper file name for the real test later on.
61947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61948  if test "x$test_shortpath" = x; then
61949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61951    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61952  fi
61953
61954  # Call helper function which possibly converts this using DOS-style short mode.
61955  # If so, the updated path is stored in $new_path.
61956
61957  input_path="$new_path"
61958  # Check if we need to convert this using DOS-style short mode. If the path
61959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61960  # take no chances and rewrite it.
61961  # Note: m4 eats our [], so we need to use [ and ] instead.
61962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61963  if test "x$has_forbidden_chars" != x; then
61964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61968      # Going to short mode and back again did indeed matter. Since short mode is
61969      # case insensitive, let's make it lowercase to improve readability.
61970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61971      # Now convert it back to Unix-style (cygpath)
61972      input_path=`$CYGPATH -u "$shortmode_path"`
61973      new_path="$input_path"
61974    fi
61975  fi
61976
61977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61978  if test "x$test_cygdrive_prefix" = x; then
61979    # As a simple fix, exclude /usr/bin since it's not a real path.
61980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61982      # a path prefixed by /cygdrive for fixpath to work.
61983      new_path="$CYGWIN_ROOT_PATH$input_path"
61984    fi
61985  fi
61986
61987
61988  if test "x$path" != "x$new_path"; then
61989    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61992  fi
61993
61994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61995
61996  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61997  has_colon=`$ECHO $path | $GREP ^.:`
61998  new_path="$path"
61999  if test "x$has_colon" = x; then
62000    # Not in mixed or Windows style, start by that.
62001    new_path=`cmd //c echo $path`
62002  fi
62003
62004
62005  input_path="$new_path"
62006  # Check if we need to convert this using DOS-style short mode. If the path
62007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62008  # take no chances and rewrite it.
62009  # Note: m4 eats our [], so we need to use [ and ] instead.
62010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62011  if test "x$has_forbidden_chars" != x; then
62012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62014  fi
62015
62016
62017  windows_path="$new_path"
62018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62019    unix_path=`$CYGPATH -u "$windows_path"`
62020    new_path="$unix_path"
62021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62023    new_path="$unix_path"
62024  fi
62025
62026  if test "x$path" != "x$new_path"; then
62027    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62030  fi
62031
62032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62034
62035    else
62036      # We're on a unix platform. Hooray! :)
62037      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62038      has_space=`$ECHO "$path" | $GREP " "`
62039      if test "x$has_space" != x; then
62040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62043      fi
62044
62045      # Use eval to expand a potential ~
62046      eval path="$path"
62047      if test ! -f "$path" && test ! -d "$path"; then
62048        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62049      fi
62050
62051      if test -d "$path"; then
62052        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62053      else
62054        dir="`$DIRNAME "$path"`"
62055        base="`$BASENAME "$path"`"
62056        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62057      fi
62058    fi
62059  fi
62060
62061
62062  # Only process if variable expands to non-empty
62063
62064  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62066
62067  # Input might be given as Windows format, start by converting to
62068  # unix format.
62069  path="$POTENTIAL_FREETYPE_LIB_PATH"
62070  new_path=`$CYGPATH -u "$path"`
62071
62072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62075  # "foo.exe" is OK but "foo" is an error.
62076  #
62077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62078  # It is also a way to make sure we got the proper file name for the real test later on.
62079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62080  if test "x$test_shortpath" = x; then
62081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62084  fi
62085
62086  # Call helper function which possibly converts this using DOS-style short mode.
62087  # If so, the updated path is stored in $new_path.
62088
62089  input_path="$new_path"
62090  # Check if we need to convert this using DOS-style short mode. If the path
62091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62092  # take no chances and rewrite it.
62093  # Note: m4 eats our [], so we need to use [ and ] instead.
62094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62095  if test "x$has_forbidden_chars" != x; then
62096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62100      # Going to short mode and back again did indeed matter. Since short mode is
62101      # case insensitive, let's make it lowercase to improve readability.
62102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62103      # Now convert it back to Unix-style (cygpath)
62104      input_path=`$CYGPATH -u "$shortmode_path"`
62105      new_path="$input_path"
62106    fi
62107  fi
62108
62109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62110  if test "x$test_cygdrive_prefix" = x; then
62111    # As a simple fix, exclude /usr/bin since it's not a real path.
62112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62114      # a path prefixed by /cygdrive for fixpath to work.
62115      new_path="$CYGWIN_ROOT_PATH$input_path"
62116    fi
62117  fi
62118
62119
62120  if test "x$path" != "x$new_path"; then
62121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62124  fi
62125
62126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62127
62128  path="$POTENTIAL_FREETYPE_LIB_PATH"
62129  has_colon=`$ECHO $path | $GREP ^.:`
62130  new_path="$path"
62131  if test "x$has_colon" = x; then
62132    # Not in mixed or Windows style, start by that.
62133    new_path=`cmd //c echo $path`
62134  fi
62135
62136
62137  input_path="$new_path"
62138  # Check if we need to convert this using DOS-style short mode. If the path
62139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62140  # take no chances and rewrite it.
62141  # Note: m4 eats our [], so we need to use [ and ] instead.
62142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62143  if test "x$has_forbidden_chars" != x; then
62144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62146  fi
62147
62148
62149  windows_path="$new_path"
62150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62151    unix_path=`$CYGPATH -u "$windows_path"`
62152    new_path="$unix_path"
62153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62155    new_path="$unix_path"
62156  fi
62157
62158  if test "x$path" != "x$new_path"; then
62159    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62162  fi
62163
62164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62166
62167    else
62168      # We're on a unix platform. Hooray! :)
62169      path="$POTENTIAL_FREETYPE_LIB_PATH"
62170      has_space=`$ECHO "$path" | $GREP " "`
62171      if test "x$has_space" != x; then
62172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62175      fi
62176
62177      # Use eval to expand a potential ~
62178      eval path="$path"
62179      if test ! -f "$path" && test ! -d "$path"; then
62180        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62181      fi
62182
62183      if test -d "$path"; then
62184        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62185      else
62186        dir="`$DIRNAME "$path"`"
62187        base="`$BASENAME "$path"`"
62188        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62189      fi
62190    fi
62191  fi
62192
62193
62194    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62195    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62196$as_echo_n "checking for freetype includes... " >&6; }
62197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62198$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62199    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62201$as_echo_n "checking for freetype libraries... " >&6; }
62202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62203$as_echo "$FREETYPE_LIB_PATH" >&6; }
62204  fi
62205
62206            else
62207
62208  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62209  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62210  METHOD="well-known location"
62211
62212  # Let's start with an optimistic view of the world :-)
62213  FOUND_FREETYPE=yes
62214
62215  # First look for the canonical freetype main include file ft2build.h.
62216  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62217    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62218    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62219    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62220      # Fail.
62221      FOUND_FREETYPE=no
62222    fi
62223  fi
62224
62225  if test "x$FOUND_FREETYPE" = xyes; then
62226    # Include file found, let's continue the sanity check.
62227    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62228$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62229
62230    # Reset to default value
62231    FREETYPE_BASE_NAME=freetype
62232    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62233    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62234      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62235          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62236        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62237        # for the .6 version explicitly.
62238        FREETYPE_BASE_NAME=freetype.6
62239        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62240        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62241$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62242      else
62243        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62244$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62245        FOUND_FREETYPE=no
62246      fi
62247    else
62248      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62249        # On Windows, we will need both .lib and .dll file.
62250        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62251          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62252$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62253          FOUND_FREETYPE=no
62254        fi
62255      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62256          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62257        # Found lib in isa dir, use that instead.
62258        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62259        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62260$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62261      fi
62262    fi
62263  fi
62264
62265  if test "x$FOUND_FREETYPE" = xyes; then
62266
62267  # Only process if variable expands to non-empty
62268
62269  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62271
62272  # Input might be given as Windows format, start by converting to
62273  # unix format.
62274  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62275  new_path=`$CYGPATH -u "$path"`
62276
62277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62280  # "foo.exe" is OK but "foo" is an error.
62281  #
62282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62283  # It is also a way to make sure we got the proper file name for the real test later on.
62284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62285  if test "x$test_shortpath" = x; then
62286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62288    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62289  fi
62290
62291  # Call helper function which possibly converts this using DOS-style short mode.
62292  # If so, the updated path is stored in $new_path.
62293
62294  input_path="$new_path"
62295  # Check if we need to convert this using DOS-style short mode. If the path
62296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62297  # take no chances and rewrite it.
62298  # Note: m4 eats our [], so we need to use [ and ] instead.
62299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62300  if test "x$has_forbidden_chars" != x; then
62301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62305      # Going to short mode and back again did indeed matter. Since short mode is
62306      # case insensitive, let's make it lowercase to improve readability.
62307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62308      # Now convert it back to Unix-style (cygpath)
62309      input_path=`$CYGPATH -u "$shortmode_path"`
62310      new_path="$input_path"
62311    fi
62312  fi
62313
62314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62315  if test "x$test_cygdrive_prefix" = x; then
62316    # As a simple fix, exclude /usr/bin since it's not a real path.
62317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62319      # a path prefixed by /cygdrive for fixpath to work.
62320      new_path="$CYGWIN_ROOT_PATH$input_path"
62321    fi
62322  fi
62323
62324
62325  if test "x$path" != "x$new_path"; then
62326    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62329  fi
62330
62331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62332
62333  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62334  has_colon=`$ECHO $path | $GREP ^.:`
62335  new_path="$path"
62336  if test "x$has_colon" = x; then
62337    # Not in mixed or Windows style, start by that.
62338    new_path=`cmd //c echo $path`
62339  fi
62340
62341
62342  input_path="$new_path"
62343  # Check if we need to convert this using DOS-style short mode. If the path
62344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62345  # take no chances and rewrite it.
62346  # Note: m4 eats our [], so we need to use [ and ] instead.
62347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62348  if test "x$has_forbidden_chars" != x; then
62349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62351  fi
62352
62353
62354  windows_path="$new_path"
62355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62356    unix_path=`$CYGPATH -u "$windows_path"`
62357    new_path="$unix_path"
62358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62360    new_path="$unix_path"
62361  fi
62362
62363  if test "x$path" != "x$new_path"; then
62364    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62367  fi
62368
62369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62371
62372    else
62373      # We're on a unix platform. Hooray! :)
62374      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62375      has_space=`$ECHO "$path" | $GREP " "`
62376      if test "x$has_space" != x; then
62377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62378$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62379        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62380      fi
62381
62382      # Use eval to expand a potential ~
62383      eval path="$path"
62384      if test ! -f "$path" && test ! -d "$path"; then
62385        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62386      fi
62387
62388      if test -d "$path"; then
62389        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62390      else
62391        dir="`$DIRNAME "$path"`"
62392        base="`$BASENAME "$path"`"
62393        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62394      fi
62395    fi
62396  fi
62397
62398
62399  # Only process if variable expands to non-empty
62400
62401  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62403
62404  # Input might be given as Windows format, start by converting to
62405  # unix format.
62406  path="$POTENTIAL_FREETYPE_LIB_PATH"
62407  new_path=`$CYGPATH -u "$path"`
62408
62409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62412  # "foo.exe" is OK but "foo" is an error.
62413  #
62414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62415  # It is also a way to make sure we got the proper file name for the real test later on.
62416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62417  if test "x$test_shortpath" = x; then
62418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62420    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62421  fi
62422
62423  # Call helper function which possibly converts this using DOS-style short mode.
62424  # If so, the updated path is stored in $new_path.
62425
62426  input_path="$new_path"
62427  # Check if we need to convert this using DOS-style short mode. If the path
62428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62429  # take no chances and rewrite it.
62430  # Note: m4 eats our [], so we need to use [ and ] instead.
62431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62432  if test "x$has_forbidden_chars" != x; then
62433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62437      # Going to short mode and back again did indeed matter. Since short mode is
62438      # case insensitive, let's make it lowercase to improve readability.
62439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62440      # Now convert it back to Unix-style (cygpath)
62441      input_path=`$CYGPATH -u "$shortmode_path"`
62442      new_path="$input_path"
62443    fi
62444  fi
62445
62446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62447  if test "x$test_cygdrive_prefix" = x; then
62448    # As a simple fix, exclude /usr/bin since it's not a real path.
62449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62451      # a path prefixed by /cygdrive for fixpath to work.
62452      new_path="$CYGWIN_ROOT_PATH$input_path"
62453    fi
62454  fi
62455
62456
62457  if test "x$path" != "x$new_path"; then
62458    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62460$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62461  fi
62462
62463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62464
62465  path="$POTENTIAL_FREETYPE_LIB_PATH"
62466  has_colon=`$ECHO $path | $GREP ^.:`
62467  new_path="$path"
62468  if test "x$has_colon" = x; then
62469    # Not in mixed or Windows style, start by that.
62470    new_path=`cmd //c echo $path`
62471  fi
62472
62473
62474  input_path="$new_path"
62475  # Check if we need to convert this using DOS-style short mode. If the path
62476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62477  # take no chances and rewrite it.
62478  # Note: m4 eats our [], so we need to use [ and ] instead.
62479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62480  if test "x$has_forbidden_chars" != x; then
62481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62483  fi
62484
62485
62486  windows_path="$new_path"
62487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62488    unix_path=`$CYGPATH -u "$windows_path"`
62489    new_path="$unix_path"
62490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62492    new_path="$unix_path"
62493  fi
62494
62495  if test "x$path" != "x$new_path"; then
62496    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62499  fi
62500
62501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62503
62504    else
62505      # We're on a unix platform. Hooray! :)
62506      path="$POTENTIAL_FREETYPE_LIB_PATH"
62507      has_space=`$ECHO "$path" | $GREP " "`
62508      if test "x$has_space" != x; then
62509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62512      fi
62513
62514      # Use eval to expand a potential ~
62515      eval path="$path"
62516      if test ! -f "$path" && test ! -d "$path"; then
62517        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62518      fi
62519
62520      if test -d "$path"; then
62521        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62522      else
62523        dir="`$DIRNAME "$path"`"
62524        base="`$BASENAME "$path"`"
62525        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62526      fi
62527    fi
62528  fi
62529
62530
62531    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62533$as_echo_n "checking for freetype includes... " >&6; }
62534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62535$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62536    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62538$as_echo_n "checking for freetype libraries... " >&6; }
62539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62540$as_echo "$FREETYPE_LIB_PATH" >&6; }
62541  fi
62542
62543              if test "x$FOUND_FREETYPE" != xyes; then
62544
62545  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62546  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62547  METHOD="well-known location"
62548
62549  # Let's start with an optimistic view of the world :-)
62550  FOUND_FREETYPE=yes
62551
62552  # First look for the canonical freetype main include file ft2build.h.
62553  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62554    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62555    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62556    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62557      # Fail.
62558      FOUND_FREETYPE=no
62559    fi
62560  fi
62561
62562  if test "x$FOUND_FREETYPE" = xyes; then
62563    # Include file found, let's continue the sanity check.
62564    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62565$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62566
62567    # Reset to default value
62568    FREETYPE_BASE_NAME=freetype
62569    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62570    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62571      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62572          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62573        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62574        # for the .6 version explicitly.
62575        FREETYPE_BASE_NAME=freetype.6
62576        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62577        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62578$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62579      else
62580        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62581$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62582        FOUND_FREETYPE=no
62583      fi
62584    else
62585      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62586        # On Windows, we will need both .lib and .dll file.
62587        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62588          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62589$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62590          FOUND_FREETYPE=no
62591        fi
62592      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62593          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62594        # Found lib in isa dir, use that instead.
62595        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62596        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62597$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62598      fi
62599    fi
62600  fi
62601
62602  if test "x$FOUND_FREETYPE" = xyes; then
62603
62604  # Only process if variable expands to non-empty
62605
62606  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62608
62609  # Input might be given as Windows format, start by converting to
62610  # unix format.
62611  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62612  new_path=`$CYGPATH -u "$path"`
62613
62614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62617  # "foo.exe" is OK but "foo" is an error.
62618  #
62619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62620  # It is also a way to make sure we got the proper file name for the real test later on.
62621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62622  if test "x$test_shortpath" = x; then
62623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62624$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62625    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62626  fi
62627
62628  # Call helper function which possibly converts this using DOS-style short mode.
62629  # If so, the updated path is stored in $new_path.
62630
62631  input_path="$new_path"
62632  # Check if we need to convert this using DOS-style short mode. If the path
62633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62634  # take no chances and rewrite it.
62635  # Note: m4 eats our [], so we need to use [ and ] instead.
62636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62637  if test "x$has_forbidden_chars" != x; then
62638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62642      # Going to short mode and back again did indeed matter. Since short mode is
62643      # case insensitive, let's make it lowercase to improve readability.
62644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62645      # Now convert it back to Unix-style (cygpath)
62646      input_path=`$CYGPATH -u "$shortmode_path"`
62647      new_path="$input_path"
62648    fi
62649  fi
62650
62651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62652  if test "x$test_cygdrive_prefix" = x; then
62653    # As a simple fix, exclude /usr/bin since it's not a real path.
62654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62656      # a path prefixed by /cygdrive for fixpath to work.
62657      new_path="$CYGWIN_ROOT_PATH$input_path"
62658    fi
62659  fi
62660
62661
62662  if test "x$path" != "x$new_path"; then
62663    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62666  fi
62667
62668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62669
62670  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62671  has_colon=`$ECHO $path | $GREP ^.:`
62672  new_path="$path"
62673  if test "x$has_colon" = x; then
62674    # Not in mixed or Windows style, start by that.
62675    new_path=`cmd //c echo $path`
62676  fi
62677
62678
62679  input_path="$new_path"
62680  # Check if we need to convert this using DOS-style short mode. If the path
62681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62682  # take no chances and rewrite it.
62683  # Note: m4 eats our [], so we need to use [ and ] instead.
62684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62685  if test "x$has_forbidden_chars" != x; then
62686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62688  fi
62689
62690
62691  windows_path="$new_path"
62692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62693    unix_path=`$CYGPATH -u "$windows_path"`
62694    new_path="$unix_path"
62695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62697    new_path="$unix_path"
62698  fi
62699
62700  if test "x$path" != "x$new_path"; then
62701    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62703$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62704  fi
62705
62706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62708
62709    else
62710      # We're on a unix platform. Hooray! :)
62711      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62712      has_space=`$ECHO "$path" | $GREP " "`
62713      if test "x$has_space" != x; then
62714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62715$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62717      fi
62718
62719      # Use eval to expand a potential ~
62720      eval path="$path"
62721      if test ! -f "$path" && test ! -d "$path"; then
62722        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62723      fi
62724
62725      if test -d "$path"; then
62726        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62727      else
62728        dir="`$DIRNAME "$path"`"
62729        base="`$BASENAME "$path"`"
62730        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62731      fi
62732    fi
62733  fi
62734
62735
62736  # Only process if variable expands to non-empty
62737
62738  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62740
62741  # Input might be given as Windows format, start by converting to
62742  # unix format.
62743  path="$POTENTIAL_FREETYPE_LIB_PATH"
62744  new_path=`$CYGPATH -u "$path"`
62745
62746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62749  # "foo.exe" is OK but "foo" is an error.
62750  #
62751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62752  # It is also a way to make sure we got the proper file name for the real test later on.
62753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62754  if test "x$test_shortpath" = x; then
62755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62757    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62758  fi
62759
62760  # Call helper function which possibly converts this using DOS-style short mode.
62761  # If so, the updated path is stored in $new_path.
62762
62763  input_path="$new_path"
62764  # Check if we need to convert this using DOS-style short mode. If the path
62765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62766  # take no chances and rewrite it.
62767  # Note: m4 eats our [], so we need to use [ and ] instead.
62768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62769  if test "x$has_forbidden_chars" != x; then
62770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62774      # Going to short mode and back again did indeed matter. Since short mode is
62775      # case insensitive, let's make it lowercase to improve readability.
62776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62777      # Now convert it back to Unix-style (cygpath)
62778      input_path=`$CYGPATH -u "$shortmode_path"`
62779      new_path="$input_path"
62780    fi
62781  fi
62782
62783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62784  if test "x$test_cygdrive_prefix" = x; then
62785    # As a simple fix, exclude /usr/bin since it's not a real path.
62786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62788      # a path prefixed by /cygdrive for fixpath to work.
62789      new_path="$CYGWIN_ROOT_PATH$input_path"
62790    fi
62791  fi
62792
62793
62794  if test "x$path" != "x$new_path"; then
62795    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62797$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62798  fi
62799
62800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62801
62802  path="$POTENTIAL_FREETYPE_LIB_PATH"
62803  has_colon=`$ECHO $path | $GREP ^.:`
62804  new_path="$path"
62805  if test "x$has_colon" = x; then
62806    # Not in mixed or Windows style, start by that.
62807    new_path=`cmd //c echo $path`
62808  fi
62809
62810
62811  input_path="$new_path"
62812  # Check if we need to convert this using DOS-style short mode. If the path
62813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62814  # take no chances and rewrite it.
62815  # Note: m4 eats our [], so we need to use [ and ] instead.
62816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62817  if test "x$has_forbidden_chars" != x; then
62818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62820  fi
62821
62822
62823  windows_path="$new_path"
62824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62825    unix_path=`$CYGPATH -u "$windows_path"`
62826    new_path="$unix_path"
62827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62829    new_path="$unix_path"
62830  fi
62831
62832  if test "x$path" != "x$new_path"; then
62833    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62835$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62836  fi
62837
62838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62840
62841    else
62842      # We're on a unix platform. Hooray! :)
62843      path="$POTENTIAL_FREETYPE_LIB_PATH"
62844      has_space=`$ECHO "$path" | $GREP " "`
62845      if test "x$has_space" != x; then
62846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62847$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62849      fi
62850
62851      # Use eval to expand a potential ~
62852      eval path="$path"
62853      if test ! -f "$path" && test ! -d "$path"; then
62854        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62855      fi
62856
62857      if test -d "$path"; then
62858        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62859      else
62860        dir="`$DIRNAME "$path"`"
62861        base="`$BASENAME "$path"`"
62862        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62863      fi
62864    fi
62865  fi
62866
62867
62868    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62870$as_echo_n "checking for freetype includes... " >&6; }
62871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62872$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62873    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62875$as_echo_n "checking for freetype libraries... " >&6; }
62876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62877$as_echo "$FREETYPE_LIB_PATH" >&6; }
62878  fi
62879
62880              fi
62881            fi
62882          fi
62883        fi
62884      fi # end check in well-known locations
62885
62886      if test "x$FOUND_FREETYPE" != xyes; then
62887
62888  # Print a helpful message on how to acquire the necessary build dependency.
62889  # freetype is the help tag: freetype, cups, alsa etc
62890  MISSING_DEPENDENCY=freetype
62891
62892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62893    cygwin_help $MISSING_DEPENDENCY
62894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62895    msys_help $MISSING_DEPENDENCY
62896  else
62897    PKGHANDLER_COMMAND=
62898
62899    case $PKGHANDLER in
62900      apt-get)
62901        apt_help     $MISSING_DEPENDENCY ;;
62902      yum)
62903        yum_help     $MISSING_DEPENDENCY ;;
62904      brew)
62905        brew_help    $MISSING_DEPENDENCY ;;
62906      port)
62907        port_help    $MISSING_DEPENDENCY ;;
62908      pkgutil)
62909        pkgutil_help $MISSING_DEPENDENCY ;;
62910      pkgadd)
62911        pkgadd_help  $MISSING_DEPENDENCY ;;
62912    esac
62913
62914    if test "x$PKGHANDLER_COMMAND" != x; then
62915      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62916    fi
62917  fi
62918
62919        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62920      fi
62921    fi # end user specified settings
62922
62923    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62924    if test "x$FREETYPE_CFLAGS" = x; then
62925
62926  # Only process if variable expands to non-empty
62927
62928  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62930
62931  # Input might be given as Windows format, start by converting to
62932  # unix format.
62933  path="$FREETYPE_INCLUDE_PATH"
62934  new_path=`$CYGPATH -u "$path"`
62935
62936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62939  # "foo.exe" is OK but "foo" is an error.
62940  #
62941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62942  # It is also a way to make sure we got the proper file name for the real test later on.
62943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62944  if test "x$test_shortpath" = x; then
62945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62946$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62947    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62948  fi
62949
62950  # Call helper function which possibly converts this using DOS-style short mode.
62951  # If so, the updated path is stored in $new_path.
62952
62953  input_path="$new_path"
62954  # Check if we need to convert this using DOS-style short mode. If the path
62955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62956  # take no chances and rewrite it.
62957  # Note: m4 eats our [], so we need to use [ and ] instead.
62958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62959  if test "x$has_forbidden_chars" != x; then
62960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62964      # Going to short mode and back again did indeed matter. Since short mode is
62965      # case insensitive, let's make it lowercase to improve readability.
62966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62967      # Now convert it back to Unix-style (cygpath)
62968      input_path=`$CYGPATH -u "$shortmode_path"`
62969      new_path="$input_path"
62970    fi
62971  fi
62972
62973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62974  if test "x$test_cygdrive_prefix" = x; then
62975    # As a simple fix, exclude /usr/bin since it's not a real path.
62976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62978      # a path prefixed by /cygdrive for fixpath to work.
62979      new_path="$CYGWIN_ROOT_PATH$input_path"
62980    fi
62981  fi
62982
62983
62984  if test "x$path" != "x$new_path"; then
62985    FREETYPE_INCLUDE_PATH="$new_path"
62986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62987$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62988  fi
62989
62990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62991
62992  path="$FREETYPE_INCLUDE_PATH"
62993  has_colon=`$ECHO $path | $GREP ^.:`
62994  new_path="$path"
62995  if test "x$has_colon" = x; then
62996    # Not in mixed or Windows style, start by that.
62997    new_path=`cmd //c echo $path`
62998  fi
62999
63000
63001  input_path="$new_path"
63002  # Check if we need to convert this using DOS-style short mode. If the path
63003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63004  # take no chances and rewrite it.
63005  # Note: m4 eats our [], so we need to use [ and ] instead.
63006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63007  if test "x$has_forbidden_chars" != x; then
63008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63010  fi
63011
63012
63013  windows_path="$new_path"
63014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63015    unix_path=`$CYGPATH -u "$windows_path"`
63016    new_path="$unix_path"
63017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63019    new_path="$unix_path"
63020  fi
63021
63022  if test "x$path" != "x$new_path"; then
63023    FREETYPE_INCLUDE_PATH="$new_path"
63024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63025$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63026  fi
63027
63028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63030
63031    else
63032      # We're on a unix platform. Hooray! :)
63033      path="$FREETYPE_INCLUDE_PATH"
63034      has_space=`$ECHO "$path" | $GREP " "`
63035      if test "x$has_space" != x; then
63036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63037$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63039      fi
63040
63041      # Use eval to expand a potential ~
63042      eval path="$path"
63043      if test ! -f "$path" && test ! -d "$path"; then
63044        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63045      fi
63046
63047      if test -d "$path"; then
63048        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63049      else
63050        dir="`$DIRNAME "$path"`"
63051        base="`$BASENAME "$path"`"
63052        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63053      fi
63054    fi
63055  fi
63056
63057      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63058        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63059      else
63060        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63061      fi
63062    fi
63063
63064    if test "x$FREETYPE_LIBS" = x; then
63065
63066  # Only process if variable expands to non-empty
63067
63068  if test "x$FREETYPE_LIB_PATH" != x; then
63069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63070
63071  # Input might be given as Windows format, start by converting to
63072  # unix format.
63073  path="$FREETYPE_LIB_PATH"
63074  new_path=`$CYGPATH -u "$path"`
63075
63076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63079  # "foo.exe" is OK but "foo" is an error.
63080  #
63081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63082  # It is also a way to make sure we got the proper file name for the real test later on.
63083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63084  if test "x$test_shortpath" = x; then
63085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63086$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63087    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63088  fi
63089
63090  # Call helper function which possibly converts this using DOS-style short mode.
63091  # If so, the updated path is stored in $new_path.
63092
63093  input_path="$new_path"
63094  # Check if we need to convert this using DOS-style short mode. If the path
63095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63096  # take no chances and rewrite it.
63097  # Note: m4 eats our [], so we need to use [ and ] instead.
63098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63099  if test "x$has_forbidden_chars" != x; then
63100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63104      # Going to short mode and back again did indeed matter. Since short mode is
63105      # case insensitive, let's make it lowercase to improve readability.
63106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63107      # Now convert it back to Unix-style (cygpath)
63108      input_path=`$CYGPATH -u "$shortmode_path"`
63109      new_path="$input_path"
63110    fi
63111  fi
63112
63113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63114  if test "x$test_cygdrive_prefix" = x; then
63115    # As a simple fix, exclude /usr/bin since it's not a real path.
63116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63118      # a path prefixed by /cygdrive for fixpath to work.
63119      new_path="$CYGWIN_ROOT_PATH$input_path"
63120    fi
63121  fi
63122
63123
63124  if test "x$path" != "x$new_path"; then
63125    FREETYPE_LIB_PATH="$new_path"
63126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63127$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63128  fi
63129
63130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63131
63132  path="$FREETYPE_LIB_PATH"
63133  has_colon=`$ECHO $path | $GREP ^.:`
63134  new_path="$path"
63135  if test "x$has_colon" = x; then
63136    # Not in mixed or Windows style, start by that.
63137    new_path=`cmd //c echo $path`
63138  fi
63139
63140
63141  input_path="$new_path"
63142  # Check if we need to convert this using DOS-style short mode. If the path
63143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63144  # take no chances and rewrite it.
63145  # Note: m4 eats our [], so we need to use [ and ] instead.
63146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63147  if test "x$has_forbidden_chars" != x; then
63148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63150  fi
63151
63152
63153  windows_path="$new_path"
63154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63155    unix_path=`$CYGPATH -u "$windows_path"`
63156    new_path="$unix_path"
63157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63159    new_path="$unix_path"
63160  fi
63161
63162  if test "x$path" != "x$new_path"; then
63163    FREETYPE_LIB_PATH="$new_path"
63164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63165$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63166  fi
63167
63168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63170
63171    else
63172      # We're on a unix platform. Hooray! :)
63173      path="$FREETYPE_LIB_PATH"
63174      has_space=`$ECHO "$path" | $GREP " "`
63175      if test "x$has_space" != x; then
63176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63177$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63179      fi
63180
63181      # Use eval to expand a potential ~
63182      eval path="$path"
63183      if test ! -f "$path" && test ! -d "$path"; then
63184        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63185      fi
63186
63187      if test -d "$path"; then
63188        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63189      else
63190        dir="`$DIRNAME "$path"`"
63191        base="`$BASENAME "$path"`"
63192        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63193      fi
63194    fi
63195  fi
63196
63197      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63198        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63199      else
63200        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63201      fi
63202    fi
63203
63204    # Try to compile it
63205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63206$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63207    ac_ext=cpp
63208ac_cpp='$CXXCPP $CPPFLAGS'
63209ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63210ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63211ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63212
63213    PREV_CXXCFLAGS="$CXXFLAGS"
63214    PREV_LIBS="$LIBS"
63215    PREV_CXX="$CXX"
63216    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63217    LIBS="$LIBS $FREETYPE_LIBS"
63218    CXX="$FIXPATH $CXX"
63219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63220/* end confdefs.h.  */
63221
63222          #include<ft2build.h>
63223          #include FT_FREETYPE_H
63224          int main () {
63225            FT_Init_FreeType(NULL);
63226            return 0;
63227          }
63228
63229_ACEOF
63230if ac_fn_cxx_try_link "$LINENO"; then :
63231
63232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63233$as_echo "yes" >&6; }
63234
63235else
63236
63237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63238$as_echo "no" >&6; }
63239          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63240$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63241          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63242$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63243
63244
63245  # Print a helpful message on how to acquire the necessary build dependency.
63246  # freetype is the help tag: freetype, cups, alsa etc
63247  MISSING_DEPENDENCY=freetype
63248
63249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63250    cygwin_help $MISSING_DEPENDENCY
63251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63252    msys_help $MISSING_DEPENDENCY
63253  else
63254    PKGHANDLER_COMMAND=
63255
63256    case $PKGHANDLER in
63257      apt-get)
63258        apt_help     $MISSING_DEPENDENCY ;;
63259      yum)
63260        yum_help     $MISSING_DEPENDENCY ;;
63261      brew)
63262        brew_help    $MISSING_DEPENDENCY ;;
63263      port)
63264        port_help    $MISSING_DEPENDENCY ;;
63265      pkgutil)
63266        pkgutil_help $MISSING_DEPENDENCY ;;
63267      pkgadd)
63268        pkgadd_help  $MISSING_DEPENDENCY ;;
63269    esac
63270
63271    if test "x$PKGHANDLER_COMMAND" != x; then
63272      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63273    fi
63274  fi
63275
63276
63277          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63278
63279
63280fi
63281rm -f core conftest.err conftest.$ac_objext \
63282    conftest$ac_exeext conftest.$ac_ext
63283    CXXCFLAGS="$PREV_CXXFLAGS"
63284    LIBS="$PREV_LIBS"
63285    CXX="$PREV_CXX"
63286    ac_ext=cpp
63287ac_cpp='$CXXCPP $CPPFLAGS'
63288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63291
63292
63293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63294$as_echo_n "checking if we should bundle freetype... " >&6; }
63295    if test "x$BUNDLE_FREETYPE" = xyes; then
63296      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63297    fi
63298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63299$as_echo "$BUNDLE_FREETYPE" >&6; }
63300
63301  fi # end freetype needed
63302
63303
63304
63305
63306
63307
63308
63309# Check whether --with-alsa was given.
63310if test "${with_alsa+set}" = set; then :
63311  withval=$with_alsa;
63312fi
63313
63314
63315# Check whether --with-alsa-include was given.
63316if test "${with_alsa_include+set}" = set; then :
63317  withval=$with_alsa_include;
63318fi
63319
63320
63321# Check whether --with-alsa-lib was given.
63322if test "${with_alsa_lib+set}" = set; then :
63323  withval=$with_alsa_lib;
63324fi
63325
63326
63327  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63328    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63329        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63330        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63331      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63332$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63333    fi
63334    ALSA_CFLAGS=
63335    ALSA_LIBS=
63336  else
63337    ALSA_FOUND=no
63338
63339    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63340      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63341    fi
63342
63343    if test "x${with_alsa}" != x; then
63344      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63345      ALSA_CFLAGS="-I${with_alsa}/include"
63346      ALSA_FOUND=yes
63347    fi
63348    if test "x${with_alsa_include}" != x; then
63349      ALSA_CFLAGS="-I${with_alsa_include}"
63350      ALSA_FOUND=yes
63351    fi
63352    if test "x${with_alsa_lib}" != x; then
63353      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63354      ALSA_FOUND=yes
63355    fi
63356    # Do not try pkg-config if we have a sysroot set.
63357    if test "x$SYSROOT" = x; then
63358      if test "x$ALSA_FOUND" = xno; then
63359
63360pkg_failed=no
63361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63362$as_echo_n "checking for ALSA... " >&6; }
63363
63364if test -n "$ALSA_CFLAGS"; then
63365    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63366 elif test -n "$PKG_CONFIG"; then
63367    if test -n "$PKG_CONFIG" && \
63368    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63369  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63370  ac_status=$?
63371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63372  test $ac_status = 0; }; then
63373  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63374else
63375  pkg_failed=yes
63376fi
63377 else
63378    pkg_failed=untried
63379fi
63380if test -n "$ALSA_LIBS"; then
63381    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63382 elif test -n "$PKG_CONFIG"; then
63383    if test -n "$PKG_CONFIG" && \
63384    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63385  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63386  ac_status=$?
63387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63388  test $ac_status = 0; }; then
63389  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63390else
63391  pkg_failed=yes
63392fi
63393 else
63394    pkg_failed=untried
63395fi
63396
63397
63398
63399if test $pkg_failed = yes; then
63400
63401if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63402        _pkg_short_errors_supported=yes
63403else
63404        _pkg_short_errors_supported=no
63405fi
63406        if test $_pkg_short_errors_supported = yes; then
63407	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63408        else
63409	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63410        fi
63411	# Put the nasty error message in config.log where it belongs
63412	echo "$ALSA_PKG_ERRORS" >&5
63413
63414	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63415$as_echo "no" >&6; }
63416                ALSA_FOUND=no
63417elif test $pkg_failed = untried; then
63418	ALSA_FOUND=no
63419else
63420	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63421	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63423$as_echo "yes" >&6; }
63424	ALSA_FOUND=yes
63425fi
63426      fi
63427    fi
63428    if test "x$ALSA_FOUND" = xno; then
63429      for ac_header in alsa/asoundlib.h
63430do :
63431  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63432if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63433  cat >>confdefs.h <<_ACEOF
63434#define HAVE_ALSA_ASOUNDLIB_H 1
63435_ACEOF
63436
63437            ALSA_FOUND=yes
63438            ALSA_CFLAGS=-Iignoreme
63439            ALSA_LIBS=-lasound
63440            DEFAULT_ALSA=yes
63441
63442else
63443  ALSA_FOUND=no
63444
63445fi
63446
63447done
63448
63449    fi
63450    if test "x$ALSA_FOUND" = xno; then
63451
63452  # Print a helpful message on how to acquire the necessary build dependency.
63453  # alsa is the help tag: freetype, cups, alsa etc
63454  MISSING_DEPENDENCY=alsa
63455
63456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63457    cygwin_help $MISSING_DEPENDENCY
63458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63459    msys_help $MISSING_DEPENDENCY
63460  else
63461    PKGHANDLER_COMMAND=
63462
63463    case $PKGHANDLER in
63464      apt-get)
63465        apt_help     $MISSING_DEPENDENCY ;;
63466      yum)
63467        yum_help     $MISSING_DEPENDENCY ;;
63468      brew)
63469        brew_help    $MISSING_DEPENDENCY ;;
63470      port)
63471        port_help    $MISSING_DEPENDENCY ;;
63472      pkgutil)
63473        pkgutil_help $MISSING_DEPENDENCY ;;
63474      pkgadd)
63475        pkgadd_help  $MISSING_DEPENDENCY ;;
63476    esac
63477
63478    if test "x$PKGHANDLER_COMMAND" != x; then
63479      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63480    fi
63481  fi
63482
63483      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63484    fi
63485  fi
63486
63487
63488
63489
63490
63491
63492# Check whether --with-libffi was given.
63493if test "${with_libffi+set}" = set; then :
63494  withval=$with_libffi;
63495fi
63496
63497
63498# Check whether --with-libffi-include was given.
63499if test "${with_libffi_include+set}" = set; then :
63500  withval=$with_libffi_include;
63501fi
63502
63503
63504# Check whether --with-libffi-lib was given.
63505if test "${with_libffi_lib+set}" = set; then :
63506  withval=$with_libffi_lib;
63507fi
63508
63509  # Check whether --enable-libffi-bundling was given.
63510if test "${enable_libffi_bundling+set}" = set; then :
63511  enableval=$enable_libffi_bundling;
63512fi
63513
63514
63515  if test "x$NEEDS_LIB_FFI" = xfalse; then
63516    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63517        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63518        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63520$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63521    fi
63522    LIBFFI_CFLAGS=
63523    LIBFFI_LIBS=
63524  else
63525    LIBFFI_FOUND=no
63526
63527    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63528      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63529    fi
63530
63531    if test "x${with_libffi}" != x; then
63532      LIBFFI_LIB_PATH="${with_libffi}/lib"
63533      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63534      LIBFFI_CFLAGS="-I${with_libffi}/include"
63535      LIBFFI_FOUND=yes
63536    fi
63537    if test "x${with_libffi_include}" != x; then
63538      LIBFFI_CFLAGS="-I${with_libffi_include}"
63539      LIBFFI_FOUND=yes
63540    fi
63541    if test "x${with_libffi_lib}" != x; then
63542      LIBFFI_LIB_PATH="${with_libffi_lib}"
63543      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63544      LIBFFI_FOUND=yes
63545    fi
63546    # Do not try pkg-config if we have a sysroot set.
63547    if test "x$SYSROOT" = x; then
63548      if test "x$LIBFFI_FOUND" = xno; then
63549        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63550
63551pkg_failed=no
63552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63553$as_echo_n "checking for LIBFFI... " >&6; }
63554
63555if test -n "$LIBFFI_CFLAGS"; then
63556    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63557 elif test -n "$PKG_CONFIG"; then
63558    if test -n "$PKG_CONFIG" && \
63559    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63560  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63561  ac_status=$?
63562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63563  test $ac_status = 0; }; then
63564  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63565else
63566  pkg_failed=yes
63567fi
63568 else
63569    pkg_failed=untried
63570fi
63571if test -n "$LIBFFI_LIBS"; then
63572    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63573 elif test -n "$PKG_CONFIG"; then
63574    if test -n "$PKG_CONFIG" && \
63575    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63576  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63577  ac_status=$?
63578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63579  test $ac_status = 0; }; then
63580  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63581else
63582  pkg_failed=yes
63583fi
63584 else
63585    pkg_failed=untried
63586fi
63587
63588
63589
63590if test $pkg_failed = yes; then
63591
63592if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63593        _pkg_short_errors_supported=yes
63594else
63595        _pkg_short_errors_supported=no
63596fi
63597        if test $_pkg_short_errors_supported = yes; then
63598	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63599        else
63600	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63601        fi
63602	# Put the nasty error message in config.log where it belongs
63603	echo "$LIBFFI_PKG_ERRORS" >&5
63604
63605	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63606$as_echo "no" >&6; }
63607                LIBFFI_FOUND=no
63608elif test $pkg_failed = untried; then
63609	LIBFFI_FOUND=no
63610else
63611	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63612	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63614$as_echo "yes" >&6; }
63615	LIBFFI_FOUND=yes
63616fi
63617      fi
63618    fi
63619    if test "x$LIBFFI_FOUND" = xno; then
63620      for ac_header in ffi.h
63621do :
63622  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63623if test "x$ac_cv_header_ffi_h" = xyes; then :
63624  cat >>confdefs.h <<_ACEOF
63625#define HAVE_FFI_H 1
63626_ACEOF
63627
63628            LIBFFI_FOUND=yes
63629            LIBFFI_CFLAGS=
63630            LIBFFI_LIBS=-lffi
63631
63632else
63633  LIBFFI_FOUND=no
63634
63635fi
63636
63637done
63638
63639    fi
63640    if test "x$LIBFFI_FOUND" = xno; then
63641
63642  # Print a helpful message on how to acquire the necessary build dependency.
63643  # ffi is the help tag: freetype, cups, alsa etc
63644  MISSING_DEPENDENCY=ffi
63645
63646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63647    cygwin_help $MISSING_DEPENDENCY
63648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63649    msys_help $MISSING_DEPENDENCY
63650  else
63651    PKGHANDLER_COMMAND=
63652
63653    case $PKGHANDLER in
63654      apt-get)
63655        apt_help     $MISSING_DEPENDENCY ;;
63656      yum)
63657        yum_help     $MISSING_DEPENDENCY ;;
63658      brew)
63659        brew_help    $MISSING_DEPENDENCY ;;
63660      port)
63661        port_help    $MISSING_DEPENDENCY ;;
63662      pkgutil)
63663        pkgutil_help $MISSING_DEPENDENCY ;;
63664      pkgadd)
63665        pkgadd_help  $MISSING_DEPENDENCY ;;
63666    esac
63667
63668    if test "x$PKGHANDLER_COMMAND" != x; then
63669      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63670    fi
63671  fi
63672
63673      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63674    fi
63675
63676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63677$as_echo_n "checking if libffi works... " >&6; }
63678    ac_ext=c
63679ac_cpp='$CPP $CPPFLAGS'
63680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63682ac_compiler_gnu=$ac_cv_c_compiler_gnu
63683
63684    OLD_CFLAGS="$CFLAGS"
63685    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63686    OLD_LIBS="$LIBS"
63687    LIBS="$LIBS $LIBFFI_LIBS"
63688    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63689/* end confdefs.h.  */
63690#include <ffi.h>
63691int
63692main ()
63693{
63694
63695          ffi_call(NULL, NULL, NULL, NULL);
63696          return 0;
63697
63698  ;
63699  return 0;
63700}
63701_ACEOF
63702if ac_fn_c_try_link "$LINENO"; then :
63703  LIBFFI_WORKS=yes
63704else
63705  LIBFFI_WORKS=no
63706
63707fi
63708rm -f core conftest.err conftest.$ac_objext \
63709    conftest$ac_exeext conftest.$ac_ext
63710    CFLAGS="$OLD_CFLAGS"
63711    LIBS="$OLD_LIBS"
63712    ac_ext=cpp
63713ac_cpp='$CXXCPP $CPPFLAGS'
63714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63717
63718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63719$as_echo "$LIBFFI_WORKS" >&6; }
63720
63721    if test "x$LIBFFI_WORKS" = xno; then
63722
63723  # Print a helpful message on how to acquire the necessary build dependency.
63724  # ffi is the help tag: freetype, cups, alsa etc
63725  MISSING_DEPENDENCY=ffi
63726
63727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63728    cygwin_help $MISSING_DEPENDENCY
63729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63730    msys_help $MISSING_DEPENDENCY
63731  else
63732    PKGHANDLER_COMMAND=
63733
63734    case $PKGHANDLER in
63735      apt-get)
63736        apt_help     $MISSING_DEPENDENCY ;;
63737      yum)
63738        yum_help     $MISSING_DEPENDENCY ;;
63739      brew)
63740        brew_help    $MISSING_DEPENDENCY ;;
63741      port)
63742        port_help    $MISSING_DEPENDENCY ;;
63743      pkgutil)
63744        pkgutil_help $MISSING_DEPENDENCY ;;
63745      pkgadd)
63746        pkgadd_help  $MISSING_DEPENDENCY ;;
63747    esac
63748
63749    if test "x$PKGHANDLER_COMMAND" != x; then
63750      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63751    fi
63752  fi
63753
63754      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63755    fi
63756
63757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63758$as_echo_n "checking if libffi should be bundled... " >&6; }
63759    if test "x$enable_libffi_bundling" = "x"; then
63760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63761$as_echo "no" >&6; }
63762      ENABLE_LIBFFI_BUNDLING=false
63763    elif  test "x$enable_libffi_bundling" = "xno"; then
63764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63765$as_echo "no, forced" >&6; }
63766      ENABLE_LIBFFI_BUNDLING=false
63767    elif  test "x$enable_libffi_bundling" = "xyes"; then
63768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63769$as_echo "yes, forced" >&6; }
63770      ENABLE_LIBFFI_BUNDLING=true
63771    else
63772      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63773    fi
63774
63775    # Find the libffi.so.X to bundle
63776    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63778$as_echo_n "checking for libffi lib file location... " >&6; }
63779      if test "x${LIBFFI_LIB_PATH}" != x; then
63780        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63781          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63782        else
63783          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63784        fi
63785      else
63786        # If we don't have an explicit path, look in a few obvious places
63787        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63788          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63789            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63790          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63791            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63792          else
63793            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63794          fi
63795        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63796          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63797            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63798          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63799            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63800          else
63801            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63802          fi
63803        else
63804          # Fallback on the default /usr/lib dir
63805          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63806            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63807          else
63808            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63809          fi
63810        fi
63811      fi
63812      # Make sure the wildcard is evaluated
63813      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63815$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63816    fi
63817  fi
63818
63819
63820
63821
63822
63823
63824
63825  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63826    # Extract the first word of "llvm-config", so it can be a program name with args.
63827set dummy llvm-config; ac_word=$2
63828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63829$as_echo_n "checking for $ac_word... " >&6; }
63830if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63831  $as_echo_n "(cached) " >&6
63832else
63833  if test -n "$LLVM_CONFIG"; then
63834  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63835else
63836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63837for as_dir in $PATH
63838do
63839  IFS=$as_save_IFS
63840  test -z "$as_dir" && as_dir=.
63841    for ac_exec_ext in '' $ac_executable_extensions; do
63842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63843    ac_cv_prog_LLVM_CONFIG="llvm-config"
63844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63845    break 2
63846  fi
63847done
63848  done
63849IFS=$as_save_IFS
63850
63851fi
63852fi
63853LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63854if test -n "$LLVM_CONFIG"; then
63855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63856$as_echo "$LLVM_CONFIG" >&6; }
63857else
63858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63859$as_echo "no" >&6; }
63860fi
63861
63862
63863
63864    if test "x$LLVM_CONFIG" != xllvm-config; then
63865      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63866    fi
63867
63868    llvm_components="jit mcjit engine nativecodegen native"
63869    unset LLVM_CFLAGS
63870    for flag in $("$LLVM_CONFIG" --cxxflags); do
63871      if echo "${flag}" | grep -q '^-[ID]'; then
63872        if test "${flag}" != "-D_DEBUG" ; then
63873          if test "${LLVM_CFLAGS}" != "" ; then
63874            LLVM_CFLAGS="${LLVM_CFLAGS} "
63875          fi
63876          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63877        fi
63878      fi
63879    done
63880    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63881    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63882
63883    unset LLVM_LDFLAGS
63884    for flag in $("${LLVM_CONFIG}" --ldflags); do
63885      if echo "${flag}" | grep -q '^-L'; then
63886        if test "${LLVM_LDFLAGS}" != ""; then
63887          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63888        fi
63889        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63890      fi
63891    done
63892
63893    unset LLVM_LIBS
63894    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63895      if echo "${flag}" | grep -q '^-l'; then
63896        if test "${LLVM_LIBS}" != ""; then
63897          LLVM_LIBS="${LLVM_LIBS} "
63898        fi
63899        LLVM_LIBS="${LLVM_LIBS}${flag}"
63900      fi
63901    done
63902
63903    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63904    # always properly detect -ltinfo
63905    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63906
63907
63908
63909
63910  fi
63911
63912
63913
63914# Check whether --with-libjpeg was given.
63915if test "${with_libjpeg+set}" = set; then :
63916  withval=$with_libjpeg;
63917fi
63918
63919
63920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63921$as_echo_n "checking for which libjpeg to use... " >&6; }
63922  # default is bundled
63923  DEFAULT_LIBJPEG=bundled
63924  # if user didn't specify, use DEFAULT_LIBJPEG
63925  if test "x${with_libjpeg}" = "x"; then
63926    with_libjpeg=${DEFAULT_LIBJPEG}
63927  fi
63928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63929$as_echo "${with_libjpeg}" >&6; }
63930
63931  if test "x${with_libjpeg}" = "xbundled"; then
63932    USE_EXTERNAL_LIBJPEG=false
63933  elif test "x${with_libjpeg}" = "xsystem"; then
63934    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63935if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63936
63937else
63938   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63939fi
63940
63941
63942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63943$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63944if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63945  $as_echo_n "(cached) " >&6
63946else
63947  ac_check_lib_save_LIBS=$LIBS
63948LIBS="-ljpeg  $LIBS"
63949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63950/* end confdefs.h.  */
63951
63952/* Override any GCC internal prototype to avoid an error.
63953   Use char because int might match the return type of a GCC
63954   builtin and then its argument prototype would still apply.  */
63955#ifdef __cplusplus
63956extern "C"
63957#endif
63958char jpeg_CreateDecompress ();
63959int
63960main ()
63961{
63962return jpeg_CreateDecompress ();
63963  ;
63964  return 0;
63965}
63966_ACEOF
63967if ac_fn_cxx_try_link "$LINENO"; then :
63968  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63969else
63970  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63971fi
63972rm -f core conftest.err conftest.$ac_objext \
63973    conftest$ac_exeext conftest.$ac_ext
63974LIBS=$ac_check_lib_save_LIBS
63975fi
63976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63977$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63978if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63979  cat >>confdefs.h <<_ACEOF
63980#define HAVE_LIBJPEG 1
63981_ACEOF
63982
63983  LIBS="-ljpeg $LIBS"
63984
63985else
63986   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63987fi
63988
63989
63990    USE_EXTERNAL_LIBJPEG=true
63991  else
63992    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63993  fi
63994
63995
63996
63997
63998
63999# Check whether --with-giflib was given.
64000if test "${with_giflib+set}" = set; then :
64001  withval=$with_giflib;
64002fi
64003
64004
64005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64006$as_echo_n "checking for which giflib to use... " >&6; }
64007  # default is bundled
64008  DEFAULT_GIFLIB=bundled
64009  # if user didn't specify, use DEFAULT_GIFLIB
64010  if test "x${with_giflib}" = "x"; then
64011    with_giflib=${DEFAULT_GIFLIB}
64012  fi
64013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64014$as_echo "${with_giflib}" >&6; }
64015
64016  if test "x${with_giflib}" = "xbundled"; then
64017    USE_EXTERNAL_LIBGIF=false
64018  elif test "x${with_giflib}" = "xsystem"; then
64019    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64020if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64021
64022else
64023   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64024fi
64025
64026
64027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64028$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64029if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64030  $as_echo_n "(cached) " >&6
64031else
64032  ac_check_lib_save_LIBS=$LIBS
64033LIBS="-lgif  $LIBS"
64034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64035/* end confdefs.h.  */
64036
64037/* Override any GCC internal prototype to avoid an error.
64038   Use char because int might match the return type of a GCC
64039   builtin and then its argument prototype would still apply.  */
64040#ifdef __cplusplus
64041extern "C"
64042#endif
64043char DGifGetCode ();
64044int
64045main ()
64046{
64047return DGifGetCode ();
64048  ;
64049  return 0;
64050}
64051_ACEOF
64052if ac_fn_cxx_try_link "$LINENO"; then :
64053  ac_cv_lib_gif_DGifGetCode=yes
64054else
64055  ac_cv_lib_gif_DGifGetCode=no
64056fi
64057rm -f core conftest.err conftest.$ac_objext \
64058    conftest$ac_exeext conftest.$ac_ext
64059LIBS=$ac_check_lib_save_LIBS
64060fi
64061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64062$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64063if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64064  cat >>confdefs.h <<_ACEOF
64065#define HAVE_LIBGIF 1
64066_ACEOF
64067
64068  LIBS="-lgif $LIBS"
64069
64070else
64071   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64072fi
64073
64074
64075    USE_EXTERNAL_LIBGIF=true
64076  else
64077    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64078  fi
64079
64080
64081
64082
64083
64084# Check whether --with-libpng was given.
64085if test "${with_libpng+set}" = set; then :
64086  withval=$with_libpng;
64087fi
64088
64089
64090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64091$as_echo_n "checking for which libpng to use... " >&6; }
64092
64093  # default is bundled
64094  DEFAULT_LIBPNG=bundled
64095  # if user didn't specify, use DEFAULT_LIBPNG
64096  if test "x${with_libpng}" = "x"; then
64097    with_libpng=${DEFAULT_LIBPNG}
64098  fi
64099
64100  if test "x${with_libpng}" = "xbundled"; then
64101    USE_EXTERNAL_LIBPNG=false
64102    PNG_CFLAGS=""
64103    PNG_LIBS=""
64104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64105$as_echo "bundled" >&6; }
64106  elif test "x${with_libpng}" = "xsystem"; then
64107
64108pkg_failed=no
64109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64110$as_echo_n "checking for PNG... " >&6; }
64111
64112if test -n "$PNG_CFLAGS"; then
64113    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64114 elif test -n "$PKG_CONFIG"; then
64115    if test -n "$PKG_CONFIG" && \
64116    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64117  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64118  ac_status=$?
64119  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64120  test $ac_status = 0; }; then
64121  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64122else
64123  pkg_failed=yes
64124fi
64125 else
64126    pkg_failed=untried
64127fi
64128if test -n "$PNG_LIBS"; then
64129    pkg_cv_PNG_LIBS="$PNG_LIBS"
64130 elif test -n "$PKG_CONFIG"; then
64131    if test -n "$PKG_CONFIG" && \
64132    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64133  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64134  ac_status=$?
64135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64136  test $ac_status = 0; }; then
64137  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64138else
64139  pkg_failed=yes
64140fi
64141 else
64142    pkg_failed=untried
64143fi
64144
64145
64146
64147if test $pkg_failed = yes; then
64148
64149if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64150        _pkg_short_errors_supported=yes
64151else
64152        _pkg_short_errors_supported=no
64153fi
64154        if test $_pkg_short_errors_supported = yes; then
64155	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64156        else
64157	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64158        fi
64159	# Put the nasty error message in config.log where it belongs
64160	echo "$PNG_PKG_ERRORS" >&5
64161
64162	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64163$as_echo "no" >&6; }
64164                LIBPNG_FOUND=no
64165elif test $pkg_failed = untried; then
64166	LIBPNG_FOUND=no
64167else
64168	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64169	PNG_LIBS=$pkg_cv_PNG_LIBS
64170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64171$as_echo "yes" >&6; }
64172	LIBPNG_FOUND=yes
64173fi
64174    if test "x${LIBPNG_FOUND}" = "xyes"; then
64175      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64176      USE_EXTERNAL_LIBPNG=true
64177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64178$as_echo "system" >&6; }
64179    else
64180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64181$as_echo "system not found" >&6; }
64182      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64183    fi
64184  else
64185    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64186  fi
64187
64188
64189
64190
64191
64192
64193
64194# Check whether --with-zlib was given.
64195if test "${with_zlib+set}" = set; then :
64196  withval=$with_zlib;
64197fi
64198
64199
64200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64201$as_echo_n "checking for compress in -lz... " >&6; }
64202if ${ac_cv_lib_z_compress+:} false; then :
64203  $as_echo_n "(cached) " >&6
64204else
64205  ac_check_lib_save_LIBS=$LIBS
64206LIBS="-lz  $LIBS"
64207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64208/* end confdefs.h.  */
64209
64210/* Override any GCC internal prototype to avoid an error.
64211   Use char because int might match the return type of a GCC
64212   builtin and then its argument prototype would still apply.  */
64213#ifdef __cplusplus
64214extern "C"
64215#endif
64216char compress ();
64217int
64218main ()
64219{
64220return compress ();
64221  ;
64222  return 0;
64223}
64224_ACEOF
64225if ac_fn_cxx_try_link "$LINENO"; then :
64226  ac_cv_lib_z_compress=yes
64227else
64228  ac_cv_lib_z_compress=no
64229fi
64230rm -f core conftest.err conftest.$ac_objext \
64231    conftest$ac_exeext conftest.$ac_ext
64232LIBS=$ac_check_lib_save_LIBS
64233fi
64234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64235$as_echo "$ac_cv_lib_z_compress" >&6; }
64236if test "x$ac_cv_lib_z_compress" = xyes; then :
64237   ZLIB_FOUND=yes
64238else
64239   ZLIB_FOUND=no
64240fi
64241
64242
64243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64244$as_echo_n "checking for which zlib to use... " >&6; }
64245
64246  DEFAULT_ZLIB=system
64247  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64248    # On windows default is bundled...on others default is system
64249    DEFAULT_ZLIB=bundled
64250  fi
64251
64252  if test "x${ZLIB_FOUND}" != "xyes"; then
64253    # If we don't find any system...set default to bundled
64254    DEFAULT_ZLIB=bundled
64255  fi
64256
64257  # If user didn't specify, use DEFAULT_ZLIB
64258  if test "x${with_zlib}" = "x"; then
64259    with_zlib=${DEFAULT_ZLIB}
64260  fi
64261
64262  if test "x${with_zlib}" = "xbundled"; then
64263    USE_EXTERNAL_LIBZ=false
64264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64265$as_echo "bundled" >&6; }
64266  elif test "x${with_zlib}" = "xsystem"; then
64267    if test "x${ZLIB_FOUND}" = "xyes"; then
64268      USE_EXTERNAL_LIBZ=true
64269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64270$as_echo "system" >&6; }
64271    else
64272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64273$as_echo "system not found" >&6; }
64274      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64275    fi
64276  else
64277    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64278  fi
64279
64280
64281
64282
64283
64284# Check whether --with-lcms was given.
64285if test "${with_lcms+set}" = set; then :
64286  withval=$with_lcms;
64287fi
64288
64289
64290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64291$as_echo_n "checking for which lcms to use... " >&6; }
64292
64293  DEFAULT_LCMS=bundled
64294  # If user didn't specify, use DEFAULT_LCMS
64295  if test "x${with_lcms}" = "x"; then
64296    with_lcms=${DEFAULT_LCMS}
64297  fi
64298
64299  if test "x${with_lcms}" = "xbundled"; then
64300    USE_EXTERNAL_LCMS=false
64301    LCMS_CFLAGS=""
64302    LCMS_LIBS=""
64303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64304$as_echo "bundled" >&6; }
64305  elif test "x${with_lcms}" = "xsystem"; then
64306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64307$as_echo "system" >&6; }
64308
64309pkg_failed=no
64310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64311$as_echo_n "checking for LCMS... " >&6; }
64312
64313if test -n "$LCMS_CFLAGS"; then
64314    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64315 elif test -n "$PKG_CONFIG"; then
64316    if test -n "$PKG_CONFIG" && \
64317    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64318  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64319  ac_status=$?
64320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64321  test $ac_status = 0; }; then
64322  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64323else
64324  pkg_failed=yes
64325fi
64326 else
64327    pkg_failed=untried
64328fi
64329if test -n "$LCMS_LIBS"; then
64330    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64331 elif test -n "$PKG_CONFIG"; then
64332    if test -n "$PKG_CONFIG" && \
64333    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64334  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64335  ac_status=$?
64336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64337  test $ac_status = 0; }; then
64338  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64339else
64340  pkg_failed=yes
64341fi
64342 else
64343    pkg_failed=untried
64344fi
64345
64346
64347
64348if test $pkg_failed = yes; then
64349
64350if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64351        _pkg_short_errors_supported=yes
64352else
64353        _pkg_short_errors_supported=no
64354fi
64355        if test $_pkg_short_errors_supported = yes; then
64356	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64357        else
64358	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64359        fi
64360	# Put the nasty error message in config.log where it belongs
64361	echo "$LCMS_PKG_ERRORS" >&5
64362
64363	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64364$as_echo "no" >&6; }
64365                LCMS_FOUND=no
64366elif test $pkg_failed = untried; then
64367	LCMS_FOUND=no
64368else
64369	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64370	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64372$as_echo "yes" >&6; }
64373	LCMS_FOUND=yes
64374fi
64375    if test "x${LCMS_FOUND}" = "xyes"; then
64376      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64377      USE_EXTERNAL_LCMS=true
64378    else
64379      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64380    fi
64381  else
64382    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64383  fi
64384
64385
64386
64387
64388
64389
64390
64391
64392
64393
64394
64395
64396
64397  # Setup libm (the maths library)
64398  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64400$as_echo_n "checking for cos in -lm... " >&6; }
64401if ${ac_cv_lib_m_cos+:} false; then :
64402  $as_echo_n "(cached) " >&6
64403else
64404  ac_check_lib_save_LIBS=$LIBS
64405LIBS="-lm  $LIBS"
64406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64407/* end confdefs.h.  */
64408
64409/* Override any GCC internal prototype to avoid an error.
64410   Use char because int might match the return type of a GCC
64411   builtin and then its argument prototype would still apply.  */
64412#ifdef __cplusplus
64413extern "C"
64414#endif
64415char cos ();
64416int
64417main ()
64418{
64419return cos ();
64420  ;
64421  return 0;
64422}
64423_ACEOF
64424if ac_fn_cxx_try_link "$LINENO"; then :
64425  ac_cv_lib_m_cos=yes
64426else
64427  ac_cv_lib_m_cos=no
64428fi
64429rm -f core conftest.err conftest.$ac_objext \
64430    conftest$ac_exeext conftest.$ac_ext
64431LIBS=$ac_check_lib_save_LIBS
64432fi
64433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64434$as_echo "$ac_cv_lib_m_cos" >&6; }
64435if test "x$ac_cv_lib_m_cos" = xyes; then :
64436  cat >>confdefs.h <<_ACEOF
64437#define HAVE_LIBM 1
64438_ACEOF
64439
64440  LIBS="-lm $LIBS"
64441
64442else
64443
64444        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64445$as_echo "$as_me: Maths library was not found" >&6;}
64446
64447fi
64448
64449    LIBM="-lm"
64450  else
64451    LIBM=""
64452  fi
64453
64454
64455  # Setup libdl (for dynamic library loading)
64456  save_LIBS="$LIBS"
64457  LIBS=""
64458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64459$as_echo_n "checking for dlopen in -ldl... " >&6; }
64460if ${ac_cv_lib_dl_dlopen+:} false; then :
64461  $as_echo_n "(cached) " >&6
64462else
64463  ac_check_lib_save_LIBS=$LIBS
64464LIBS="-ldl  $LIBS"
64465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64466/* end confdefs.h.  */
64467
64468/* Override any GCC internal prototype to avoid an error.
64469   Use char because int might match the return type of a GCC
64470   builtin and then its argument prototype would still apply.  */
64471#ifdef __cplusplus
64472extern "C"
64473#endif
64474char dlopen ();
64475int
64476main ()
64477{
64478return dlopen ();
64479  ;
64480  return 0;
64481}
64482_ACEOF
64483if ac_fn_cxx_try_link "$LINENO"; then :
64484  ac_cv_lib_dl_dlopen=yes
64485else
64486  ac_cv_lib_dl_dlopen=no
64487fi
64488rm -f core conftest.err conftest.$ac_objext \
64489    conftest$ac_exeext conftest.$ac_ext
64490LIBS=$ac_check_lib_save_LIBS
64491fi
64492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64493$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64494if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64495  cat >>confdefs.h <<_ACEOF
64496#define HAVE_LIBDL 1
64497_ACEOF
64498
64499  LIBS="-ldl $LIBS"
64500
64501fi
64502
64503  LIBDL="$LIBS"
64504
64505  LIBS="$save_LIBS"
64506
64507  # Deprecated libraries, keep the flags for backwards compatibility
64508  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64509
64510
64511# Check whether --with-dxsdk was given.
64512if test "${with_dxsdk+set}" = set; then :
64513  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64514$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64515fi
64516
64517
64518
64519
64520# Check whether --with-dxsdk-lib was given.
64521if test "${with_dxsdk_lib+set}" = set; then :
64522  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64523$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64524fi
64525
64526
64527
64528
64529# Check whether --with-dxsdk-include was given.
64530if test "${with_dxsdk_include+set}" = set; then :
64531  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64532$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64533fi
64534
64535
64536  fi
64537
64538  # Control if libzip can use mmap. Available for purposes of overriding.
64539  LIBZIP_CAN_USE_MMAP=true
64540
64541
64542
64543  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64544    # Find the root of the Solaris Studio installation from the compiler path
64545    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64546    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64548$as_echo_n "checking for libstlport.so.1... " >&6; }
64549    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64550      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64551      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64552    fi
64553    if test -f "$STLPORT_LIB"; then
64554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64555$as_echo "yes, $STLPORT_LIB" >&6; }
64556
64557  # Only process if variable expands to non-empty
64558
64559  if test "x$STLPORT_LIB" != x; then
64560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64561
64562  # Input might be given as Windows format, start by converting to
64563  # unix format.
64564  path="$STLPORT_LIB"
64565  new_path=`$CYGPATH -u "$path"`
64566
64567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64570  # "foo.exe" is OK but "foo" is an error.
64571  #
64572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64573  # It is also a way to make sure we got the proper file name for the real test later on.
64574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64575  if test "x$test_shortpath" = x; then
64576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64577$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64578    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64579  fi
64580
64581  # Call helper function which possibly converts this using DOS-style short mode.
64582  # If so, the updated path is stored in $new_path.
64583
64584  input_path="$new_path"
64585  # Check if we need to convert this using DOS-style short mode. If the path
64586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64587  # take no chances and rewrite it.
64588  # Note: m4 eats our [], so we need to use [ and ] instead.
64589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64590  if test "x$has_forbidden_chars" != x; then
64591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64595      # Going to short mode and back again did indeed matter. Since short mode is
64596      # case insensitive, let's make it lowercase to improve readability.
64597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64598      # Now convert it back to Unix-style (cygpath)
64599      input_path=`$CYGPATH -u "$shortmode_path"`
64600      new_path="$input_path"
64601    fi
64602  fi
64603
64604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64605  if test "x$test_cygdrive_prefix" = x; then
64606    # As a simple fix, exclude /usr/bin since it's not a real path.
64607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64609      # a path prefixed by /cygdrive for fixpath to work.
64610      new_path="$CYGWIN_ROOT_PATH$input_path"
64611    fi
64612  fi
64613
64614
64615  if test "x$path" != "x$new_path"; then
64616    STLPORT_LIB="$new_path"
64617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64618$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64619  fi
64620
64621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64622
64623  path="$STLPORT_LIB"
64624  has_colon=`$ECHO $path | $GREP ^.:`
64625  new_path="$path"
64626  if test "x$has_colon" = x; then
64627    # Not in mixed or Windows style, start by that.
64628    new_path=`cmd //c echo $path`
64629  fi
64630
64631
64632  input_path="$new_path"
64633  # Check if we need to convert this using DOS-style short mode. If the path
64634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64635  # take no chances and rewrite it.
64636  # Note: m4 eats our [], so we need to use [ and ] instead.
64637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64638  if test "x$has_forbidden_chars" != x; then
64639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64641  fi
64642
64643
64644  windows_path="$new_path"
64645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64646    unix_path=`$CYGPATH -u "$windows_path"`
64647    new_path="$unix_path"
64648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64650    new_path="$unix_path"
64651  fi
64652
64653  if test "x$path" != "x$new_path"; then
64654    STLPORT_LIB="$new_path"
64655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64656$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64657  fi
64658
64659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64661
64662    else
64663      # We're on a unix platform. Hooray! :)
64664      path="$STLPORT_LIB"
64665      has_space=`$ECHO "$path" | $GREP " "`
64666      if test "x$has_space" != x; then
64667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64668$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64670      fi
64671
64672      # Use eval to expand a potential ~
64673      eval path="$path"
64674      if test ! -f "$path" && test ! -d "$path"; then
64675        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64676      fi
64677
64678      if test -d "$path"; then
64679        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64680      else
64681        dir="`$DIRNAME "$path"`"
64682        base="`$BASENAME "$path"`"
64683        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64684      fi
64685    fi
64686  fi
64687
64688    else
64689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64690$as_echo "no, not found at $STLPORT_LIB" >&6; }
64691      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64692    fi
64693
64694  fi
64695
64696
64697
64698# Check whether --with-libelf was given.
64699if test "${with_libelf+set}" = set; then :
64700  withval=$with_libelf;
64701fi
64702
64703
64704# Check whether --with-libelf-include was given.
64705if test "${with_libelf_include+set}" = set; then :
64706  withval=$with_libelf_include;
64707fi
64708
64709
64710# Check whether --with-libelf-lib was given.
64711if test "${with_libelf_lib+set}" = set; then :
64712  withval=$with_libelf_lib;
64713fi
64714
64715
64716  if test "x$ENABLE_AOT" = xfalse; then
64717    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64718        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64719        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64720      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64721$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64722    fi
64723    LIBELF_CFLAGS=
64724    LIBELF_LIBS=
64725  else
64726    LIBELF_FOUND=no
64727
64728    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64729      ENABLE_AOT="false"
64730      if test "x${enable_aot}" = xyes; then
64731        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64732      fi
64733    else
64734      if test "x${with_libelf}" != x; then
64735        ELF_LIBS="-L${with_libelf}/lib -lelf"
64736        ELF_CFLAGS="-I${with_libelf}/include"
64737        LIBELF_FOUND=yes
64738      fi
64739      if test "x${with_libelf_include}" != x; then
64740        ELF_CFLAGS="-I${with_libelf_include}"
64741        LIBELF_FOUND=yes
64742      fi
64743      if test "x${with_libelf_lib}" != x; then
64744        ELF_LIBS="-L${with_libelf_lib} -lelf"
64745        LIBELF_FOUND=yes
64746      fi
64747      # Do not try pkg-config if we have a sysroot set.
64748      if test "x$SYSROOT" = x; then
64749        if test "x$LIBELF_FOUND" = xno; then
64750          # Figure out ELF_CFLAGS and ELF_LIBS
64751
64752pkg_failed=no
64753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64754$as_echo_n "checking for ELF... " >&6; }
64755
64756if test -n "$ELF_CFLAGS"; then
64757    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64758 elif test -n "$PKG_CONFIG"; then
64759    if test -n "$PKG_CONFIG" && \
64760    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64761  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64762  ac_status=$?
64763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64764  test $ac_status = 0; }; then
64765  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64766else
64767  pkg_failed=yes
64768fi
64769 else
64770    pkg_failed=untried
64771fi
64772if test -n "$ELF_LIBS"; then
64773    pkg_cv_ELF_LIBS="$ELF_LIBS"
64774 elif test -n "$PKG_CONFIG"; then
64775    if test -n "$PKG_CONFIG" && \
64776    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64777  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64778  ac_status=$?
64779  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64780  test $ac_status = 0; }; then
64781  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64782else
64783  pkg_failed=yes
64784fi
64785 else
64786    pkg_failed=untried
64787fi
64788
64789
64790
64791if test $pkg_failed = yes; then
64792
64793if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64794        _pkg_short_errors_supported=yes
64795else
64796        _pkg_short_errors_supported=no
64797fi
64798        if test $_pkg_short_errors_supported = yes; then
64799	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64800        else
64801	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64802        fi
64803	# Put the nasty error message in config.log where it belongs
64804	echo "$ELF_PKG_ERRORS" >&5
64805
64806	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64807$as_echo "no" >&6; }
64808                LIBELF_FOUND=no
64809elif test $pkg_failed = untried; then
64810	LIBELF_FOUND=no
64811else
64812	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64813	ELF_LIBS=$pkg_cv_ELF_LIBS
64814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64815$as_echo "yes" >&6; }
64816	LIBELF_FOUND=yes
64817fi
64818        fi
64819      fi
64820      if test "x$LIBELF_FOUND" = xno; then
64821        for ac_header in libelf.h
64822do :
64823  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64824if test "x$ac_cv_header_libelf_h" = xyes; then :
64825  cat >>confdefs.h <<_ACEOF
64826#define HAVE_LIBELF_H 1
64827_ACEOF
64828
64829              LIBELF_FOUND=yes
64830              ELF_CFLAGS=
64831              ELF_LIBS=-lelf
64832
64833else
64834  LIBELF_FOUND=no
64835
64836fi
64837
64838done
64839
64840      fi
64841      if test "x$LIBELF_FOUND" = xno; then
64842        ENABLE_AOT="false"
64843
64844  # Print a helpful message on how to acquire the necessary build dependency.
64845  # elf is the help tag: freetype, cups, alsa etc
64846  MISSING_DEPENDENCY=elf
64847
64848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64849    cygwin_help $MISSING_DEPENDENCY
64850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64851    msys_help $MISSING_DEPENDENCY
64852  else
64853    PKGHANDLER_COMMAND=
64854
64855    case $PKGHANDLER in
64856      apt-get)
64857        apt_help     $MISSING_DEPENDENCY ;;
64858      yum)
64859        yum_help     $MISSING_DEPENDENCY ;;
64860      brew)
64861        brew_help    $MISSING_DEPENDENCY ;;
64862      port)
64863        port_help    $MISSING_DEPENDENCY ;;
64864      pkgutil)
64865        pkgutil_help $MISSING_DEPENDENCY ;;
64866      pkgadd)
64867        pkgadd_help  $MISSING_DEPENDENCY ;;
64868    esac
64869
64870    if test "x$PKGHANDLER_COMMAND" != x; then
64871      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64872    fi
64873  fi
64874
64875        if test "x${enable_aot}" = xyes; then
64876          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64877        else
64878          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64879$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64880        fi
64881      else
64882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64883$as_echo_n "checking if libelf works... " >&6; }
64884        ac_ext=c
64885ac_cpp='$CPP $CPPFLAGS'
64886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64888ac_compiler_gnu=$ac_cv_c_compiler_gnu
64889
64890        OLD_CFLAGS="$CFLAGS"
64891        CFLAGS="$CFLAGS $ELF_CFLAGS"
64892        OLD_LIBS="$LIBS"
64893        LIBS="$LIBS $ELF_LIBS"
64894        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64895/* end confdefs.h.  */
64896#include <libelf.h>
64897int
64898main ()
64899{
64900
64901              elf_version(0);
64902              return 0;
64903
64904  ;
64905  return 0;
64906}
64907_ACEOF
64908if ac_fn_c_try_link "$LINENO"; then :
64909  LIBELF_WORKS=yes
64910else
64911  LIBELF_WORKS=no
64912
64913fi
64914rm -f core conftest.err conftest.$ac_objext \
64915    conftest$ac_exeext conftest.$ac_ext
64916        CFLAGS="$OLD_CFLAGS"
64917        LIBS="$OLD_LIBS"
64918        ac_ext=cpp
64919ac_cpp='$CXXCPP $CPPFLAGS'
64920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64923
64924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64925$as_echo "$LIBELF_WORKS" >&6; }
64926
64927        if test "x$LIBELF_WORKS" = xno; then
64928          ENABLE_AOT="false"
64929
64930  # Print a helpful message on how to acquire the necessary build dependency.
64931  # elf is the help tag: freetype, cups, alsa etc
64932  MISSING_DEPENDENCY=elf
64933
64934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64935    cygwin_help $MISSING_DEPENDENCY
64936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64937    msys_help $MISSING_DEPENDENCY
64938  else
64939    PKGHANDLER_COMMAND=
64940
64941    case $PKGHANDLER in
64942      apt-get)
64943        apt_help     $MISSING_DEPENDENCY ;;
64944      yum)
64945        yum_help     $MISSING_DEPENDENCY ;;
64946      brew)
64947        brew_help    $MISSING_DEPENDENCY ;;
64948      port)
64949        port_help    $MISSING_DEPENDENCY ;;
64950      pkgutil)
64951        pkgutil_help $MISSING_DEPENDENCY ;;
64952      pkgadd)
64953        pkgadd_help  $MISSING_DEPENDENCY ;;
64954    esac
64955
64956    if test "x$PKGHANDLER_COMMAND" != x; then
64957      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64958    fi
64959  fi
64960
64961          if test "x$enable_aot" = "xyes"; then
64962            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64963          else
64964            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64965$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64966          fi
64967        fi
64968      fi
64969    fi
64970  fi
64971
64972
64973
64974
64975
64976
64977
64978
64979
64980
64981
64982
64983
64984
64985
64986
64987
64988
64989# Hotspot setup depends on lib checks (AOT needs libelf).
64990
64991
64992  # The user can in some cases supply additional jvm features. For the custom
64993  # variant, this defines the entire variant.
64994
64995# Check whether --with-jvm-features was given.
64996if test "${with_jvm_features+set}" = set; then :
64997  withval=$with_jvm_features;
64998fi
64999
65000  if test "x$with_jvm_features" != x; then
65001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65002$as_echo_n "checking additional JVM features... " >&6; }
65003    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65005$as_echo "$JVM_FEATURES" >&6; }
65006  fi
65007
65008  # Override hotspot cpu definitions for ARM platforms
65009  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65010    HOTSPOT_TARGET_CPU=arm_32
65011    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65012    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65013    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65014  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65015    HOTSPOT_TARGET_CPU=arm_64
65016    HOTSPOT_TARGET_CPU_ARCH=arm
65017    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65018    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65019  fi
65020
65021  # Verify that dependencies are met for explicitly set features.
65022  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65023    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65024  fi
65025
65026  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65027    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65028  fi
65029
65030  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65031    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65032  fi
65033
65034  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65035    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65036  fi
65037
65038  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65039    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65040  fi
65041
65042  # Turn on additional features based on other parts of configure
65043  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65044    JVM_FEATURES="$JVM_FEATURES dtrace"
65045  else
65046    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65047      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65048    fi
65049  fi
65050
65051  if test "x$STATIC_BUILD" = "xtrue"; then
65052    JVM_FEATURES="$JVM_FEATURES static-build"
65053  else
65054    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65055      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65056    fi
65057  fi
65058
65059  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65060    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65061      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65062    fi
65063  fi
65064
65065  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65066    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65067      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65068    fi
65069  fi
65070
65071  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65072  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65073     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65074     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65075    JVM_FEATURES_jvmci="jvmci"
65076  else
65077    JVM_FEATURES_jvmci=""
65078  fi
65079
65080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65081$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65082  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65084$as_echo "yes, forced" >&6; }
65085    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65086      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65087    fi
65088    INCLUDE_GRAAL="true"
65089  else
65090    # By default enable graal build where AOT is available
65091    if test "x$ENABLE_AOT" = "xtrue"; then
65092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65093$as_echo "yes" >&6; }
65094      JVM_FEATURES_graal="graal"
65095      INCLUDE_GRAAL="true"
65096    else
65097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65098$as_echo "no" >&6; }
65099      JVM_FEATURES_graal=""
65100      INCLUDE_GRAAL="false"
65101    fi
65102  fi
65103
65104
65105
65106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65107$as_echo_n "checking if aot should be enabled... " >&6; }
65108  if test "x$ENABLE_AOT" = "xtrue"; then
65109    if test "x$enable_aot" = "xyes"; then
65110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65111$as_echo "yes, forced" >&6; }
65112    else
65113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65114$as_echo "yes" >&6; }
65115    fi
65116    JVM_FEATURES_aot="aot"
65117  else
65118    if test "x$enable_aot" = "xno"; then
65119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65120$as_echo "no, forced" >&6; }
65121    else
65122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65123$as_echo "no" >&6; }
65124    fi
65125    JVM_FEATURES_aot=""
65126  fi
65127
65128  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65129    # Default to use link time optimizations on minimal on arm
65130    JVM_FEATURES_link_time_opt="link-time-opt"
65131  else
65132    JVM_FEATURES_link_time_opt=""
65133  fi
65134
65135  # All variants but minimal (and custom) get these features
65136  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65137
65138  # Enable features depending on variant.
65139  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65140  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65141  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65142  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65143  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65144  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65145  JVM_FEATURES_custom="$JVM_FEATURES"
65146
65147
65148
65149
65150
65151
65152
65153
65154
65155  # Used for verification of Makefiles by check-jvm-feature
65156
65157
65158  # We don't support --with-jvm-interpreter anymore, use zero instead.
65159
65160
65161# Check whether --with-jvm-interpreter was given.
65162if test "${with_jvm_interpreter+set}" = set; then :
65163  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65164$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65165fi
65166
65167
65168
65169
65170###############################################################################
65171#
65172# We need to do some final tweaking, when everything else is done.
65173#
65174###############################################################################
65175
65176
65177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65178$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65179
65180  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65181    ENABLE_INTREE_EC=true
65182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65183$as_echo "yes" >&6; }
65184  else
65185    ENABLE_INTREE_EC=false
65186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65187$as_echo "no" >&6; }
65188  fi
65189
65190
65191
65192
65193  # Check whether --enable-jtreg-failure-handler was given.
65194if test "${enable_jtreg_failure_handler+set}" = set; then :
65195  enableval=$enable_jtreg_failure_handler;
65196fi
65197
65198
65199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65200$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65201
65202  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65203    if test "x$JT_HOME" = "x"; then
65204      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65205    else
65206      BUILD_FAILURE_HANDLER=true
65207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65208$as_echo "yes, forced" >&6; }
65209    fi
65210  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65211    BUILD_FAILURE_HANDLER=false
65212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65213$as_echo "no, forced" >&6; }
65214  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65215      || test "x$enable_jtreg_failure_handler" = "x"; then
65216    if test "x$JT_HOME" = "x"; then
65217      BUILD_FAILURE_HANDLER=false
65218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65219$as_echo "no, missing jtreg" >&6; }
65220    else
65221      BUILD_FAILURE_HANDLER=true
65222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65223$as_echo "yes, jtreg present" >&6; }
65224    fi
65225  else
65226    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65227  fi
65228
65229
65230
65231
65232  # Check whether --enable-generate-classlist was given.
65233if test "${enable_generate_classlist+set}" = set; then :
65234  enableval=$enable_generate_classlist;
65235fi
65236
65237
65238  # Check if it's likely that it's possible to generate the classlist. Depending
65239  # on exact jvm configuration it could be possible anyway.
65240  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65241    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65242  else
65243    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65244  fi
65245
65246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65247$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65248  if test "x$enable_generate_classlist" = "xyes"; then
65249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65250$as_echo "yes, forced" >&6; }
65251    ENABLE_GENERATE_CLASSLIST="true"
65252    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65253      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65254$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65255    fi
65256  elif test "x$enable_generate_classlist" = "xno"; then
65257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65258$as_echo "no, forced" >&6; }
65259    ENABLE_GENERATE_CLASSLIST="false"
65260  elif test "x$enable_generate_classlist" = "x"; then
65261    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65263$as_echo "yes" >&6; }
65264      ENABLE_GENERATE_CLASSLIST="true"
65265    else
65266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65267$as_echo "no" >&6; }
65268      ENABLE_GENERATE_CLASSLIST="false"
65269    fi
65270  else
65271    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65272  fi
65273
65274
65275
65276
65277###############################################################################
65278#
65279# Configure parts of the build that only affect the build performance,
65280# not the result.
65281#
65282###############################################################################
65283
65284
65285  # How many cores do we have on this build system?
65286
65287# Check whether --with-num-cores was given.
65288if test "${with_num_cores+set}" = set; then :
65289  withval=$with_num_cores;
65290fi
65291
65292  if test "x$with_num_cores" = x; then
65293    # The number of cores were not specified, try to probe them.
65294
65295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65296$as_echo_n "checking for number of cores... " >&6; }
65297  NUM_CORES=1
65298  FOUND_CORES=no
65299
65300  if test -f /proc/cpuinfo; then
65301    # Looks like a Linux (or cygwin) system
65302    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65303    FOUND_CORES=yes
65304  elif test -x /usr/sbin/psrinfo; then
65305    # Looks like a Solaris system
65306    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65307    FOUND_CORES=yes
65308  elif test -x /usr/sbin/sysctl; then
65309    # Looks like a MacOSX system
65310    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65311    FOUND_CORES=yes
65312  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65313    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65314    FOUND_CORES=yes
65315  elif test -n "$NUMBER_OF_PROCESSORS"; then
65316    # On windows, look in the env
65317    NUM_CORES=$NUMBER_OF_PROCESSORS
65318    FOUND_CORES=yes
65319  fi
65320
65321  if test "x$FOUND_CORES" = xyes; then
65322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65323$as_echo "$NUM_CORES" >&6; }
65324  else
65325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65326$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65327    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65328$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65329  fi
65330
65331  else
65332    NUM_CORES=$with_num_cores
65333  fi
65334
65335
65336
65337  # How much memory do we have on this build system?
65338
65339# Check whether --with-memory-size was given.
65340if test "${with_memory_size+set}" = set; then :
65341  withval=$with_memory_size;
65342fi
65343
65344  if test "x$with_memory_size" = x; then
65345    # The memory size was not specified, try to probe it.
65346
65347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65348$as_echo_n "checking for memory size... " >&6; }
65349  # Default to 1024 MB
65350  MEMORY_SIZE=1024
65351  FOUND_MEM=no
65352
65353  if test -f /proc/meminfo; then
65354    # Looks like a Linux (or cygwin) system
65355    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65356    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65357    FOUND_MEM=yes
65358  elif test -x /usr/sbin/prtconf; then
65359    # Looks like a Solaris or AIX system
65360    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65361    FOUND_MEM=yes
65362  elif test -x /usr/sbin/sysctl; then
65363    # Looks like a MacOSX system
65364    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65365    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65366    FOUND_MEM=yes
65367  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65368    # Windows, but without cygwin
65369    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65370    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65371    FOUND_MEM=yes
65372  fi
65373
65374  if test "x$FOUND_MEM" = xyes; then
65375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65376$as_echo "$MEMORY_SIZE MB" >&6; }
65377  else
65378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65379$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65380    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65381$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65382  fi
65383
65384  else
65385    MEMORY_SIZE=$with_memory_size
65386  fi
65387
65388
65389
65390  # Provide a decent default number of parallel jobs for make depending on
65391  # number of cores, amount of memory and machine architecture.
65392
65393# Check whether --with-jobs was given.
65394if test "${with_jobs+set}" = set; then :
65395  withval=$with_jobs;
65396fi
65397
65398  if test "x$with_jobs" = x; then
65399    # Number of jobs was not specified, calculate.
65400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65401$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65402    # Approximate memory in GB.
65403    memory_gb=`expr $MEMORY_SIZE / 1024`
65404    # Pick the lowest of memory in gb and number of cores.
65405    if test "$memory_gb" -lt "$NUM_CORES"; then
65406      JOBS="$memory_gb"
65407    else
65408      JOBS="$NUM_CORES"
65409    fi
65410    if test "$JOBS" -eq "0"; then
65411      JOBS=1
65412    fi
65413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65414$as_echo "$JOBS" >&6; }
65415  else
65416    JOBS=$with_jobs
65417  fi
65418
65419
65420
65421  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65422
65423# Check whether --with-test-jobs was given.
65424if test "${with_test_jobs+set}" = set; then :
65425  withval=$with_test_jobs;
65426fi
65427
65428  if test "x$with_test_jobs" = x; then
65429      TEST_JOBS=0
65430  else
65431      TEST_JOBS=$with_test_jobs
65432  fi
65433
65434
65435
65436# Setup arguments for the boot jdk (after cores and memory have been setup)
65437
65438  ##############################################################################
65439  #
65440  # Specify jvm options for anything that is run with the Boot JDK.
65441  # Not all JVM:s accept the same arguments on the command line.
65442  #
65443
65444# Check whether --with-boot-jdk-jvmargs was given.
65445if test "${with_boot_jdk_jvmargs+set}" = set; then :
65446  withval=$with_boot_jdk_jvmargs;
65447fi
65448
65449
65450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65451$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65452
65453  # Disable special log output when a debug build is used as Boot JDK...
65454
65455  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65456  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65457  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65458  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65459  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65460  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65461    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65462    JVM_ARG_OK=true
65463  else
65464    $ECHO "Arg failed:" >&5
65465    $ECHO "$OUTPUT" >&5
65466    JVM_ARG_OK=false
65467  fi
65468
65469
65470  # Force en-US environment
65471
65472  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65473  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65474  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65475  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65476  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65477  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65478    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65479    JVM_ARG_OK=true
65480  else
65481    $ECHO "Arg failed:" >&5
65482    $ECHO "$OUTPUT" >&5
65483    JVM_ARG_OK=false
65484  fi
65485
65486
65487  # Apply user provided options.
65488
65489  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65490  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65491  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65492  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65493  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65494  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65495    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65496    JVM_ARG_OK=true
65497  else
65498    $ECHO "Arg failed:" >&5
65499    $ECHO "$OUTPUT" >&5
65500    JVM_ARG_OK=false
65501  fi
65502
65503
65504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65505$as_echo "$boot_jdk_jvmargs" >&6; }
65506
65507  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65508  JAVA_FLAGS=$boot_jdk_jvmargs
65509
65510
65511
65512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65513$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65514
65515  # Starting amount of heap memory.
65516
65517  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65518  $ECHO "Command: $JAVA -Xms64M -version" >&5
65519  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65520  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65521  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65522  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65523    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65524    JVM_ARG_OK=true
65525  else
65526    $ECHO "Arg failed:" >&5
65527    $ECHO "$OUTPUT" >&5
65528    JVM_ARG_OK=false
65529  fi
65530
65531  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65532
65533  # Maximum amount of heap memory and stack size.
65534  JVM_HEAP_LIMIT_32="1024"
65535  # Running a 64 bit JVM allows for and requires a bigger heap
65536  JVM_HEAP_LIMIT_64="1600"
65537  STACK_SIZE_32=768
65538  STACK_SIZE_64=1536
65539  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65540  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65541    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65542  fi
65543  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65544    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65545  fi
65546  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65547    JVM_HEAP_LIMIT_32=512
65548    JVM_HEAP_LIMIT_64=512
65549  fi
65550
65551  if test "x$BOOT_JDK_BITS" = "x32"; then
65552    STACK_SIZE=$STACK_SIZE_32
65553    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65554  else
65555    STACK_SIZE=$STACK_SIZE_64
65556    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65557  fi
65558
65559  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65560  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65561  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65562  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65563  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65564  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65565    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65566    JVM_ARG_OK=true
65567  else
65568    $ECHO "Arg failed:" >&5
65569    $ECHO "$OUTPUT" >&5
65570    JVM_ARG_OK=false
65571  fi
65572
65573
65574  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65575  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65576  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65577  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65578  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65579  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65580    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65581    JVM_ARG_OK=true
65582  else
65583    $ECHO "Arg failed:" >&5
65584    $ECHO "$OUTPUT" >&5
65585    JVM_ARG_OK=false
65586  fi
65587
65588
65589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65590$as_echo "$boot_jdk_jvmargs_big" >&6; }
65591
65592  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65593
65594
65595  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65596    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65597    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65598  else
65599    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65600    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65601  fi
65602  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65603  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65605$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65607$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65608
65609
65610  # By default, the main javac compilations use big
65611  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65612
65613
65614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65615$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65616
65617  # Use serial gc for small short lived tools if possible
65618
65619  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65620  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65621  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65622  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65623  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65624  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65625    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65626    JVM_ARG_OK=true
65627  else
65628    $ECHO "Arg failed:" >&5
65629    $ECHO "$OUTPUT" >&5
65630    JVM_ARG_OK=false
65631  fi
65632
65633
65634  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65635  $ECHO "Command: $JAVA -Xms32M -version" >&5
65636  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65637  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65638  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65639  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65640    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65641    JVM_ARG_OK=true
65642  else
65643    $ECHO "Arg failed:" >&5
65644    $ECHO "$OUTPUT" >&5
65645    JVM_ARG_OK=false
65646  fi
65647
65648
65649  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65650  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65651  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65652  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65653  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65654  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65655    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65656    JVM_ARG_OK=true
65657  else
65658    $ECHO "Arg failed:" >&5
65659    $ECHO "$OUTPUT" >&5
65660    JVM_ARG_OK=false
65661  fi
65662
65663
65664  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65665  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65666  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65667  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65668  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65669  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65670    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65671    JVM_ARG_OK=true
65672  else
65673    $ECHO "Arg failed:" >&5
65674    $ECHO "$OUTPUT" >&5
65675    JVM_ARG_OK=false
65676  fi
65677
65678
65679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65680$as_echo "$boot_jdk_jvmargs_small" >&6; }
65681
65682  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65683
65684
65685  JAVA_TOOL_FLAGS_SMALL=""
65686  for f in $JAVA_FLAGS_SMALL; do
65687    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65688  done
65689
65690
65691
65692# Setup smart javac (after cores and memory have been setup)
65693
65694
65695# Check whether --with-sjavac-server-java was given.
65696if test "${with_sjavac_server_java+set}" = set; then :
65697  withval=$with_sjavac_server_java;
65698fi
65699
65700
65701  if test "x$with_sjavac_server_java" != x; then
65702    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65703    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65704    if test "x$FOUND_VERSION" = x; then
65705      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65706    fi
65707  else
65708    SJAVAC_SERVER_JAVA="$JAVA"
65709  fi
65710
65711
65712  if test "$MEMORY_SIZE" -gt "3000"; then
65713
65714  $ECHO "Check if jvm arg is ok: -d64" >&5
65715  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65716  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65717  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65718  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65719  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65720    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65721    JVM_ARG_OK=true
65722  else
65723    $ECHO "Arg failed:" >&5
65724    $ECHO "$OUTPUT" >&5
65725    JVM_ARG_OK=false
65726  fi
65727
65728    if test "$JVM_ARG_OK" = true; then
65729      JVM_64BIT=true
65730      JVM_ARG_OK=false
65731    fi
65732  fi
65733
65734  MX_VALUE=`expr $MEMORY_SIZE / 2`
65735  if test "$JVM_64BIT" = true; then
65736    # Set ms lower than mx since more than one instance of the server might
65737    # get launched at the same time before they figure out which instance won.
65738    MS_VALUE=512
65739    if test "$MX_VALUE" -gt "2048"; then
65740      MX_VALUE=2048
65741    fi
65742  else
65743    MS_VALUE=256
65744    if test "$MX_VALUE" -gt "1500"; then
65745      MX_VALUE=1500
65746    fi
65747  fi
65748  if test "$MX_VALUE" -lt "512"; then
65749    MX_VALUE=512
65750  fi
65751
65752  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65753  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65754  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65755  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65756  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65757  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65758    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65759    JVM_ARG_OK=true
65760  else
65761    $ECHO "Arg failed:" >&5
65762    $ECHO "$OUTPUT" >&5
65763    JVM_ARG_OK=false
65764  fi
65765
65766
65767
65768  # Check whether --enable-sjavac was given.
65769if test "${enable_sjavac+set}" = set; then :
65770  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65771else
65772  ENABLE_SJAVAC="no"
65773fi
65774
65775  if test "x$JVM_ARG_OK" = "xfalse"; then
65776    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65777$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65778    ENABLE_SJAVAC="no"
65779  fi
65780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65781$as_echo_n "checking whether to use sjavac... " >&6; }
65782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65783$as_echo "$ENABLE_SJAVAC" >&6; }
65784
65785
65786  # Check whether --enable-javac-server was given.
65787if test "${enable_javac_server+set}" = set; then :
65788  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65789else
65790  ENABLE_JAVAC_SERVER="yes"
65791fi
65792
65793  if test "x$JVM_ARG_OK" = "xfalse"; then
65794    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65795$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65796    ENABLE_JAVAC_SERVER="no"
65797  fi
65798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65799$as_echo_n "checking whether to use javac server... " >&6; }
65800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65801$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65802
65803
65804  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65805    # When using a server javac, the small client instances do not need much
65806    # resources.
65807    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65808  fi
65809
65810
65811# Setup use of icecc if requested
65812
65813  # Check whether --enable-icecc was given.
65814if test "${enable_icecc+set}" = set; then :
65815  enableval=$enable_icecc;
65816fi
65817
65818
65819  if test "x${enable_icecc}" = "xyes"; then
65820
65821
65822
65823  # Publish this variable in the help.
65824
65825
65826  if [ -z "${ICECC_CMD+x}" ]; then
65827    # The variable is not set by user, try to locate tool using the code snippet
65828    for ac_prog in icecc
65829do
65830  # Extract the first word of "$ac_prog", so it can be a program name with args.
65831set dummy $ac_prog; ac_word=$2
65832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65833$as_echo_n "checking for $ac_word... " >&6; }
65834if ${ac_cv_path_ICECC_CMD+:} false; then :
65835  $as_echo_n "(cached) " >&6
65836else
65837  case $ICECC_CMD in
65838  [\\/]* | ?:[\\/]*)
65839  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65840  ;;
65841  *)
65842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65843for as_dir in $PATH
65844do
65845  IFS=$as_save_IFS
65846  test -z "$as_dir" && as_dir=.
65847    for ac_exec_ext in '' $ac_executable_extensions; do
65848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65849    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65851    break 2
65852  fi
65853done
65854  done
65855IFS=$as_save_IFS
65856
65857  ;;
65858esac
65859fi
65860ICECC_CMD=$ac_cv_path_ICECC_CMD
65861if test -n "$ICECC_CMD"; then
65862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65863$as_echo "$ICECC_CMD" >&6; }
65864else
65865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65866$as_echo "no" >&6; }
65867fi
65868
65869
65870  test -n "$ICECC_CMD" && break
65871done
65872
65873  else
65874    # The variable is set, but is it from the command line or the environment?
65875
65876    # Try to remove the string !ICECC_CMD! from our list.
65877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65879      # If it failed, the variable was not from the command line. Ignore it,
65880      # but warn the user (except for BASH, which is always set by the calling BASH).
65881      if test "xICECC_CMD" != xBASH; then
65882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65883$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65884      fi
65885      # Try to locate tool using the code snippet
65886      for ac_prog in icecc
65887do
65888  # Extract the first word of "$ac_prog", so it can be a program name with args.
65889set dummy $ac_prog; ac_word=$2
65890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65891$as_echo_n "checking for $ac_word... " >&6; }
65892if ${ac_cv_path_ICECC_CMD+:} false; then :
65893  $as_echo_n "(cached) " >&6
65894else
65895  case $ICECC_CMD in
65896  [\\/]* | ?:[\\/]*)
65897  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65898  ;;
65899  *)
65900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65901for as_dir in $PATH
65902do
65903  IFS=$as_save_IFS
65904  test -z "$as_dir" && as_dir=.
65905    for ac_exec_ext in '' $ac_executable_extensions; do
65906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65907    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65909    break 2
65910  fi
65911done
65912  done
65913IFS=$as_save_IFS
65914
65915  ;;
65916esac
65917fi
65918ICECC_CMD=$ac_cv_path_ICECC_CMD
65919if test -n "$ICECC_CMD"; then
65920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65921$as_echo "$ICECC_CMD" >&6; }
65922else
65923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65924$as_echo "no" >&6; }
65925fi
65926
65927
65928  test -n "$ICECC_CMD" && break
65929done
65930
65931    else
65932      # If it succeeded, then it was overridden by the user. We will use it
65933      # for the tool.
65934
65935      # First remove it from the list of overridden variables, so we can test
65936      # for unknown variables in the end.
65937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65938
65939      # Check if we try to supply an empty value
65940      if test "x$ICECC_CMD" = x; then
65941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65942$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65944$as_echo_n "checking for ICECC_CMD... " >&6; }
65945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65946$as_echo "disabled" >&6; }
65947      else
65948        # Check if the provided tool contains a complete path.
65949        tool_specified="$ICECC_CMD"
65950        tool_basename="${tool_specified##*/}"
65951        if test "x$tool_basename" = "x$tool_specified"; then
65952          # A command without a complete path is provided, search $PATH.
65953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65954$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65955          # Extract the first word of "$tool_basename", so it can be a program name with args.
65956set dummy $tool_basename; ac_word=$2
65957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65958$as_echo_n "checking for $ac_word... " >&6; }
65959if ${ac_cv_path_ICECC_CMD+:} false; then :
65960  $as_echo_n "(cached) " >&6
65961else
65962  case $ICECC_CMD in
65963  [\\/]* | ?:[\\/]*)
65964  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65965  ;;
65966  *)
65967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65968for as_dir in $PATH
65969do
65970  IFS=$as_save_IFS
65971  test -z "$as_dir" && as_dir=.
65972    for ac_exec_ext in '' $ac_executable_extensions; do
65973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65974    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65976    break 2
65977  fi
65978done
65979  done
65980IFS=$as_save_IFS
65981
65982  ;;
65983esac
65984fi
65985ICECC_CMD=$ac_cv_path_ICECC_CMD
65986if test -n "$ICECC_CMD"; then
65987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65988$as_echo "$ICECC_CMD" >&6; }
65989else
65990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65991$as_echo "no" >&6; }
65992fi
65993
65994
65995          if test "x$ICECC_CMD" = x; then
65996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65997          fi
65998        else
65999          # Otherwise we believe it is a complete path. Use it as it is.
66000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66001$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66003$as_echo_n "checking for ICECC_CMD... " >&6; }
66004          if test ! -x "$tool_specified"; then
66005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66006$as_echo "not found" >&6; }
66007            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66008          fi
66009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66010$as_echo "$tool_specified" >&6; }
66011        fi
66012      fi
66013    fi
66014
66015  fi
66016
66017
66018
66019  if test "x$ICECC_CMD" = x; then
66020    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66021  fi
66022
66023
66024    old_path="$PATH"
66025
66026    # Look for icecc-create-env in some known places
66027    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66028
66029
66030
66031  # Publish this variable in the help.
66032
66033
66034  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66035    # The variable is not set by user, try to locate tool using the code snippet
66036    for ac_prog in icecc-create-env
66037do
66038  # Extract the first word of "$ac_prog", so it can be a program name with args.
66039set dummy $ac_prog; ac_word=$2
66040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66041$as_echo_n "checking for $ac_word... " >&6; }
66042if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66043  $as_echo_n "(cached) " >&6
66044else
66045  case $ICECC_CREATE_ENV in
66046  [\\/]* | ?:[\\/]*)
66047  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66048  ;;
66049  *)
66050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66051for as_dir in $PATH
66052do
66053  IFS=$as_save_IFS
66054  test -z "$as_dir" && as_dir=.
66055    for ac_exec_ext in '' $ac_executable_extensions; do
66056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66057    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66059    break 2
66060  fi
66061done
66062  done
66063IFS=$as_save_IFS
66064
66065  ;;
66066esac
66067fi
66068ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66069if test -n "$ICECC_CREATE_ENV"; then
66070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66071$as_echo "$ICECC_CREATE_ENV" >&6; }
66072else
66073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66074$as_echo "no" >&6; }
66075fi
66076
66077
66078  test -n "$ICECC_CREATE_ENV" && break
66079done
66080
66081  else
66082    # The variable is set, but is it from the command line or the environment?
66083
66084    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66087      # If it failed, the variable was not from the command line. Ignore it,
66088      # but warn the user (except for BASH, which is always set by the calling BASH).
66089      if test "xICECC_CREATE_ENV" != xBASH; then
66090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66091$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66092      fi
66093      # Try to locate tool using the code snippet
66094      for ac_prog in icecc-create-env
66095do
66096  # Extract the first word of "$ac_prog", so it can be a program name with args.
66097set dummy $ac_prog; ac_word=$2
66098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66099$as_echo_n "checking for $ac_word... " >&6; }
66100if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66101  $as_echo_n "(cached) " >&6
66102else
66103  case $ICECC_CREATE_ENV in
66104  [\\/]* | ?:[\\/]*)
66105  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66106  ;;
66107  *)
66108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66109for as_dir in $PATH
66110do
66111  IFS=$as_save_IFS
66112  test -z "$as_dir" && as_dir=.
66113    for ac_exec_ext in '' $ac_executable_extensions; do
66114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66115    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66117    break 2
66118  fi
66119done
66120  done
66121IFS=$as_save_IFS
66122
66123  ;;
66124esac
66125fi
66126ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66127if test -n "$ICECC_CREATE_ENV"; then
66128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66129$as_echo "$ICECC_CREATE_ENV" >&6; }
66130else
66131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66132$as_echo "no" >&6; }
66133fi
66134
66135
66136  test -n "$ICECC_CREATE_ENV" && break
66137done
66138
66139    else
66140      # If it succeeded, then it was overridden by the user. We will use it
66141      # for the tool.
66142
66143      # First remove it from the list of overridden variables, so we can test
66144      # for unknown variables in the end.
66145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66146
66147      # Check if we try to supply an empty value
66148      if test "x$ICECC_CREATE_ENV" = x; then
66149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66150$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66152$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66154$as_echo "disabled" >&6; }
66155      else
66156        # Check if the provided tool contains a complete path.
66157        tool_specified="$ICECC_CREATE_ENV"
66158        tool_basename="${tool_specified##*/}"
66159        if test "x$tool_basename" = "x$tool_specified"; then
66160          # A command without a complete path is provided, search $PATH.
66161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66162$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66163          # Extract the first word of "$tool_basename", so it can be a program name with args.
66164set dummy $tool_basename; ac_word=$2
66165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66166$as_echo_n "checking for $ac_word... " >&6; }
66167if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66168  $as_echo_n "(cached) " >&6
66169else
66170  case $ICECC_CREATE_ENV in
66171  [\\/]* | ?:[\\/]*)
66172  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66173  ;;
66174  *)
66175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66176for as_dir in $PATH
66177do
66178  IFS=$as_save_IFS
66179  test -z "$as_dir" && as_dir=.
66180    for ac_exec_ext in '' $ac_executable_extensions; do
66181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66182    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66184    break 2
66185  fi
66186done
66187  done
66188IFS=$as_save_IFS
66189
66190  ;;
66191esac
66192fi
66193ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66194if test -n "$ICECC_CREATE_ENV"; then
66195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66196$as_echo "$ICECC_CREATE_ENV" >&6; }
66197else
66198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66199$as_echo "no" >&6; }
66200fi
66201
66202
66203          if test "x$ICECC_CREATE_ENV" = x; then
66204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66205          fi
66206        else
66207          # Otherwise we believe it is a complete path. Use it as it is.
66208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66209$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66211$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66212          if test ! -x "$tool_specified"; then
66213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66214$as_echo "not found" >&6; }
66215            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66216          fi
66217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66218$as_echo "$tool_specified" >&6; }
66219        fi
66220      fi
66221    fi
66222
66223  fi
66224
66225
66226
66227  if test "x$ICECC_CREATE_ENV" = x; then
66228    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66229  fi
66230
66231
66232    # Use icecc-create-env to create a minimal compilation environment that can
66233    # be sent to the other hosts in the icecream cluster.
66234    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66235    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66236    # Older versions of icecc does not have the --gcc parameter
66237    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66238      icecc_gcc_arg="--gcc"
66239    fi
66240    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66241
66242  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66243      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66244          ${icecc_create_env_log} 2>&1 )
66245  if test "$?" != "0"; then
66246    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66247$as_echo "$as_me: icecc-create-env output:" >&6;}
66248    cat \
66249          ${icecc_create_env_log}
66250    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66251  fi
66252
66253    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66254      # For clang, the icecc compilerwrapper is needed. It usually resides next
66255      # to icecc-create-env.
66256
66257
66258
66259  # Publish this variable in the help.
66260
66261
66262  if [ -z "${ICECC_WRAPPER+x}" ]; then
66263    # The variable is not set by user, try to locate tool using the code snippet
66264    for ac_prog in compilerwrapper
66265do
66266  # Extract the first word of "$ac_prog", so it can be a program name with args.
66267set dummy $ac_prog; ac_word=$2
66268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66269$as_echo_n "checking for $ac_word... " >&6; }
66270if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66271  $as_echo_n "(cached) " >&6
66272else
66273  case $ICECC_WRAPPER in
66274  [\\/]* | ?:[\\/]*)
66275  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66276  ;;
66277  *)
66278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66279for as_dir in $PATH
66280do
66281  IFS=$as_save_IFS
66282  test -z "$as_dir" && as_dir=.
66283    for ac_exec_ext in '' $ac_executable_extensions; do
66284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66285    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66287    break 2
66288  fi
66289done
66290  done
66291IFS=$as_save_IFS
66292
66293  ;;
66294esac
66295fi
66296ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66297if test -n "$ICECC_WRAPPER"; then
66298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66299$as_echo "$ICECC_WRAPPER" >&6; }
66300else
66301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66302$as_echo "no" >&6; }
66303fi
66304
66305
66306  test -n "$ICECC_WRAPPER" && break
66307done
66308
66309  else
66310    # The variable is set, but is it from the command line or the environment?
66311
66312    # Try to remove the string !ICECC_WRAPPER! from our list.
66313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66315      # If it failed, the variable was not from the command line. Ignore it,
66316      # but warn the user (except for BASH, which is always set by the calling BASH).
66317      if test "xICECC_WRAPPER" != xBASH; then
66318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66319$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66320      fi
66321      # Try to locate tool using the code snippet
66322      for ac_prog in compilerwrapper
66323do
66324  # Extract the first word of "$ac_prog", so it can be a program name with args.
66325set dummy $ac_prog; ac_word=$2
66326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66327$as_echo_n "checking for $ac_word... " >&6; }
66328if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66329  $as_echo_n "(cached) " >&6
66330else
66331  case $ICECC_WRAPPER in
66332  [\\/]* | ?:[\\/]*)
66333  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66334  ;;
66335  *)
66336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66337for as_dir in $PATH
66338do
66339  IFS=$as_save_IFS
66340  test -z "$as_dir" && as_dir=.
66341    for ac_exec_ext in '' $ac_executable_extensions; do
66342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66343    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66345    break 2
66346  fi
66347done
66348  done
66349IFS=$as_save_IFS
66350
66351  ;;
66352esac
66353fi
66354ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66355if test -n "$ICECC_WRAPPER"; then
66356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66357$as_echo "$ICECC_WRAPPER" >&6; }
66358else
66359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66360$as_echo "no" >&6; }
66361fi
66362
66363
66364  test -n "$ICECC_WRAPPER" && break
66365done
66366
66367    else
66368      # If it succeeded, then it was overridden by the user. We will use it
66369      # for the tool.
66370
66371      # First remove it from the list of overridden variables, so we can test
66372      # for unknown variables in the end.
66373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66374
66375      # Check if we try to supply an empty value
66376      if test "x$ICECC_WRAPPER" = x; then
66377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66378$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66380$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66382$as_echo "disabled" >&6; }
66383      else
66384        # Check if the provided tool contains a complete path.
66385        tool_specified="$ICECC_WRAPPER"
66386        tool_basename="${tool_specified##*/}"
66387        if test "x$tool_basename" = "x$tool_specified"; then
66388          # A command without a complete path is provided, search $PATH.
66389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66390$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66391          # Extract the first word of "$tool_basename", so it can be a program name with args.
66392set dummy $tool_basename; ac_word=$2
66393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66394$as_echo_n "checking for $ac_word... " >&6; }
66395if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66396  $as_echo_n "(cached) " >&6
66397else
66398  case $ICECC_WRAPPER in
66399  [\\/]* | ?:[\\/]*)
66400  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66401  ;;
66402  *)
66403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66404for as_dir in $PATH
66405do
66406  IFS=$as_save_IFS
66407  test -z "$as_dir" && as_dir=.
66408    for ac_exec_ext in '' $ac_executable_extensions; do
66409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66410    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66412    break 2
66413  fi
66414done
66415  done
66416IFS=$as_save_IFS
66417
66418  ;;
66419esac
66420fi
66421ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66422if test -n "$ICECC_WRAPPER"; then
66423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66424$as_echo "$ICECC_WRAPPER" >&6; }
66425else
66426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66427$as_echo "no" >&6; }
66428fi
66429
66430
66431          if test "x$ICECC_WRAPPER" = x; then
66432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66433          fi
66434        else
66435          # Otherwise we believe it is a complete path. Use it as it is.
66436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66437$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66439$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66440          if test ! -x "$tool_specified"; then
66441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66442$as_echo "not found" >&6; }
66443            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66444          fi
66445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66446$as_echo "$tool_specified" >&6; }
66447        fi
66448      fi
66449    fi
66450
66451  fi
66452
66453
66454
66455  if test "x$ICECC_WRAPPER" = x; then
66456    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66457  fi
66458
66459
66460
66461  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66462      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66463  if test "$?" != "0"; then
66464    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66465$as_echo "$as_me: icecc-create-env output:" >&6;}
66466    cat ${icecc_create_env_log}
66467    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66468  fi
66469
66470    else
66471      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66472    fi
66473    PATH="$old_path"
66474    # The bundle with the compiler gets a name based on checksums. Parse log file
66475    # to find it.
66476    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66477    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66478    if test ! -f ${ICECC_ENV_BUNDLE}; then
66479      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66480    fi
66481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66482$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66484$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66485    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66486
66487    if test "x${COMPILE_TYPE}" = "xcross"; then
66488      # If cross compiling, create a separate env package for the build compiler
66489      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66490      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66491      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66492
66493  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66494      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66495            ${icecc_create_env_log_build} 2>&1 )
66496  if test "$?" != "0"; then
66497    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66498$as_echo "$as_me: icecc-create-env output:" >&6;}
66499    cat \
66500            ${icecc_create_env_log_build}
66501    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66502  fi
66503
66504      elif test "x${BUILD_CC##*/}" = "xclang"; then
66505
66506  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66507      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66508  if test "$?" != "0"; then
66509    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66510$as_echo "$as_me: icecc-create-env output:" >&6;}
66511    cat ${icecc_create_env_log_build}
66512    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66513  fi
66514
66515      else
66516        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66517      fi
66518      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66519      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66520      if test ! -f ${ICECC_ENV_BUNDLE}; then
66521        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66522      fi
66523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66524$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66526$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66527      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66528          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66529    else
66530      BUILD_ICECC="${ICECC}"
66531    fi
66532
66533
66534  fi
66535
66536
66537# Can the C/C++ compiler use precompiled headers?
66538
66539
66540  ###############################################################################
66541  #
66542  # Can the C/C++ compiler use precompiled headers?
66543  #
66544  # Check whether --enable-precompiled-headers was given.
66545if test "${enable_precompiled_headers+set}" = set; then :
66546  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66547else
66548  ENABLE_PRECOMPH=yes
66549fi
66550
66551
66552  USE_PRECOMPILED_HEADER=true
66553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66554$as_echo_n "checking If precompiled header is enabled... " >&6; }
66555  if test "x$ENABLE_PRECOMPH" = xno; then
66556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66557$as_echo "no, forced" >&6; }
66558    USE_PRECOMPILED_HEADER=false
66559  elif test "x$ICECC" != "x"; then
66560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66561$as_echo "no, does not work effectively with icecc" >&6; }
66562    USE_PRECOMPILED_HEADER=false
66563  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66565$as_echo "no, does not work with Solaris Studio" >&6; }
66566    USE_PRECOMPILED_HEADER=false
66567  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66569$as_echo "no, does not work with xlc" >&6; }
66570    USE_PRECOMPILED_HEADER=false
66571  else
66572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66573$as_echo "yes" >&6; }
66574  fi
66575
66576  if test "x$ENABLE_PRECOMPH" = xyes; then
66577    # Check that the compiler actually supports precomp headers.
66578    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66580$as_echo_n "checking that precompiled headers work... " >&6; }
66581      echo "int alfa();" > conftest.h
66582      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66583      if test ! -f conftest.hpp.gch; then
66584        USE_PRECOMPILED_HEADER=false
66585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66586$as_echo "no" >&6; }
66587      else
66588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66589$as_echo "yes" >&6; }
66590      fi
66591      $RM conftest.h conftest.hpp.gch
66592    fi
66593  fi
66594
66595
66596
66597
66598# Setup use of ccache, if available
66599
66600  # Check whether --enable-ccache was given.
66601if test "${enable_ccache+set}" = set; then :
66602  enableval=$enable_ccache;
66603fi
66604
66605
66606  CCACHE_STATUS=
66607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66608$as_echo_n "checking is ccache enabled... " >&6; }
66609  if test "x$enable_ccache" = xyes; then
66610    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66612$as_echo "yes" >&6; }
66613      OLD_PATH="$PATH"
66614      if test "x$TOOLCHAIN_PATH" != x; then
66615        PATH=$TOOLCHAIN_PATH:$PATH
66616      fi
66617
66618
66619
66620  # Publish this variable in the help.
66621
66622
66623  if [ -z "${CCACHE+x}" ]; then
66624    # The variable is not set by user, try to locate tool using the code snippet
66625    for ac_prog in ccache
66626do
66627  # Extract the first word of "$ac_prog", so it can be a program name with args.
66628set dummy $ac_prog; ac_word=$2
66629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66630$as_echo_n "checking for $ac_word... " >&6; }
66631if ${ac_cv_path_CCACHE+:} false; then :
66632  $as_echo_n "(cached) " >&6
66633else
66634  case $CCACHE in
66635  [\\/]* | ?:[\\/]*)
66636  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66637  ;;
66638  *)
66639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66640for as_dir in $PATH
66641do
66642  IFS=$as_save_IFS
66643  test -z "$as_dir" && as_dir=.
66644    for ac_exec_ext in '' $ac_executable_extensions; do
66645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66646    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66648    break 2
66649  fi
66650done
66651  done
66652IFS=$as_save_IFS
66653
66654  ;;
66655esac
66656fi
66657CCACHE=$ac_cv_path_CCACHE
66658if test -n "$CCACHE"; then
66659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66660$as_echo "$CCACHE" >&6; }
66661else
66662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66663$as_echo "no" >&6; }
66664fi
66665
66666
66667  test -n "$CCACHE" && break
66668done
66669
66670  else
66671    # The variable is set, but is it from the command line or the environment?
66672
66673    # Try to remove the string !CCACHE! from our list.
66674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66676      # If it failed, the variable was not from the command line. Ignore it,
66677      # but warn the user (except for BASH, which is always set by the calling BASH).
66678      if test "xCCACHE" != xBASH; then
66679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66680$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66681      fi
66682      # Try to locate tool using the code snippet
66683      for ac_prog in ccache
66684do
66685  # Extract the first word of "$ac_prog", so it can be a program name with args.
66686set dummy $ac_prog; ac_word=$2
66687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66688$as_echo_n "checking for $ac_word... " >&6; }
66689if ${ac_cv_path_CCACHE+:} false; then :
66690  $as_echo_n "(cached) " >&6
66691else
66692  case $CCACHE in
66693  [\\/]* | ?:[\\/]*)
66694  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66695  ;;
66696  *)
66697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66698for as_dir in $PATH
66699do
66700  IFS=$as_save_IFS
66701  test -z "$as_dir" && as_dir=.
66702    for ac_exec_ext in '' $ac_executable_extensions; do
66703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66704    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66706    break 2
66707  fi
66708done
66709  done
66710IFS=$as_save_IFS
66711
66712  ;;
66713esac
66714fi
66715CCACHE=$ac_cv_path_CCACHE
66716if test -n "$CCACHE"; then
66717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66718$as_echo "$CCACHE" >&6; }
66719else
66720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66721$as_echo "no" >&6; }
66722fi
66723
66724
66725  test -n "$CCACHE" && break
66726done
66727
66728    else
66729      # If it succeeded, then it was overridden by the user. We will use it
66730      # for the tool.
66731
66732      # First remove it from the list of overridden variables, so we can test
66733      # for unknown variables in the end.
66734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66735
66736      # Check if we try to supply an empty value
66737      if test "x$CCACHE" = x; then
66738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66739$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66741$as_echo_n "checking for CCACHE... " >&6; }
66742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66743$as_echo "disabled" >&6; }
66744      else
66745        # Check if the provided tool contains a complete path.
66746        tool_specified="$CCACHE"
66747        tool_basename="${tool_specified##*/}"
66748        if test "x$tool_basename" = "x$tool_specified"; then
66749          # A command without a complete path is provided, search $PATH.
66750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66751$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66752          # Extract the first word of "$tool_basename", so it can be a program name with args.
66753set dummy $tool_basename; ac_word=$2
66754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66755$as_echo_n "checking for $ac_word... " >&6; }
66756if ${ac_cv_path_CCACHE+:} false; then :
66757  $as_echo_n "(cached) " >&6
66758else
66759  case $CCACHE in
66760  [\\/]* | ?:[\\/]*)
66761  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66762  ;;
66763  *)
66764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66765for as_dir in $PATH
66766do
66767  IFS=$as_save_IFS
66768  test -z "$as_dir" && as_dir=.
66769    for ac_exec_ext in '' $ac_executable_extensions; do
66770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66771    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66773    break 2
66774  fi
66775done
66776  done
66777IFS=$as_save_IFS
66778
66779  ;;
66780esac
66781fi
66782CCACHE=$ac_cv_path_CCACHE
66783if test -n "$CCACHE"; then
66784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66785$as_echo "$CCACHE" >&6; }
66786else
66787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66788$as_echo "no" >&6; }
66789fi
66790
66791
66792          if test "x$CCACHE" = x; then
66793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66794          fi
66795        else
66796          # Otherwise we believe it is a complete path. Use it as it is.
66797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66798$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66800$as_echo_n "checking for CCACHE... " >&6; }
66801          if test ! -x "$tool_specified"; then
66802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66803$as_echo "not found" >&6; }
66804            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66805          fi
66806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66807$as_echo "$tool_specified" >&6; }
66808        fi
66809      fi
66810    fi
66811
66812  fi
66813
66814
66815
66816  if test "x$CCACHE" = x; then
66817    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66818  fi
66819
66820
66821      PATH="$OLD_PATH"
66822      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66823      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66824    else
66825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66826$as_echo "no" >&6; }
66827      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66828$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66829    fi
66830  elif test "x$enable_ccache" = xno; then
66831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66832$as_echo "no, explicitly disabled" >&6; }
66833    CCACHE_STATUS="Disabled"
66834  elif test "x$enable_ccache" = x; then
66835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66836$as_echo "no" >&6; }
66837  else
66838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66839$as_echo "unknown" >&6; }
66840    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66841  fi
66842
66843
66844
66845# Check whether --with-ccache-dir was given.
66846if test "${with_ccache_dir+set}" = set; then :
66847  withval=$with_ccache_dir;
66848fi
66849
66850
66851  if test "x$with_ccache_dir" != x; then
66852    # When using a non home ccache directory, assume the use is to share ccache files
66853    # with other users. Thus change the umask.
66854    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66855    if test "x$CCACHE" = x; then
66856      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66857$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66858    fi
66859  fi
66860
66861  if test "x$CCACHE" != x; then
66862
66863  if test "x$CCACHE" != x; then
66864    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66865      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66866          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66867      if test "x$HAS_BAD_CCACHE" != "x"; then
66868        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66869      fi
66870    fi
66871    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66872      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66873          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66874      if test "x$HAS_BAD_CCACHE" != "x"; then
66875        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66876      fi
66877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66878$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66879      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66880      PUSHED_FLAGS="$CXXFLAGS"
66881      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66882      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66883/* end confdefs.h.  */
66884
66885int
66886main ()
66887{
66888
66889  ;
66890  return 0;
66891}
66892_ACEOF
66893if ac_fn_cxx_try_compile "$LINENO"; then :
66894  CC_KNOWS_CCACHE_TRICK=yes
66895else
66896  CC_KNOWS_CCACHE_TRICK=no
66897fi
66898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66899      CXXFLAGS="$PUSHED_FLAGS"
66900      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66902$as_echo "yes" >&6; }
66903        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66904
66905        CCACHE_SLOPPINESS=pch_defines,time_macros
66906      else
66907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66908$as_echo "no" >&6; }
66909        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66910      fi
66911    fi
66912
66913    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66914        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66915
66916    if test "x$SET_CCACHE_DIR" != x; then
66917      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66918      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66919    fi
66920  fi
66921
66922  fi
66923
66924
66925###############################################################################
66926#
66927# And now the finish...
66928#
66929###############################################################################
66930
66931# Check for some common pitfalls
66932
66933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66934    file_to_test="$SRC_ROOT/LICENSE"
66935    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66936      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
66937    fi
66938  fi
66939
66940
66941  # Did user specify any unknown variables?
66942
66943  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66944    # Replace the separating ! with spaces before presenting for end user.
66945    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66946    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66947$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66948  fi
66949
66950
66951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66952$as_echo_n "checking if build directory is on local disk... " >&6; }
66953
66954  # df -l lists only local disks; if the given directory is not found then
66955  # a non-zero exit code is given
66956  if test "x$DF" = x; then
66957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66958      # msys does not have df; use Windows "net use" instead.
66959      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66960      if test "x$IS_NETWORK_DISK" = x; then
66961        OUTPUT_DIR_IS_LOCAL="yes"
66962      else
66963        OUTPUT_DIR_IS_LOCAL="no"
66964      fi
66965    else
66966      # No df here, say it's local
66967      OUTPUT_DIR_IS_LOCAL="yes"
66968    fi
66969  else
66970    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66971      OUTPUT_DIR_IS_LOCAL="yes"
66972    else
66973      OUTPUT_DIR_IS_LOCAL="no"
66974    fi
66975  fi
66976
66977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66978$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66979
66980
66981
66982  # Check if the user has any old-style ALT_ variables set.
66983  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66984
66985  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66986  # Since we can't properly handle the dependencies for this, warn the user about the situation
66987  if test -e $OUTPUT_ROOT/spec.gmk; then
66988    IS_RECONFIGURE=yes
66989  else
66990    IS_RECONFIGURE=no
66991  fi
66992
66993
66994# At the end, call the custom hook. (Dummy macro if no custom sources available)
66995
66996
66997# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66998
66999  # Keep feature lists sorted and free of duplicates
67000  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67001  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67002  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67003  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67004  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67005  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67006  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67007
67008  # Validate features
67009  for variant in $JVM_VARIANTS; do
67010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67011$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67012    features_var_name=JVM_FEATURES_$variant
67013    JVM_FEATURES_TO_TEST=${!features_var_name}
67014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67015$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67016    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67017    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67018    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67019    if test "x$INVALID_FEATURES" != x; then
67020      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67021    fi
67022  done
67023
67024
67025# We're messing a bit with internal autoconf variables to put the config.status
67026# in the output directory instead of the current directory.
67027CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67028
67029# Create the actual output files. Now the main work of configure is done.
67030cat >confcache <<\_ACEOF
67031# This file is a shell script that caches the results of configure
67032# tests run on this system so they can be shared between configure
67033# scripts and configure runs, see configure's option --config-cache.
67034# It is not useful on other systems.  If it contains results you don't
67035# want to keep, you may remove or edit it.
67036#
67037# config.status only pays attention to the cache file if you give it
67038# the --recheck option to rerun configure.
67039#
67040# `ac_cv_env_foo' variables (set or unset) will be overridden when
67041# loading this file, other *unset* `ac_cv_foo' will be assigned the
67042# following values.
67043
67044_ACEOF
67045
67046# The following way of writing the cache mishandles newlines in values,
67047# but we know of no workaround that is simple, portable, and efficient.
67048# So, we kill variables containing newlines.
67049# Ultrix sh set writes to stderr and can't be redirected directly,
67050# and sets the high bit in the cache file unless we assign to the vars.
67051(
67052  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67053    eval ac_val=\$$ac_var
67054    case $ac_val in #(
67055    *${as_nl}*)
67056      case $ac_var in #(
67057      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67058$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67059      esac
67060      case $ac_var in #(
67061      _ | IFS | as_nl) ;; #(
67062      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67063      *) { eval $ac_var=; unset $ac_var;} ;;
67064      esac ;;
67065    esac
67066  done
67067
67068  (set) 2>&1 |
67069    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67070    *${as_nl}ac_space=\ *)
67071      # `set' does not quote correctly, so add quotes: double-quote
67072      # substitution turns \\\\ into \\, and sed turns \\ into \.
67073      sed -n \
67074	"s/'/'\\\\''/g;
67075	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67076      ;; #(
67077    *)
67078      # `set' quotes correctly as required by POSIX, so do not add quotes.
67079      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67080      ;;
67081    esac |
67082    sort
67083) |
67084  sed '
67085     /^ac_cv_env_/b end
67086     t clear
67087     :clear
67088     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67089     t end
67090     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67091     :end' >>confcache
67092if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67093  if test -w "$cache_file"; then
67094    if test "x$cache_file" != "x/dev/null"; then
67095      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67096$as_echo "$as_me: updating cache $cache_file" >&6;}
67097      if test ! -f "$cache_file" || test -h "$cache_file"; then
67098	cat confcache >"$cache_file"
67099      else
67100        case $cache_file in #(
67101        */* | ?:*)
67102	  mv -f confcache "$cache_file"$$ &&
67103	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67104        *)
67105	  mv -f confcache "$cache_file" ;;
67106	esac
67107      fi
67108    fi
67109  else
67110    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67111$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67112  fi
67113fi
67114rm -f confcache
67115
67116test "x$prefix" = xNONE && prefix=$ac_default_prefix
67117# Let make expand exec_prefix.
67118test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67119
67120# Transform confdefs.h into DEFS.
67121# Protect against shell expansion while executing Makefile rules.
67122# Protect against Makefile macro expansion.
67123#
67124# If the first sed substitution is executed (which looks for macros that
67125# take arguments), then branch to the quote section.  Otherwise,
67126# look for a macro that doesn't take arguments.
67127ac_script='
67128:mline
67129/\\$/{
67130 N
67131 s,\\\n,,
67132 b mline
67133}
67134t clear
67135:clear
67136s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67137t quote
67138s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67139t quote
67140b any
67141:quote
67142s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67143s/\[/\\&/g
67144s/\]/\\&/g
67145s/\$/$$/g
67146H
67147:any
67148${
67149	g
67150	s/^\n//
67151	s/\n/ /g
67152	p
67153}
67154'
67155DEFS=`sed -n "$ac_script" confdefs.h`
67156
67157
67158ac_libobjs=
67159ac_ltlibobjs=
67160U=
67161for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67162  # 1. Remove the extension, and $U if already installed.
67163  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67164  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67165  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67166  #    will be set to the directory where LIBOBJS objects are built.
67167  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67168  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67169done
67170LIBOBJS=$ac_libobjs
67171
67172LTLIBOBJS=$ac_ltlibobjs
67173
67174
67175
67176: "${CONFIG_STATUS=./config.status}"
67177ac_write_fail=0
67178ac_clean_files_save=$ac_clean_files
67179ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67180{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67181$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67182as_write_fail=0
67183cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67184#! $SHELL
67185# Generated by $as_me.
67186# Run this file to recreate the current configuration.
67187# Compiler output produced by configure, useful for debugging
67188# configure, is in config.log if it exists.
67189
67190debug=false
67191ac_cs_recheck=false
67192ac_cs_silent=false
67193
67194SHELL=\${CONFIG_SHELL-$SHELL}
67195export SHELL
67196_ASEOF
67197cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67198## -------------------- ##
67199## M4sh Initialization. ##
67200## -------------------- ##
67201
67202# Be more Bourne compatible
67203DUALCASE=1; export DUALCASE # for MKS sh
67204if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67205  emulate sh
67206  NULLCMD=:
67207  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67208  # is contrary to our usage.  Disable this feature.
67209  alias -g '${1+"$@"}'='"$@"'
67210  setopt NO_GLOB_SUBST
67211else
67212  case `(set -o) 2>/dev/null` in #(
67213  *posix*) :
67214    set -o posix ;; #(
67215  *) :
67216     ;;
67217esac
67218fi
67219
67220
67221as_nl='
67222'
67223export as_nl
67224# Printing a long string crashes Solaris 7 /usr/bin/printf.
67225as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67226as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67227as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67228# Prefer a ksh shell builtin over an external printf program on Solaris,
67229# but without wasting forks for bash or zsh.
67230if test -z "$BASH_VERSION$ZSH_VERSION" \
67231    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67232  as_echo='print -r --'
67233  as_echo_n='print -rn --'
67234elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67235  as_echo='printf %s\n'
67236  as_echo_n='printf %s'
67237else
67238  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67239    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67240    as_echo_n='/usr/ucb/echo -n'
67241  else
67242    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67243    as_echo_n_body='eval
67244      arg=$1;
67245      case $arg in #(
67246      *"$as_nl"*)
67247	expr "X$arg" : "X\\(.*\\)$as_nl";
67248	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67249      esac;
67250      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67251    '
67252    export as_echo_n_body
67253    as_echo_n='sh -c $as_echo_n_body as_echo'
67254  fi
67255  export as_echo_body
67256  as_echo='sh -c $as_echo_body as_echo'
67257fi
67258
67259# The user is always right.
67260if test "${PATH_SEPARATOR+set}" != set; then
67261  PATH_SEPARATOR=:
67262  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67263    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67264      PATH_SEPARATOR=';'
67265  }
67266fi
67267
67268
67269# IFS
67270# We need space, tab and new line, in precisely that order.  Quoting is
67271# there to prevent editors from complaining about space-tab.
67272# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67273# splitting by setting IFS to empty value.)
67274IFS=" ""	$as_nl"
67275
67276# Find who we are.  Look in the path if we contain no directory separator.
67277as_myself=
67278case $0 in #((
67279  *[\\/]* ) as_myself=$0 ;;
67280  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67281for as_dir in $PATH
67282do
67283  IFS=$as_save_IFS
67284  test -z "$as_dir" && as_dir=.
67285    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67286  done
67287IFS=$as_save_IFS
67288
67289     ;;
67290esac
67291# We did not find ourselves, most probably we were run as `sh COMMAND'
67292# in which case we are not to be found in the path.
67293if test "x$as_myself" = x; then
67294  as_myself=$0
67295fi
67296if test ! -f "$as_myself"; then
67297  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67298  exit 1
67299fi
67300
67301# Unset variables that we do not need and which cause bugs (e.g. in
67302# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67303# suppresses any "Segmentation fault" message there.  '((' could
67304# trigger a bug in pdksh 5.2.14.
67305for as_var in BASH_ENV ENV MAIL MAILPATH
67306do eval test x\${$as_var+set} = xset \
67307  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67308done
67309PS1='$ '
67310PS2='> '
67311PS4='+ '
67312
67313# NLS nuisances.
67314LC_ALL=C
67315export LC_ALL
67316LANGUAGE=C
67317export LANGUAGE
67318
67319# CDPATH.
67320(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67321
67322
67323# as_fn_error STATUS ERROR [LINENO LOG_FD]
67324# ----------------------------------------
67325# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67326# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67327# script with STATUS, using 1 if that was 0.
67328as_fn_error ()
67329{
67330  as_status=$1; test $as_status -eq 0 && as_status=1
67331  if test "$4"; then
67332    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67333    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67334  fi
67335  $as_echo "$as_me: error: $2" >&2
67336  as_fn_exit $as_status
67337} # as_fn_error
67338
67339
67340# as_fn_set_status STATUS
67341# -----------------------
67342# Set $? to STATUS, without forking.
67343as_fn_set_status ()
67344{
67345  return $1
67346} # as_fn_set_status
67347
67348# as_fn_exit STATUS
67349# -----------------
67350# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67351as_fn_exit ()
67352{
67353  set +e
67354  as_fn_set_status $1
67355  exit $1
67356} # as_fn_exit
67357
67358# as_fn_unset VAR
67359# ---------------
67360# Portably unset VAR.
67361as_fn_unset ()
67362{
67363  { eval $1=; unset $1;}
67364}
67365as_unset=as_fn_unset
67366# as_fn_append VAR VALUE
67367# ----------------------
67368# Append the text in VALUE to the end of the definition contained in VAR. Take
67369# advantage of any shell optimizations that allow amortized linear growth over
67370# repeated appends, instead of the typical quadratic growth present in naive
67371# implementations.
67372if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67373  eval 'as_fn_append ()
67374  {
67375    eval $1+=\$2
67376  }'
67377else
67378  as_fn_append ()
67379  {
67380    eval $1=\$$1\$2
67381  }
67382fi # as_fn_append
67383
67384# as_fn_arith ARG...
67385# ------------------
67386# Perform arithmetic evaluation on the ARGs, and store the result in the
67387# global $as_val. Take advantage of shells that can avoid forks. The arguments
67388# must be portable across $(()) and expr.
67389if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67390  eval 'as_fn_arith ()
67391  {
67392    as_val=$(( $* ))
67393  }'
67394else
67395  as_fn_arith ()
67396  {
67397    as_val=`expr "$@" || test $? -eq 1`
67398  }
67399fi # as_fn_arith
67400
67401
67402if expr a : '\(a\)' >/dev/null 2>&1 &&
67403   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67404  as_expr=expr
67405else
67406  as_expr=false
67407fi
67408
67409if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67410  as_basename=basename
67411else
67412  as_basename=false
67413fi
67414
67415if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67416  as_dirname=dirname
67417else
67418  as_dirname=false
67419fi
67420
67421as_me=`$as_basename -- "$0" ||
67422$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67423	 X"$0" : 'X\(//\)$' \| \
67424	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67425$as_echo X/"$0" |
67426    sed '/^.*\/\([^/][^/]*\)\/*$/{
67427	    s//\1/
67428	    q
67429	  }
67430	  /^X\/\(\/\/\)$/{
67431	    s//\1/
67432	    q
67433	  }
67434	  /^X\/\(\/\).*/{
67435	    s//\1/
67436	    q
67437	  }
67438	  s/.*/./; q'`
67439
67440# Avoid depending upon Character Ranges.
67441as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67442as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67443as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67444as_cr_digits='0123456789'
67445as_cr_alnum=$as_cr_Letters$as_cr_digits
67446
67447ECHO_C= ECHO_N= ECHO_T=
67448case `echo -n x` in #(((((
67449-n*)
67450  case `echo 'xy\c'` in
67451  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67452  xy)  ECHO_C='\c';;
67453  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67454       ECHO_T='	';;
67455  esac;;
67456*)
67457  ECHO_N='-n';;
67458esac
67459
67460rm -f conf$$ conf$$.exe conf$$.file
67461if test -d conf$$.dir; then
67462  rm -f conf$$.dir/conf$$.file
67463else
67464  rm -f conf$$.dir
67465  mkdir conf$$.dir 2>/dev/null
67466fi
67467if (echo >conf$$.file) 2>/dev/null; then
67468  if ln -s conf$$.file conf$$ 2>/dev/null; then
67469    as_ln_s='ln -s'
67470    # ... but there are two gotchas:
67471    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67472    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67473    # In both cases, we have to default to `cp -pR'.
67474    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67475      as_ln_s='cp -pR'
67476  elif ln conf$$.file conf$$ 2>/dev/null; then
67477    as_ln_s=ln
67478  else
67479    as_ln_s='cp -pR'
67480  fi
67481else
67482  as_ln_s='cp -pR'
67483fi
67484rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67485rmdir conf$$.dir 2>/dev/null
67486
67487
67488# as_fn_mkdir_p
67489# -------------
67490# Create "$as_dir" as a directory, including parents if necessary.
67491as_fn_mkdir_p ()
67492{
67493
67494  case $as_dir in #(
67495  -*) as_dir=./$as_dir;;
67496  esac
67497  test -d "$as_dir" || eval $as_mkdir_p || {
67498    as_dirs=
67499    while :; do
67500      case $as_dir in #(
67501      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67502      *) as_qdir=$as_dir;;
67503      esac
67504      as_dirs="'$as_qdir' $as_dirs"
67505      as_dir=`$as_dirname -- "$as_dir" ||
67506$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67507	 X"$as_dir" : 'X\(//\)[^/]' \| \
67508	 X"$as_dir" : 'X\(//\)$' \| \
67509	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67510$as_echo X"$as_dir" |
67511    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67512	    s//\1/
67513	    q
67514	  }
67515	  /^X\(\/\/\)[^/].*/{
67516	    s//\1/
67517	    q
67518	  }
67519	  /^X\(\/\/\)$/{
67520	    s//\1/
67521	    q
67522	  }
67523	  /^X\(\/\).*/{
67524	    s//\1/
67525	    q
67526	  }
67527	  s/.*/./; q'`
67528      test -d "$as_dir" && break
67529    done
67530    test -z "$as_dirs" || eval "mkdir $as_dirs"
67531  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67532
67533
67534} # as_fn_mkdir_p
67535if mkdir -p . 2>/dev/null; then
67536  as_mkdir_p='mkdir -p "$as_dir"'
67537else
67538  test -d ./-p && rmdir ./-p
67539  as_mkdir_p=false
67540fi
67541
67542
67543# as_fn_executable_p FILE
67544# -----------------------
67545# Test if FILE is an executable regular file.
67546as_fn_executable_p ()
67547{
67548  test -f "$1" && test -x "$1"
67549} # as_fn_executable_p
67550as_test_x='test -x'
67551as_executable_p=as_fn_executable_p
67552
67553# Sed expression to map a string onto a valid CPP name.
67554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67555
67556# Sed expression to map a string onto a valid variable name.
67557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67558
67559
67560exec 6>&1
67561## ----------------------------------- ##
67562## Main body of $CONFIG_STATUS script. ##
67563## ----------------------------------- ##
67564_ASEOF
67565test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67566
67567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67568# Save the log message, to keep $0 and so on meaningful, and to
67569# report actual input values of CONFIG_FILES etc. instead of their
67570# values after options handling.
67571ac_log="
67572This file was extended by OpenJDK $as_me jdk9, which was
67573generated by GNU Autoconf 2.69.  Invocation command line was
67574
67575  CONFIG_FILES    = $CONFIG_FILES
67576  CONFIG_HEADERS  = $CONFIG_HEADERS
67577  CONFIG_LINKS    = $CONFIG_LINKS
67578  CONFIG_COMMANDS = $CONFIG_COMMANDS
67579  $ $0 $@
67580
67581on `(hostname || uname -n) 2>/dev/null | sed 1q`
67582"
67583
67584_ACEOF
67585
67586case $ac_config_files in *"
67587"*) set x $ac_config_files; shift; ac_config_files=$*;;
67588esac
67589
67590
67591
67592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67593# Files that config.status was made for.
67594config_files="$ac_config_files"
67595
67596_ACEOF
67597
67598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67599ac_cs_usage="\
67600\`$as_me' instantiates files and other configuration actions
67601from templates according to the current configuration.  Unless the files
67602and actions are specified as TAGs, all are instantiated by default.
67603
67604Usage: $0 [OPTION]... [TAG]...
67605
67606  -h, --help       print this help, then exit
67607  -V, --version    print version number and configuration settings, then exit
67608      --config     print configuration, then exit
67609  -q, --quiet, --silent
67610                   do not print progress messages
67611  -d, --debug      don't remove temporary files
67612      --recheck    update $as_me by reconfiguring in the same conditions
67613      --file=FILE[:TEMPLATE]
67614                   instantiate the configuration file FILE
67615
67616Configuration files:
67617$config_files
67618
67619Report bugs to <build-dev@openjdk.java.net>.
67620OpenJDK home page: <http://openjdk.java.net>."
67621
67622_ACEOF
67623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67624ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67625ac_cs_version="\\
67626OpenJDK config.status jdk9
67627configured by $0, generated by GNU Autoconf 2.69,
67628  with options \\"\$ac_cs_config\\"
67629
67630Copyright (C) 2012 Free Software Foundation, Inc.
67631This config.status script is free software; the Free Software Foundation
67632gives unlimited permission to copy, distribute and modify it."
67633
67634ac_pwd='$ac_pwd'
67635srcdir='$srcdir'
67636AWK='$AWK'
67637test -n "\$AWK" || AWK=awk
67638_ACEOF
67639
67640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67641# The default lists apply if the user does not specify any file.
67642ac_need_defaults=:
67643while test $# != 0
67644do
67645  case $1 in
67646  --*=?*)
67647    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67648    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67649    ac_shift=:
67650    ;;
67651  --*=)
67652    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67653    ac_optarg=
67654    ac_shift=:
67655    ;;
67656  *)
67657    ac_option=$1
67658    ac_optarg=$2
67659    ac_shift=shift
67660    ;;
67661  esac
67662
67663  case $ac_option in
67664  # Handling of the options.
67665  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67666    ac_cs_recheck=: ;;
67667  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67668    $as_echo "$ac_cs_version"; exit ;;
67669  --config | --confi | --conf | --con | --co | --c )
67670    $as_echo "$ac_cs_config"; exit ;;
67671  --debug | --debu | --deb | --de | --d | -d )
67672    debug=: ;;
67673  --file | --fil | --fi | --f )
67674    $ac_shift
67675    case $ac_optarg in
67676    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67677    '') as_fn_error $? "missing file argument" ;;
67678    esac
67679    as_fn_append CONFIG_FILES " '$ac_optarg'"
67680    ac_need_defaults=false;;
67681  --he | --h |  --help | --hel | -h )
67682    $as_echo "$ac_cs_usage"; exit ;;
67683  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67684  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67685    ac_cs_silent=: ;;
67686
67687  # This is an error.
67688  -*) as_fn_error $? "unrecognized option: \`$1'
67689Try \`$0 --help' for more information." ;;
67690
67691  *) as_fn_append ac_config_targets " $1"
67692     ac_need_defaults=false ;;
67693
67694  esac
67695  shift
67696done
67697
67698ac_configure_extra_args=
67699
67700if $ac_cs_silent; then
67701  exec 6>/dev/null
67702  ac_configure_extra_args="$ac_configure_extra_args --silent"
67703fi
67704
67705_ACEOF
67706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67707if \$ac_cs_recheck; then
67708  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67709  shift
67710  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67711  CONFIG_SHELL='$SHELL'
67712  export CONFIG_SHELL
67713  exec "\$@"
67714fi
67715
67716_ACEOF
67717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67718exec 5>>config.log
67719{
67720  echo
67721  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67722## Running $as_me. ##
67723_ASBOX
67724  $as_echo "$ac_log"
67725} >&5
67726
67727_ACEOF
67728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67729_ACEOF
67730
67731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67732
67733# Handling of arguments.
67734for ac_config_target in $ac_config_targets
67735do
67736  case $ac_config_target in
67737    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67738    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67739    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67740    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67741    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67742
67743  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67744  esac
67745done
67746
67747
67748# If the user did not use the arguments to specify the items to instantiate,
67749# then the envvar interface is used.  Set only those that are not.
67750# We use the long form for the default assignment because of an extremely
67751# bizarre bug on SunOS 4.1.3.
67752if $ac_need_defaults; then
67753  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67754fi
67755
67756# Have a temporary directory for convenience.  Make it in the build tree
67757# simply because there is no reason against having it here, and in addition,
67758# creating and moving files from /tmp can sometimes cause problems.
67759# Hook for its removal unless debugging.
67760# Note that there is a small window in which the directory will not be cleaned:
67761# after its creation but before its name has been assigned to `$tmp'.
67762$debug ||
67763{
67764  tmp= ac_tmp=
67765  trap 'exit_status=$?
67766  : "${ac_tmp:=$tmp}"
67767  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67768' 0
67769  trap 'as_fn_exit 1' 1 2 13 15
67770}
67771# Create a (secure) tmp directory for tmp files.
67772
67773{
67774  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67775  test -d "$tmp"
67776}  ||
67777{
67778  tmp=./conf$$-$RANDOM
67779  (umask 077 && mkdir "$tmp")
67780} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67781ac_tmp=$tmp
67782
67783# Set up the scripts for CONFIG_FILES section.
67784# No need to generate them if there are no CONFIG_FILES.
67785# This happens for instance with `./config.status config.h'.
67786if test -n "$CONFIG_FILES"; then
67787
67788
67789ac_cr=`echo X | tr X '\015'`
67790# On cygwin, bash can eat \r inside `` if the user requested igncr.
67791# But we know of no other shell where ac_cr would be empty at this
67792# point, so we can use a bashism as a fallback.
67793if test "x$ac_cr" = x; then
67794  eval ac_cr=\$\'\\r\'
67795fi
67796ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67797if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67798  ac_cs_awk_cr='\\r'
67799else
67800  ac_cs_awk_cr=$ac_cr
67801fi
67802
67803echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67804_ACEOF
67805
67806
67807{
67808  echo "cat >conf$$subs.awk <<_ACEOF" &&
67809  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67810  echo "_ACEOF"
67811} >conf$$subs.sh ||
67812  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67813ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67814ac_delim='%!_!# '
67815for ac_last_try in false false false false false :; do
67816  . ./conf$$subs.sh ||
67817    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67818
67819  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67820  if test $ac_delim_n = $ac_delim_num; then
67821    break
67822  elif $ac_last_try; then
67823    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67824  else
67825    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67826  fi
67827done
67828rm -f conf$$subs.sh
67829
67830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67831cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67832_ACEOF
67833sed -n '
67834h
67835s/^/S["/; s/!.*/"]=/
67836p
67837g
67838s/^[^!]*!//
67839:repl
67840t repl
67841s/'"$ac_delim"'$//
67842t delim
67843:nl
67844h
67845s/\(.\{148\}\)..*/\1/
67846t more1
67847s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67848p
67849n
67850b repl
67851:more1
67852s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67853p
67854g
67855s/.\{148\}//
67856t nl
67857:delim
67858h
67859s/\(.\{148\}\)..*/\1/
67860t more2
67861s/["\\]/\\&/g; s/^/"/; s/$/"/
67862p
67863b
67864:more2
67865s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67866p
67867g
67868s/.\{148\}//
67869t delim
67870' <conf$$subs.awk | sed '
67871/^[^""]/{
67872  N
67873  s/\n//
67874}
67875' >>$CONFIG_STATUS || ac_write_fail=1
67876rm -f conf$$subs.awk
67877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67878_ACAWK
67879cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67880  for (key in S) S_is_set[key] = 1
67881  FS = ""
67882
67883}
67884{
67885  line = $ 0
67886  nfields = split(line, field, "@")
67887  substed = 0
67888  len = length(field[1])
67889  for (i = 2; i < nfields; i++) {
67890    key = field[i]
67891    keylen = length(key)
67892    if (S_is_set[key]) {
67893      value = S[key]
67894      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67895      len += length(value) + length(field[++i])
67896      substed = 1
67897    } else
67898      len += 1 + keylen
67899  }
67900
67901  print line
67902}
67903
67904_ACAWK
67905_ACEOF
67906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67907if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67908  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67909else
67910  cat
67911fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67912  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67913_ACEOF
67914
67915# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67916# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67917# trailing colons and then remove the whole line if VPATH becomes empty
67918# (actually we leave an empty line to preserve line numbers).
67919if test "x$srcdir" = x.; then
67920  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67921h
67922s///
67923s/^/:/
67924s/[	 ]*$/:/
67925s/:\$(srcdir):/:/g
67926s/:\${srcdir}:/:/g
67927s/:@srcdir@:/:/g
67928s/^:*//
67929s/:*$//
67930x
67931s/\(=[	 ]*\).*/\1/
67932G
67933s/\n//
67934s/^[^=]*=[	 ]*$//
67935}'
67936fi
67937
67938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67939fi # test -n "$CONFIG_FILES"
67940
67941
67942eval set X "  :F $CONFIG_FILES      "
67943shift
67944for ac_tag
67945do
67946  case $ac_tag in
67947  :[FHLC]) ac_mode=$ac_tag; continue;;
67948  esac
67949  case $ac_mode$ac_tag in
67950  :[FHL]*:*);;
67951  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67952  :[FH]-) ac_tag=-:-;;
67953  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67954  esac
67955  ac_save_IFS=$IFS
67956  IFS=:
67957  set x $ac_tag
67958  IFS=$ac_save_IFS
67959  shift
67960  ac_file=$1
67961  shift
67962
67963  case $ac_mode in
67964  :L) ac_source=$1;;
67965  :[FH])
67966    ac_file_inputs=
67967    for ac_f
67968    do
67969      case $ac_f in
67970      -) ac_f="$ac_tmp/stdin";;
67971      *) # Look for the file first in the build tree, then in the source tree
67972	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67973	 # because $ac_f cannot contain `:'.
67974	 test -f "$ac_f" ||
67975	   case $ac_f in
67976	   [\\/$]*) false;;
67977	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67978	   esac ||
67979	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67980      esac
67981      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67982      as_fn_append ac_file_inputs " '$ac_f'"
67983    done
67984
67985    # Let's still pretend it is `configure' which instantiates (i.e., don't
67986    # use $as_me), people would be surprised to read:
67987    #    /* config.h.  Generated by config.status.  */
67988    configure_input='Generated from '`
67989	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67990	`' by configure.'
67991    if test x"$ac_file" != x-; then
67992      configure_input="$ac_file.  $configure_input"
67993      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67994$as_echo "$as_me: creating $ac_file" >&6;}
67995    fi
67996    # Neutralize special characters interpreted by sed in replacement strings.
67997    case $configure_input in #(
67998    *\&* | *\|* | *\\* )
67999       ac_sed_conf_input=`$as_echo "$configure_input" |
68000       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68001    *) ac_sed_conf_input=$configure_input;;
68002    esac
68003
68004    case $ac_tag in
68005    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68006      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68007    esac
68008    ;;
68009  esac
68010
68011  ac_dir=`$as_dirname -- "$ac_file" ||
68012$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68013	 X"$ac_file" : 'X\(//\)[^/]' \| \
68014	 X"$ac_file" : 'X\(//\)$' \| \
68015	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68016$as_echo X"$ac_file" |
68017    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68018	    s//\1/
68019	    q
68020	  }
68021	  /^X\(\/\/\)[^/].*/{
68022	    s//\1/
68023	    q
68024	  }
68025	  /^X\(\/\/\)$/{
68026	    s//\1/
68027	    q
68028	  }
68029	  /^X\(\/\).*/{
68030	    s//\1/
68031	    q
68032	  }
68033	  s/.*/./; q'`
68034  as_dir="$ac_dir"; as_fn_mkdir_p
68035  ac_builddir=.
68036
68037case "$ac_dir" in
68038.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68039*)
68040  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68041  # A ".." for each directory in $ac_dir_suffix.
68042  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68043  case $ac_top_builddir_sub in
68044  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68045  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68046  esac ;;
68047esac
68048ac_abs_top_builddir=$ac_pwd
68049ac_abs_builddir=$ac_pwd$ac_dir_suffix
68050# for backward compatibility:
68051ac_top_builddir=$ac_top_build_prefix
68052
68053case $srcdir in
68054  .)  # We are building in place.
68055    ac_srcdir=.
68056    ac_top_srcdir=$ac_top_builddir_sub
68057    ac_abs_top_srcdir=$ac_pwd ;;
68058  [\\/]* | ?:[\\/]* )  # Absolute name.
68059    ac_srcdir=$srcdir$ac_dir_suffix;
68060    ac_top_srcdir=$srcdir
68061    ac_abs_top_srcdir=$srcdir ;;
68062  *) # Relative name.
68063    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68064    ac_top_srcdir=$ac_top_build_prefix$srcdir
68065    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68066esac
68067ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68068
68069
68070  case $ac_mode in
68071  :F)
68072  #
68073  # CONFIG_FILE
68074  #
68075
68076_ACEOF
68077
68078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68079# If the template does not know about datarootdir, expand it.
68080# FIXME: This hack should be removed a few years after 2.60.
68081ac_datarootdir_hack=; ac_datarootdir_seen=
68082ac_sed_dataroot='
68083/datarootdir/ {
68084  p
68085  q
68086}
68087/@datadir@/p
68088/@docdir@/p
68089/@infodir@/p
68090/@localedir@/p
68091/@mandir@/p'
68092case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68093*datarootdir*) ac_datarootdir_seen=yes;;
68094*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68095  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68096$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68097_ACEOF
68098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68099  ac_datarootdir_hack='
68100  s&@datadir@&$datadir&g
68101  s&@docdir@&$docdir&g
68102  s&@infodir@&$infodir&g
68103  s&@localedir@&$localedir&g
68104  s&@mandir@&$mandir&g
68105  s&\\\${datarootdir}&$datarootdir&g' ;;
68106esac
68107_ACEOF
68108
68109# Neutralize VPATH when `$srcdir' = `.'.
68110# Shell code in configure.ac might set extrasub.
68111# FIXME: do we really want to maintain this feature?
68112cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68113ac_sed_extra="$ac_vpsub
68114$extrasub
68115_ACEOF
68116cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68117:t
68118/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68119s|@configure_input@|$ac_sed_conf_input|;t t
68120s&@top_builddir@&$ac_top_builddir_sub&;t t
68121s&@top_build_prefix@&$ac_top_build_prefix&;t t
68122s&@srcdir@&$ac_srcdir&;t t
68123s&@abs_srcdir@&$ac_abs_srcdir&;t t
68124s&@top_srcdir@&$ac_top_srcdir&;t t
68125s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68126s&@builddir@&$ac_builddir&;t t
68127s&@abs_builddir@&$ac_abs_builddir&;t t
68128s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68129$ac_datarootdir_hack
68130"
68131eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68132  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68133
68134test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68135  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68136  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68137      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68138  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68139which seems to be undefined.  Please make sure it is defined" >&5
68140$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68141which seems to be undefined.  Please make sure it is defined" >&2;}
68142
68143  rm -f "$ac_tmp/stdin"
68144  case $ac_file in
68145  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68146  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68147  esac \
68148  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68149 ;;
68150
68151
68152
68153  esac
68154
68155done # for ac_tag
68156
68157
68158as_fn_exit 0
68159_ACEOF
68160ac_clean_files=$ac_clean_files_save
68161
68162test $ac_write_fail = 0 ||
68163  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68164
68165
68166# configure is writing to config.log, and then calls config.status.
68167# config.status does its own redirection, appending to config.log.
68168# Unfortunately, on DOS this fails, as config.log is still kept open
68169# by configure, so config.status won't be able to write to it; its
68170# output is simply discarded.  So we exec the FD to /dev/null,
68171# effectively closing config.log, so it can be properly (re)opened and
68172# appended to by config.status.  When coming back to configure, we
68173# need to make the FD available again.
68174if test "$no_create" != yes; then
68175  ac_cs_success=:
68176  ac_config_status_args=
68177  test "$silent" = yes &&
68178    ac_config_status_args="$ac_config_status_args --quiet"
68179  exec 5>/dev/null
68180  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68181  exec 5>>config.log
68182  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68183  # would make configure fail if this is the last instruction.
68184  $ac_cs_success || as_fn_exit 1
68185fi
68186if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68187  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68188$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68189fi
68190
68191
68192# After AC_OUTPUT, we need to do final work
68193
68194
68195  # Try to move config.log (generated by autoconf) to the configure-support directory.
68196  if test -e ./config.log; then
68197    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68198  fi
68199
68200  # Rotate our log file (configure.log)
68201  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68202    $RM -f "$OUTPUT_ROOT/configure.log.old"
68203  fi
68204  if test -e "$OUTPUT_ROOT/configure.log"; then
68205    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68206  fi
68207
68208  # Move configure.log from current directory to the build output root
68209  if test -e ./configure.log; then
68210    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68211  fi
68212
68213  # Make the compare script executable
68214  $CHMOD +x $OUTPUT_ROOT/compare.sh
68215
68216
68217# Finally output some useful information to the user
68218
68219  # Finally output some useful information to the user
68220
68221  printf "\n"
68222  printf "====================================================\n"
68223  if test "x$no_create" != "xyes"; then
68224    if test "x$IS_RECONFIGURE" != "xyes"; then
68225      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68226    else
68227      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68228    fi
68229  else
68230    if test "x$IS_RECONFIGURE" != "xyes"; then
68231      printf "A configuration has been successfully checked but not created\n"
68232    else
68233      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68234    fi
68235  fi
68236  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68237    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68238  else
68239    printf "using default settings.\n"
68240  fi
68241
68242  printf "\n"
68243  printf "Configuration summary:\n"
68244  printf "* Debug level:    $DEBUG_LEVEL\n"
68245  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68246  printf "* JDK variant:    $JDK_VARIANT\n"
68247  printf "* JVM variants:   $JVM_VARIANTS\n"
68248  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68249  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68250
68251  printf "\n"
68252  printf "Tools summary:\n"
68253  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68254    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68255  fi
68256  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68257  if test "x$TOOLCHAIN_VERSION" != "x"; then
68258    print_version=" $TOOLCHAIN_VERSION"
68259  fi
68260  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68261  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68262  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68263
68264  printf "\n"
68265  printf "Build performance summary:\n"
68266  printf "* Cores to use:   $JOBS\n"
68267  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68268  if test "x$CCACHE_STATUS" != "x"; then
68269    printf "* ccache status:  $CCACHE_STATUS\n"
68270  fi
68271  printf "\n"
68272
68273  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68274    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68275    printf "will result in longer build times.\n"
68276    printf "\n"
68277  fi
68278
68279  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68280    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68281    printf "These are not respected, and will be ignored. It is recommended\n"
68282    printf "that you clean your environment. The following variables are set:\n"
68283    printf "$FOUND_ALT_VARIABLES\n"
68284    printf "\n"
68285  fi
68286
68287  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68288    printf "WARNING: Your build output directory is not on a local disk.\n"
68289    printf "This will severely degrade build performance!\n"
68290    printf "It is recommended that you create an output directory on a local disk,\n"
68291    printf "and run the configure script again from that directory.\n"
68292    printf "\n"
68293  fi
68294
68295  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68296    printf "WARNING: The result of this configuration has overridden an older\n"
68297    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68298    printf "proper build. Failure to do so might result in strange build problems.\n"
68299    printf "\n"
68300  fi
68301
68302  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68303    printf "WARNING: The result of this configuration was not saved.\n"
68304    printf "You should run without '--no-create | -n' to create the configuration.\n"
68305    printf "\n"
68306  fi
68307
68308
68309
68310  # Locate config.log.
68311  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68312    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68313  elif test -e "./config.log"; then
68314    CONFIG_LOG_PATH="."
68315  fi
68316
68317  if test -e "$CONFIG_LOG_PATH/config.log"; then
68318    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68319    if test $? -eq 0; then
68320      printf "The following warnings were produced. Repeated here for convenience:\n"
68321      # We must quote sed expression (using []) to stop m4 from eating the [].
68322      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68323      printf "\n"
68324    fi
68325  fi
68326
68327