generated-configure.sh revision 2623:2878d95ace72
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
998RELEASE_FILE_OS_ARCH
999RELEASE_FILE_OS_NAME
1000OPENJDK_MODULE_TARGET_PLATFORM
1001COMPILE_TYPE
1002OPENJDK_TARGET_CPU_ENDIAN
1003OPENJDK_TARGET_CPU_BITS
1004OPENJDK_TARGET_CPU_ARCH
1005OPENJDK_TARGET_CPU
1006OPENJDK_TARGET_OS_ENV
1007OPENJDK_TARGET_OS_TYPE
1008OPENJDK_TARGET_OS
1009OPENJDK_BUILD_CPU_ENDIAN
1010OPENJDK_BUILD_CPU_BITS
1011OPENJDK_BUILD_CPU_ARCH
1012OPENJDK_BUILD_CPU
1013OPENJDK_BUILD_OS_ENV
1014OPENJDK_BUILD_OS_TYPE
1015OPENJDK_BUILD_OS
1016OPENJDK_BUILD_AUTOCONF_NAME
1017OPENJDK_TARGET_AUTOCONF_NAME
1018target_os
1019target_vendor
1020target_cpu
1021target
1022host_os
1023host_vendor
1024host_cpu
1025host
1026build_os
1027build_vendor
1028build_cpu
1029build
1030PANDOC
1031NICE
1032CPIO
1033DF
1034READLINK
1035CYGPATH
1036SED
1037FGREP
1038EGREP
1039GREP
1040AWK
1041XARGS
1042WHICH
1043WC
1044UNIQ
1045UNAME
1046TR
1047TOUCH
1048TEE
1049TAR
1050TAIL
1051SORT
1052SH
1053RMDIR
1054RM
1055PRINTF
1056NAWK
1057MV
1058MKTEMP
1059MKDIR
1060LS
1061LN
1062GZIP
1063GUNZIP
1064HEAD
1065FIND
1066FILE
1067EXPR
1068ECHO
1069DIRNAME
1070DIFF
1071DATE
1072CUT
1073CP
1074COMM
1075CMP
1076CHMOD
1077CAT
1078BASH
1079BASENAME
1080DATE_WHEN_CONFIGURED
1081ORIGINAL_PATH
1082CONFIGURE_COMMAND_LINE
1083target_alias
1084host_alias
1085build_alias
1086LIBS
1087ECHO_T
1088ECHO_N
1089ECHO_C
1090DEFS
1091mandir
1092localedir
1093libdir
1094psdir
1095pdfdir
1096dvidir
1097htmldir
1098infodir
1099docdir
1100oldincludedir
1101includedir
1102localstatedir
1103sharedstatedir
1104sysconfdir
1105datadir
1106datarootdir
1107libexecdir
1108sbindir
1109bindir
1110program_transform_name
1111prefix
1112exec_prefix
1113PACKAGE_URL
1114PACKAGE_BUGREPORT
1115PACKAGE_STRING
1116PACKAGE_VERSION
1117PACKAGE_TARNAME
1118PACKAGE_NAME
1119PATH_SEPARATOR
1120SHELL'
1121ac_subst_files=''
1122ac_user_opts='
1123enable_option_checking
1124with_target_bits
1125enable_openjdk_only
1126with_custom_make_dir
1127with_jdk_variant
1128enable_debug
1129with_debug_level
1130with_jvm_variants
1131with_cpu_port
1132with_devkit
1133with_sys_root
1134with_sysroot
1135with_tools_dir
1136with_toolchain_path
1137with_extra_path
1138with_sdk_name
1139with_conf_name
1140with_output_sync
1141with_default_make_target
1142enable_headless_only
1143enable_full_docs
1144with_cacerts_file
1145enable_unlimited_crypto
1146with_copyright_year
1147enable_keep_packaged_modules
1148with_milestone
1149with_update_version
1150with_user_release_suffix
1151with_build_number
1152with_version_string
1153with_version_pre
1154with_version_opt
1155with_version_build
1156with_version_major
1157with_version_minor
1158with_version_security
1159with_version_patch
1160with_boot_jdk
1161with_build_jdk
1162with_add_source_root
1163with_override_source_root
1164with_adds_and_overrides
1165with_override_langtools
1166with_override_corba
1167with_override_jaxp
1168with_override_jaxws
1169with_override_hotspot
1170with_override_nashorn
1171with_override_jdk
1172with_import_hotspot
1173with_import_modules
1174enable_static_build
1175with_toolchain_type
1176with_extra_cflags
1177with_extra_cxxflags
1178with_extra_ldflags
1179with_toolchain_version
1180with_build_devkit
1181with_jtreg
1182with_abi_profile
1183enable_warnings_as_errors
1184with_native_debug_symbols
1185enable_debug_symbols
1186enable_zip_debug_info
1187enable_native_coverage
1188enable_dtrace
1189enable_aot
1190enable_hotspot_gtest
1191with_stdc__lib
1192with_msvcr_dll
1193with_msvcp_dll
1194with_x
1195with_cups
1196with_cups_include
1197with_freetype
1198with_freetype_include
1199with_freetype_lib
1200with_freetype_src
1201enable_freetype_bundling
1202with_alsa
1203with_alsa_include
1204with_alsa_lib
1205with_libffi
1206with_libffi_include
1207with_libffi_lib
1208enable_libffi_bundling
1209with_libjpeg
1210with_giflib
1211with_libpng
1212with_zlib
1213with_lcms
1214with_dxsdk
1215with_dxsdk_lib
1216with_dxsdk_include
1217with_libelf
1218with_libelf_include
1219with_libelf_lib
1220with_jvm_features
1221with_jvm_interpreter
1222enable_jtreg_failure_handler
1223enable_generate_classlist
1224with_num_cores
1225with_memory_size
1226with_jobs
1227with_test_jobs
1228with_boot_jdk_jvmargs
1229with_sjavac_server_java
1230enable_sjavac
1231enable_javac_server
1232enable_icecc
1233enable_precompiled_headers
1234enable_ccache
1235with_ccache_dir
1236'
1237      ac_precious_vars='build_alias
1238host_alias
1239target_alias
1240BASENAME
1241BASH
1242CAT
1243CHMOD
1244CMP
1245COMM
1246CP
1247CUT
1248DATE
1249DIFF
1250DIRNAME
1251ECHO
1252EXPR
1253FILE
1254FIND
1255HEAD
1256GUNZIP
1257GZIP
1258LN
1259LS
1260MKDIR
1261MKTEMP
1262MV
1263NAWK
1264PRINTF
1265RM
1266RMDIR
1267SH
1268SORT
1269TAIL
1270TAR
1271TEE
1272TOUCH
1273TR
1274UNAME
1275UNIQ
1276WC
1277WHICH
1278XARGS
1279AWK
1280GREP
1281EGREP
1282FGREP
1283SED
1284CYGPATH
1285READLINK
1286DF
1287CPIO
1288NICE
1289PANDOC
1290MAKE
1291UNZIP
1292ZIPEXE
1293LDD
1294OTOOL
1295READELF
1296DOT
1297HG
1298STAT
1299TIME
1300DTRACE
1301PATCH
1302DSYMUTIL
1303XATTR
1304CODESIGN
1305SETFILE
1306PKG_CONFIG
1307JAVA
1308JAVAC
1309JAVAH
1310JAR
1311JARSIGNER
1312CC
1313CFLAGS
1314LDFLAGS
1315LIBS
1316CPPFLAGS
1317CXX
1318CXXFLAGS
1319CCC
1320CPP
1321CXXCPP
1322AS
1323AR
1324LIPO
1325STRIP
1326NM
1327GNM
1328OBJCOPY
1329OBJDUMP
1330BUILD_CC
1331BUILD_CXX
1332BUILD_NM
1333BUILD_AR
1334BUILD_OBJCOPY
1335BUILD_STRIP
1336JTREGEXE
1337XMKMF
1338FREETYPE_CFLAGS
1339FREETYPE_LIBS
1340ALSA_CFLAGS
1341ALSA_LIBS
1342LIBFFI_CFLAGS
1343LIBFFI_LIBS
1344PNG_CFLAGS
1345PNG_LIBS
1346LCMS_CFLAGS
1347LCMS_LIBS
1348ELF_CFLAGS
1349ELF_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-full-docs      build complete documentation [enabled if all tools
1978                          found]
1979  --disable-unlimited-crypto
1980                          Disable unlimited crypto policy [enabled]
1981  --disable-keep-packaged-modules
1982                          Do not keep packaged modules in jdk image [enable]
1983  --enable-static-build   enable static library build [disabled]
1984  --disable-warnings-as-errors
1985                          do not consider native warnings to be an error
1986                          [enabled]
1987  --enable-debug-symbols  Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-zip-debug-info Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-native-coverage
1992                          enable native compilation with code coverage
1993                          data[disabled]
1994  --enable-dtrace[=yes/no/auto]
1995                          enable dtrace. Default is auto, where dtrace is
1996                          enabled if all dependencies are present.
1997  --enable-aot[=yes/no/auto]
1998                          enable ahead of time compilation feature. Default is
1999                          auto, where aot is enabled if all dependencies are
2000                          present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-libffi-bundling
2007                          enable bundling of libffi.so to make the built JDK
2008                          runnable on more systems
2009  --enable-jtreg-failure-handler
2010                          forces build of the jtreg failure handler to be
2011                          enabled, missing dependencies become fatal errors.
2012                          Default is auto, where the failure handler is built
2013                          if all dependencies are present and otherwise just
2014                          disabled.
2015  --disable-generate-classlist
2016                          forces enabling or disabling of the generation of a
2017                          CDS classlist at build time. Default is to generate
2018                          it when either the server or client JVMs are built.
2019  --enable-sjavac         use sjavac to do fast incremental compiles
2020                          [disabled]
2021  --disable-javac-server  disable javac server [enabled]
2022  --enable-icecc          enable distribted compilation of native code using
2023                          icecc/icecream [disabled]
2024  --disable-precompiled-headers
2025                          disable using precompiled headers when compiling C++
2026                          [enabled]
2027  --enable-ccache         enable using ccache to speed up recompilations
2028                          [disabled]
2029
2030Optional Packages:
2031  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2032  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2033  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2034                          support it), e.g. --with-target-bits=32 [guessed]
2035  --with-custom-make-dir  Deprecated. Option is kept for backwards
2036                          compatibility and is ignored
2037  --with-jdk-variant      JDK variant to build (normal) [normal]
2038  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2039                          optimized) [release]
2040  --with-jvm-variants     JVM variants (separated by commas) to build
2041                          (server,client,minimal,core,zero,zeroshark,custom)
2042                          [server]
2043  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2044                          (arm64,aarch64) [aarch64]
2045  --with-devkit           use this devkit for compilers, tools and resources
2046  --with-sys-root         alias for --with-sysroot for backwards compatability
2047  --with-sysroot          use this directory as sysroot
2048  --with-tools-dir        alias for --with-toolchain-path for backwards
2049                          compatibility
2050  --with-toolchain-path   prepend these directories when searching for
2051                          toolchain binaries (compilers etc)
2052  --with-extra-path       prepend these directories to the default path
2053  --with-sdk-name         use the platform SDK of the given name. [macosx]
2054  --with-conf-name        use this as the name of the configuration [generated
2055                          from important configuration options]
2056  --with-output-sync      set make output sync type if supported by make.
2057                          [recurse]
2058  --with-default-make-target
2059                          set the default make target [exploded-image]
2060  --with-cacerts-file     specify alternative cacerts file
2061  --with-copyright-year   Set copyright year value for build [current year]
2062  --with-milestone        Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-update-version   Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-user-release-suffix
2067                          Deprecated. Option is kept for backwards
2068                          compatibility and is ignored
2069  --with-build-number     Deprecated. Option is kept for backwards
2070                          compatibility and is ignored
2071  --with-version-string   Set version string [calculated]
2072  --with-version-pre      Set the base part of the version 'PRE' field
2073                          (pre-release identifier) ['internal']
2074  --with-version-opt      Set version 'OPT' field (build metadata)
2075                          [<timestamp>.<user>.<dirname>]
2076  --with-version-build    Set version 'BUILD' field (build number) [not
2077                          specified]
2078  --with-version-major    Set version 'MAJOR' field (first number) [current
2079                          source value]
2080  --with-version-minor    Set version 'MINOR' field (second number) [current
2081                          source value]
2082  --with-version-security Set version 'SECURITY' field (third number) [current
2083                          source value]
2084  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2085                          specified]
2086  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2087  --with-build-jdk        path to JDK of same version as is being built[the
2088                          newly built JDK]
2089  --with-add-source-root  Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-source-root
2092                          Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-adds-and-overrides
2095                          Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-langtools
2098                          Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-corba   Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-jaxp    Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-jaxws   Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-hotspot Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-nashorn Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-jdk     Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-import_hotspot   Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-import-modules   import a set of prebuilt modules either as a zip
2115                          file or an exploded directory
2116  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2117                          to show possible values [platform dependent]
2118  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2119  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2120  --with-extra-ldflags    extra flags to be used when linking jdk
2121  --with-toolchain-version
2122                          the version of the toolchain to look for, use
2123                          '--help' to show possible values [platform
2124                          dependent]
2125  --with-build-devkit     Devkit to use for the build platform toolchain
2126  --with-jtreg            Regression Test Harness [probed]
2127  --with-abi-profile      specify ABI profile for ARM builds
2128                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2129                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2130                          [toolchain dependent]
2131  --with-native-debug-symbols
2132                          set the native debug symbol configuration (none,
2133                          internal, external, zipped) [varying]
2134  --with-stdc++lib=<static>,<dynamic>,<default>
2135                          force linking of the C++ runtime on Linux to either
2136                          static or dynamic, default is static with dynamic as
2137                          fallback
2138  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2139                          (Windows only) [probed]
2140  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2141                          (Windows only) [probed]
2142  --with-x                use the X Window System
2143  --with-cups             specify prefix directory for the cups package
2144                          (expecting the headers under PATH/include)
2145  --with-cups-include     specify directory for the cups include files
2146  --with-freetype         specify prefix directory for the freetype package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-freetype-include specify directory for the freetype include files
2150  --with-freetype-lib     specify directory for the freetype library
2151  --with-freetype-src     specify directory with freetype sources to
2152                          automatically build the library (experimental,
2153                          Windows-only)
2154  --with-alsa             specify prefix directory for the alsa package
2155                          (expecting the libraries under PATH/lib and the
2156                          headers under PATH/include)
2157  --with-alsa-include     specify directory for the alsa include files
2158  --with-alsa-lib         specify directory for the alsa library
2159  --with-libffi           specify prefix directory for the libffi package
2160                          (expecting the libraries under PATH/lib and the
2161                          headers under PATH/include)
2162  --with-libffi-include   specify directory for the libffi include files
2163  --with-libffi-lib       specify directory for the libffi library
2164  --with-libjpeg          use libjpeg from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-giflib           use giflib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-libpng           use libpng from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-zlib             use zlib from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-lcms             use lcms2 from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-dxsdk            Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-dxsdk-include    Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-libelf           specify prefix directory for the libelf package
2181                          (expecting the libraries under PATH/lib and the
2182                          headers under PATH/include)
2183  --with-libelf-include   specify directory for the libelf include files
2184  --with-libelf-lib       specify directory for the libelf library
2185  --with-jvm-features     additional JVM features to enable (separated by
2186                          comma), use '--help' to show possible values [none]
2187  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2188                          compatibility and is ignored
2189  --with-num-cores        number of cores in the build system, e.g.
2190                          --with-num-cores=8 [probed]
2191  --with-memory-size      memory (in MB) available in the build system, e.g.
2192                          --with-memory-size=1024 [probed]
2193  --with-jobs             number of parallel jobs to let make run [calculated
2194                          based on cores and memory]
2195  --with-test-jobs        number of parallel tests jobs to run [based on build
2196                          jobs]
2197  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2198                          invocations of boot JDK, overriding the default
2199                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2200                          -enableassertions"
2201  --with-sjavac-server-java
2202                          use this java binary for running the sjavac
2203                          background server [Boot JDK java]
2204  --with-ccache-dir       where to store ccache files [~/.ccache]
2205
2206Some influential environment variables:
2207  BASENAME    Override default value for BASENAME
2208  BASH        Override default value for BASH
2209  CAT         Override default value for CAT
2210  CHMOD       Override default value for CHMOD
2211  CMP         Override default value for CMP
2212  COMM        Override default value for COMM
2213  CP          Override default value for CP
2214  CUT         Override default value for CUT
2215  DATE        Override default value for DATE
2216  DIFF        Override default value for DIFF
2217  DIRNAME     Override default value for DIRNAME
2218  ECHO        Override default value for ECHO
2219  EXPR        Override default value for EXPR
2220  FILE        Override default value for FILE
2221  FIND        Override default value for FIND
2222  HEAD        Override default value for HEAD
2223  GUNZIP      Override default value for GUNZIP
2224  GZIP        Override default value for GZIP
2225  LN          Override default value for LN
2226  LS          Override default value for LS
2227  MKDIR       Override default value for MKDIR
2228  MKTEMP      Override default value for MKTEMP
2229  MV          Override default value for MV
2230  NAWK        Override default value for NAWK
2231  PRINTF      Override default value for PRINTF
2232  RM          Override default value for RM
2233  RMDIR       Override default value for RMDIR
2234  SH          Override default value for SH
2235  SORT        Override default value for SORT
2236  TAIL        Override default value for TAIL
2237  TAR         Override default value for TAR
2238  TEE         Override default value for TEE
2239  TOUCH       Override default value for TOUCH
2240  TR          Override default value for TR
2241  UNAME       Override default value for UNAME
2242  UNIQ        Override default value for UNIQ
2243  WC          Override default value for WC
2244  WHICH       Override default value for WHICH
2245  XARGS       Override default value for XARGS
2246  AWK         Override default value for AWK
2247  GREP        Override default value for GREP
2248  EGREP       Override default value for EGREP
2249  FGREP       Override default value for FGREP
2250  SED         Override default value for SED
2251  CYGPATH     Override default value for CYGPATH
2252  READLINK    Override default value for READLINK
2253  DF          Override default value for DF
2254  CPIO        Override default value for CPIO
2255  NICE        Override default value for NICE
2256  PANDOC      Override default value for PANDOC
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  DOT         Override default value for DOT
2264  HG          Override default value for HG
2265  STAT        Override default value for STAT
2266  TIME        Override default value for TIME
2267  DTRACE      Override default value for DTRACE
2268  PATCH       Override default value for PATCH
2269  DSYMUTIL    Override default value for DSYMUTIL
2270  XATTR       Override default value for XATTR
2271  CODESIGN    Override default value for CODESIGN
2272  SETFILE     Override default value for SETFILE
2273  PKG_CONFIG  path to pkg-config utility
2274  JAVA        Override default value for JAVA
2275  JAVAC       Override default value for JAVAC
2276  JAVAH       Override default value for JAVAH
2277  JAR         Override default value for JAR
2278  JARSIGNER   Override default value for JARSIGNER
2279  CC          C compiler command
2280  CFLAGS      C compiler flags
2281  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2282              nonstandard directory <lib dir>
2283  LIBS        libraries to pass to the linker, e.g. -l<library>
2284  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2285              you have headers in a nonstandard directory <include dir>
2286  CXX         C++ compiler command
2287  CXXFLAGS    C++ compiler flags
2288  CPP         C preprocessor
2289  CXXCPP      C++ preprocessor
2290  AS          Override default value for AS
2291  AR          Override default value for AR
2292  LIPO        Override default value for LIPO
2293  STRIP       Override default value for STRIP
2294  NM          Override default value for NM
2295  GNM         Override default value for GNM
2296  OBJCOPY     Override default value for OBJCOPY
2297  OBJDUMP     Override default value for OBJDUMP
2298  BUILD_CC    Override default value for BUILD_CC
2299  BUILD_CXX   Override default value for BUILD_CXX
2300  BUILD_NM    Override default value for BUILD_NM
2301  BUILD_AR    Override default value for BUILD_AR
2302  BUILD_OBJCOPY
2303              Override default value for BUILD_OBJCOPY
2304  BUILD_STRIP Override default value for BUILD_STRIP
2305  JTREGEXE    Override default value for JTREGEXE
2306  XMKMF       Path to xmkmf, Makefile generator for X Window System
2307  FREETYPE_CFLAGS
2308              C compiler flags for FREETYPE, overriding pkg-config
2309  FREETYPE_LIBS
2310              linker flags for FREETYPE, overriding pkg-config
2311  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2312  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2313  LIBFFI_CFLAGS
2314              C compiler flags for LIBFFI, overriding pkg-config
2315  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2316  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2317  PNG_LIBS    linker flags for PNG, overriding pkg-config
2318  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2319  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2320  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2321  ELF_LIBS    linker flags for ELF, overriding pkg-config
2322  ICECC_CMD   Override default value for ICECC_CMD
2323  ICECC_CREATE_ENV
2324              Override default value for ICECC_CREATE_ENV
2325  ICECC_WRAPPER
2326              Override default value for ICECC_WRAPPER
2327  CCACHE      Override default value for CCACHE
2328
2329Use these variables to override the choices made by `configure' or to help
2330it to find libraries and programs with nonstandard names/locations.
2331
2332Report bugs to <build-dev@openjdk.java.net>.
2333OpenJDK home page: <http://openjdk.java.net>.
2334_ACEOF
2335ac_status=$?
2336fi
2337
2338if test "$ac_init_help" = "recursive"; then
2339  # If there are subdirs, report their specific --help.
2340  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2341    test -d "$ac_dir" ||
2342      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2343      continue
2344    ac_builddir=.
2345
2346case "$ac_dir" in
2347.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2348*)
2349  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2350  # A ".." for each directory in $ac_dir_suffix.
2351  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2352  case $ac_top_builddir_sub in
2353  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2354  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2355  esac ;;
2356esac
2357ac_abs_top_builddir=$ac_pwd
2358ac_abs_builddir=$ac_pwd$ac_dir_suffix
2359# for backward compatibility:
2360ac_top_builddir=$ac_top_build_prefix
2361
2362case $srcdir in
2363  .)  # We are building in place.
2364    ac_srcdir=.
2365    ac_top_srcdir=$ac_top_builddir_sub
2366    ac_abs_top_srcdir=$ac_pwd ;;
2367  [\\/]* | ?:[\\/]* )  # Absolute name.
2368    ac_srcdir=$srcdir$ac_dir_suffix;
2369    ac_top_srcdir=$srcdir
2370    ac_abs_top_srcdir=$srcdir ;;
2371  *) # Relative name.
2372    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2373    ac_top_srcdir=$ac_top_build_prefix$srcdir
2374    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2375esac
2376ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2377
2378    cd "$ac_dir" || { ac_status=$?; continue; }
2379    # Check for guested configure.
2380    if test -f "$ac_srcdir/configure.gnu"; then
2381      echo &&
2382      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2383    elif test -f "$ac_srcdir/configure"; then
2384      echo &&
2385      $SHELL "$ac_srcdir/configure" --help=recursive
2386    else
2387      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2388    fi || ac_status=$?
2389    cd "$ac_pwd" || { ac_status=$?; break; }
2390  done
2391fi
2392
2393test -n "$ac_init_help" && exit $ac_status
2394if $ac_init_version; then
2395  cat <<\_ACEOF
2396OpenJDK configure jdk9
2397generated by GNU Autoconf 2.69
2398
2399Copyright (C) 2012 Free Software Foundation, Inc.
2400This configure script is free software; the Free Software Foundation
2401gives unlimited permission to copy, distribute and modify it.
2402_ACEOF
2403  exit
2404fi
2405
2406## ------------------------ ##
2407## Autoconf initialization. ##
2408## ------------------------ ##
2409
2410# ac_fn_c_try_compile LINENO
2411# --------------------------
2412# Try to compile conftest.$ac_ext, and return whether this succeeded.
2413ac_fn_c_try_compile ()
2414{
2415  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2416  rm -f conftest.$ac_objext
2417  if { { ac_try="$ac_compile"
2418case "(($ac_try" in
2419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2420  *) ac_try_echo=$ac_try;;
2421esac
2422eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2423$as_echo "$ac_try_echo"; } >&5
2424  (eval "$ac_compile") 2>conftest.err
2425  ac_status=$?
2426  if test -s conftest.err; then
2427    grep -v '^ *+' conftest.err >conftest.er1
2428    cat conftest.er1 >&5
2429    mv -f conftest.er1 conftest.err
2430  fi
2431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432  test $ac_status = 0; } && {
2433	 test -z "$ac_c_werror_flag" ||
2434	 test ! -s conftest.err
2435       } && test -s conftest.$ac_objext; then :
2436  ac_retval=0
2437else
2438  $as_echo "$as_me: failed program was:" >&5
2439sed 's/^/| /' conftest.$ac_ext >&5
2440
2441	ac_retval=1
2442fi
2443  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444  as_fn_set_status $ac_retval
2445
2446} # ac_fn_c_try_compile
2447
2448# ac_fn_cxx_try_compile LINENO
2449# ----------------------------
2450# Try to compile conftest.$ac_ext, and return whether this succeeded.
2451ac_fn_cxx_try_compile ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  rm -f conftest.$ac_objext
2455  if { { ac_try="$ac_compile"
2456case "(($ac_try" in
2457  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2458  *) ac_try_echo=$ac_try;;
2459esac
2460eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2461$as_echo "$ac_try_echo"; } >&5
2462  (eval "$ac_compile") 2>conftest.err
2463  ac_status=$?
2464  if test -s conftest.err; then
2465    grep -v '^ *+' conftest.err >conftest.er1
2466    cat conftest.er1 >&5
2467    mv -f conftest.er1 conftest.err
2468  fi
2469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2470  test $ac_status = 0; } && {
2471	 test -z "$ac_cxx_werror_flag" ||
2472	 test ! -s conftest.err
2473       } && test -s conftest.$ac_objext; then :
2474  ac_retval=0
2475else
2476  $as_echo "$as_me: failed program was:" >&5
2477sed 's/^/| /' conftest.$ac_ext >&5
2478
2479	ac_retval=1
2480fi
2481  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2482  as_fn_set_status $ac_retval
2483
2484} # ac_fn_cxx_try_compile
2485
2486# ac_fn_c_try_cpp LINENO
2487# ----------------------
2488# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2489ac_fn_c_try_cpp ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  if { { ac_try="$ac_cpp conftest.$ac_ext"
2493case "(($ac_try" in
2494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2495  *) ac_try_echo=$ac_try;;
2496esac
2497eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2498$as_echo "$ac_try_echo"; } >&5
2499  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2500  ac_status=$?
2501  if test -s conftest.err; then
2502    grep -v '^ *+' conftest.err >conftest.er1
2503    cat conftest.er1 >&5
2504    mv -f conftest.er1 conftest.err
2505  fi
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } > conftest.i && {
2508	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2509	 test ! -s conftest.err
2510       }; then :
2511  ac_retval=0
2512else
2513  $as_echo "$as_me: failed program was:" >&5
2514sed 's/^/| /' conftest.$ac_ext >&5
2515
2516    ac_retval=1
2517fi
2518  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519  as_fn_set_status $ac_retval
2520
2521} # ac_fn_c_try_cpp
2522
2523# ac_fn_cxx_try_cpp LINENO
2524# ------------------------
2525# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2526ac_fn_cxx_try_cpp ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  if { { ac_try="$ac_cpp conftest.$ac_ext"
2530case "(($ac_try" in
2531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532  *) ac_try_echo=$ac_try;;
2533esac
2534eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535$as_echo "$ac_try_echo"; } >&5
2536  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2537  ac_status=$?
2538  if test -s conftest.err; then
2539    grep -v '^ *+' conftest.err >conftest.er1
2540    cat conftest.er1 >&5
2541    mv -f conftest.er1 conftest.err
2542  fi
2543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544  test $ac_status = 0; } > conftest.i && {
2545	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2546	 test ! -s conftest.err
2547       }; then :
2548  ac_retval=0
2549else
2550  $as_echo "$as_me: failed program was:" >&5
2551sed 's/^/| /' conftest.$ac_ext >&5
2552
2553    ac_retval=1
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556  as_fn_set_status $ac_retval
2557
2558} # ac_fn_cxx_try_cpp
2559
2560# ac_fn_c_try_link LINENO
2561# -----------------------
2562# Try to link conftest.$ac_ext, and return whether this succeeded.
2563ac_fn_c_try_link ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  rm -f conftest.$ac_objext conftest$ac_exeext
2567  if { { ac_try="$ac_link"
2568case "(($ac_try" in
2569  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2570  *) ac_try_echo=$ac_try;;
2571esac
2572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2573$as_echo "$ac_try_echo"; } >&5
2574  (eval "$ac_link") 2>conftest.err
2575  ac_status=$?
2576  if test -s conftest.err; then
2577    grep -v '^ *+' conftest.err >conftest.er1
2578    cat conftest.er1 >&5
2579    mv -f conftest.er1 conftest.err
2580  fi
2581  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2582  test $ac_status = 0; } && {
2583	 test -z "$ac_c_werror_flag" ||
2584	 test ! -s conftest.err
2585       } && test -s conftest$ac_exeext && {
2586	 test "$cross_compiling" = yes ||
2587	 test -x conftest$ac_exeext
2588       }; then :
2589  ac_retval=0
2590else
2591  $as_echo "$as_me: failed program was:" >&5
2592sed 's/^/| /' conftest.$ac_ext >&5
2593
2594	ac_retval=1
2595fi
2596  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2597  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2598  # interfere with the next link command; also delete a directory that is
2599  # left behind by Apple's compiler.  We do this before executing the actions.
2600  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602  as_fn_set_status $ac_retval
2603
2604} # ac_fn_c_try_link
2605
2606# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2607# ---------------------------------------------------------
2608# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2609# the include files in INCLUDES and setting the cache variable VAR
2610# accordingly.
2611ac_fn_cxx_check_header_mongrel ()
2612{
2613  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2614  if eval \${$3+:} false; then :
2615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2616$as_echo_n "checking for $2... " >&6; }
2617if eval \${$3+:} false; then :
2618  $as_echo_n "(cached) " >&6
2619fi
2620eval ac_res=\$$3
2621	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2622$as_echo "$ac_res" >&6; }
2623else
2624  # Is the header compilable?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2626$as_echo_n "checking $2 usability... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629$4
2630#include <$2>
2631_ACEOF
2632if ac_fn_cxx_try_compile "$LINENO"; then :
2633  ac_header_compiler=yes
2634else
2635  ac_header_compiler=no
2636fi
2637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2639$as_echo "$ac_header_compiler" >&6; }
2640
2641# Is the header present?
2642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2643$as_echo_n "checking $2 presence... " >&6; }
2644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645/* end confdefs.h.  */
2646#include <$2>
2647_ACEOF
2648if ac_fn_cxx_try_cpp "$LINENO"; then :
2649  ac_header_preproc=yes
2650else
2651  ac_header_preproc=no
2652fi
2653rm -f conftest.err conftest.i conftest.$ac_ext
2654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2655$as_echo "$ac_header_preproc" >&6; }
2656
2657# So?  What about this header?
2658case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2659  yes:no: )
2660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2661$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2662    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2663$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2664    ;;
2665  no:yes:* )
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2667$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2669$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2671$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2673$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2675$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2676( $as_echo "## ----------------------------------------- ##
2677## Report this to build-dev@openjdk.java.net ##
2678## ----------------------------------------- ##"
2679     ) | sed "s/^/$as_me: WARNING:     /" >&2
2680    ;;
2681esac
2682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2683$as_echo_n "checking for $2... " >&6; }
2684if eval \${$3+:} false; then :
2685  $as_echo_n "(cached) " >&6
2686else
2687  eval "$3=\$ac_header_compiler"
2688fi
2689eval ac_res=\$$3
2690	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691$as_echo "$ac_res" >&6; }
2692fi
2693  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2694
2695} # ac_fn_cxx_check_header_mongrel
2696
2697# ac_fn_cxx_try_run LINENO
2698# ------------------------
2699# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2700# that executables *can* be run.
2701ac_fn_cxx_try_run ()
2702{
2703  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704  if { { ac_try="$ac_link"
2705case "(($ac_try" in
2706  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707  *) ac_try_echo=$ac_try;;
2708esac
2709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2710$as_echo "$ac_try_echo"; } >&5
2711  (eval "$ac_link") 2>&5
2712  ac_status=$?
2713  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2714  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2715  { { case "(($ac_try" in
2716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717  *) ac_try_echo=$ac_try;;
2718esac
2719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2720$as_echo "$ac_try_echo"; } >&5
2721  (eval "$ac_try") 2>&5
2722  ac_status=$?
2723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724  test $ac_status = 0; }; }; then :
2725  ac_retval=0
2726else
2727  $as_echo "$as_me: program exited with status $ac_status" >&5
2728       $as_echo "$as_me: failed program was:" >&5
2729sed 's/^/| /' conftest.$ac_ext >&5
2730
2731       ac_retval=$ac_status
2732fi
2733  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2734  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735  as_fn_set_status $ac_retval
2736
2737} # ac_fn_cxx_try_run
2738
2739# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2740# ---------------------------------------------------------
2741# Tests whether HEADER exists and can be compiled using the include files in
2742# INCLUDES, setting the cache variable VAR accordingly.
2743ac_fn_cxx_check_header_compile ()
2744{
2745  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2747$as_echo_n "checking for $2... " >&6; }
2748if eval \${$3+:} false; then :
2749  $as_echo_n "(cached) " >&6
2750else
2751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753$4
2754#include <$2>
2755_ACEOF
2756if ac_fn_cxx_try_compile "$LINENO"; then :
2757  eval "$3=yes"
2758else
2759  eval "$3=no"
2760fi
2761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2762fi
2763eval ac_res=\$$3
2764	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2765$as_echo "$ac_res" >&6; }
2766  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767
2768} # ac_fn_cxx_check_header_compile
2769
2770# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2771# ----------------------------------------------
2772# Tries to find the compile-time value of EXPR in a program that includes
2773# INCLUDES, setting VAR accordingly. Returns whether the value could be
2774# computed
2775ac_fn_cxx_compute_int ()
2776{
2777  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2778  if test "$cross_compiling" = yes; then
2779    # Depending upon the size, compute the lo and hi bounds.
2780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) >= 0)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_lo=0 ac_mid=0
2796  while :; do
2797    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2798/* end confdefs.h.  */
2799$4
2800int
2801main ()
2802{
2803static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2804test_array [0] = 0;
2805return test_array [0];
2806
2807  ;
2808  return 0;
2809}
2810_ACEOF
2811if ac_fn_cxx_try_compile "$LINENO"; then :
2812  ac_hi=$ac_mid; break
2813else
2814  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2815			if test $ac_lo -le $ac_mid; then
2816			  ac_lo= ac_hi=
2817			  break
2818			fi
2819			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2820fi
2821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822  done
2823else
2824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) < 0)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_hi=-1 ac_mid=-1
2840  while :; do
2841    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2842/* end confdefs.h.  */
2843$4
2844int
2845main ()
2846{
2847static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2848test_array [0] = 0;
2849return test_array [0];
2850
2851  ;
2852  return 0;
2853}
2854_ACEOF
2855if ac_fn_cxx_try_compile "$LINENO"; then :
2856  ac_lo=$ac_mid; break
2857else
2858  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2859			if test $ac_mid -le $ac_hi; then
2860			  ac_lo= ac_hi=
2861			  break
2862			fi
2863			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866  done
2867else
2868  ac_lo= ac_hi=
2869fi
2870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873# Binary search between lo and hi bounds.
2874while test "x$ac_lo" != "x$ac_hi"; do
2875  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877/* end confdefs.h.  */
2878$4
2879int
2880main ()
2881{
2882static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2883test_array [0] = 0;
2884return test_array [0];
2885
2886  ;
2887  return 0;
2888}
2889_ACEOF
2890if ac_fn_cxx_try_compile "$LINENO"; then :
2891  ac_hi=$ac_mid
2892else
2893  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2894fi
2895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2896done
2897case $ac_lo in #((
2898?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2899'') ac_retval=1 ;;
2900esac
2901  else
2902    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903/* end confdefs.h.  */
2904$4
2905static long int longval () { return $2; }
2906static unsigned long int ulongval () { return $2; }
2907#include <stdio.h>
2908#include <stdlib.h>
2909int
2910main ()
2911{
2912
2913  FILE *f = fopen ("conftest.val", "w");
2914  if (! f)
2915    return 1;
2916  if (($2) < 0)
2917    {
2918      long int i = longval ();
2919      if (i != ($2))
2920	return 1;
2921      fprintf (f, "%ld", i);
2922    }
2923  else
2924    {
2925      unsigned long int i = ulongval ();
2926      if (i != ($2))
2927	return 1;
2928      fprintf (f, "%lu", i);
2929    }
2930  /* Do not output a trailing newline, as this causes \r\n confusion
2931     on some platforms.  */
2932  return ferror (f) || fclose (f) != 0;
2933
2934  ;
2935  return 0;
2936}
2937_ACEOF
2938if ac_fn_cxx_try_run "$LINENO"; then :
2939  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2940else
2941  ac_retval=1
2942fi
2943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2944  conftest.$ac_objext conftest.beam conftest.$ac_ext
2945rm -f conftest.val
2946
2947  fi
2948  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2949  as_fn_set_status $ac_retval
2950
2951} # ac_fn_cxx_compute_int
2952
2953# ac_fn_cxx_try_link LINENO
2954# -------------------------
2955# Try to link conftest.$ac_ext, and return whether this succeeded.
2956ac_fn_cxx_try_link ()
2957{
2958  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2959  rm -f conftest.$ac_objext conftest$ac_exeext
2960  if { { ac_try="$ac_link"
2961case "(($ac_try" in
2962  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2963  *) ac_try_echo=$ac_try;;
2964esac
2965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2966$as_echo "$ac_try_echo"; } >&5
2967  (eval "$ac_link") 2>conftest.err
2968  ac_status=$?
2969  if test -s conftest.err; then
2970    grep -v '^ *+' conftest.err >conftest.er1
2971    cat conftest.er1 >&5
2972    mv -f conftest.er1 conftest.err
2973  fi
2974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2975  test $ac_status = 0; } && {
2976	 test -z "$ac_cxx_werror_flag" ||
2977	 test ! -s conftest.err
2978       } && test -s conftest$ac_exeext && {
2979	 test "$cross_compiling" = yes ||
2980	 test -x conftest$ac_exeext
2981       }; then :
2982  ac_retval=0
2983else
2984  $as_echo "$as_me: failed program was:" >&5
2985sed 's/^/| /' conftest.$ac_ext >&5
2986
2987	ac_retval=1
2988fi
2989  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2990  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2991  # interfere with the next link command; also delete a directory that is
2992  # left behind by Apple's compiler.  We do this before executing the actions.
2993  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2994  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2995  as_fn_set_status $ac_retval
2996
2997} # ac_fn_cxx_try_link
2998
2999# ac_fn_cxx_check_func LINENO FUNC VAR
3000# ------------------------------------
3001# Tests whether FUNC exists, setting the cache variable VAR accordingly
3002ac_fn_cxx_check_func ()
3003{
3004  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3006$as_echo_n "checking for $2... " >&6; }
3007if eval \${$3+:} false; then :
3008  $as_echo_n "(cached) " >&6
3009else
3010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3011/* end confdefs.h.  */
3012/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3013   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3014#define $2 innocuous_$2
3015
3016/* System header to define __stub macros and hopefully few prototypes,
3017    which can conflict with char $2 (); below.
3018    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3019    <limits.h> exists even on freestanding compilers.  */
3020
3021#ifdef __STDC__
3022# include <limits.h>
3023#else
3024# include <assert.h>
3025#endif
3026
3027#undef $2
3028
3029/* Override any GCC internal prototype to avoid an error.
3030   Use char because int might match the return type of a GCC
3031   builtin and then its argument prototype would still apply.  */
3032#ifdef __cplusplus
3033extern "C"
3034#endif
3035char $2 ();
3036/* The GNU C library defines this for functions which it implements
3037    to always fail with ENOSYS.  Some functions are actually named
3038    something starting with __ and the normal name is an alias.  */
3039#if defined __stub_$2 || defined __stub___$2
3040choke me
3041#endif
3042
3043int
3044main ()
3045{
3046return $2 ();
3047  ;
3048  return 0;
3049}
3050_ACEOF
3051if ac_fn_cxx_try_link "$LINENO"; then :
3052  eval "$3=yes"
3053else
3054  eval "$3=no"
3055fi
3056rm -f core conftest.err conftest.$ac_objext \
3057    conftest$ac_exeext conftest.$ac_ext
3058fi
3059eval ac_res=\$$3
3060	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3061$as_echo "$ac_res" >&6; }
3062  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3063
3064} # ac_fn_cxx_check_func
3065
3066# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3067# -------------------------------------------------------
3068# Tests whether HEADER exists and can be compiled using the include files in
3069# INCLUDES, setting the cache variable VAR accordingly.
3070ac_fn_c_check_header_compile ()
3071{
3072  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3074$as_echo_n "checking for $2... " >&6; }
3075if eval \${$3+:} false; then :
3076  $as_echo_n "(cached) " >&6
3077else
3078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3079/* end confdefs.h.  */
3080$4
3081#include <$2>
3082_ACEOF
3083if ac_fn_c_try_compile "$LINENO"; then :
3084  eval "$3=yes"
3085else
3086  eval "$3=no"
3087fi
3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3089fi
3090eval ac_res=\$$3
3091	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3092$as_echo "$ac_res" >&6; }
3093  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3094
3095} # ac_fn_c_check_header_compile
3096cat >config.log <<_ACEOF
3097This file contains any messages produced by compilers while
3098running configure, to aid debugging if configure makes a mistake.
3099
3100It was created by OpenJDK $as_me jdk9, which was
3101generated by GNU Autoconf 2.69.  Invocation command line was
3102
3103  $ $0 $@
3104
3105_ACEOF
3106exec 5>>config.log
3107{
3108cat <<_ASUNAME
3109## --------- ##
3110## Platform. ##
3111## --------- ##
3112
3113hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3114uname -m = `(uname -m) 2>/dev/null || echo unknown`
3115uname -r = `(uname -r) 2>/dev/null || echo unknown`
3116uname -s = `(uname -s) 2>/dev/null || echo unknown`
3117uname -v = `(uname -v) 2>/dev/null || echo unknown`
3118
3119/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3120/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3121
3122/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3123/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3124/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3125/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3126/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3127/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3128/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3129
3130_ASUNAME
3131
3132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3133for as_dir in $PATH
3134do
3135  IFS=$as_save_IFS
3136  test -z "$as_dir" && as_dir=.
3137    $as_echo "PATH: $as_dir"
3138  done
3139IFS=$as_save_IFS
3140
3141} >&5
3142
3143cat >&5 <<_ACEOF
3144
3145
3146## ----------- ##
3147## Core tests. ##
3148## ----------- ##
3149
3150_ACEOF
3151
3152
3153# Keep a trace of the command line.
3154# Strip out --no-create and --no-recursion so they do not pile up.
3155# Strip out --silent because we don't want to record it for future runs.
3156# Also quote any args containing shell meta-characters.
3157# Make two passes to allow for proper duplicate-argument suppression.
3158ac_configure_args=
3159ac_configure_args0=
3160ac_configure_args1=
3161ac_must_keep_next=false
3162for ac_pass in 1 2
3163do
3164  for ac_arg
3165  do
3166    case $ac_arg in
3167    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3168    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3169    | -silent | --silent | --silen | --sile | --sil)
3170      continue ;;
3171    *\'*)
3172      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3173    esac
3174    case $ac_pass in
3175    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3176    2)
3177      as_fn_append ac_configure_args1 " '$ac_arg'"
3178      if test $ac_must_keep_next = true; then
3179	ac_must_keep_next=false # Got value, back to normal.
3180      else
3181	case $ac_arg in
3182	  *=* | --config-cache | -C | -disable-* | --disable-* \
3183	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3184	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3185	  | -with-* | --with-* | -without-* | --without-* | --x)
3186	    case "$ac_configure_args0 " in
3187	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3188	    esac
3189	    ;;
3190	  -* ) ac_must_keep_next=true ;;
3191	esac
3192      fi
3193      as_fn_append ac_configure_args " '$ac_arg'"
3194      ;;
3195    esac
3196  done
3197done
3198{ ac_configure_args0=; unset ac_configure_args0;}
3199{ ac_configure_args1=; unset ac_configure_args1;}
3200
3201# When interrupted or exit'd, cleanup temporary files, and complete
3202# config.log.  We remove comments because anyway the quotes in there
3203# would cause problems or look ugly.
3204# WARNING: Use '\'' to represent an apostrophe within the trap.
3205# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3206trap 'exit_status=$?
3207  # Save into config.log some information that might help in debugging.
3208  {
3209    echo
3210
3211    $as_echo "## ---------------- ##
3212## Cache variables. ##
3213## ---------------- ##"
3214    echo
3215    # The following way of writing the cache mishandles newlines in values,
3216(
3217  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3218    eval ac_val=\$$ac_var
3219    case $ac_val in #(
3220    *${as_nl}*)
3221      case $ac_var in #(
3222      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3223$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3224      esac
3225      case $ac_var in #(
3226      _ | IFS | as_nl) ;; #(
3227      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3228      *) { eval $ac_var=; unset $ac_var;} ;;
3229      esac ;;
3230    esac
3231  done
3232  (set) 2>&1 |
3233    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3234    *${as_nl}ac_space=\ *)
3235      sed -n \
3236	"s/'\''/'\''\\\\'\'''\''/g;
3237	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3238      ;; #(
3239    *)
3240      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3241      ;;
3242    esac |
3243    sort
3244)
3245    echo
3246
3247    $as_echo "## ----------------- ##
3248## Output variables. ##
3249## ----------------- ##"
3250    echo
3251    for ac_var in $ac_subst_vars
3252    do
3253      eval ac_val=\$$ac_var
3254      case $ac_val in
3255      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3256      esac
3257      $as_echo "$ac_var='\''$ac_val'\''"
3258    done | sort
3259    echo
3260
3261    if test -n "$ac_subst_files"; then
3262      $as_echo "## ------------------- ##
3263## File substitutions. ##
3264## ------------------- ##"
3265      echo
3266      for ac_var in $ac_subst_files
3267      do
3268	eval ac_val=\$$ac_var
3269	case $ac_val in
3270	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3271	esac
3272	$as_echo "$ac_var='\''$ac_val'\''"
3273      done | sort
3274      echo
3275    fi
3276
3277    if test -s confdefs.h; then
3278      $as_echo "## ----------- ##
3279## confdefs.h. ##
3280## ----------- ##"
3281      echo
3282      cat confdefs.h
3283      echo
3284    fi
3285    test "$ac_signal" != 0 &&
3286      $as_echo "$as_me: caught signal $ac_signal"
3287    $as_echo "$as_me: exit $exit_status"
3288  } >&5
3289  rm -f core *.core core.conftest.* &&
3290    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3291    exit $exit_status
3292' 0
3293for ac_signal in 1 2 13 15; do
3294  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3295done
3296ac_signal=0
3297
3298# confdefs.h avoids OS command line length limits that DEFS can exceed.
3299rm -f -r conftest* confdefs.h
3300
3301$as_echo "/* confdefs.h */" > confdefs.h
3302
3303# Predefined preprocessor variables.
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_NAME "$PACKAGE_NAME"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3311_ACEOF
3312
3313cat >>confdefs.h <<_ACEOF
3314#define PACKAGE_VERSION "$PACKAGE_VERSION"
3315_ACEOF
3316
3317cat >>confdefs.h <<_ACEOF
3318#define PACKAGE_STRING "$PACKAGE_STRING"
3319_ACEOF
3320
3321cat >>confdefs.h <<_ACEOF
3322#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3323_ACEOF
3324
3325cat >>confdefs.h <<_ACEOF
3326#define PACKAGE_URL "$PACKAGE_URL"
3327_ACEOF
3328
3329
3330# Let the site file select an alternate cache file if it wants to.
3331# Prefer an explicitly selected file to automatically selected ones.
3332ac_site_file1=NONE
3333ac_site_file2=NONE
3334if test -n "$CONFIG_SITE"; then
3335  # We do not want a PATH search for config.site.
3336  case $CONFIG_SITE in #((
3337    -*)  ac_site_file1=./$CONFIG_SITE;;
3338    */*) ac_site_file1=$CONFIG_SITE;;
3339    *)   ac_site_file1=./$CONFIG_SITE;;
3340  esac
3341elif test "x$prefix" != xNONE; then
3342  ac_site_file1=$prefix/share/config.site
3343  ac_site_file2=$prefix/etc/config.site
3344else
3345  ac_site_file1=$ac_default_prefix/share/config.site
3346  ac_site_file2=$ac_default_prefix/etc/config.site
3347fi
3348for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3349do
3350  test "x$ac_site_file" = xNONE && continue
3351  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3352    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3353$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3354    sed 's/^/| /' "$ac_site_file" >&5
3355    . "$ac_site_file" \
3356      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3358as_fn_error $? "failed to load site script $ac_site_file
3359See \`config.log' for more details" "$LINENO" 5; }
3360  fi
3361done
3362
3363if test -r "$cache_file"; then
3364  # Some versions of bash will fail to source /dev/null (special files
3365  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3366  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3367    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3368$as_echo "$as_me: loading cache $cache_file" >&6;}
3369    case $cache_file in
3370      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3371      *)                      . "./$cache_file";;
3372    esac
3373  fi
3374else
3375  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3376$as_echo "$as_me: creating cache $cache_file" >&6;}
3377  >$cache_file
3378fi
3379
3380# Check that the precious variables saved in the cache have kept the same
3381# value.
3382ac_cache_corrupted=false
3383for ac_var in $ac_precious_vars; do
3384  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3385  eval ac_new_set=\$ac_env_${ac_var}_set
3386  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3387  eval ac_new_val=\$ac_env_${ac_var}_value
3388  case $ac_old_set,$ac_new_set in
3389    set,)
3390      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3391$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3392      ac_cache_corrupted=: ;;
3393    ,set)
3394      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3395$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3396      ac_cache_corrupted=: ;;
3397    ,);;
3398    *)
3399      if test "x$ac_old_val" != "x$ac_new_val"; then
3400	# differences in whitespace do not lead to failure.
3401	ac_old_val_w=`echo x $ac_old_val`
3402	ac_new_val_w=`echo x $ac_new_val`
3403	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3404	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3405$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3406	  ac_cache_corrupted=:
3407	else
3408	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3409$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3410	  eval $ac_var=\$ac_old_val
3411	fi
3412	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3413$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3414	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3415$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3416      fi;;
3417  esac
3418  # Pass precious variables to config.status.
3419  if test "$ac_new_set" = set; then
3420    case $ac_new_val in
3421    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3422    *) ac_arg=$ac_var=$ac_new_val ;;
3423    esac
3424    case " $ac_configure_args " in
3425      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3426      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3427    esac
3428  fi
3429done
3430if $ac_cache_corrupted; then
3431  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3433  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3434$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3435  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3436fi
3437## -------------------- ##
3438## Main body of script. ##
3439## -------------------- ##
3440
3441ac_ext=c
3442ac_cpp='$CPP $CPPFLAGS'
3443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3445ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446
3447
3448
3449ac_aux_dir=
3450for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3451  if test -f "$ac_dir/install-sh"; then
3452    ac_aux_dir=$ac_dir
3453    ac_install_sh="$ac_aux_dir/install-sh -c"
3454    break
3455  elif test -f "$ac_dir/install.sh"; then
3456    ac_aux_dir=$ac_dir
3457    ac_install_sh="$ac_aux_dir/install.sh -c"
3458    break
3459  elif test -f "$ac_dir/shtool"; then
3460    ac_aux_dir=$ac_dir
3461    ac_install_sh="$ac_aux_dir/shtool install -c"
3462    break
3463  fi
3464done
3465if test -z "$ac_aux_dir"; then
3466  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
3467fi
3468
3469# These three variables are undocumented and unsupported,
3470# and are intended to be withdrawn in a future Autoconf release.
3471# They can cause serious problems if a builder's source tree is in a directory
3472# whose full name contains unusual characters.
3473ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3474ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3475ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3476
3477
3478# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3479
3480#
3481# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3482# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3483#
3484# This code is free software; you can redistribute it and/or modify it
3485# under the terms of the GNU General Public License version 2 only, as
3486# published by the Free Software Foundation.  Oracle designates this
3487# particular file as subject to the "Classpath" exception as provided
3488# by Oracle in the LICENSE file that accompanied this code.
3489#
3490# This code is distributed in the hope that it will be useful, but WITHOUT
3491# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3492# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3493# version 2 for more details (a copy is included in the LICENSE file that
3494# accompanied this code).
3495#
3496# You should have received a copy of the GNU General Public License version
3497# 2 along with this work; if not, write to the Free Software Foundation,
3498# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3499#
3500# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3501# or visit www.oracle.com if you need additional information or have any
3502# questions.
3503#
3504
3505#
3506# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3507#
3508# This program is free software; you can redistribute it and/or modify
3509# it under the terms of the GNU General Public License as published by
3510# the Free Software Foundation; either version 2 of the License, or
3511# (at your option) any later version.
3512#
3513# This program is distributed in the hope that it will be useful, but
3514# WITHOUT ANY WARRANTY; without even the implied warranty of
3515# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3516# General Public License for more details.
3517#
3518# You should have received a copy of the GNU General Public License
3519# along with this program; if not, write to the Free Software
3520# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3521#
3522# As a special exception to the GNU General Public License, if you
3523# distribute this file as part of a program that contains a
3524# configuration script generated by Autoconf, you may include it under
3525# the same distribution terms that you use for the rest of that program.
3526
3527# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3528# ----------------------------------
3529# PKG_PROG_PKG_CONFIG
3530
3531# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3532#
3533# Check to see whether a particular set of modules exists.  Similar
3534# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3535#
3536#
3537# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3538# this or PKG_CHECK_MODULES is called, or make sure to call
3539# PKG_CHECK_EXISTS manually
3540# --------------------------------------------------------------
3541
3542
3543
3544# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3545# ---------------------------------------------
3546# _PKG_CONFIG
3547
3548# _PKG_SHORT_ERRORS_SUPPORTED
3549# -----------------------------
3550# _PKG_SHORT_ERRORS_SUPPORTED
3551
3552
3553# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3554# [ACTION-IF-NOT-FOUND])
3555#
3556#
3557# Note that if there is a possibility the first call to
3558# PKG_CHECK_MODULES might not happen, you should be sure to include an
3559# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3560#
3561#
3562# --------------------------------------------------------------
3563# PKG_CHECK_MODULES
3564
3565
3566# Include these first...
3567#
3568# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570#
3571# This code is free software; you can redistribute it and/or modify it
3572# under the terms of the GNU General Public License version 2 only, as
3573# published by the Free Software Foundation.  Oracle designates this
3574# particular file as subject to the "Classpath" exception as provided
3575# by Oracle in the LICENSE file that accompanied this code.
3576#
3577# This code is distributed in the hope that it will be useful, but WITHOUT
3578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580# version 2 for more details (a copy is included in the LICENSE file that
3581# accompanied this code).
3582#
3583# You should have received a copy of the GNU General Public License version
3584# 2 along with this work; if not, write to the Free Software Foundation,
3585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586#
3587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588# or visit www.oracle.com if you need additional information or have any
3589# questions.
3590#
3591
3592# Create a function/macro that takes a series of named arguments. The call is
3593# similar to AC_DEFUN, but the setup of the function looks like this:
3594# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3595# ... do something
3596#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3597# ])
3598# A star (*) in front of a named argument means that it is required and it's
3599# presence will be verified. To pass e.g. the first value as a normal indexed
3600# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3601# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3602# "ARG_FOO".
3603#
3604# The generated function can be called like this:
3605# MYFUNC(FOO: [foo-val],
3606#     BAR: [
3607#         $ECHO hello world
3608#     ])
3609# Note that the argument value must start on the same line as the argument name.
3610#
3611# Argument 1: Name of the function to define
3612# Argument 2: List of legal named arguments, with a * prefix for required arguments
3613# Argument 3: Argument array to treat as named, typically $@
3614# Argument 4: The main function body
3615
3616
3617# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3618# If so, then append $1 to $2 \
3619# Also set JVM_ARG_OK to true/false depending on outcome.
3620
3621
3622# Appends a string to a path variable, only adding the : when needed.
3623
3624
3625# Prepends a string to a path variable, only adding the : when needed.
3626
3627
3628# This will make sure the given variable points to a full and proper
3629# path. This means:
3630# 1) There will be no spaces in the path. On unix platforms,
3631#    spaces in the path will result in an error. On Windows,
3632#    the path will be rewritten using short-style to be space-free.
3633# 2) The path will be absolute, and it will be in unix-style (on
3634#     cygwin).
3635# $1: The name of the variable to fix
3636
3637
3638# This will make sure the given variable points to a executable
3639# with a full and proper path. This means:
3640# 1) There will be no spaces in the path. On unix platforms,
3641#    spaces in the path will result in an error. On Windows,
3642#    the path will be rewritten using short-style to be space-free.
3643# 2) The path will be absolute, and it will be in unix-style (on
3644#     cygwin).
3645# Any arguments given to the executable is preserved.
3646# If the input variable does not have a directory specification, then
3647# it need to be in the PATH.
3648# $1: The name of the variable to fix
3649
3650
3651
3652
3653# Register a --with argument but mark it as deprecated
3654# $1: The name of the with argument to deprecate, not including --with-
3655
3656
3657# Register a --enable argument but mark it as deprecated
3658# $1: The name of the with argument to deprecate, not including --enable-
3659# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3660# $3: Messages to user.
3661
3662
3663
3664
3665# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3666# $1: variable to check
3667
3668
3669# Check that there are no unprocessed overridden variables left.
3670# If so, they are an incorrect argument and we will exit with an error.
3671
3672
3673# Setup a tool for the given variable. If correctly specified by the user,
3674# use that value, otherwise search for the tool using the supplied code snippet.
3675# $1: variable to set
3676# $2: code snippet to call to look for the tool
3677# $3: code snippet to call if variable was used to find tool
3678
3679
3680# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3681# $1: variable to set
3682# $2: executable name (or list of names) to look for
3683# $3: [path]
3684
3685
3686# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3687# $1: variable to set
3688# $2: executable name (or list of names) to look for
3689
3690
3691# Like BASIC_PATH_PROGS but fails if no tool was found.
3692# $1: variable to set
3693# $2: executable name (or list of names) to look for
3694# $3: [path]
3695
3696
3697# Like BASIC_SETUP_TOOL but fails if no tool was found.
3698# $1: variable to set
3699# $2: autoconf macro to call to look for the special tool
3700
3701
3702# Setup the most fundamental tools that relies on not much else to set up,
3703# but is used by much of the early bootstrap code.
3704
3705
3706# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3707
3708
3709# Evaluates platform specific overrides for devkit variables.
3710# $1: Name of variable
3711
3712
3713
3714
3715
3716
3717#%%% Simple tools %%%
3718
3719# Check if we have found a usable version of make
3720# $1: the path to a potential make binary (or empty)
3721# $2: the description on how we found this
3722
3723
3724
3725
3726# Goes looking for a usable version of GNU make.
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737# Check if build directory is on local disk. If not possible to determine,
3738# we prefer to claim it's local.
3739# Argument 1: directory to test
3740# Argument 2: what to do if it is on local disk
3741# Argument 3: what to do otherwise (remote disk or failure)
3742
3743
3744# Check that source files have basic read permissions set. This might
3745# not be the case in cygwin in certain conditions.
3746
3747
3748
3749
3750# Check for support for specific options in bash
3751
3752
3753################################################################################
3754#
3755# Default make target
3756#
3757
3758
3759# Code to run after AC_OUTPUT
3760
3761
3762#
3763# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765#
3766# This code is free software; you can redistribute it and/or modify it
3767# under the terms of the GNU General Public License version 2 only, as
3768# published by the Free Software Foundation.  Oracle designates this
3769# particular file as subject to the "Classpath" exception as provided
3770# by Oracle in the LICENSE file that accompanied this code.
3771#
3772# This code is distributed in the hope that it will be useful, but WITHOUT
3773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775# version 2 for more details (a copy is included in the LICENSE file that
3776# accompanied this code).
3777#
3778# You should have received a copy of the GNU General Public License version
3779# 2 along with this work; if not, write to the Free Software Foundation,
3780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781#
3782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783# or visit www.oracle.com if you need additional information or have any
3784# questions.
3785#
3786
3787
3788
3789
3790
3791# Helper function which possibly converts a path using DOS-style short mode.
3792# If so, the updated path is stored in $new_path.
3793# $1: The path to check
3794
3795
3796# Helper function which possibly converts a path using DOS-style short mode.
3797# If so, the updated path is stored in $new_path.
3798# $1: The path to check
3799
3800
3801# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3802# and could probably be heavily simplified. However, all changes in this
3803# area tend to need lot of testing in different scenarios, and in lack of
3804# proper unit testing, cleaning this up has not been deemed worth the effort
3805# at the moment.
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3816
3817
3818
3819
3820# ... then the rest
3821#
3822# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824#
3825# This code is free software; you can redistribute it and/or modify it
3826# under the terms of the GNU General Public License version 2 only, as
3827# published by the Free Software Foundation.  Oracle designates this
3828# particular file as subject to the "Classpath" exception as provided
3829# by Oracle in the LICENSE file that accompanied this code.
3830#
3831# This code is distributed in the hope that it will be useful, but WITHOUT
3832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834# version 2 for more details (a copy is included in the LICENSE file that
3835# accompanied this code).
3836#
3837# You should have received a copy of the GNU General Public License version
3838# 2 along with this work; if not, write to the Free Software Foundation,
3839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840#
3841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842# or visit www.oracle.com if you need additional information or have any
3843# questions.
3844#
3845
3846########################################################################
3847# This file handles detection of the Boot JDK. The Boot JDK detection
3848# process has been developed as a response to solve a complex real-world
3849# problem. Initially, it was simple, but it has grown as platform after
3850# platform, idiosyncracy after idiosyncracy has been supported.
3851#
3852# The basic idea is this:
3853# 1) You need an acceptable *) JDK to use as a Boot JDK
3854# 2) There are several ways to locate a JDK, that are mostly platform
3855#    dependent **)
3856# 3) You can have multiple JDKs installed
3857# 4) If possible, configure should try to dig out an acceptable JDK
3858#    automatically, without having to resort to command-line options
3859#
3860# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3861#     javac) and not a JRE, etc.
3862#
3863# **) On Windows we typically use a well-known path.
3864#     On MacOSX we typically use the tool java_home.
3865#     On Linux we typically find javac in the $PATH, and then follow a
3866#     chain of symlinks that often ends up in a real JDK.
3867#
3868# This leads to the code where we check in different ways to locate a
3869# JDK, and if one is found, check if it is acceptable. If not, we print
3870# our reasons for rejecting it (useful when debugging non-working
3871# configure situations) and continue checking the next one.
3872########################################################################
3873
3874# Execute the check given as argument, and verify the result
3875# If the Boot JDK was previously found, do nothing
3876# $1 A command line (typically autoconf macro) to execute
3877
3878
3879# Test: Is bootjdk explicitly set by command line arguments?
3880
3881
3882# Test: Is $JAVA_HOME set?
3883
3884
3885# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3886
3887
3888# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3889# $1: Argument to the java_home binary (optional)
3890
3891
3892# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3893
3894
3895# Look for a jdk in the given path. If there are multiple, try to select the newest.
3896# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3897# $1 = Path to directory containing jdk installations.
3898# $2 = String to append to the found JDK directory to get the proper JDK home
3899
3900
3901# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3902# environmental variable as base for where to look.
3903# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3904
3905
3906# Test: Is there a JDK installed in default, well-known locations?
3907
3908
3909# Check that a command-line tool in the Boot JDK is correct
3910# $1 = name of variable to assign
3911# $2 = name of binary
3912
3913
3914###############################################################################
3915#
3916# We need a Boot JDK to bootstrap the build.
3917#
3918
3919
3920
3921
3922
3923# BUILD_JDK: the location of the latest JDK that can run
3924#   on the host system and supports the target class file version
3925#   generated in this JDK build.  This variable should only be
3926#   used after the launchers are built.
3927#
3928
3929# Execute the check given as argument, and verify the result.
3930# If the JDK was previously found, do nothing.
3931# $1 A command line (typically autoconf macro) to execute
3932
3933
3934# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3935# is different than the host system doing the build (e.g. cross-compilation),
3936# a special BUILD_JDK is built as part of the build process.  An external
3937# prebuilt BUILD_JDK can also be supplied.
3938
3939
3940#
3941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3943#
3944# This code is free software; you can redistribute it and/or modify it
3945# under the terms of the GNU General Public License version 2 only, as
3946# published by the Free Software Foundation.  Oracle designates this
3947# particular file as subject to the "Classpath" exception as provided
3948# by Oracle in the LICENSE file that accompanied this code.
3949#
3950# This code is distributed in the hope that it will be useful, but WITHOUT
3951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3953# version 2 for more details (a copy is included in the LICENSE file that
3954# accompanied this code).
3955#
3956# You should have received a copy of the GNU General Public License version
3957# 2 along with this work; if not, write to the Free Software Foundation,
3958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3959#
3960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3961# or visit www.oracle.com if you need additional information or have any
3962# questions.
3963#
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981################################################################################
3982#
3983# Runs icecc-create-env once and prints the error if it fails
3984#
3985# $1: arguments to icecc-create-env
3986# $2: log file
3987#
3988
3989
3990################################################################################
3991#
3992# Optionally enable distributed compilation of native code using icecc/icecream
3993#
3994
3995
3996
3997
3998
3999
4000
4001#
4002# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4003# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4004#
4005# This code is free software; you can redistribute it and/or modify it
4006# under the terms of the GNU General Public License version 2 only, as
4007# published by the Free Software Foundation.  Oracle designates this
4008# particular file as subject to the "Classpath" exception as provided
4009# by Oracle in the LICENSE file that accompanied this code.
4010#
4011# This code is distributed in the hope that it will be useful, but WITHOUT
4012# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4013# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4014# version 2 for more details (a copy is included in the LICENSE file that
4015# accompanied this code).
4016#
4017# You should have received a copy of the GNU General Public License version
4018# 2 along with this work; if not, write to the Free Software Foundation,
4019# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4020#
4021# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4022# or visit www.oracle.com if you need additional information or have any
4023# questions.
4024#
4025
4026################################################################################
4027#
4028# Setup ABI profile (for arm)
4029#
4030
4031
4032# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4033# corresponding configure arguments instead
4034
4035
4036# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4037# that configure can use them while detecting compilers.
4038# TOOLCHAIN_TYPE is available here.
4039# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4040
4041
4042
4043
4044
4045
4046# Documentation on common flags used for solstudio in HIGHEST.
4047#
4048# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4049#          done with care, there are some assumptions below that need to
4050#          be understood about the use of pointers, and IEEE behavior.
4051#
4052# -fns: Use non-standard floating point mode (not IEEE 754)
4053# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4054# -fsingle: Use single precision floating point with 'float'
4055# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4056#   (Source with excessing pointer casting and data access with mixed
4057#    pointer types are not recommended)
4058# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4059#   (If you expect perfect errno behavior, do not use this)
4060# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4061# -xrestrict: Pointer parameters to functions do not overlap
4062#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4063#    If you pass in multiple pointers to the same data, do not use this)
4064# -xlibmil: Inline some library routines
4065#   (If you expect perfect errno behavior, do not use this)
4066# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4067#   (If you expect perfect errno behavior, do not use this)
4068#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4069
4070    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4071    # Bug?
4072    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4073    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4074    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4075    #fi
4076
4077
4078
4079
4080
4081
4082################################################################################
4083# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4084#      conditionals against.
4085# $2 - Optional prefix for each variable defined.
4086
4087
4088# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4089#                                  IF_FALSE: [RUN-IF-FALSE])
4090# ------------------------------------------------------------
4091# Check that the C compiler supports an argument
4092
4093
4094
4095
4096# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4097#                                    IF_FALSE: [RUN-IF-FALSE])
4098# ------------------------------------------------------------
4099# Check that the C++ compiler supports an argument
4100
4101
4102
4103
4104# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4105#                                IF_FALSE: [RUN-IF-FALSE])
4106# ------------------------------------------------------------
4107# Check that the C and C++ compilers support an argument
4108
4109
4110
4111
4112# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4113#                                   IF_FALSE: [RUN-IF-FALSE])
4114# ------------------------------------------------------------
4115# Check that the linker support an argument
4116
4117
4118
4119
4120
4121
4122# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4123# Arguments:
4124# $1 - Optional prefix for each variable defined.
4125
4126
4127#
4128# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4129# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4130#
4131# This code is free software; you can redistribute it and/or modify it
4132# under the terms of the GNU General Public License version 2 only, as
4133# published by the Free Software Foundation.  Oracle designates this
4134# particular file as subject to the "Classpath" exception as provided
4135# by Oracle in the LICENSE file that accompanied this code.
4136#
4137# This code is distributed in the hope that it will be useful, but WITHOUT
4138# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4139# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4140# version 2 for more details (a copy is included in the LICENSE file that
4141# accompanied this code).
4142#
4143# You should have received a copy of the GNU General Public License version
4144# 2 along with this work; if not, write to the Free Software Foundation,
4145# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4146#
4147# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4148# or visit www.oracle.com if you need additional information or have any
4149# questions.
4150#
4151
4152
4153
4154
4155
4156cygwin_help() {
4157  case $1 in
4158    unzip)
4159      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4161      ;;
4162    zip)
4163      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4164      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165      ;;
4166    make)
4167      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4168      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169      ;;
4170    freetype)
4171      HELP_MSG="
4172The freetype library can now be build during the configure process.
4173Download the freetype sources and unpack them into an arbitrary directory:
4174
4175wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4176tar -xzf freetype-2.5.3.tar.gz
4177
4178Then run configure with '--with-freetype-src=<freetype_src>'. This will
4179automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4180builds or into '<freetype_src>/lib32' for 32-bit builds.
4181Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4182and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4183
4184Alternatively you can unpack the sources like this to use the default directory:
4185
4186tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4187      ;;
4188  esac
4189}
4190
4191msys_help() {
4192  PKGHANDLER_COMMAND=""
4193}
4194
4195apt_help() {
4196  case $1 in
4197    reduced)
4198      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4199    devkit)
4200      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4201    openjdk)
4202      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4203    alsa)
4204      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4205    cups)
4206      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4207    freetype)
4208      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4209    ffi)
4210      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4211    x11)
4212      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4213    ccache)
4214      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4215    dtrace)
4216      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4217    elf)
4218      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4219  esac
4220}
4221
4222yum_help() {
4223  case $1 in
4224    devkit)
4225      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4226    openjdk)
4227      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4228    alsa)
4229      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4230    cups)
4231      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4232    freetype)
4233      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4234    x11)
4235      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4236    ccache)
4237      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4238    elf)
4239      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4240  esac
4241}
4242
4243brew_help() {
4244  case $1 in
4245    openjdk)
4246      PKGHANDLER_COMMAND="brew cask install java" ;;
4247    freetype)
4248      PKGHANDLER_COMMAND="brew install freetype" ;;
4249    ccache)
4250      PKGHANDLER_COMMAND="brew install ccache" ;;
4251  esac
4252}
4253
4254port_help() {
4255  PKGHANDLER_COMMAND=""
4256}
4257
4258pkgutil_help() {
4259  PKGHANDLER_COMMAND=""
4260}
4261
4262pkgadd_help() {
4263  PKGHANDLER_COMMAND=""
4264}
4265
4266# This function will check if we're called from the "configure" wrapper while
4267# printing --help. If so, we will print out additional information that can
4268# only be extracted within the autoconf script, and then exit. This must be
4269# called at the very beginning in configure.ac.
4270
4271
4272
4273
4274
4275
4276#
4277# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4279#
4280# This code is free software; you can redistribute it and/or modify it
4281# under the terms of the GNU General Public License version 2 only, as
4282# published by the Free Software Foundation.  Oracle designates this
4283# particular file as subject to the "Classpath" exception as provided
4284# by Oracle in the LICENSE file that accompanied this code.
4285#
4286# This code is distributed in the hope that it will be useful, but WITHOUT
4287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4289# version 2 for more details (a copy is included in the LICENSE file that
4290# accompanied this code).
4291#
4292# You should have received a copy of the GNU General Public License version
4293# 2 along with this work; if not, write to the Free Software Foundation,
4294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4295#
4296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4297# or visit www.oracle.com if you need additional information or have any
4298# questions.
4299#
4300
4301# All valid JVM features, regardless of platform
4302VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4303    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4304    static-build link-time-opt aot"
4305
4306# All valid JVM variants
4307VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4308
4309###############################################################################
4310# Check if the specified JVM variant should be built. To be used in shell if
4311# constructs, like this:
4312# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check if the specified JVM features are explicitly enabled. To be used in
4322# shell if constructs, like this:
4323# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4324#
4325# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4326
4327# Definition kept in one line to allow inlining in if statements.
4328# Additional [] needed to keep m4 from mangling shell constructs.
4329
4330
4331###############################################################################
4332# Check which variants of the JVM that we want to build. Available variants are:
4333#   server: normal interpreter, and a tiered C1/C2 compiler
4334#   client: normal interpreter, and C1 (no C2 compiler)
4335#   minimal: reduced form of client with optional features stripped out
4336#   core: normal interpreter only, no compiler
4337#   zero: C++ based interpreter only, no compiler
4338#   zeroshark: C++ based interpreter, and a llvm-based compiler
4339#   custom: baseline JVM with no default features
4340#
4341
4342
4343###############################################################################
4344# Check if dtrace should be enabled and has all prerequisites present.
4345#
4346
4347
4348################################################################################
4349# Check if AOT should be enabled
4350#
4351
4352
4353###############################################################################
4354# Set up all JVM features for each JVM variant.
4355#
4356
4357
4358###############################################################################
4359# Validate JVM features once all setup is complete, including custom setup.
4360#
4361
4362
4363################################################################################
4364#
4365# Specify which sources will be used to build the 64-bit ARM port
4366#
4367# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4368# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4369#
4370
4371
4372
4373################################################################################
4374# Check if gtest should be built
4375#
4376
4377
4378#
4379# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4380# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4381#
4382# This code is free software; you can redistribute it and/or modify it
4383# under the terms of the GNU General Public License version 2 only, as
4384# published by the Free Software Foundation.  Oracle designates this
4385# particular file as subject to the "Classpath" exception as provided
4386# by Oracle in the LICENSE file that accompanied this code.
4387#
4388# This code is distributed in the hope that it will be useful, but WITHOUT
4389# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4390# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4391# version 2 for more details (a copy is included in the LICENSE file that
4392# accompanied this code).
4393#
4394# You should have received a copy of the GNU General Public License version
4395# 2 along with this work; if not, write to the Free Software Foundation,
4396# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4397#
4398# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4399# or visit www.oracle.com if you need additional information or have any
4400# questions.
4401#
4402
4403###############################################################################
4404# Check which variant of the JDK that we want to build.
4405# Currently we have:
4406#    normal:   standard edition
4407# but the custom make system may add other variants
4408#
4409# Effectively the JDK variant gives a name to a specific set of
4410# modules to compile into the JDK.
4411
4412
4413###############################################################################
4414# Set the debug level
4415#    release: no debug information, all optimizations, no asserts.
4416#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4417#    fastdebug: debug information (-g), all optimizations, all asserts
4418#    slowdebug: debug information (-g), no optimizations, all asserts
4419
4420
4421###############################################################################
4422#
4423# Should we build only OpenJDK even if closed sources are present?
4424#
4425
4426
4427
4428
4429###############################################################################
4430#
4431# Enable or disable the elliptic curve crypto implementation
4432#
4433
4434
4435
4436
4437################################################################################
4438#
4439# Gcov coverage data for hotspot
4440#
4441
4442
4443################################################################################
4444#
4445# Static build support.  When enabled will generate static
4446# libraries instead of shared libraries for all JDK libs.
4447#
4448
4449
4450################################################################################
4451#
4452# jlink options.
4453# We always keep packaged modules in JDK image.
4454#
4455
4456
4457################################################################################
4458#
4459# Check if building of the jtreg failure handler should be enabled.
4460#
4461
4462
4463################################################################################
4464#
4465# Enable or disable generation of the classlist at build time
4466#
4467
4468
4469#
4470# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4472#
4473# This code is free software; you can redistribute it and/or modify it
4474# under the terms of the GNU General Public License version 2 only, as
4475# published by the Free Software Foundation.  Oracle designates this
4476# particular file as subject to the "Classpath" exception as provided
4477# by Oracle in the LICENSE file that accompanied this code.
4478#
4479# This code is distributed in the hope that it will be useful, but WITHOUT
4480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4482# version 2 for more details (a copy is included in the LICENSE file that
4483# accompanied this code).
4484#
4485# You should have received a copy of the GNU General Public License version
4486# 2 along with this work; if not, write to the Free Software Foundation,
4487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4488#
4489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4490# or visit www.oracle.com if you need additional information or have any
4491# questions.
4492#
4493
4494###############################################################################
4495#
4496# Setup version numbers
4497#
4498
4499# Verify that a given string represents a valid version number, and assign it
4500# to a variable.
4501
4502# Argument 1: the variable to assign to
4503# Argument 2: the value given by the user
4504
4505
4506
4507
4508#
4509# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4510# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4511#
4512# This code is free software; you can redistribute it and/or modify it
4513# under the terms of the GNU General Public License version 2 only, as
4514# published by the Free Software Foundation.  Oracle designates this
4515# particular file as subject to the "Classpath" exception as provided
4516# by Oracle in the LICENSE file that accompanied this code.
4517#
4518# This code is distributed in the hope that it will be useful, but WITHOUT
4519# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4520# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4521# version 2 for more details (a copy is included in the LICENSE file that
4522# accompanied this code).
4523#
4524# You should have received a copy of the GNU General Public License version
4525# 2 along with this work; if not, write to the Free Software Foundation,
4526# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4527#
4528# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4529# or visit www.oracle.com if you need additional information or have any
4530# questions.
4531#
4532
4533# Major library component reside in separate files.
4534#
4535# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4537#
4538# This code is free software; you can redistribute it and/or modify it
4539# under the terms of the GNU General Public License version 2 only, as
4540# published by the Free Software Foundation.  Oracle designates this
4541# particular file as subject to the "Classpath" exception as provided
4542# by Oracle in the LICENSE file that accompanied this code.
4543#
4544# This code is distributed in the hope that it will be useful, but WITHOUT
4545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4547# version 2 for more details (a copy is included in the LICENSE file that
4548# accompanied this code).
4549#
4550# You should have received a copy of the GNU General Public License version
4551# 2 along with this work; if not, write to the Free Software Foundation,
4552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4553#
4554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4555# or visit www.oracle.com if you need additional information or have any
4556# questions.
4557#
4558
4559################################################################################
4560# Setup alsa (Advanced Linux Sound Architecture)
4561################################################################################
4562
4563
4564#
4565# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4566# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4567#
4568# This code is free software; you can redistribute it and/or modify it
4569# under the terms of the GNU General Public License version 2 only, as
4570# published by the Free Software Foundation.  Oracle designates this
4571# particular file as subject to the "Classpath" exception as provided
4572# by Oracle in the LICENSE file that accompanied this code.
4573#
4574# This code is distributed in the hope that it will be useful, but WITHOUT
4575# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4576# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4577# version 2 for more details (a copy is included in the LICENSE file that
4578# accompanied this code).
4579#
4580# You should have received a copy of the GNU General Public License version
4581# 2 along with this work; if not, write to the Free Software Foundation,
4582# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4583#
4584# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4585# or visit www.oracle.com if you need additional information or have any
4586# questions.
4587#
4588
4589################################################################################
4590# Setup bundled libraries.
4591#
4592# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4593# OpenJDK repository. Default is to use these libraries as bundled, but they
4594# might be replaced by en external version by the user.
4595################################################################################
4596
4597
4598################################################################################
4599# Setup libjpeg
4600################################################################################
4601
4602
4603################################################################################
4604# Setup giflib
4605################################################################################
4606
4607
4608################################################################################
4609# Setup libpng
4610################################################################################
4611
4612
4613################################################################################
4614# Setup zlib
4615################################################################################
4616
4617
4618################################################################################
4619# Setup lcms (Little CMS)
4620################################################################################
4621
4622
4623#
4624# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626#
4627# This code is free software; you can redistribute it and/or modify it
4628# under the terms of the GNU General Public License version 2 only, as
4629# published by the Free Software Foundation.  Oracle designates this
4630# particular file as subject to the "Classpath" exception as provided
4631# by Oracle in the LICENSE file that accompanied this code.
4632#
4633# This code is distributed in the hope that it will be useful, but WITHOUT
4634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4636# version 2 for more details (a copy is included in the LICENSE file that
4637# accompanied this code).
4638#
4639# You should have received a copy of the GNU General Public License version
4640# 2 along with this work; if not, write to the Free Software Foundation,
4641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642#
4643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644# or visit www.oracle.com if you need additional information or have any
4645# questions.
4646#
4647
4648################################################################################
4649# Setup cups (Common Unix Printing System)
4650################################################################################
4651
4652
4653#
4654# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4655# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4656#
4657# This code is free software; you can redistribute it and/or modify it
4658# under the terms of the GNU General Public License version 2 only, as
4659# published by the Free Software Foundation.  Oracle designates this
4660# particular file as subject to the "Classpath" exception as provided
4661# by Oracle in the LICENSE file that accompanied this code.
4662#
4663# This code is distributed in the hope that it will be useful, but WITHOUT
4664# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4665# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4666# version 2 for more details (a copy is included in the LICENSE file that
4667# accompanied this code).
4668#
4669# You should have received a copy of the GNU General Public License version
4670# 2 along with this work; if not, write to the Free Software Foundation,
4671# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4672#
4673# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4674# or visit www.oracle.com if you need additional information or have any
4675# questions.
4676#
4677
4678################################################################################
4679# Setup libffi (Foreign Function Interface)
4680################################################################################
4681
4682
4683#
4684# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4685# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4686#
4687# This code is free software; you can redistribute it and/or modify it
4688# under the terms of the GNU General Public License version 2 only, as
4689# published by the Free Software Foundation.  Oracle designates this
4690# particular file as subject to the "Classpath" exception as provided
4691# by Oracle in the LICENSE file that accompanied this code.
4692#
4693# This code is distributed in the hope that it will be useful, but WITHOUT
4694# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4695# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4696# version 2 for more details (a copy is included in the LICENSE file that
4697# accompanied this code).
4698#
4699# You should have received a copy of the GNU General Public License version
4700# 2 along with this work; if not, write to the Free Software Foundation,
4701# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4702#
4703# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4704# or visit www.oracle.com if you need additional information or have any
4705# questions.
4706#
4707
4708################################################################################
4709# Build the freetype lib from source
4710################################################################################
4711
4712
4713################################################################################
4714# Check if a potential freeype library match is correct and usable
4715################################################################################
4716
4717
4718################################################################################
4719# Setup freetype (The FreeType2 font rendering library)
4720################################################################################
4721
4722
4723#
4724# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4725# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4726#
4727# This code is free software; you can redistribute it and/or modify it
4728# under the terms of the GNU General Public License version 2 only, as
4729# published by the Free Software Foundation.  Oracle designates this
4730# particular file as subject to the "Classpath" exception as provided
4731# by Oracle in the LICENSE file that accompanied this code.
4732#
4733# This code is distributed in the hope that it will be useful, but WITHOUT
4734# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4735# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4736# version 2 for more details (a copy is included in the LICENSE file that
4737# accompanied this code).
4738#
4739# You should have received a copy of the GNU General Public License version
4740# 2 along with this work; if not, write to the Free Software Foundation,
4741# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4742#
4743# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4744# or visit www.oracle.com if you need additional information or have any
4745# questions.
4746#
4747
4748################################################################################
4749# Setup the standard C/C++ runtime libraries.
4750#
4751# Most importantly, determine if stdc++ should be linked statically or
4752# dynamically.
4753################################################################################
4754
4755
4756#
4757# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4758# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4759#
4760# This code is free software; you can redistribute it and/or modify it
4761# under the terms of the GNU General Public License version 2 only, as
4762# published by the Free Software Foundation.  Oracle designates this
4763# particular file as subject to the "Classpath" exception as provided
4764# by Oracle in the LICENSE file that accompanied this code.
4765#
4766# This code is distributed in the hope that it will be useful, but WITHOUT
4767# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4768# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4769# version 2 for more details (a copy is included in the LICENSE file that
4770# accompanied this code).
4771#
4772# You should have received a copy of the GNU General Public License version
4773# 2 along with this work; if not, write to the Free Software Foundation,
4774# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4775#
4776# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4777# or visit www.oracle.com if you need additional information or have any
4778# questions.
4779#
4780
4781################################################################################
4782# Setup X11 Windows system
4783################################################################################
4784
4785
4786#
4787# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4788# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4789#
4790# This code is free software; you can redistribute it and/or modify it
4791# under the terms of the GNU General Public License version 2 only, as
4792# published by the Free Software Foundation.  Oracle designates this
4793# particular file as subject to the "Classpath" exception as provided
4794# by Oracle in the LICENSE file that accompanied this code.
4795#
4796# This code is distributed in the hope that it will be useful, but WITHOUT
4797# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4798# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4799# version 2 for more details (a copy is included in the LICENSE file that
4800# accompanied this code).
4801#
4802# You should have received a copy of the GNU General Public License version
4803# 2 along with this work; if not, write to the Free Software Foundation,
4804# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4805#
4806# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4807# or visit www.oracle.com if you need additional information or have any
4808# questions.
4809#
4810
4811################################################################################
4812# Setup libelf (ELF library)
4813################################################################################
4814
4815
4816
4817################################################################################
4818# Determine which libraries are needed for this configuration
4819################################################################################
4820
4821
4822################################################################################
4823# Parse library options, and setup needed libraries
4824################################################################################
4825
4826
4827################################################################################
4828# Setup llvm (Low-Level VM)
4829################################################################################
4830
4831
4832################################################################################
4833# Setup various libraries, typically small system libraries
4834################################################################################
4835
4836
4837################################################################################
4838# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4839# redistribute it in the test image.
4840################################################################################
4841
4842
4843
4844#
4845# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4846# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4847#
4848# This code is free software; you can redistribute it and/or modify it
4849# under the terms of the GNU General Public License version 2 only, as
4850# published by the Free Software Foundation.  Oracle designates this
4851# particular file as subject to the "Classpath" exception as provided
4852# by Oracle in the LICENSE file that accompanied this code.
4853#
4854# This code is distributed in the hope that it will be useful, but WITHOUT
4855# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4856# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4857# version 2 for more details (a copy is included in the LICENSE file that
4858# accompanied this code).
4859#
4860# You should have received a copy of the GNU General Public License version
4861# 2 along with this work; if not, write to the Free Software Foundation,
4862# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4863#
4864# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4865# or visit www.oracle.com if you need additional information or have any
4866# questions.
4867#
4868
4869# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4870# Converts autoconf style CPU name to OpenJDK style, into
4871# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4872
4873
4874# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4875# Converts autoconf style OS name to OpenJDK style, into
4876# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4877
4878
4879# Expects $host_os $host_cpu $build_os and $build_cpu
4880# and $with_target_bits to have been setup!
4881#
4882# Translate the standard triplet(quadruplet) definition
4883# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4884# OPENJDK_BUILD_OS, etc.
4885
4886
4887# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4888# accordingly. Must be done after setting up build and target system, but before
4889# doing anything else with these values.
4890
4891
4892# Setup the legacy variables, for controlling the old makefiles.
4893#
4894
4895
4896# $1 - Either TARGET or BUILD to setup the variables for.
4897
4898
4899
4900
4901
4902
4903#%%% Build and target systems %%%
4904
4905
4906
4907
4908# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4909# Add -mX to various FLAGS variables.
4910
4911
4912
4913
4914
4915
4916#
4917# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4918# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4919#
4920# This code is free software; you can redistribute it and/or modify it
4921# under the terms of the GNU General Public License version 2 only, as
4922# published by the Free Software Foundation.  Oracle designates this
4923# particular file as subject to the "Classpath" exception as provided
4924# by Oracle in the LICENSE file that accompanied this code.
4925#
4926# This code is distributed in the hope that it will be useful, but WITHOUT
4927# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4928# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4929# version 2 for more details (a copy is included in the LICENSE file that
4930# accompanied this code).
4931#
4932# You should have received a copy of the GNU General Public License version
4933# 2 along with this work; if not, write to the Free Software Foundation,
4934# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4935#
4936# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4937# or visit www.oracle.com if you need additional information or have any
4938# questions.
4939#
4940
4941
4942
4943
4944
4945
4946
4947################################################################################
4948# Define a mechanism for importing extra prebuilt modules
4949#
4950
4951
4952
4953#
4954# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4956#
4957# This code is free software; you can redistribute it and/or modify it
4958# under the terms of the GNU General Public License version 2 only, as
4959# published by the Free Software Foundation.  Oracle designates this
4960# particular file as subject to the "Classpath" exception as provided
4961# by Oracle in the LICENSE file that accompanied this code.
4962#
4963# This code is distributed in the hope that it will be useful, but WITHOUT
4964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4966# version 2 for more details (a copy is included in the LICENSE file that
4967# accompanied this code).
4968#
4969# You should have received a copy of the GNU General Public License version
4970# 2 along with this work; if not, write to the Free Software Foundation,
4971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4972#
4973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4974# or visit www.oracle.com if you need additional information or have any
4975# questions.
4976#
4977
4978########################################################################
4979# This file is responsible for detecting, verifying and setting up the
4980# toolchain, i.e. the compiler, linker and related utilities. It will setup
4981# proper paths to the binaries, but it will not setup any flags.
4982#
4983# The binaries used is determined by the toolchain type, which is the family of
4984# compilers and related tools that are used.
4985########################################################################
4986
4987
4988# All valid toolchains, regardless of platform (used by help.m4)
4989VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4990
4991# These toolchains are valid on different platforms
4992VALID_TOOLCHAINS_linux="gcc clang"
4993VALID_TOOLCHAINS_solaris="solstudio"
4994VALID_TOOLCHAINS_macosx="gcc clang"
4995VALID_TOOLCHAINS_aix="xlc"
4996VALID_TOOLCHAINS_windows="microsoft"
4997
4998# Toolchain descriptions
4999TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5000TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5001TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5002TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5003TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5004
5005# Minimum supported versions, empty means unspecified
5006TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5007TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5008TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5009TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5010TOOLCHAIN_MINIMUM_VERSION_xlc=""
5011
5012# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5013# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5014# $1 - optional variable prefix for compiler and version variables (BUILD_)
5015# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5016
5017
5018# Check if the configured compiler (C and C++) is of a specific version or
5019# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5020#
5021# Arguments:
5022#   VERSION:   The version string to check against the found version
5023#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5024#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5025#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5026
5027
5028
5029
5030# Setup a number of variables describing how native output files are
5031# named on this platform/toolchain.
5032
5033
5034# Determine which toolchain type to use, and make sure it is valid for this
5035# platform. Setup various information about the selected toolchain.
5036
5037
5038# Before we start detecting the toolchain executables, we might need some
5039# special setup, e.g. additional paths etc.
5040
5041
5042# Restore path, etc
5043
5044
5045# Check if a compiler is of the toolchain type we expect, and save the version
5046# information from it. If the compiler does not match the expected type,
5047# this function will abort using AC_MSG_ERROR. If it matches, the version will
5048# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5049# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5050#
5051# $1 = compiler to test (CC or CXX)
5052# $2 = human readable name of compiler (C or C++)
5053
5054
5055# Try to locate the given C or C++ compiler in the path, or otherwise.
5056#
5057# $1 = compiler to test (CC or CXX)
5058# $2 = human readable name of compiler (C or C++)
5059# $3 = compiler name to search for
5060
5061
5062# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5063# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5064# archiver (AR). Verify that the compilers are correct according to the
5065# toolchain type.
5066
5067
5068# Setup additional tools that is considered a part of the toolchain, but not the
5069# core part. Many of these are highly platform-specific and do not exist,
5070# and/or are not needed on all platforms.
5071
5072
5073# Setup the build tools (i.e, the compiler and linker used to build programs
5074# that should be run on the build platform, not the target platform, as a build
5075# helper). Since the non-cross-compile case uses the normal, target compilers
5076# for this, we can only do this after these have been setup.
5077
5078
5079# Do some additional checks on the detected tools.
5080
5081
5082# Setup the JTReg Regression Test Harness.
5083
5084
5085#
5086# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5088#
5089# This code is free software; you can redistribute it and/or modify it
5090# under the terms of the GNU General Public License version 2 only, as
5091# published by the Free Software Foundation.  Oracle designates this
5092# particular file as subject to the "Classpath" exception as provided
5093# by Oracle in the LICENSE file that accompanied this code.
5094#
5095# This code is distributed in the hope that it will be useful, but WITHOUT
5096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5098# version 2 for more details (a copy is included in the LICENSE file that
5099# accompanied this code).
5100#
5101# You should have received a copy of the GNU General Public License version
5102# 2 along with this work; if not, write to the Free Software Foundation,
5103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5104#
5105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5106# or visit www.oracle.com if you need additional information or have any
5107# questions.
5108#
5109
5110################################################################################
5111# The order of these defines the priority by which we try to find them.
5112VALID_VS_VERSIONS="2013 2012 2010"
5113
5114VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5115VS_VERSION_INTERNAL_2010=100
5116VS_MSVCR_2010=msvcr100.dll
5117# We don't use msvcp on Visual Studio 2010
5118#VS_MSVCP_2010=msvcp100.dll
5119VS_ENVVAR_2010="VS100COMNTOOLS"
5120VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5121VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5122VS_VS_PLATFORM_NAME_2010="v100"
5123VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5124
5125VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5126VS_VERSION_INTERNAL_2012=110
5127VS_MSVCR_2012=msvcr110.dll
5128VS_MSVCP_2012=msvcp110.dll
5129VS_ENVVAR_2012="VS110COMNTOOLS"
5130VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5131VS_SDK_INSTALLDIR_2012=
5132VS_VS_PLATFORM_NAME_2012="v110"
5133VS_SDK_PLATFORM_NAME_2012=
5134
5135VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5136VS_VERSION_INTERNAL_2013=120
5137VS_MSVCR_2013=msvcr120.dll
5138VS_MSVCP_2013=msvcp120.dll
5139VS_ENVVAR_2013="VS120COMNTOOLS"
5140VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5141VS_SDK_INSTALLDIR_2013=
5142VS_VS_PLATFORM_NAME_2013="v120"
5143VS_SDK_PLATFORM_NAME_2013=
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150
5151
5152
5153################################################################################
5154# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5155# build environment and assigns it to VS_ENV_CMD
5156
5157
5158################################################################################
5159
5160
5161
5162################################################################################
5163# Check if the VS env variables were setup prior to running configure.
5164# If not, then find vcvarsall.bat and run it automatically, and integrate
5165# the set env variables into the spec file.
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180# This line needs to be here, verbatim, after all includes and the dummy hook
5181# definitions. It is replaced with custom functionality when building
5182# custom sources.
5183#CUSTOM_AUTOCONF_INCLUDE
5184
5185# Do not change or remove the following line, it is needed for consistency checks:
5186DATE_WHEN_GENERATED=1494858828
5187
5188###############################################################################
5189#
5190# Initialization / Boot-strapping
5191#
5192# The bootstrapping process needs to solve the "chicken or the egg" problem,
5193# thus it jumps back and forth, each time gaining something needed later on.
5194#
5195###############################################################################
5196
5197# If we are requested to print additional help, do that and then exit.
5198# This must be the very first call.
5199
5200  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5201
5202    # Print available toolchains
5203    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5204    $PRINTF "Which are valid to use depends on the build platform.\n"
5205    for toolchain in $VALID_TOOLCHAINS_all; do
5206      # Use indirect variable referencing
5207      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5208      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5209      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5210    done
5211    $PRINTF "\n"
5212
5213    # Print available jvm features
5214    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5215    $PRINTF "Which are valid to use depends on the target platform.\n  "
5216    $PRINTF "%s " $VALID_JVM_FEATURES
5217    $PRINTF "\n"
5218
5219    # And now exit directly
5220    exit 0
5221  fi
5222
5223
5224# Basic initialization that must happen first of all in the normal process.
5225
5226  # Save the original command line. This is passed to us by the wrapper configure script.
5227
5228  # Save the path variable before it gets changed
5229  ORIGINAL_PATH="$PATH"
5230
5231  DATE_WHEN_CONFIGURED=`LANG=C date`
5232
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5234$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5236$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5237
5238
5239  # Start with tools that do not need have cross compilation support
5240  # and can be expected to be found in the default PATH. These tools are
5241  # used by configure.
5242
5243  # First are all the simple required tools.
5244
5245
5246
5247  # Publish this variable in the help.
5248
5249
5250  if [ -z "${BASENAME+x}" ]; then
5251    # The variable is not set by user, try to locate tool using the code snippet
5252    for ac_prog in basename
5253do
5254  # Extract the first word of "$ac_prog", so it can be a program name with args.
5255set dummy $ac_prog; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5257$as_echo_n "checking for $ac_word... " >&6; }
5258if ${ac_cv_path_BASENAME+:} false; then :
5259  $as_echo_n "(cached) " >&6
5260else
5261  case $BASENAME in
5262  [\\/]* | ?:[\\/]*)
5263  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5264  ;;
5265  *)
5266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269  IFS=$as_save_IFS
5270  test -z "$as_dir" && as_dir=.
5271    for ac_exec_ext in '' $ac_executable_extensions; do
5272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5273    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275    break 2
5276  fi
5277done
5278  done
5279IFS=$as_save_IFS
5280
5281  ;;
5282esac
5283fi
5284BASENAME=$ac_cv_path_BASENAME
5285if test -n "$BASENAME"; then
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5287$as_echo "$BASENAME" >&6; }
5288else
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }
5291fi
5292
5293
5294  test -n "$BASENAME" && break
5295done
5296
5297  else
5298    # The variable is set, but is it from the command line or the environment?
5299
5300    # Try to remove the string !BASENAME! from our list.
5301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5303      # If it failed, the variable was not from the command line. Ignore it,
5304      # but warn the user (except for BASH, which is always set by the calling BASH).
5305      if test "xBASENAME" != xBASH; then
5306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5307$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5308      fi
5309      # Try to locate tool using the code snippet
5310      for ac_prog in basename
5311do
5312  # Extract the first word of "$ac_prog", so it can be a program name with args.
5313set dummy $ac_prog; ac_word=$2
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5315$as_echo_n "checking for $ac_word... " >&6; }
5316if ${ac_cv_path_BASENAME+:} false; then :
5317  $as_echo_n "(cached) " >&6
5318else
5319  case $BASENAME in
5320  [\\/]* | ?:[\\/]*)
5321  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5322  ;;
5323  *)
5324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325for as_dir in $PATH
5326do
5327  IFS=$as_save_IFS
5328  test -z "$as_dir" && as_dir=.
5329    for ac_exec_ext in '' $ac_executable_extensions; do
5330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5331    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5333    break 2
5334  fi
5335done
5336  done
5337IFS=$as_save_IFS
5338
5339  ;;
5340esac
5341fi
5342BASENAME=$ac_cv_path_BASENAME
5343if test -n "$BASENAME"; then
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5345$as_echo "$BASENAME" >&6; }
5346else
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348$as_echo "no" >&6; }
5349fi
5350
5351
5352  test -n "$BASENAME" && break
5353done
5354
5355    else
5356      # If it succeeded, then it was overridden by the user. We will use it
5357      # for the tool.
5358
5359      # First remove it from the list of overridden variables, so we can test
5360      # for unknown variables in the end.
5361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5362
5363      # Check if we try to supply an empty value
5364      if test "x$BASENAME" = x; then
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5366$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5368$as_echo_n "checking for BASENAME... " >&6; }
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5370$as_echo "disabled" >&6; }
5371      else
5372        # Check if the provided tool contains a complete path.
5373        tool_specified="$BASENAME"
5374        tool_basename="${tool_specified##*/}"
5375        if test "x$tool_basename" = "x$tool_specified"; then
5376          # A command without a complete path is provided, search $PATH.
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5378$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5379          # Extract the first word of "$tool_basename", so it can be a program name with args.
5380set dummy $tool_basename; ac_word=$2
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5382$as_echo_n "checking for $ac_word... " >&6; }
5383if ${ac_cv_path_BASENAME+:} false; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386  case $BASENAME in
5387  [\\/]* | ?:[\\/]*)
5388  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5389  ;;
5390  *)
5391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394  IFS=$as_save_IFS
5395  test -z "$as_dir" && as_dir=.
5396    for ac_exec_ext in '' $ac_executable_extensions; do
5397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5398    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5400    break 2
5401  fi
5402done
5403  done
5404IFS=$as_save_IFS
5405
5406  ;;
5407esac
5408fi
5409BASENAME=$ac_cv_path_BASENAME
5410if test -n "$BASENAME"; then
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5412$as_echo "$BASENAME" >&6; }
5413else
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
5417
5418
5419          if test "x$BASENAME" = x; then
5420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5421          fi
5422        else
5423          # Otherwise we believe it is a complete path. Use it as it is.
5424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5425$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5427$as_echo_n "checking for BASENAME... " >&6; }
5428          if test ! -x "$tool_specified"; then
5429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5430$as_echo "not found" >&6; }
5431            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5432          fi
5433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5434$as_echo "$tool_specified" >&6; }
5435        fi
5436      fi
5437    fi
5438
5439  fi
5440
5441
5442
5443  if test "x$BASENAME" = x; then
5444    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5445  fi
5446
5447
5448
5449
5450
5451  # Publish this variable in the help.
5452
5453
5454  if [ -z "${BASH+x}" ]; then
5455    # The variable is not set by user, try to locate tool using the code snippet
5456    for ac_prog in bash
5457do
5458  # Extract the first word of "$ac_prog", so it can be a program name with args.
5459set dummy $ac_prog; ac_word=$2
5460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5461$as_echo_n "checking for $ac_word... " >&6; }
5462if ${ac_cv_path_BASH+:} false; then :
5463  $as_echo_n "(cached) " >&6
5464else
5465  case $BASH in
5466  [\\/]* | ?:[\\/]*)
5467  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5468  ;;
5469  *)
5470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471for as_dir in $PATH
5472do
5473  IFS=$as_save_IFS
5474  test -z "$as_dir" && as_dir=.
5475    for ac_exec_ext in '' $ac_executable_extensions; do
5476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5477    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5479    break 2
5480  fi
5481done
5482  done
5483IFS=$as_save_IFS
5484
5485  ;;
5486esac
5487fi
5488BASH=$ac_cv_path_BASH
5489if test -n "$BASH"; then
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5491$as_echo "$BASH" >&6; }
5492else
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5494$as_echo "no" >&6; }
5495fi
5496
5497
5498  test -n "$BASH" && break
5499done
5500
5501  else
5502    # The variable is set, but is it from the command line or the environment?
5503
5504    # Try to remove the string !BASH! from our list.
5505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5507      # If it failed, the variable was not from the command line. Ignore it,
5508      # but warn the user (except for BASH, which is always set by the calling BASH).
5509      if test "xBASH" != xBASH; then
5510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5511$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5512      fi
5513      # Try to locate tool using the code snippet
5514      for ac_prog in bash
5515do
5516  # Extract the first word of "$ac_prog", so it can be a program name with args.
5517set dummy $ac_prog; ac_word=$2
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519$as_echo_n "checking for $ac_word... " >&6; }
5520if ${ac_cv_path_BASH+:} false; then :
5521  $as_echo_n "(cached) " >&6
5522else
5523  case $BASH in
5524  [\\/]* | ?:[\\/]*)
5525  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5526  ;;
5527  *)
5528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5529for as_dir in $PATH
5530do
5531  IFS=$as_save_IFS
5532  test -z "$as_dir" && as_dir=.
5533    for ac_exec_ext in '' $ac_executable_extensions; do
5534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5535    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5537    break 2
5538  fi
5539done
5540  done
5541IFS=$as_save_IFS
5542
5543  ;;
5544esac
5545fi
5546BASH=$ac_cv_path_BASH
5547if test -n "$BASH"; then
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5549$as_echo "$BASH" >&6; }
5550else
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552$as_echo "no" >&6; }
5553fi
5554
5555
5556  test -n "$BASH" && break
5557done
5558
5559    else
5560      # If it succeeded, then it was overridden by the user. We will use it
5561      # for the tool.
5562
5563      # First remove it from the list of overridden variables, so we can test
5564      # for unknown variables in the end.
5565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5566
5567      # Check if we try to supply an empty value
5568      if test "x$BASH" = x; then
5569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5570$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5572$as_echo_n "checking for BASH... " >&6; }
5573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5574$as_echo "disabled" >&6; }
5575      else
5576        # Check if the provided tool contains a complete path.
5577        tool_specified="$BASH"
5578        tool_basename="${tool_specified##*/}"
5579        if test "x$tool_basename" = "x$tool_specified"; then
5580          # A command without a complete path is provided, search $PATH.
5581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5582$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5583          # Extract the first word of "$tool_basename", so it can be a program name with args.
5584set dummy $tool_basename; ac_word=$2
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586$as_echo_n "checking for $ac_word... " >&6; }
5587if ${ac_cv_path_BASH+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  case $BASH in
5591  [\\/]* | ?:[\\/]*)
5592  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5593  ;;
5594  *)
5595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596for as_dir in $PATH
5597do
5598  IFS=$as_save_IFS
5599  test -z "$as_dir" && as_dir=.
5600    for ac_exec_ext in '' $ac_executable_extensions; do
5601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604    break 2
5605  fi
5606done
5607  done
5608IFS=$as_save_IFS
5609
5610  ;;
5611esac
5612fi
5613BASH=$ac_cv_path_BASH
5614if test -n "$BASH"; then
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5616$as_echo "$BASH" >&6; }
5617else
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
5620fi
5621
5622
5623          if test "x$BASH" = x; then
5624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625          fi
5626        else
5627          # Otherwise we believe it is a complete path. Use it as it is.
5628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5629$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5631$as_echo_n "checking for BASH... " >&6; }
5632          if test ! -x "$tool_specified"; then
5633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634$as_echo "not found" >&6; }
5635            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5636          fi
5637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638$as_echo "$tool_specified" >&6; }
5639        fi
5640      fi
5641    fi
5642
5643  fi
5644
5645
5646
5647  if test "x$BASH" = x; then
5648    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5649  fi
5650
5651
5652
5653
5654
5655  # Publish this variable in the help.
5656
5657
5658  if [ -z "${CAT+x}" ]; then
5659    # The variable is not set by user, try to locate tool using the code snippet
5660    for ac_prog in cat
5661do
5662  # Extract the first word of "$ac_prog", so it can be a program name with args.
5663set dummy $ac_prog; ac_word=$2
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5665$as_echo_n "checking for $ac_word... " >&6; }
5666if ${ac_cv_path_CAT+:} false; then :
5667  $as_echo_n "(cached) " >&6
5668else
5669  case $CAT in
5670  [\\/]* | ?:[\\/]*)
5671  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5672  ;;
5673  *)
5674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677  IFS=$as_save_IFS
5678  test -z "$as_dir" && as_dir=.
5679    for ac_exec_ext in '' $ac_executable_extensions; do
5680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5683    break 2
5684  fi
5685done
5686  done
5687IFS=$as_save_IFS
5688
5689  ;;
5690esac
5691fi
5692CAT=$ac_cv_path_CAT
5693if test -n "$CAT"; then
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5695$as_echo "$CAT" >&6; }
5696else
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
5699fi
5700
5701
5702  test -n "$CAT" && break
5703done
5704
5705  else
5706    # The variable is set, but is it from the command line or the environment?
5707
5708    # Try to remove the string !CAT! from our list.
5709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5711      # If it failed, the variable was not from the command line. Ignore it,
5712      # but warn the user (except for BASH, which is always set by the calling BASH).
5713      if test "xCAT" != xBASH; then
5714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5715$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5716      fi
5717      # Try to locate tool using the code snippet
5718      for ac_prog in cat
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_CAT+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $CAT in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750CAT=$ac_cv_path_CAT
5751if test -n "$CAT"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5753$as_echo "$CAT" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$CAT" && break
5761done
5762
5763    else
5764      # If it succeeded, then it was overridden by the user. We will use it
5765      # for the tool.
5766
5767      # First remove it from the list of overridden variables, so we can test
5768      # for unknown variables in the end.
5769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5770
5771      # Check if we try to supply an empty value
5772      if test "x$CAT" = x; then
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5774$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5776$as_echo_n "checking for CAT... " >&6; }
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5778$as_echo "disabled" >&6; }
5779      else
5780        # Check if the provided tool contains a complete path.
5781        tool_specified="$CAT"
5782        tool_basename="${tool_specified##*/}"
5783        if test "x$tool_basename" = "x$tool_specified"; then
5784          # A command without a complete path is provided, search $PATH.
5785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5786$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5787          # Extract the first word of "$tool_basename", so it can be a program name with args.
5788set dummy $tool_basename; ac_word=$2
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
5791if ${ac_cv_path_CAT+:} false; then :
5792  $as_echo_n "(cached) " >&6
5793else
5794  case $CAT in
5795  [\\/]* | ?:[\\/]*)
5796  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5797  ;;
5798  *)
5799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5800for as_dir in $PATH
5801do
5802  IFS=$as_save_IFS
5803  test -z "$as_dir" && as_dir=.
5804    for ac_exec_ext in '' $ac_executable_extensions; do
5805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5806    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5808    break 2
5809  fi
5810done
5811  done
5812IFS=$as_save_IFS
5813
5814  ;;
5815esac
5816fi
5817CAT=$ac_cv_path_CAT
5818if test -n "$CAT"; then
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5820$as_echo "$CAT" >&6; }
5821else
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
5824fi
5825
5826
5827          if test "x$CAT" = x; then
5828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5829          fi
5830        else
5831          # Otherwise we believe it is a complete path. Use it as it is.
5832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5833$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5835$as_echo_n "checking for CAT... " >&6; }
5836          if test ! -x "$tool_specified"; then
5837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5838$as_echo "not found" >&6; }
5839            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5840          fi
5841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5842$as_echo "$tool_specified" >&6; }
5843        fi
5844      fi
5845    fi
5846
5847  fi
5848
5849
5850
5851  if test "x$CAT" = x; then
5852    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5853  fi
5854
5855
5856
5857
5858
5859  # Publish this variable in the help.
5860
5861
5862  if [ -z "${CHMOD+x}" ]; then
5863    # The variable is not set by user, try to locate tool using the code snippet
5864    for ac_prog in chmod
5865do
5866  # Extract the first word of "$ac_prog", so it can be a program name with args.
5867set dummy $ac_prog; ac_word=$2
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869$as_echo_n "checking for $ac_word... " >&6; }
5870if ${ac_cv_path_CHMOD+:} false; then :
5871  $as_echo_n "(cached) " >&6
5872else
5873  case $CHMOD in
5874  [\\/]* | ?:[\\/]*)
5875  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5876  ;;
5877  *)
5878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879for as_dir in $PATH
5880do
5881  IFS=$as_save_IFS
5882  test -z "$as_dir" && as_dir=.
5883    for ac_exec_ext in '' $ac_executable_extensions; do
5884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887    break 2
5888  fi
5889done
5890  done
5891IFS=$as_save_IFS
5892
5893  ;;
5894esac
5895fi
5896CHMOD=$ac_cv_path_CHMOD
5897if test -n "$CHMOD"; then
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5899$as_echo "$CHMOD" >&6; }
5900else
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
5903fi
5904
5905
5906  test -n "$CHMOD" && break
5907done
5908
5909  else
5910    # The variable is set, but is it from the command line or the environment?
5911
5912    # Try to remove the string !CHMOD! from our list.
5913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5915      # If it failed, the variable was not from the command line. Ignore it,
5916      # but warn the user (except for BASH, which is always set by the calling BASH).
5917      if test "xCHMOD" != xBASH; then
5918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5919$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5920      fi
5921      # Try to locate tool using the code snippet
5922      for ac_prog in chmod
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if ${ac_cv_path_CHMOD+:} false; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $CHMOD in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954CHMOD=$ac_cv_path_CHMOD
5955if test -n "$CHMOD"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5957$as_echo "$CHMOD" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$CHMOD" && break
5965done
5966
5967    else
5968      # If it succeeded, then it was overridden by the user. We will use it
5969      # for the tool.
5970
5971      # First remove it from the list of overridden variables, so we can test
5972      # for unknown variables in the end.
5973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5974
5975      # Check if we try to supply an empty value
5976      if test "x$CHMOD" = x; then
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5978$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5980$as_echo_n "checking for CHMOD... " >&6; }
5981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5982$as_echo "disabled" >&6; }
5983      else
5984        # Check if the provided tool contains a complete path.
5985        tool_specified="$CHMOD"
5986        tool_basename="${tool_specified##*/}"
5987        if test "x$tool_basename" = "x$tool_specified"; then
5988          # A command without a complete path is provided, search $PATH.
5989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5990$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5991          # Extract the first word of "$tool_basename", so it can be a program name with args.
5992set dummy $tool_basename; ac_word=$2
5993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994$as_echo_n "checking for $ac_word... " >&6; }
5995if ${ac_cv_path_CHMOD+:} false; then :
5996  $as_echo_n "(cached) " >&6
5997else
5998  case $CHMOD in
5999  [\\/]* | ?:[\\/]*)
6000  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6001  ;;
6002  *)
6003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6004for as_dir in $PATH
6005do
6006  IFS=$as_save_IFS
6007  test -z "$as_dir" && as_dir=.
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6010    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6012    break 2
6013  fi
6014done
6015  done
6016IFS=$as_save_IFS
6017
6018  ;;
6019esac
6020fi
6021CHMOD=$ac_cv_path_CHMOD
6022if test -n "$CHMOD"; then
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6024$as_echo "$CHMOD" >&6; }
6025else
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031          if test "x$CHMOD" = x; then
6032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6033          fi
6034        else
6035          # Otherwise we believe it is a complete path. Use it as it is.
6036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6037$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6039$as_echo_n "checking for CHMOD... " >&6; }
6040          if test ! -x "$tool_specified"; then
6041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6042$as_echo "not found" >&6; }
6043            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6044          fi
6045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6046$as_echo "$tool_specified" >&6; }
6047        fi
6048      fi
6049    fi
6050
6051  fi
6052
6053
6054
6055  if test "x$CHMOD" = x; then
6056    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6057  fi
6058
6059
6060
6061
6062
6063  # Publish this variable in the help.
6064
6065
6066  if [ -z "${CMP+x}" ]; then
6067    # The variable is not set by user, try to locate tool using the code snippet
6068    for ac_prog in cmp
6069do
6070  # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_path_CMP+:} false; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  case $CMP in
6078  [\\/]* | ?:[\\/]*)
6079  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6080  ;;
6081  *)
6082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6083for as_dir in $PATH
6084do
6085  IFS=$as_save_IFS
6086  test -z "$as_dir" && as_dir=.
6087    for ac_exec_ext in '' $ac_executable_extensions; do
6088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6089    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6091    break 2
6092  fi
6093done
6094  done
6095IFS=$as_save_IFS
6096
6097  ;;
6098esac
6099fi
6100CMP=$ac_cv_path_CMP
6101if test -n "$CMP"; then
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6103$as_echo "$CMP" >&6; }
6104else
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6106$as_echo "no" >&6; }
6107fi
6108
6109
6110  test -n "$CMP" && break
6111done
6112
6113  else
6114    # The variable is set, but is it from the command line or the environment?
6115
6116    # Try to remove the string !CMP! from our list.
6117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6119      # If it failed, the variable was not from the command line. Ignore it,
6120      # but warn the user (except for BASH, which is always set by the calling BASH).
6121      if test "xCMP" != xBASH; then
6122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6123$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6124      fi
6125      # Try to locate tool using the code snippet
6126      for ac_prog in cmp
6127do
6128  # Extract the first word of "$ac_prog", so it can be a program name with args.
6129set dummy $ac_prog; ac_word=$2
6130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131$as_echo_n "checking for $ac_word... " >&6; }
6132if ${ac_cv_path_CMP+:} false; then :
6133  $as_echo_n "(cached) " >&6
6134else
6135  case $CMP in
6136  [\\/]* | ?:[\\/]*)
6137  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6138  ;;
6139  *)
6140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141for as_dir in $PATH
6142do
6143  IFS=$as_save_IFS
6144  test -z "$as_dir" && as_dir=.
6145    for ac_exec_ext in '' $ac_executable_extensions; do
6146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149    break 2
6150  fi
6151done
6152  done
6153IFS=$as_save_IFS
6154
6155  ;;
6156esac
6157fi
6158CMP=$ac_cv_path_CMP
6159if test -n "$CMP"; then
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6161$as_echo "$CMP" >&6; }
6162else
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164$as_echo "no" >&6; }
6165fi
6166
6167
6168  test -n "$CMP" && break
6169done
6170
6171    else
6172      # If it succeeded, then it was overridden by the user. We will use it
6173      # for the tool.
6174
6175      # First remove it from the list of overridden variables, so we can test
6176      # for unknown variables in the end.
6177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6178
6179      # Check if we try to supply an empty value
6180      if test "x$CMP" = x; then
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6182$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6184$as_echo_n "checking for CMP... " >&6; }
6185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6186$as_echo "disabled" >&6; }
6187      else
6188        # Check if the provided tool contains a complete path.
6189        tool_specified="$CMP"
6190        tool_basename="${tool_specified##*/}"
6191        if test "x$tool_basename" = "x$tool_specified"; then
6192          # A command without a complete path is provided, search $PATH.
6193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6194$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6195          # Extract the first word of "$tool_basename", so it can be a program name with args.
6196set dummy $tool_basename; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_path_CMP+:} false; then :
6200  $as_echo_n "(cached) " >&6
6201else
6202  case $CMP in
6203  [\\/]* | ?:[\\/]*)
6204  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6205  ;;
6206  *)
6207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208for as_dir in $PATH
6209do
6210  IFS=$as_save_IFS
6211  test -z "$as_dir" && as_dir=.
6212    for ac_exec_ext in '' $ac_executable_extensions; do
6213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216    break 2
6217  fi
6218done
6219  done
6220IFS=$as_save_IFS
6221
6222  ;;
6223esac
6224fi
6225CMP=$ac_cv_path_CMP
6226if test -n "$CMP"; then
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6228$as_echo "$CMP" >&6; }
6229else
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231$as_echo "no" >&6; }
6232fi
6233
6234
6235          if test "x$CMP" = x; then
6236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6237          fi
6238        else
6239          # Otherwise we believe it is a complete path. Use it as it is.
6240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6241$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6243$as_echo_n "checking for CMP... " >&6; }
6244          if test ! -x "$tool_specified"; then
6245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6246$as_echo "not found" >&6; }
6247            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6248          fi
6249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6250$as_echo "$tool_specified" >&6; }
6251        fi
6252      fi
6253    fi
6254
6255  fi
6256
6257
6258
6259  if test "x$CMP" = x; then
6260    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6261  fi
6262
6263
6264
6265
6266
6267  # Publish this variable in the help.
6268
6269
6270  if [ -z "${COMM+x}" ]; then
6271    # The variable is not set by user, try to locate tool using the code snippet
6272    for ac_prog in comm
6273do
6274  # Extract the first word of "$ac_prog", so it can be a program name with args.
6275set dummy $ac_prog; ac_word=$2
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if ${ac_cv_path_COMM+:} false; then :
6279  $as_echo_n "(cached) " >&6
6280else
6281  case $COMM in
6282  [\\/]* | ?:[\\/]*)
6283  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6284  ;;
6285  *)
6286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289  IFS=$as_save_IFS
6290  test -z "$as_dir" && as_dir=.
6291    for ac_exec_ext in '' $ac_executable_extensions; do
6292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295    break 2
6296  fi
6297done
6298  done
6299IFS=$as_save_IFS
6300
6301  ;;
6302esac
6303fi
6304COMM=$ac_cv_path_COMM
6305if test -n "$COMM"; then
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6307$as_echo "$COMM" >&6; }
6308else
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313
6314  test -n "$COMM" && break
6315done
6316
6317  else
6318    # The variable is set, but is it from the command line or the environment?
6319
6320    # Try to remove the string !COMM! from our list.
6321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6323      # If it failed, the variable was not from the command line. Ignore it,
6324      # but warn the user (except for BASH, which is always set by the calling BASH).
6325      if test "xCOMM" != xBASH; then
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6327$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6328      fi
6329      # Try to locate tool using the code snippet
6330      for ac_prog in comm
6331do
6332  # Extract the first word of "$ac_prog", so it can be a program name with args.
6333set dummy $ac_prog; ac_word=$2
6334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6335$as_echo_n "checking for $ac_word... " >&6; }
6336if ${ac_cv_path_COMM+:} false; then :
6337  $as_echo_n "(cached) " >&6
6338else
6339  case $COMM in
6340  [\\/]* | ?:[\\/]*)
6341  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6342  ;;
6343  *)
6344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6345for as_dir in $PATH
6346do
6347  IFS=$as_save_IFS
6348  test -z "$as_dir" && as_dir=.
6349    for ac_exec_ext in '' $ac_executable_extensions; do
6350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6351    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6353    break 2
6354  fi
6355done
6356  done
6357IFS=$as_save_IFS
6358
6359  ;;
6360esac
6361fi
6362COMM=$ac_cv_path_COMM
6363if test -n "$COMM"; then
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6365$as_echo "$COMM" >&6; }
6366else
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368$as_echo "no" >&6; }
6369fi
6370
6371
6372  test -n "$COMM" && break
6373done
6374
6375    else
6376      # If it succeeded, then it was overridden by the user. We will use it
6377      # for the tool.
6378
6379      # First remove it from the list of overridden variables, so we can test
6380      # for unknown variables in the end.
6381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6382
6383      # Check if we try to supply an empty value
6384      if test "x$COMM" = x; then
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6386$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6388$as_echo_n "checking for COMM... " >&6; }
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6390$as_echo "disabled" >&6; }
6391      else
6392        # Check if the provided tool contains a complete path.
6393        tool_specified="$COMM"
6394        tool_basename="${tool_specified##*/}"
6395        if test "x$tool_basename" = "x$tool_specified"; then
6396          # A command without a complete path is provided, search $PATH.
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6398$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6399          # Extract the first word of "$tool_basename", so it can be a program name with args.
6400set dummy $tool_basename; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if ${ac_cv_path_COMM+:} false; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $COMM in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429COMM=$ac_cv_path_COMM
6430if test -n "$COMM"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6432$as_echo "$COMM" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439          if test "x$COMM" = x; then
6440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6441          fi
6442        else
6443          # Otherwise we believe it is a complete path. Use it as it is.
6444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6445$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6447$as_echo_n "checking for COMM... " >&6; }
6448          if test ! -x "$tool_specified"; then
6449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6450$as_echo "not found" >&6; }
6451            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6452          fi
6453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6454$as_echo "$tool_specified" >&6; }
6455        fi
6456      fi
6457    fi
6458
6459  fi
6460
6461
6462
6463  if test "x$COMM" = x; then
6464    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6465  fi
6466
6467
6468
6469
6470
6471  # Publish this variable in the help.
6472
6473
6474  if [ -z "${CP+x}" ]; then
6475    # The variable is not set by user, try to locate tool using the code snippet
6476    for ac_prog in cp
6477do
6478  # Extract the first word of "$ac_prog", so it can be a program name with args.
6479set dummy $ac_prog; ac_word=$2
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481$as_echo_n "checking for $ac_word... " >&6; }
6482if ${ac_cv_path_CP+:} false; then :
6483  $as_echo_n "(cached) " >&6
6484else
6485  case $CP in
6486  [\\/]* | ?:[\\/]*)
6487  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6488  ;;
6489  *)
6490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493  IFS=$as_save_IFS
6494  test -z "$as_dir" && as_dir=.
6495    for ac_exec_ext in '' $ac_executable_extensions; do
6496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6497    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499    break 2
6500  fi
6501done
6502  done
6503IFS=$as_save_IFS
6504
6505  ;;
6506esac
6507fi
6508CP=$ac_cv_path_CP
6509if test -n "$CP"; then
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6511$as_echo "$CP" >&6; }
6512else
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517
6518  test -n "$CP" && break
6519done
6520
6521  else
6522    # The variable is set, but is it from the command line or the environment?
6523
6524    # Try to remove the string !CP! from our list.
6525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6527      # If it failed, the variable was not from the command line. Ignore it,
6528      # but warn the user (except for BASH, which is always set by the calling BASH).
6529      if test "xCP" != xBASH; then
6530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6531$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6532      fi
6533      # Try to locate tool using the code snippet
6534      for ac_prog in cp
6535do
6536  # Extract the first word of "$ac_prog", so it can be a program name with args.
6537set dummy $ac_prog; ac_word=$2
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6539$as_echo_n "checking for $ac_word... " >&6; }
6540if ${ac_cv_path_CP+:} false; then :
6541  $as_echo_n "(cached) " >&6
6542else
6543  case $CP in
6544  [\\/]* | ?:[\\/]*)
6545  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6546  ;;
6547  *)
6548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549for as_dir in $PATH
6550do
6551  IFS=$as_save_IFS
6552  test -z "$as_dir" && as_dir=.
6553    for ac_exec_ext in '' $ac_executable_extensions; do
6554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6555    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557    break 2
6558  fi
6559done
6560  done
6561IFS=$as_save_IFS
6562
6563  ;;
6564esac
6565fi
6566CP=$ac_cv_path_CP
6567if test -n "$CP"; then
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6569$as_echo "$CP" >&6; }
6570else
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572$as_echo "no" >&6; }
6573fi
6574
6575
6576  test -n "$CP" && break
6577done
6578
6579    else
6580      # If it succeeded, then it was overridden by the user. We will use it
6581      # for the tool.
6582
6583      # First remove it from the list of overridden variables, so we can test
6584      # for unknown variables in the end.
6585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6586
6587      # Check if we try to supply an empty value
6588      if test "x$CP" = x; then
6589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6590$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6592$as_echo_n "checking for CP... " >&6; }
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6594$as_echo "disabled" >&6; }
6595      else
6596        # Check if the provided tool contains a complete path.
6597        tool_specified="$CP"
6598        tool_basename="${tool_specified##*/}"
6599        if test "x$tool_basename" = "x$tool_specified"; then
6600          # A command without a complete path is provided, search $PATH.
6601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6602$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6603          # Extract the first word of "$tool_basename", so it can be a program name with args.
6604set dummy $tool_basename; ac_word=$2
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_path_CP+:} false; then :
6608  $as_echo_n "(cached) " >&6
6609else
6610  case $CP in
6611  [\\/]* | ?:[\\/]*)
6612  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6613  ;;
6614  *)
6615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6616for as_dir in $PATH
6617do
6618  IFS=$as_save_IFS
6619  test -z "$as_dir" && as_dir=.
6620    for ac_exec_ext in '' $ac_executable_extensions; do
6621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6622    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6624    break 2
6625  fi
6626done
6627  done
6628IFS=$as_save_IFS
6629
6630  ;;
6631esac
6632fi
6633CP=$ac_cv_path_CP
6634if test -n "$CP"; then
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6636$as_echo "$CP" >&6; }
6637else
6638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6639$as_echo "no" >&6; }
6640fi
6641
6642
6643          if test "x$CP" = x; then
6644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6645          fi
6646        else
6647          # Otherwise we believe it is a complete path. Use it as it is.
6648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6649$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6651$as_echo_n "checking for CP... " >&6; }
6652          if test ! -x "$tool_specified"; then
6653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6654$as_echo "not found" >&6; }
6655            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6656          fi
6657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6658$as_echo "$tool_specified" >&6; }
6659        fi
6660      fi
6661    fi
6662
6663  fi
6664
6665
6666
6667  if test "x$CP" = x; then
6668    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6669  fi
6670
6671
6672
6673
6674
6675  # Publish this variable in the help.
6676
6677
6678  if [ -z "${CUT+x}" ]; then
6679    # The variable is not set by user, try to locate tool using the code snippet
6680    for ac_prog in cut
6681do
6682  # Extract the first word of "$ac_prog", so it can be a program name with args.
6683set dummy $ac_prog; ac_word=$2
6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6685$as_echo_n "checking for $ac_word... " >&6; }
6686if ${ac_cv_path_CUT+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689  case $CUT in
6690  [\\/]* | ?:[\\/]*)
6691  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6692  ;;
6693  *)
6694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6695for as_dir in $PATH
6696do
6697  IFS=$as_save_IFS
6698  test -z "$as_dir" && as_dir=.
6699    for ac_exec_ext in '' $ac_executable_extensions; do
6700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6701    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6703    break 2
6704  fi
6705done
6706  done
6707IFS=$as_save_IFS
6708
6709  ;;
6710esac
6711fi
6712CUT=$ac_cv_path_CUT
6713if test -n "$CUT"; then
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6715$as_echo "$CUT" >&6; }
6716else
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6718$as_echo "no" >&6; }
6719fi
6720
6721
6722  test -n "$CUT" && break
6723done
6724
6725  else
6726    # The variable is set, but is it from the command line or the environment?
6727
6728    # Try to remove the string !CUT! from our list.
6729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6731      # If it failed, the variable was not from the command line. Ignore it,
6732      # but warn the user (except for BASH, which is always set by the calling BASH).
6733      if test "xCUT" != xBASH; then
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6735$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6736      fi
6737      # Try to locate tool using the code snippet
6738      for ac_prog in cut
6739do
6740  # Extract the first word of "$ac_prog", so it can be a program name with args.
6741set dummy $ac_prog; ac_word=$2
6742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6743$as_echo_n "checking for $ac_word... " >&6; }
6744if ${ac_cv_path_CUT+:} false; then :
6745  $as_echo_n "(cached) " >&6
6746else
6747  case $CUT in
6748  [\\/]* | ?:[\\/]*)
6749  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6750  ;;
6751  *)
6752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6753for as_dir in $PATH
6754do
6755  IFS=$as_save_IFS
6756  test -z "$as_dir" && as_dir=.
6757    for ac_exec_ext in '' $ac_executable_extensions; do
6758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6759    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6761    break 2
6762  fi
6763done
6764  done
6765IFS=$as_save_IFS
6766
6767  ;;
6768esac
6769fi
6770CUT=$ac_cv_path_CUT
6771if test -n "$CUT"; then
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6773$as_echo "$CUT" >&6; }
6774else
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6776$as_echo "no" >&6; }
6777fi
6778
6779
6780  test -n "$CUT" && break
6781done
6782
6783    else
6784      # If it succeeded, then it was overridden by the user. We will use it
6785      # for the tool.
6786
6787      # First remove it from the list of overridden variables, so we can test
6788      # for unknown variables in the end.
6789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6790
6791      # Check if we try to supply an empty value
6792      if test "x$CUT" = x; then
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6794$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6796$as_echo_n "checking for CUT... " >&6; }
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6798$as_echo "disabled" >&6; }
6799      else
6800        # Check if the provided tool contains a complete path.
6801        tool_specified="$CUT"
6802        tool_basename="${tool_specified##*/}"
6803        if test "x$tool_basename" = "x$tool_specified"; then
6804          # A command without a complete path is provided, search $PATH.
6805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6806$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6807          # Extract the first word of "$tool_basename", so it can be a program name with args.
6808set dummy $tool_basename; ac_word=$2
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6810$as_echo_n "checking for $ac_word... " >&6; }
6811if ${ac_cv_path_CUT+:} false; then :
6812  $as_echo_n "(cached) " >&6
6813else
6814  case $CUT in
6815  [\\/]* | ?:[\\/]*)
6816  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6817  ;;
6818  *)
6819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820for as_dir in $PATH
6821do
6822  IFS=$as_save_IFS
6823  test -z "$as_dir" && as_dir=.
6824    for ac_exec_ext in '' $ac_executable_extensions; do
6825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6826    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6828    break 2
6829  fi
6830done
6831  done
6832IFS=$as_save_IFS
6833
6834  ;;
6835esac
6836fi
6837CUT=$ac_cv_path_CUT
6838if test -n "$CUT"; then
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6840$as_echo "$CUT" >&6; }
6841else
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843$as_echo "no" >&6; }
6844fi
6845
6846
6847          if test "x$CUT" = x; then
6848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6849          fi
6850        else
6851          # Otherwise we believe it is a complete path. Use it as it is.
6852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6853$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6855$as_echo_n "checking for CUT... " >&6; }
6856          if test ! -x "$tool_specified"; then
6857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6858$as_echo "not found" >&6; }
6859            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6860          fi
6861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6862$as_echo "$tool_specified" >&6; }
6863        fi
6864      fi
6865    fi
6866
6867  fi
6868
6869
6870
6871  if test "x$CUT" = x; then
6872    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6873  fi
6874
6875
6876
6877
6878
6879  # Publish this variable in the help.
6880
6881
6882  if [ -z "${DATE+x}" ]; then
6883    # The variable is not set by user, try to locate tool using the code snippet
6884    for ac_prog in date
6885do
6886  # Extract the first word of "$ac_prog", so it can be a program name with args.
6887set dummy $ac_prog; ac_word=$2
6888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6889$as_echo_n "checking for $ac_word... " >&6; }
6890if ${ac_cv_path_DATE+:} false; then :
6891  $as_echo_n "(cached) " >&6
6892else
6893  case $DATE in
6894  [\\/]* | ?:[\\/]*)
6895  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6896  ;;
6897  *)
6898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6899for as_dir in $PATH
6900do
6901  IFS=$as_save_IFS
6902  test -z "$as_dir" && as_dir=.
6903    for ac_exec_ext in '' $ac_executable_extensions; do
6904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6905    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6907    break 2
6908  fi
6909done
6910  done
6911IFS=$as_save_IFS
6912
6913  ;;
6914esac
6915fi
6916DATE=$ac_cv_path_DATE
6917if test -n "$DATE"; then
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6919$as_echo "$DATE" >&6; }
6920else
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922$as_echo "no" >&6; }
6923fi
6924
6925
6926  test -n "$DATE" && break
6927done
6928
6929  else
6930    # The variable is set, but is it from the command line or the environment?
6931
6932    # Try to remove the string !DATE! from our list.
6933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6935      # If it failed, the variable was not from the command line. Ignore it,
6936      # but warn the user (except for BASH, which is always set by the calling BASH).
6937      if test "xDATE" != xBASH; then
6938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6939$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6940      fi
6941      # Try to locate tool using the code snippet
6942      for ac_prog in date
6943do
6944  # Extract the first word of "$ac_prog", so it can be a program name with args.
6945set dummy $ac_prog; ac_word=$2
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6947$as_echo_n "checking for $ac_word... " >&6; }
6948if ${ac_cv_path_DATE+:} false; then :
6949  $as_echo_n "(cached) " >&6
6950else
6951  case $DATE in
6952  [\\/]* | ?:[\\/]*)
6953  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6954  ;;
6955  *)
6956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6957for as_dir in $PATH
6958do
6959  IFS=$as_save_IFS
6960  test -z "$as_dir" && as_dir=.
6961    for ac_exec_ext in '' $ac_executable_extensions; do
6962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6963    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6965    break 2
6966  fi
6967done
6968  done
6969IFS=$as_save_IFS
6970
6971  ;;
6972esac
6973fi
6974DATE=$ac_cv_path_DATE
6975if test -n "$DATE"; then
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6977$as_echo "$DATE" >&6; }
6978else
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980$as_echo "no" >&6; }
6981fi
6982
6983
6984  test -n "$DATE" && break
6985done
6986
6987    else
6988      # If it succeeded, then it was overridden by the user. We will use it
6989      # for the tool.
6990
6991      # First remove it from the list of overridden variables, so we can test
6992      # for unknown variables in the end.
6993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6994
6995      # Check if we try to supply an empty value
6996      if test "x$DATE" = x; then
6997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6998$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7000$as_echo_n "checking for DATE... " >&6; }
7001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7002$as_echo "disabled" >&6; }
7003      else
7004        # Check if the provided tool contains a complete path.
7005        tool_specified="$DATE"
7006        tool_basename="${tool_specified##*/}"
7007        if test "x$tool_basename" = "x$tool_specified"; then
7008          # A command without a complete path is provided, search $PATH.
7009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7010$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7011          # Extract the first word of "$tool_basename", so it can be a program name with args.
7012set dummy $tool_basename; ac_word=$2
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014$as_echo_n "checking for $ac_word... " >&6; }
7015if ${ac_cv_path_DATE+:} false; then :
7016  $as_echo_n "(cached) " >&6
7017else
7018  case $DATE in
7019  [\\/]* | ?:[\\/]*)
7020  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7021  ;;
7022  *)
7023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026  IFS=$as_save_IFS
7027  test -z "$as_dir" && as_dir=.
7028    for ac_exec_ext in '' $ac_executable_extensions; do
7029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032    break 2
7033  fi
7034done
7035  done
7036IFS=$as_save_IFS
7037
7038  ;;
7039esac
7040fi
7041DATE=$ac_cv_path_DATE
7042if test -n "$DATE"; then
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7044$as_echo "$DATE" >&6; }
7045else
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047$as_echo "no" >&6; }
7048fi
7049
7050
7051          if test "x$DATE" = x; then
7052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7053          fi
7054        else
7055          # Otherwise we believe it is a complete path. Use it as it is.
7056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7057$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7059$as_echo_n "checking for DATE... " >&6; }
7060          if test ! -x "$tool_specified"; then
7061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7062$as_echo "not found" >&6; }
7063            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7064          fi
7065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7066$as_echo "$tool_specified" >&6; }
7067        fi
7068      fi
7069    fi
7070
7071  fi
7072
7073
7074
7075  if test "x$DATE" = x; then
7076    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7077  fi
7078
7079
7080
7081
7082
7083  # Publish this variable in the help.
7084
7085
7086  if [ -z "${DIFF+x}" ]; then
7087    # The variable is not set by user, try to locate tool using the code snippet
7088    for ac_prog in gdiff diff
7089do
7090  # Extract the first word of "$ac_prog", so it can be a program name with args.
7091set dummy $ac_prog; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
7094if ${ac_cv_path_DIFF+:} false; then :
7095  $as_echo_n "(cached) " >&6
7096else
7097  case $DIFF in
7098  [\\/]* | ?:[\\/]*)
7099  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7100  ;;
7101  *)
7102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in $PATH
7104do
7105  IFS=$as_save_IFS
7106  test -z "$as_dir" && as_dir=.
7107    for ac_exec_ext in '' $ac_executable_extensions; do
7108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111    break 2
7112  fi
7113done
7114  done
7115IFS=$as_save_IFS
7116
7117  ;;
7118esac
7119fi
7120DIFF=$ac_cv_path_DIFF
7121if test -n "$DIFF"; then
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7123$as_echo "$DIFF" >&6; }
7124else
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130  test -n "$DIFF" && break
7131done
7132
7133  else
7134    # The variable is set, but is it from the command line or the environment?
7135
7136    # Try to remove the string !DIFF! from our list.
7137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7139      # If it failed, the variable was not from the command line. Ignore it,
7140      # but warn the user (except for BASH, which is always set by the calling BASH).
7141      if test "xDIFF" != xBASH; then
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7143$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7144      fi
7145      # Try to locate tool using the code snippet
7146      for ac_prog in gdiff diff
7147do
7148  # Extract the first word of "$ac_prog", so it can be a program name with args.
7149set dummy $ac_prog; ac_word=$2
7150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151$as_echo_n "checking for $ac_word... " >&6; }
7152if ${ac_cv_path_DIFF+:} false; then :
7153  $as_echo_n "(cached) " >&6
7154else
7155  case $DIFF in
7156  [\\/]* | ?:[\\/]*)
7157  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7158  ;;
7159  *)
7160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161for as_dir in $PATH
7162do
7163  IFS=$as_save_IFS
7164  test -z "$as_dir" && as_dir=.
7165    for ac_exec_ext in '' $ac_executable_extensions; do
7166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7167    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169    break 2
7170  fi
7171done
7172  done
7173IFS=$as_save_IFS
7174
7175  ;;
7176esac
7177fi
7178DIFF=$ac_cv_path_DIFF
7179if test -n "$DIFF"; then
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7181$as_echo "$DIFF" >&6; }
7182else
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
7185fi
7186
7187
7188  test -n "$DIFF" && break
7189done
7190
7191    else
7192      # If it succeeded, then it was overridden by the user. We will use it
7193      # for the tool.
7194
7195      # First remove it from the list of overridden variables, so we can test
7196      # for unknown variables in the end.
7197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7198
7199      # Check if we try to supply an empty value
7200      if test "x$DIFF" = x; then
7201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7202$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7204$as_echo_n "checking for DIFF... " >&6; }
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7206$as_echo "disabled" >&6; }
7207      else
7208        # Check if the provided tool contains a complete path.
7209        tool_specified="$DIFF"
7210        tool_basename="${tool_specified##*/}"
7211        if test "x$tool_basename" = "x$tool_specified"; then
7212          # A command without a complete path is provided, search $PATH.
7213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7214$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7215          # Extract the first word of "$tool_basename", so it can be a program name with args.
7216set dummy $tool_basename; ac_word=$2
7217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7218$as_echo_n "checking for $ac_word... " >&6; }
7219if ${ac_cv_path_DIFF+:} false; then :
7220  $as_echo_n "(cached) " >&6
7221else
7222  case $DIFF in
7223  [\\/]* | ?:[\\/]*)
7224  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7225  ;;
7226  *)
7227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7228for as_dir in $PATH
7229do
7230  IFS=$as_save_IFS
7231  test -z "$as_dir" && as_dir=.
7232    for ac_exec_ext in '' $ac_executable_extensions; do
7233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7234    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7236    break 2
7237  fi
7238done
7239  done
7240IFS=$as_save_IFS
7241
7242  ;;
7243esac
7244fi
7245DIFF=$ac_cv_path_DIFF
7246if test -n "$DIFF"; then
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7248$as_echo "$DIFF" >&6; }
7249else
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7251$as_echo "no" >&6; }
7252fi
7253
7254
7255          if test "x$DIFF" = x; then
7256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7257          fi
7258        else
7259          # Otherwise we believe it is a complete path. Use it as it is.
7260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7261$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7263$as_echo_n "checking for DIFF... " >&6; }
7264          if test ! -x "$tool_specified"; then
7265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7266$as_echo "not found" >&6; }
7267            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7268          fi
7269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7270$as_echo "$tool_specified" >&6; }
7271        fi
7272      fi
7273    fi
7274
7275  fi
7276
7277
7278
7279  if test "x$DIFF" = x; then
7280    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7281  fi
7282
7283
7284
7285
7286
7287  # Publish this variable in the help.
7288
7289
7290  if [ -z "${DIRNAME+x}" ]; then
7291    # The variable is not set by user, try to locate tool using the code snippet
7292    for ac_prog in dirname
7293do
7294  # Extract the first word of "$ac_prog", so it can be a program name with args.
7295set dummy $ac_prog; ac_word=$2
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7297$as_echo_n "checking for $ac_word... " >&6; }
7298if ${ac_cv_path_DIRNAME+:} false; then :
7299  $as_echo_n "(cached) " >&6
7300else
7301  case $DIRNAME in
7302  [\\/]* | ?:[\\/]*)
7303  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7304  ;;
7305  *)
7306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7307for as_dir in $PATH
7308do
7309  IFS=$as_save_IFS
7310  test -z "$as_dir" && as_dir=.
7311    for ac_exec_ext in '' $ac_executable_extensions; do
7312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7313    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7315    break 2
7316  fi
7317done
7318  done
7319IFS=$as_save_IFS
7320
7321  ;;
7322esac
7323fi
7324DIRNAME=$ac_cv_path_DIRNAME
7325if test -n "$DIRNAME"; then
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7327$as_echo "$DIRNAME" >&6; }
7328else
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7330$as_echo "no" >&6; }
7331fi
7332
7333
7334  test -n "$DIRNAME" && break
7335done
7336
7337  else
7338    # The variable is set, but is it from the command line or the environment?
7339
7340    # Try to remove the string !DIRNAME! from our list.
7341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7343      # If it failed, the variable was not from the command line. Ignore it,
7344      # but warn the user (except for BASH, which is always set by the calling BASH).
7345      if test "xDIRNAME" != xBASH; then
7346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7347$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7348      fi
7349      # Try to locate tool using the code snippet
7350      for ac_prog in dirname
7351do
7352  # Extract the first word of "$ac_prog", so it can be a program name with args.
7353set dummy $ac_prog; ac_word=$2
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355$as_echo_n "checking for $ac_word... " >&6; }
7356if ${ac_cv_path_DIRNAME+:} false; then :
7357  $as_echo_n "(cached) " >&6
7358else
7359  case $DIRNAME in
7360  [\\/]* | ?:[\\/]*)
7361  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7362  ;;
7363  *)
7364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365for as_dir in $PATH
7366do
7367  IFS=$as_save_IFS
7368  test -z "$as_dir" && as_dir=.
7369    for ac_exec_ext in '' $ac_executable_extensions; do
7370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373    break 2
7374  fi
7375done
7376  done
7377IFS=$as_save_IFS
7378
7379  ;;
7380esac
7381fi
7382DIRNAME=$ac_cv_path_DIRNAME
7383if test -n "$DIRNAME"; then
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7385$as_echo "$DIRNAME" >&6; }
7386else
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
7389fi
7390
7391
7392  test -n "$DIRNAME" && break
7393done
7394
7395    else
7396      # If it succeeded, then it was overridden by the user. We will use it
7397      # for the tool.
7398
7399      # First remove it from the list of overridden variables, so we can test
7400      # for unknown variables in the end.
7401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7402
7403      # Check if we try to supply an empty value
7404      if test "x$DIRNAME" = x; then
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7406$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7408$as_echo_n "checking for DIRNAME... " >&6; }
7409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7410$as_echo "disabled" >&6; }
7411      else
7412        # Check if the provided tool contains a complete path.
7413        tool_specified="$DIRNAME"
7414        tool_basename="${tool_specified##*/}"
7415        if test "x$tool_basename" = "x$tool_specified"; then
7416          # A command without a complete path is provided, search $PATH.
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7418$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7419          # Extract the first word of "$tool_basename", so it can be a program name with args.
7420set dummy $tool_basename; ac_word=$2
7421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7422$as_echo_n "checking for $ac_word... " >&6; }
7423if ${ac_cv_path_DIRNAME+:} false; then :
7424  $as_echo_n "(cached) " >&6
7425else
7426  case $DIRNAME in
7427  [\\/]* | ?:[\\/]*)
7428  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7429  ;;
7430  *)
7431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7432for as_dir in $PATH
7433do
7434  IFS=$as_save_IFS
7435  test -z "$as_dir" && as_dir=.
7436    for ac_exec_ext in '' $ac_executable_extensions; do
7437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7438    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7440    break 2
7441  fi
7442done
7443  done
7444IFS=$as_save_IFS
7445
7446  ;;
7447esac
7448fi
7449DIRNAME=$ac_cv_path_DIRNAME
7450if test -n "$DIRNAME"; then
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7452$as_echo "$DIRNAME" >&6; }
7453else
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7455$as_echo "no" >&6; }
7456fi
7457
7458
7459          if test "x$DIRNAME" = x; then
7460            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7461          fi
7462        else
7463          # Otherwise we believe it is a complete path. Use it as it is.
7464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7465$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7466          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7467$as_echo_n "checking for DIRNAME... " >&6; }
7468          if test ! -x "$tool_specified"; then
7469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7470$as_echo "not found" >&6; }
7471            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7472          fi
7473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7474$as_echo "$tool_specified" >&6; }
7475        fi
7476      fi
7477    fi
7478
7479  fi
7480
7481
7482
7483  if test "x$DIRNAME" = x; then
7484    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7485  fi
7486
7487
7488
7489
7490
7491  # Publish this variable in the help.
7492
7493
7494  if [ -z "${ECHO+x}" ]; then
7495    # The variable is not set by user, try to locate tool using the code snippet
7496    for ac_prog in echo
7497do
7498  # Extract the first word of "$ac_prog", so it can be a program name with args.
7499set dummy $ac_prog; ac_word=$2
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501$as_echo_n "checking for $ac_word... " >&6; }
7502if ${ac_cv_path_ECHO+:} false; then :
7503  $as_echo_n "(cached) " >&6
7504else
7505  case $ECHO in
7506  [\\/]* | ?:[\\/]*)
7507  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7508  ;;
7509  *)
7510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513  IFS=$as_save_IFS
7514  test -z "$as_dir" && as_dir=.
7515    for ac_exec_ext in '' $ac_executable_extensions; do
7516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7517    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519    break 2
7520  fi
7521done
7522  done
7523IFS=$as_save_IFS
7524
7525  ;;
7526esac
7527fi
7528ECHO=$ac_cv_path_ECHO
7529if test -n "$ECHO"; then
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7531$as_echo "$ECHO" >&6; }
7532else
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
7536
7537
7538  test -n "$ECHO" && break
7539done
7540
7541  else
7542    # The variable is set, but is it from the command line or the environment?
7543
7544    # Try to remove the string !ECHO! from our list.
7545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7547      # If it failed, the variable was not from the command line. Ignore it,
7548      # but warn the user (except for BASH, which is always set by the calling BASH).
7549      if test "xECHO" != xBASH; then
7550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7551$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7552      fi
7553      # Try to locate tool using the code snippet
7554      for ac_prog in echo
7555do
7556  # Extract the first word of "$ac_prog", so it can be a program name with args.
7557set dummy $ac_prog; ac_word=$2
7558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559$as_echo_n "checking for $ac_word... " >&6; }
7560if ${ac_cv_path_ECHO+:} false; then :
7561  $as_echo_n "(cached) " >&6
7562else
7563  case $ECHO in
7564  [\\/]* | ?:[\\/]*)
7565  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7566  ;;
7567  *)
7568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7569for as_dir in $PATH
7570do
7571  IFS=$as_save_IFS
7572  test -z "$as_dir" && as_dir=.
7573    for ac_exec_ext in '' $ac_executable_extensions; do
7574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7575    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7577    break 2
7578  fi
7579done
7580  done
7581IFS=$as_save_IFS
7582
7583  ;;
7584esac
7585fi
7586ECHO=$ac_cv_path_ECHO
7587if test -n "$ECHO"; then
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7589$as_echo "$ECHO" >&6; }
7590else
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7592$as_echo "no" >&6; }
7593fi
7594
7595
7596  test -n "$ECHO" && break
7597done
7598
7599    else
7600      # If it succeeded, then it was overridden by the user. We will use it
7601      # for the tool.
7602
7603      # First remove it from the list of overridden variables, so we can test
7604      # for unknown variables in the end.
7605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7606
7607      # Check if we try to supply an empty value
7608      if test "x$ECHO" = x; then
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7610$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7612$as_echo_n "checking for ECHO... " >&6; }
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7614$as_echo "disabled" >&6; }
7615      else
7616        # Check if the provided tool contains a complete path.
7617        tool_specified="$ECHO"
7618        tool_basename="${tool_specified##*/}"
7619        if test "x$tool_basename" = "x$tool_specified"; then
7620          # A command without a complete path is provided, search $PATH.
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7622$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7623          # Extract the first word of "$tool_basename", so it can be a program name with args.
7624set dummy $tool_basename; ac_word=$2
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626$as_echo_n "checking for $ac_word... " >&6; }
7627if ${ac_cv_path_ECHO+:} false; then :
7628  $as_echo_n "(cached) " >&6
7629else
7630  case $ECHO in
7631  [\\/]* | ?:[\\/]*)
7632  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7633  ;;
7634  *)
7635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7636for as_dir in $PATH
7637do
7638  IFS=$as_save_IFS
7639  test -z "$as_dir" && as_dir=.
7640    for ac_exec_ext in '' $ac_executable_extensions; do
7641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7642    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7644    break 2
7645  fi
7646done
7647  done
7648IFS=$as_save_IFS
7649
7650  ;;
7651esac
7652fi
7653ECHO=$ac_cv_path_ECHO
7654if test -n "$ECHO"; then
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7656$as_echo "$ECHO" >&6; }
7657else
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659$as_echo "no" >&6; }
7660fi
7661
7662
7663          if test "x$ECHO" = x; then
7664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7665          fi
7666        else
7667          # Otherwise we believe it is a complete path. Use it as it is.
7668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7669$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7671$as_echo_n "checking for ECHO... " >&6; }
7672          if test ! -x "$tool_specified"; then
7673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7674$as_echo "not found" >&6; }
7675            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7676          fi
7677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7678$as_echo "$tool_specified" >&6; }
7679        fi
7680      fi
7681    fi
7682
7683  fi
7684
7685
7686
7687  if test "x$ECHO" = x; then
7688    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7689  fi
7690
7691
7692
7693
7694
7695  # Publish this variable in the help.
7696
7697
7698  if [ -z "${EXPR+x}" ]; then
7699    # The variable is not set by user, try to locate tool using the code snippet
7700    for ac_prog in expr
7701do
7702  # Extract the first word of "$ac_prog", so it can be a program name with args.
7703set dummy $ac_prog; ac_word=$2
7704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7705$as_echo_n "checking for $ac_word... " >&6; }
7706if ${ac_cv_path_EXPR+:} false; then :
7707  $as_echo_n "(cached) " >&6
7708else
7709  case $EXPR in
7710  [\\/]* | ?:[\\/]*)
7711  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7712  ;;
7713  *)
7714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715for as_dir in $PATH
7716do
7717  IFS=$as_save_IFS
7718  test -z "$as_dir" && as_dir=.
7719    for ac_exec_ext in '' $ac_executable_extensions; do
7720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723    break 2
7724  fi
7725done
7726  done
7727IFS=$as_save_IFS
7728
7729  ;;
7730esac
7731fi
7732EXPR=$ac_cv_path_EXPR
7733if test -n "$EXPR"; then
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7735$as_echo "$EXPR" >&6; }
7736else
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738$as_echo "no" >&6; }
7739fi
7740
7741
7742  test -n "$EXPR" && break
7743done
7744
7745  else
7746    # The variable is set, but is it from the command line or the environment?
7747
7748    # Try to remove the string !EXPR! from our list.
7749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7751      # If it failed, the variable was not from the command line. Ignore it,
7752      # but warn the user (except for BASH, which is always set by the calling BASH).
7753      if test "xEXPR" != xBASH; then
7754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7755$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7756      fi
7757      # Try to locate tool using the code snippet
7758      for ac_prog in expr
7759do
7760  # Extract the first word of "$ac_prog", so it can be a program name with args.
7761set dummy $ac_prog; ac_word=$2
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7763$as_echo_n "checking for $ac_word... " >&6; }
7764if ${ac_cv_path_EXPR+:} false; then :
7765  $as_echo_n "(cached) " >&6
7766else
7767  case $EXPR in
7768  [\\/]* | ?:[\\/]*)
7769  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7770  ;;
7771  *)
7772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7773for as_dir in $PATH
7774do
7775  IFS=$as_save_IFS
7776  test -z "$as_dir" && as_dir=.
7777    for ac_exec_ext in '' $ac_executable_extensions; do
7778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7779    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7781    break 2
7782  fi
7783done
7784  done
7785IFS=$as_save_IFS
7786
7787  ;;
7788esac
7789fi
7790EXPR=$ac_cv_path_EXPR
7791if test -n "$EXPR"; then
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7793$as_echo "$EXPR" >&6; }
7794else
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7796$as_echo "no" >&6; }
7797fi
7798
7799
7800  test -n "$EXPR" && break
7801done
7802
7803    else
7804      # If it succeeded, then it was overridden by the user. We will use it
7805      # for the tool.
7806
7807      # First remove it from the list of overridden variables, so we can test
7808      # for unknown variables in the end.
7809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7810
7811      # Check if we try to supply an empty value
7812      if test "x$EXPR" = x; then
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7814$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7816$as_echo_n "checking for EXPR... " >&6; }
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7818$as_echo "disabled" >&6; }
7819      else
7820        # Check if the provided tool contains a complete path.
7821        tool_specified="$EXPR"
7822        tool_basename="${tool_specified##*/}"
7823        if test "x$tool_basename" = "x$tool_specified"; then
7824          # A command without a complete path is provided, search $PATH.
7825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7826$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7827          # Extract the first word of "$tool_basename", so it can be a program name with args.
7828set dummy $tool_basename; ac_word=$2
7829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7830$as_echo_n "checking for $ac_word... " >&6; }
7831if ${ac_cv_path_EXPR+:} false; then :
7832  $as_echo_n "(cached) " >&6
7833else
7834  case $EXPR in
7835  [\\/]* | ?:[\\/]*)
7836  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7837  ;;
7838  *)
7839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7840for as_dir in $PATH
7841do
7842  IFS=$as_save_IFS
7843  test -z "$as_dir" && as_dir=.
7844    for ac_exec_ext in '' $ac_executable_extensions; do
7845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7846    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7848    break 2
7849  fi
7850done
7851  done
7852IFS=$as_save_IFS
7853
7854  ;;
7855esac
7856fi
7857EXPR=$ac_cv_path_EXPR
7858if test -n "$EXPR"; then
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7860$as_echo "$EXPR" >&6; }
7861else
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7863$as_echo "no" >&6; }
7864fi
7865
7866
7867          if test "x$EXPR" = x; then
7868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7869          fi
7870        else
7871          # Otherwise we believe it is a complete path. Use it as it is.
7872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7873$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7875$as_echo_n "checking for EXPR... " >&6; }
7876          if test ! -x "$tool_specified"; then
7877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7878$as_echo "not found" >&6; }
7879            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7880          fi
7881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7882$as_echo "$tool_specified" >&6; }
7883        fi
7884      fi
7885    fi
7886
7887  fi
7888
7889
7890
7891  if test "x$EXPR" = x; then
7892    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7893  fi
7894
7895
7896
7897
7898
7899  # Publish this variable in the help.
7900
7901
7902  if [ -z "${FILE+x}" ]; then
7903    # The variable is not set by user, try to locate tool using the code snippet
7904    for ac_prog in file
7905do
7906  # Extract the first word of "$ac_prog", so it can be a program name with args.
7907set dummy $ac_prog; ac_word=$2
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909$as_echo_n "checking for $ac_word... " >&6; }
7910if ${ac_cv_path_FILE+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  case $FILE in
7914  [\\/]* | ?:[\\/]*)
7915  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7916  ;;
7917  *)
7918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919for as_dir in $PATH
7920do
7921  IFS=$as_save_IFS
7922  test -z "$as_dir" && as_dir=.
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927    break 2
7928  fi
7929done
7930  done
7931IFS=$as_save_IFS
7932
7933  ;;
7934esac
7935fi
7936FILE=$ac_cv_path_FILE
7937if test -n "$FILE"; then
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7939$as_echo "$FILE" >&6; }
7940else
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942$as_echo "no" >&6; }
7943fi
7944
7945
7946  test -n "$FILE" && break
7947done
7948
7949  else
7950    # The variable is set, but is it from the command line or the environment?
7951
7952    # Try to remove the string !FILE! from our list.
7953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7955      # If it failed, the variable was not from the command line. Ignore it,
7956      # but warn the user (except for BASH, which is always set by the calling BASH).
7957      if test "xFILE" != xBASH; then
7958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7959$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7960      fi
7961      # Try to locate tool using the code snippet
7962      for ac_prog in file
7963do
7964  # Extract the first word of "$ac_prog", so it can be a program name with args.
7965set dummy $ac_prog; ac_word=$2
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967$as_echo_n "checking for $ac_word... " >&6; }
7968if ${ac_cv_path_FILE+:} false; then :
7969  $as_echo_n "(cached) " >&6
7970else
7971  case $FILE in
7972  [\\/]* | ?:[\\/]*)
7973  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7974  ;;
7975  *)
7976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977for as_dir in $PATH
7978do
7979  IFS=$as_save_IFS
7980  test -z "$as_dir" && as_dir=.
7981    for ac_exec_ext in '' $ac_executable_extensions; do
7982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985    break 2
7986  fi
7987done
7988  done
7989IFS=$as_save_IFS
7990
7991  ;;
7992esac
7993fi
7994FILE=$ac_cv_path_FILE
7995if test -n "$FILE"; then
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7997$as_echo "$FILE" >&6; }
7998else
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000$as_echo "no" >&6; }
8001fi
8002
8003
8004  test -n "$FILE" && break
8005done
8006
8007    else
8008      # If it succeeded, then it was overridden by the user. We will use it
8009      # for the tool.
8010
8011      # First remove it from the list of overridden variables, so we can test
8012      # for unknown variables in the end.
8013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8014
8015      # Check if we try to supply an empty value
8016      if test "x$FILE" = x; then
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8018$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8020$as_echo_n "checking for FILE... " >&6; }
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8022$as_echo "disabled" >&6; }
8023      else
8024        # Check if the provided tool contains a complete path.
8025        tool_specified="$FILE"
8026        tool_basename="${tool_specified##*/}"
8027        if test "x$tool_basename" = "x$tool_specified"; then
8028          # A command without a complete path is provided, search $PATH.
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8030$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8031          # Extract the first word of "$tool_basename", so it can be a program name with args.
8032set dummy $tool_basename; ac_word=$2
8033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8034$as_echo_n "checking for $ac_word... " >&6; }
8035if ${ac_cv_path_FILE+:} false; then :
8036  $as_echo_n "(cached) " >&6
8037else
8038  case $FILE in
8039  [\\/]* | ?:[\\/]*)
8040  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8041  ;;
8042  *)
8043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8044for as_dir in $PATH
8045do
8046  IFS=$as_save_IFS
8047  test -z "$as_dir" && as_dir=.
8048    for ac_exec_ext in '' $ac_executable_extensions; do
8049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8050    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8052    break 2
8053  fi
8054done
8055  done
8056IFS=$as_save_IFS
8057
8058  ;;
8059esac
8060fi
8061FILE=$ac_cv_path_FILE
8062if test -n "$FILE"; then
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8064$as_echo "$FILE" >&6; }
8065else
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8067$as_echo "no" >&6; }
8068fi
8069
8070
8071          if test "x$FILE" = x; then
8072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8073          fi
8074        else
8075          # Otherwise we believe it is a complete path. Use it as it is.
8076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8077$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8079$as_echo_n "checking for FILE... " >&6; }
8080          if test ! -x "$tool_specified"; then
8081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8082$as_echo "not found" >&6; }
8083            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8084          fi
8085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8086$as_echo "$tool_specified" >&6; }
8087        fi
8088      fi
8089    fi
8090
8091  fi
8092
8093
8094
8095  if test "x$FILE" = x; then
8096    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8097  fi
8098
8099
8100
8101
8102
8103  # Publish this variable in the help.
8104
8105
8106  if [ -z "${FIND+x}" ]; then
8107    # The variable is not set by user, try to locate tool using the code snippet
8108    for ac_prog in find
8109do
8110  # Extract the first word of "$ac_prog", so it can be a program name with args.
8111set dummy $ac_prog; ac_word=$2
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8113$as_echo_n "checking for $ac_word... " >&6; }
8114if ${ac_cv_path_FIND+:} false; then :
8115  $as_echo_n "(cached) " >&6
8116else
8117  case $FIND in
8118  [\\/]* | ?:[\\/]*)
8119  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8120  ;;
8121  *)
8122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8123for as_dir in $PATH
8124do
8125  IFS=$as_save_IFS
8126  test -z "$as_dir" && as_dir=.
8127    for ac_exec_ext in '' $ac_executable_extensions; do
8128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8129    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8131    break 2
8132  fi
8133done
8134  done
8135IFS=$as_save_IFS
8136
8137  ;;
8138esac
8139fi
8140FIND=$ac_cv_path_FIND
8141if test -n "$FIND"; then
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8143$as_echo "$FIND" >&6; }
8144else
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
8147fi
8148
8149
8150  test -n "$FIND" && break
8151done
8152
8153  else
8154    # The variable is set, but is it from the command line or the environment?
8155
8156    # Try to remove the string !FIND! from our list.
8157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8159      # If it failed, the variable was not from the command line. Ignore it,
8160      # but warn the user (except for BASH, which is always set by the calling BASH).
8161      if test "xFIND" != xBASH; then
8162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8163$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8164      fi
8165      # Try to locate tool using the code snippet
8166      for ac_prog in find
8167do
8168  # Extract the first word of "$ac_prog", so it can be a program name with args.
8169set dummy $ac_prog; ac_word=$2
8170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171$as_echo_n "checking for $ac_word... " >&6; }
8172if ${ac_cv_path_FIND+:} false; then :
8173  $as_echo_n "(cached) " >&6
8174else
8175  case $FIND in
8176  [\\/]* | ?:[\\/]*)
8177  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8178  ;;
8179  *)
8180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8181for as_dir in $PATH
8182do
8183  IFS=$as_save_IFS
8184  test -z "$as_dir" && as_dir=.
8185    for ac_exec_ext in '' $ac_executable_extensions; do
8186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8189    break 2
8190  fi
8191done
8192  done
8193IFS=$as_save_IFS
8194
8195  ;;
8196esac
8197fi
8198FIND=$ac_cv_path_FIND
8199if test -n "$FIND"; then
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8201$as_echo "$FIND" >&6; }
8202else
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204$as_echo "no" >&6; }
8205fi
8206
8207
8208  test -n "$FIND" && break
8209done
8210
8211    else
8212      # If it succeeded, then it was overridden by the user. We will use it
8213      # for the tool.
8214
8215      # First remove it from the list of overridden variables, so we can test
8216      # for unknown variables in the end.
8217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8218
8219      # Check if we try to supply an empty value
8220      if test "x$FIND" = x; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8222$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8224$as_echo_n "checking for FIND... " >&6; }
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8226$as_echo "disabled" >&6; }
8227      else
8228        # Check if the provided tool contains a complete path.
8229        tool_specified="$FIND"
8230        tool_basename="${tool_specified##*/}"
8231        if test "x$tool_basename" = "x$tool_specified"; then
8232          # A command without a complete path is provided, search $PATH.
8233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8234$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8235          # Extract the first word of "$tool_basename", so it can be a program name with args.
8236set dummy $tool_basename; ac_word=$2
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238$as_echo_n "checking for $ac_word... " >&6; }
8239if ${ac_cv_path_FIND+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  case $FIND in
8243  [\\/]* | ?:[\\/]*)
8244  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8245  ;;
8246  *)
8247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  test -z "$as_dir" && as_dir=.
8252    for ac_exec_ext in '' $ac_executable_extensions; do
8253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256    break 2
8257  fi
8258done
8259  done
8260IFS=$as_save_IFS
8261
8262  ;;
8263esac
8264fi
8265FIND=$ac_cv_path_FIND
8266if test -n "$FIND"; then
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8268$as_echo "$FIND" >&6; }
8269else
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271$as_echo "no" >&6; }
8272fi
8273
8274
8275          if test "x$FIND" = x; then
8276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8277          fi
8278        else
8279          # Otherwise we believe it is a complete path. Use it as it is.
8280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8281$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8283$as_echo_n "checking for FIND... " >&6; }
8284          if test ! -x "$tool_specified"; then
8285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8286$as_echo "not found" >&6; }
8287            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8288          fi
8289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8290$as_echo "$tool_specified" >&6; }
8291        fi
8292      fi
8293    fi
8294
8295  fi
8296
8297
8298
8299  if test "x$FIND" = x; then
8300    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8301  fi
8302
8303
8304
8305
8306
8307  # Publish this variable in the help.
8308
8309
8310  if [ -z "${HEAD+x}" ]; then
8311    # The variable is not set by user, try to locate tool using the code snippet
8312    for ac_prog in head
8313do
8314  # Extract the first word of "$ac_prog", so it can be a program name with args.
8315set dummy $ac_prog; ac_word=$2
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8317$as_echo_n "checking for $ac_word... " >&6; }
8318if ${ac_cv_path_HEAD+:} false; then :
8319  $as_echo_n "(cached) " >&6
8320else
8321  case $HEAD in
8322  [\\/]* | ?:[\\/]*)
8323  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8324  ;;
8325  *)
8326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8327for as_dir in $PATH
8328do
8329  IFS=$as_save_IFS
8330  test -z "$as_dir" && as_dir=.
8331    for ac_exec_ext in '' $ac_executable_extensions; do
8332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8333    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8335    break 2
8336  fi
8337done
8338  done
8339IFS=$as_save_IFS
8340
8341  ;;
8342esac
8343fi
8344HEAD=$ac_cv_path_HEAD
8345if test -n "$HEAD"; then
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8347$as_echo "$HEAD" >&6; }
8348else
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
8352
8353
8354  test -n "$HEAD" && break
8355done
8356
8357  else
8358    # The variable is set, but is it from the command line or the environment?
8359
8360    # Try to remove the string !HEAD! from our list.
8361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8363      # If it failed, the variable was not from the command line. Ignore it,
8364      # but warn the user (except for BASH, which is always set by the calling BASH).
8365      if test "xHEAD" != xBASH; then
8366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8367$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8368      fi
8369      # Try to locate tool using the code snippet
8370      for ac_prog in head
8371do
8372  # Extract the first word of "$ac_prog", so it can be a program name with args.
8373set dummy $ac_prog; ac_word=$2
8374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8375$as_echo_n "checking for $ac_word... " >&6; }
8376if ${ac_cv_path_HEAD+:} false; then :
8377  $as_echo_n "(cached) " >&6
8378else
8379  case $HEAD in
8380  [\\/]* | ?:[\\/]*)
8381  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8382  ;;
8383  *)
8384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387  IFS=$as_save_IFS
8388  test -z "$as_dir" && as_dir=.
8389    for ac_exec_ext in '' $ac_executable_extensions; do
8390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393    break 2
8394  fi
8395done
8396  done
8397IFS=$as_save_IFS
8398
8399  ;;
8400esac
8401fi
8402HEAD=$ac_cv_path_HEAD
8403if test -n "$HEAD"; then
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8405$as_echo "$HEAD" >&6; }
8406else
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
8409fi
8410
8411
8412  test -n "$HEAD" && break
8413done
8414
8415    else
8416      # If it succeeded, then it was overridden by the user. We will use it
8417      # for the tool.
8418
8419      # First remove it from the list of overridden variables, so we can test
8420      # for unknown variables in the end.
8421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8422
8423      # Check if we try to supply an empty value
8424      if test "x$HEAD" = x; then
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8426$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8428$as_echo_n "checking for HEAD... " >&6; }
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8430$as_echo "disabled" >&6; }
8431      else
8432        # Check if the provided tool contains a complete path.
8433        tool_specified="$HEAD"
8434        tool_basename="${tool_specified##*/}"
8435        if test "x$tool_basename" = "x$tool_specified"; then
8436          # A command without a complete path is provided, search $PATH.
8437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8439          # Extract the first word of "$tool_basename", so it can be a program name with args.
8440set dummy $tool_basename; ac_word=$2
8441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8442$as_echo_n "checking for $ac_word... " >&6; }
8443if ${ac_cv_path_HEAD+:} false; then :
8444  $as_echo_n "(cached) " >&6
8445else
8446  case $HEAD in
8447  [\\/]* | ?:[\\/]*)
8448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8449  ;;
8450  *)
8451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8452for as_dir in $PATH
8453do
8454  IFS=$as_save_IFS
8455  test -z "$as_dir" && as_dir=.
8456    for ac_exec_ext in '' $ac_executable_extensions; do
8457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8460    break 2
8461  fi
8462done
8463  done
8464IFS=$as_save_IFS
8465
8466  ;;
8467esac
8468fi
8469HEAD=$ac_cv_path_HEAD
8470if test -n "$HEAD"; then
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8472$as_echo "$HEAD" >&6; }
8473else
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8475$as_echo "no" >&6; }
8476fi
8477
8478
8479          if test "x$HEAD" = x; then
8480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8481          fi
8482        else
8483          # Otherwise we believe it is a complete path. Use it as it is.
8484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8487$as_echo_n "checking for HEAD... " >&6; }
8488          if test ! -x "$tool_specified"; then
8489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8490$as_echo "not found" >&6; }
8491            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8492          fi
8493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8494$as_echo "$tool_specified" >&6; }
8495        fi
8496      fi
8497    fi
8498
8499  fi
8500
8501
8502
8503  if test "x$HEAD" = x; then
8504    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8505  fi
8506
8507
8508
8509
8510
8511  # Publish this variable in the help.
8512
8513
8514  if [ -z "${GUNZIP+x}" ]; then
8515    # The variable is not set by user, try to locate tool using the code snippet
8516    for ac_prog in gunzip
8517do
8518  # Extract the first word of "$ac_prog", so it can be a program name with args.
8519set dummy $ac_prog; ac_word=$2
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521$as_echo_n "checking for $ac_word... " >&6; }
8522if ${ac_cv_path_GUNZIP+:} false; then :
8523  $as_echo_n "(cached) " >&6
8524else
8525  case $GUNZIP in
8526  [\\/]* | ?:[\\/]*)
8527  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8528  ;;
8529  *)
8530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531for as_dir in $PATH
8532do
8533  IFS=$as_save_IFS
8534  test -z "$as_dir" && as_dir=.
8535    for ac_exec_ext in '' $ac_executable_extensions; do
8536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8537    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539    break 2
8540  fi
8541done
8542  done
8543IFS=$as_save_IFS
8544
8545  ;;
8546esac
8547fi
8548GUNZIP=$ac_cv_path_GUNZIP
8549if test -n "$GUNZIP"; then
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8551$as_echo "$GUNZIP" >&6; }
8552else
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558  test -n "$GUNZIP" && break
8559done
8560
8561  else
8562    # The variable is set, but is it from the command line or the environment?
8563
8564    # Try to remove the string !GUNZIP! from our list.
8565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8567      # If it failed, the variable was not from the command line. Ignore it,
8568      # but warn the user (except for BASH, which is always set by the calling BASH).
8569      if test "xGUNZIP" != xBASH; then
8570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8571$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8572      fi
8573      # Try to locate tool using the code snippet
8574      for ac_prog in gunzip
8575do
8576  # Extract the first word of "$ac_prog", so it can be a program name with args.
8577set dummy $ac_prog; ac_word=$2
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579$as_echo_n "checking for $ac_word... " >&6; }
8580if ${ac_cv_path_GUNZIP+:} false; then :
8581  $as_echo_n "(cached) " >&6
8582else
8583  case $GUNZIP in
8584  [\\/]* | ?:[\\/]*)
8585  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8586  ;;
8587  *)
8588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8589for as_dir in $PATH
8590do
8591  IFS=$as_save_IFS
8592  test -z "$as_dir" && as_dir=.
8593    for ac_exec_ext in '' $ac_executable_extensions; do
8594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8595    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8597    break 2
8598  fi
8599done
8600  done
8601IFS=$as_save_IFS
8602
8603  ;;
8604esac
8605fi
8606GUNZIP=$ac_cv_path_GUNZIP
8607if test -n "$GUNZIP"; then
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8609$as_echo "$GUNZIP" >&6; }
8610else
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8612$as_echo "no" >&6; }
8613fi
8614
8615
8616  test -n "$GUNZIP" && break
8617done
8618
8619    else
8620      # If it succeeded, then it was overridden by the user. We will use it
8621      # for the tool.
8622
8623      # First remove it from the list of overridden variables, so we can test
8624      # for unknown variables in the end.
8625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8626
8627      # Check if we try to supply an empty value
8628      if test "x$GUNZIP" = x; then
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8630$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8632$as_echo_n "checking for GUNZIP... " >&6; }
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8634$as_echo "disabled" >&6; }
8635      else
8636        # Check if the provided tool contains a complete path.
8637        tool_specified="$GUNZIP"
8638        tool_basename="${tool_specified##*/}"
8639        if test "x$tool_basename" = "x$tool_specified"; then
8640          # A command without a complete path is provided, search $PATH.
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8642$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8643          # Extract the first word of "$tool_basename", so it can be a program name with args.
8644set dummy $tool_basename; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_path_GUNZIP+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  case $GUNZIP in
8651  [\\/]* | ?:[\\/]*)
8652  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8653  ;;
8654  *)
8655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670  ;;
8671esac
8672fi
8673GUNZIP=$ac_cv_path_GUNZIP
8674if test -n "$GUNZIP"; then
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8676$as_echo "$GUNZIP" >&6; }
8677else
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679$as_echo "no" >&6; }
8680fi
8681
8682
8683          if test "x$GUNZIP" = x; then
8684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8685          fi
8686        else
8687          # Otherwise we believe it is a complete path. Use it as it is.
8688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8689$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8691$as_echo_n "checking for GUNZIP... " >&6; }
8692          if test ! -x "$tool_specified"; then
8693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8694$as_echo "not found" >&6; }
8695            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8696          fi
8697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8698$as_echo "$tool_specified" >&6; }
8699        fi
8700      fi
8701    fi
8702
8703  fi
8704
8705
8706
8707  if test "x$GUNZIP" = x; then
8708    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8709  fi
8710
8711
8712
8713
8714
8715  # Publish this variable in the help.
8716
8717
8718  if [ -z "${GZIP+x}" ]; then
8719    # The variable is not set by user, try to locate tool using the code snippet
8720    for ac_prog in pigz gzip
8721do
8722  # Extract the first word of "$ac_prog", so it can be a program name with args.
8723set dummy $ac_prog; ac_word=$2
8724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8725$as_echo_n "checking for $ac_word... " >&6; }
8726if ${ac_cv_path_GZIP+:} false; then :
8727  $as_echo_n "(cached) " >&6
8728else
8729  case $GZIP in
8730  [\\/]* | ?:[\\/]*)
8731  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8732  ;;
8733  *)
8734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8735for as_dir in $PATH
8736do
8737  IFS=$as_save_IFS
8738  test -z "$as_dir" && as_dir=.
8739    for ac_exec_ext in '' $ac_executable_extensions; do
8740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8741    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8743    break 2
8744  fi
8745done
8746  done
8747IFS=$as_save_IFS
8748
8749  ;;
8750esac
8751fi
8752GZIP=$ac_cv_path_GZIP
8753if test -n "$GZIP"; then
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8755$as_echo "$GZIP" >&6; }
8756else
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8758$as_echo "no" >&6; }
8759fi
8760
8761
8762  test -n "$GZIP" && break
8763done
8764
8765  else
8766    # The variable is set, but is it from the command line or the environment?
8767
8768    # Try to remove the string !GZIP! from our list.
8769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8771      # If it failed, the variable was not from the command line. Ignore it,
8772      # but warn the user (except for BASH, which is always set by the calling BASH).
8773      if test "xGZIP" != xBASH; then
8774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8775$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8776      fi
8777      # Try to locate tool using the code snippet
8778      for ac_prog in pigz gzip
8779do
8780  # Extract the first word of "$ac_prog", so it can be a program name with args.
8781set dummy $ac_prog; ac_word=$2
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if ${ac_cv_path_GZIP+:} false; then :
8785  $as_echo_n "(cached) " >&6
8786else
8787  case $GZIP in
8788  [\\/]* | ?:[\\/]*)
8789  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8790  ;;
8791  *)
8792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795  IFS=$as_save_IFS
8796  test -z "$as_dir" && as_dir=.
8797    for ac_exec_ext in '' $ac_executable_extensions; do
8798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8799    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8801    break 2
8802  fi
8803done
8804  done
8805IFS=$as_save_IFS
8806
8807  ;;
8808esac
8809fi
8810GZIP=$ac_cv_path_GZIP
8811if test -n "$GZIP"; then
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8813$as_echo "$GZIP" >&6; }
8814else
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
8817fi
8818
8819
8820  test -n "$GZIP" && break
8821done
8822
8823    else
8824      # If it succeeded, then it was overridden by the user. We will use it
8825      # for the tool.
8826
8827      # First remove it from the list of overridden variables, so we can test
8828      # for unknown variables in the end.
8829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8830
8831      # Check if we try to supply an empty value
8832      if test "x$GZIP" = x; then
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8834$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8836$as_echo_n "checking for GZIP... " >&6; }
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8838$as_echo "disabled" >&6; }
8839      else
8840        # Check if the provided tool contains a complete path.
8841        tool_specified="$GZIP"
8842        tool_basename="${tool_specified##*/}"
8843        if test "x$tool_basename" = "x$tool_specified"; then
8844          # A command without a complete path is provided, search $PATH.
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8846$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8847          # Extract the first word of "$tool_basename", so it can be a program name with args.
8848set dummy $tool_basename; ac_word=$2
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8850$as_echo_n "checking for $ac_word... " >&6; }
8851if ${ac_cv_path_GZIP+:} false; then :
8852  $as_echo_n "(cached) " >&6
8853else
8854  case $GZIP in
8855  [\\/]* | ?:[\\/]*)
8856  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8857  ;;
8858  *)
8859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8860for as_dir in $PATH
8861do
8862  IFS=$as_save_IFS
8863  test -z "$as_dir" && as_dir=.
8864    for ac_exec_ext in '' $ac_executable_extensions; do
8865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8866    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8868    break 2
8869  fi
8870done
8871  done
8872IFS=$as_save_IFS
8873
8874  ;;
8875esac
8876fi
8877GZIP=$ac_cv_path_GZIP
8878if test -n "$GZIP"; then
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8880$as_echo "$GZIP" >&6; }
8881else
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
8884fi
8885
8886
8887          if test "x$GZIP" = x; then
8888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8889          fi
8890        else
8891          # Otherwise we believe it is a complete path. Use it as it is.
8892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8893$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8895$as_echo_n "checking for GZIP... " >&6; }
8896          if test ! -x "$tool_specified"; then
8897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8898$as_echo "not found" >&6; }
8899            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8900          fi
8901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8902$as_echo "$tool_specified" >&6; }
8903        fi
8904      fi
8905    fi
8906
8907  fi
8908
8909
8910
8911  if test "x$GZIP" = x; then
8912    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8913  fi
8914
8915
8916
8917
8918
8919  # Publish this variable in the help.
8920
8921
8922  if [ -z "${LN+x}" ]; then
8923    # The variable is not set by user, try to locate tool using the code snippet
8924    for ac_prog in ln
8925do
8926  # Extract the first word of "$ac_prog", so it can be a program name with args.
8927set dummy $ac_prog; ac_word=$2
8928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929$as_echo_n "checking for $ac_word... " >&6; }
8930if ${ac_cv_path_LN+:} false; then :
8931  $as_echo_n "(cached) " >&6
8932else
8933  case $LN in
8934  [\\/]* | ?:[\\/]*)
8935  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8936  ;;
8937  *)
8938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939for as_dir in $PATH
8940do
8941  IFS=$as_save_IFS
8942  test -z "$as_dir" && as_dir=.
8943    for ac_exec_ext in '' $ac_executable_extensions; do
8944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947    break 2
8948  fi
8949done
8950  done
8951IFS=$as_save_IFS
8952
8953  ;;
8954esac
8955fi
8956LN=$ac_cv_path_LN
8957if test -n "$LN"; then
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8959$as_echo "$LN" >&6; }
8960else
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
8963fi
8964
8965
8966  test -n "$LN" && break
8967done
8968
8969  else
8970    # The variable is set, but is it from the command line or the environment?
8971
8972    # Try to remove the string !LN! from our list.
8973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8975      # If it failed, the variable was not from the command line. Ignore it,
8976      # but warn the user (except for BASH, which is always set by the calling BASH).
8977      if test "xLN" != xBASH; then
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8979$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8980      fi
8981      # Try to locate tool using the code snippet
8982      for ac_prog in ln
8983do
8984  # Extract the first word of "$ac_prog", so it can be a program name with args.
8985set dummy $ac_prog; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_path_LN+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  case $LN in
8992  [\\/]* | ?:[\\/]*)
8993  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8994  ;;
8995  *)
8996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997for as_dir in $PATH
8998do
8999  IFS=$as_save_IFS
9000  test -z "$as_dir" && as_dir=.
9001    for ac_exec_ext in '' $ac_executable_extensions; do
9002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005    break 2
9006  fi
9007done
9008  done
9009IFS=$as_save_IFS
9010
9011  ;;
9012esac
9013fi
9014LN=$ac_cv_path_LN
9015if test -n "$LN"; then
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9017$as_echo "$LN" >&6; }
9018else
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020$as_echo "no" >&6; }
9021fi
9022
9023
9024  test -n "$LN" && break
9025done
9026
9027    else
9028      # If it succeeded, then it was overridden by the user. We will use it
9029      # for the tool.
9030
9031      # First remove it from the list of overridden variables, so we can test
9032      # for unknown variables in the end.
9033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9034
9035      # Check if we try to supply an empty value
9036      if test "x$LN" = x; then
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9038$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9040$as_echo_n "checking for LN... " >&6; }
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9042$as_echo "disabled" >&6; }
9043      else
9044        # Check if the provided tool contains a complete path.
9045        tool_specified="$LN"
9046        tool_basename="${tool_specified##*/}"
9047        if test "x$tool_basename" = "x$tool_specified"; then
9048          # A command without a complete path is provided, search $PATH.
9049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9050$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9051          # Extract the first word of "$tool_basename", so it can be a program name with args.
9052set dummy $tool_basename; ac_word=$2
9053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9054$as_echo_n "checking for $ac_word... " >&6; }
9055if ${ac_cv_path_LN+:} false; then :
9056  $as_echo_n "(cached) " >&6
9057else
9058  case $LN in
9059  [\\/]* | ?:[\\/]*)
9060  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9061  ;;
9062  *)
9063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9064for as_dir in $PATH
9065do
9066  IFS=$as_save_IFS
9067  test -z "$as_dir" && as_dir=.
9068    for ac_exec_ext in '' $ac_executable_extensions; do
9069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9070    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9072    break 2
9073  fi
9074done
9075  done
9076IFS=$as_save_IFS
9077
9078  ;;
9079esac
9080fi
9081LN=$ac_cv_path_LN
9082if test -n "$LN"; then
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9084$as_echo "$LN" >&6; }
9085else
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9087$as_echo "no" >&6; }
9088fi
9089
9090
9091          if test "x$LN" = x; then
9092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9093          fi
9094        else
9095          # Otherwise we believe it is a complete path. Use it as it is.
9096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9097$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9099$as_echo_n "checking for LN... " >&6; }
9100          if test ! -x "$tool_specified"; then
9101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9102$as_echo "not found" >&6; }
9103            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9104          fi
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9106$as_echo "$tool_specified" >&6; }
9107        fi
9108      fi
9109    fi
9110
9111  fi
9112
9113
9114
9115  if test "x$LN" = x; then
9116    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9117  fi
9118
9119
9120
9121
9122
9123  # Publish this variable in the help.
9124
9125
9126  if [ -z "${LS+x}" ]; then
9127    # The variable is not set by user, try to locate tool using the code snippet
9128    for ac_prog in ls
9129do
9130  # Extract the first word of "$ac_prog", so it can be a program name with args.
9131set dummy $ac_prog; ac_word=$2
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9133$as_echo_n "checking for $ac_word... " >&6; }
9134if ${ac_cv_path_LS+:} false; then :
9135  $as_echo_n "(cached) " >&6
9136else
9137  case $LS in
9138  [\\/]* | ?:[\\/]*)
9139  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9140  ;;
9141  *)
9142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157  ;;
9158esac
9159fi
9160LS=$ac_cv_path_LS
9161if test -n "$LS"; then
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9163$as_echo "$LS" >&6; }
9164else
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9166$as_echo "no" >&6; }
9167fi
9168
9169
9170  test -n "$LS" && break
9171done
9172
9173  else
9174    # The variable is set, but is it from the command line or the environment?
9175
9176    # Try to remove the string !LS! from our list.
9177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9179      # If it failed, the variable was not from the command line. Ignore it,
9180      # but warn the user (except for BASH, which is always set by the calling BASH).
9181      if test "xLS" != xBASH; then
9182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9183$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9184      fi
9185      # Try to locate tool using the code snippet
9186      for ac_prog in ls
9187do
9188  # Extract the first word of "$ac_prog", so it can be a program name with args.
9189set dummy $ac_prog; ac_word=$2
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9191$as_echo_n "checking for $ac_word... " >&6; }
9192if ${ac_cv_path_LS+:} false; then :
9193  $as_echo_n "(cached) " >&6
9194else
9195  case $LS in
9196  [\\/]* | ?:[\\/]*)
9197  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9198  ;;
9199  *)
9200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9201for as_dir in $PATH
9202do
9203  IFS=$as_save_IFS
9204  test -z "$as_dir" && as_dir=.
9205    for ac_exec_ext in '' $ac_executable_extensions; do
9206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9207    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9209    break 2
9210  fi
9211done
9212  done
9213IFS=$as_save_IFS
9214
9215  ;;
9216esac
9217fi
9218LS=$ac_cv_path_LS
9219if test -n "$LS"; then
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9221$as_echo "$LS" >&6; }
9222else
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9224$as_echo "no" >&6; }
9225fi
9226
9227
9228  test -n "$LS" && break
9229done
9230
9231    else
9232      # If it succeeded, then it was overridden by the user. We will use it
9233      # for the tool.
9234
9235      # First remove it from the list of overridden variables, so we can test
9236      # for unknown variables in the end.
9237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9238
9239      # Check if we try to supply an empty value
9240      if test "x$LS" = x; then
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9242$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9244$as_echo_n "checking for LS... " >&6; }
9245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9246$as_echo "disabled" >&6; }
9247      else
9248        # Check if the provided tool contains a complete path.
9249        tool_specified="$LS"
9250        tool_basename="${tool_specified##*/}"
9251        if test "x$tool_basename" = "x$tool_specified"; then
9252          # A command without a complete path is provided, search $PATH.
9253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9254$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9255          # Extract the first word of "$tool_basename", so it can be a program name with args.
9256set dummy $tool_basename; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_LS+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $LS in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285LS=$ac_cv_path_LS
9286if test -n "$LS"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9288$as_echo "$LS" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295          if test "x$LS" = x; then
9296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9297          fi
9298        else
9299          # Otherwise we believe it is a complete path. Use it as it is.
9300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9301$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9303$as_echo_n "checking for LS... " >&6; }
9304          if test ! -x "$tool_specified"; then
9305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9306$as_echo "not found" >&6; }
9307            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9308          fi
9309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9310$as_echo "$tool_specified" >&6; }
9311        fi
9312      fi
9313    fi
9314
9315  fi
9316
9317
9318
9319  if test "x$LS" = x; then
9320    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9321  fi
9322
9323
9324
9325
9326
9327  # Publish this variable in the help.
9328
9329
9330  if [ -z "${MKDIR+x}" ]; then
9331    # The variable is not set by user, try to locate tool using the code snippet
9332    for ac_prog in mkdir
9333do
9334  # Extract the first word of "$ac_prog", so it can be a program name with args.
9335set dummy $ac_prog; ac_word=$2
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337$as_echo_n "checking for $ac_word... " >&6; }
9338if ${ac_cv_path_MKDIR+:} false; then :
9339  $as_echo_n "(cached) " >&6
9340else
9341  case $MKDIR in
9342  [\\/]* | ?:[\\/]*)
9343  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9344  ;;
9345  *)
9346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9347for as_dir in $PATH
9348do
9349  IFS=$as_save_IFS
9350  test -z "$as_dir" && as_dir=.
9351    for ac_exec_ext in '' $ac_executable_extensions; do
9352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9353    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9355    break 2
9356  fi
9357done
9358  done
9359IFS=$as_save_IFS
9360
9361  ;;
9362esac
9363fi
9364MKDIR=$ac_cv_path_MKDIR
9365if test -n "$MKDIR"; then
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9367$as_echo "$MKDIR" >&6; }
9368else
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
9371fi
9372
9373
9374  test -n "$MKDIR" && break
9375done
9376
9377  else
9378    # The variable is set, but is it from the command line or the environment?
9379
9380    # Try to remove the string !MKDIR! from our list.
9381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9383      # If it failed, the variable was not from the command line. Ignore it,
9384      # but warn the user (except for BASH, which is always set by the calling BASH).
9385      if test "xMKDIR" != xBASH; then
9386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9387$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9388      fi
9389      # Try to locate tool using the code snippet
9390      for ac_prog in mkdir
9391do
9392  # Extract the first word of "$ac_prog", so it can be a program name with args.
9393set dummy $ac_prog; ac_word=$2
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395$as_echo_n "checking for $ac_word... " >&6; }
9396if ${ac_cv_path_MKDIR+:} false; then :
9397  $as_echo_n "(cached) " >&6
9398else
9399  case $MKDIR in
9400  [\\/]* | ?:[\\/]*)
9401  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9402  ;;
9403  *)
9404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405for as_dir in $PATH
9406do
9407  IFS=$as_save_IFS
9408  test -z "$as_dir" && as_dir=.
9409    for ac_exec_ext in '' $ac_executable_extensions; do
9410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413    break 2
9414  fi
9415done
9416  done
9417IFS=$as_save_IFS
9418
9419  ;;
9420esac
9421fi
9422MKDIR=$ac_cv_path_MKDIR
9423if test -n "$MKDIR"; then
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9425$as_echo "$MKDIR" >&6; }
9426else
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
9429fi
9430
9431
9432  test -n "$MKDIR" && break
9433done
9434
9435    else
9436      # If it succeeded, then it was overridden by the user. We will use it
9437      # for the tool.
9438
9439      # First remove it from the list of overridden variables, so we can test
9440      # for unknown variables in the end.
9441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9442
9443      # Check if we try to supply an empty value
9444      if test "x$MKDIR" = x; then
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9446$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9448$as_echo_n "checking for MKDIR... " >&6; }
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9450$as_echo "disabled" >&6; }
9451      else
9452        # Check if the provided tool contains a complete path.
9453        tool_specified="$MKDIR"
9454        tool_basename="${tool_specified##*/}"
9455        if test "x$tool_basename" = "x$tool_specified"; then
9456          # A command without a complete path is provided, search $PATH.
9457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9458$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9459          # Extract the first word of "$tool_basename", so it can be a program name with args.
9460set dummy $tool_basename; ac_word=$2
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9462$as_echo_n "checking for $ac_word... " >&6; }
9463if ${ac_cv_path_MKDIR+:} false; then :
9464  $as_echo_n "(cached) " >&6
9465else
9466  case $MKDIR in
9467  [\\/]* | ?:[\\/]*)
9468  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9469  ;;
9470  *)
9471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9472for as_dir in $PATH
9473do
9474  IFS=$as_save_IFS
9475  test -z "$as_dir" && as_dir=.
9476    for ac_exec_ext in '' $ac_executable_extensions; do
9477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9478    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9480    break 2
9481  fi
9482done
9483  done
9484IFS=$as_save_IFS
9485
9486  ;;
9487esac
9488fi
9489MKDIR=$ac_cv_path_MKDIR
9490if test -n "$MKDIR"; then
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9492$as_echo "$MKDIR" >&6; }
9493else
9494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
9496fi
9497
9498
9499          if test "x$MKDIR" = x; then
9500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9501          fi
9502        else
9503          # Otherwise we believe it is a complete path. Use it as it is.
9504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9505$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9507$as_echo_n "checking for MKDIR... " >&6; }
9508          if test ! -x "$tool_specified"; then
9509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9510$as_echo "not found" >&6; }
9511            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9512          fi
9513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9514$as_echo "$tool_specified" >&6; }
9515        fi
9516      fi
9517    fi
9518
9519  fi
9520
9521
9522
9523  if test "x$MKDIR" = x; then
9524    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9525  fi
9526
9527
9528
9529
9530
9531  # Publish this variable in the help.
9532
9533
9534  if [ -z "${MKTEMP+x}" ]; then
9535    # The variable is not set by user, try to locate tool using the code snippet
9536    for ac_prog in mktemp
9537do
9538  # Extract the first word of "$ac_prog", so it can be a program name with args.
9539set dummy $ac_prog; ac_word=$2
9540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9541$as_echo_n "checking for $ac_word... " >&6; }
9542if ${ac_cv_path_MKTEMP+:} false; then :
9543  $as_echo_n "(cached) " >&6
9544else
9545  case $MKTEMP in
9546  [\\/]* | ?:[\\/]*)
9547  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9548  ;;
9549  *)
9550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9551for as_dir in $PATH
9552do
9553  IFS=$as_save_IFS
9554  test -z "$as_dir" && as_dir=.
9555    for ac_exec_ext in '' $ac_executable_extensions; do
9556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9557    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9559    break 2
9560  fi
9561done
9562  done
9563IFS=$as_save_IFS
9564
9565  ;;
9566esac
9567fi
9568MKTEMP=$ac_cv_path_MKTEMP
9569if test -n "$MKTEMP"; then
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9571$as_echo "$MKTEMP" >&6; }
9572else
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574$as_echo "no" >&6; }
9575fi
9576
9577
9578  test -n "$MKTEMP" && break
9579done
9580
9581  else
9582    # The variable is set, but is it from the command line or the environment?
9583
9584    # Try to remove the string !MKTEMP! from our list.
9585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9587      # If it failed, the variable was not from the command line. Ignore it,
9588      # but warn the user (except for BASH, which is always set by the calling BASH).
9589      if test "xMKTEMP" != xBASH; then
9590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9591$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9592      fi
9593      # Try to locate tool using the code snippet
9594      for ac_prog in mktemp
9595do
9596  # Extract the first word of "$ac_prog", so it can be a program name with args.
9597set dummy $ac_prog; ac_word=$2
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9599$as_echo_n "checking for $ac_word... " >&6; }
9600if ${ac_cv_path_MKTEMP+:} false; then :
9601  $as_echo_n "(cached) " >&6
9602else
9603  case $MKTEMP in
9604  [\\/]* | ?:[\\/]*)
9605  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9606  ;;
9607  *)
9608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9609for as_dir in $PATH
9610do
9611  IFS=$as_save_IFS
9612  test -z "$as_dir" && as_dir=.
9613    for ac_exec_ext in '' $ac_executable_extensions; do
9614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9615    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9617    break 2
9618  fi
9619done
9620  done
9621IFS=$as_save_IFS
9622
9623  ;;
9624esac
9625fi
9626MKTEMP=$ac_cv_path_MKTEMP
9627if test -n "$MKTEMP"; then
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9629$as_echo "$MKTEMP" >&6; }
9630else
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
9633fi
9634
9635
9636  test -n "$MKTEMP" && break
9637done
9638
9639    else
9640      # If it succeeded, then it was overridden by the user. We will use it
9641      # for the tool.
9642
9643      # First remove it from the list of overridden variables, so we can test
9644      # for unknown variables in the end.
9645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9646
9647      # Check if we try to supply an empty value
9648      if test "x$MKTEMP" = x; then
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9650$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9652$as_echo_n "checking for MKTEMP... " >&6; }
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9654$as_echo "disabled" >&6; }
9655      else
9656        # Check if the provided tool contains a complete path.
9657        tool_specified="$MKTEMP"
9658        tool_basename="${tool_specified##*/}"
9659        if test "x$tool_basename" = "x$tool_specified"; then
9660          # A command without a complete path is provided, search $PATH.
9661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9662$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9663          # Extract the first word of "$tool_basename", so it can be a program name with args.
9664set dummy $tool_basename; ac_word=$2
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9666$as_echo_n "checking for $ac_word... " >&6; }
9667if ${ac_cv_path_MKTEMP+:} false; then :
9668  $as_echo_n "(cached) " >&6
9669else
9670  case $MKTEMP in
9671  [\\/]* | ?:[\\/]*)
9672  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9673  ;;
9674  *)
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690  ;;
9691esac
9692fi
9693MKTEMP=$ac_cv_path_MKTEMP
9694if test -n "$MKTEMP"; then
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9696$as_echo "$MKTEMP" >&6; }
9697else
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699$as_echo "no" >&6; }
9700fi
9701
9702
9703          if test "x$MKTEMP" = x; then
9704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9705          fi
9706        else
9707          # Otherwise we believe it is a complete path. Use it as it is.
9708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9709$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9711$as_echo_n "checking for MKTEMP... " >&6; }
9712          if test ! -x "$tool_specified"; then
9713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9714$as_echo "not found" >&6; }
9715            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9716          fi
9717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9718$as_echo "$tool_specified" >&6; }
9719        fi
9720      fi
9721    fi
9722
9723  fi
9724
9725
9726
9727  if test "x$MKTEMP" = x; then
9728    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9729  fi
9730
9731
9732
9733
9734
9735  # Publish this variable in the help.
9736
9737
9738  if [ -z "${MV+x}" ]; then
9739    # The variable is not set by user, try to locate tool using the code snippet
9740    for ac_prog in mv
9741do
9742  # Extract the first word of "$ac_prog", so it can be a program name with args.
9743set dummy $ac_prog; ac_word=$2
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745$as_echo_n "checking for $ac_word... " >&6; }
9746if ${ac_cv_path_MV+:} false; then :
9747  $as_echo_n "(cached) " >&6
9748else
9749  case $MV in
9750  [\\/]* | ?:[\\/]*)
9751  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9752  ;;
9753  *)
9754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9755for as_dir in $PATH
9756do
9757  IFS=$as_save_IFS
9758  test -z "$as_dir" && as_dir=.
9759    for ac_exec_ext in '' $ac_executable_extensions; do
9760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9761    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9763    break 2
9764  fi
9765done
9766  done
9767IFS=$as_save_IFS
9768
9769  ;;
9770esac
9771fi
9772MV=$ac_cv_path_MV
9773if test -n "$MV"; then
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9775$as_echo "$MV" >&6; }
9776else
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779fi
9780
9781
9782  test -n "$MV" && break
9783done
9784
9785  else
9786    # The variable is set, but is it from the command line or the environment?
9787
9788    # Try to remove the string !MV! from our list.
9789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9791      # If it failed, the variable was not from the command line. Ignore it,
9792      # but warn the user (except for BASH, which is always set by the calling BASH).
9793      if test "xMV" != xBASH; then
9794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9795$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9796      fi
9797      # Try to locate tool using the code snippet
9798      for ac_prog in mv
9799do
9800  # Extract the first word of "$ac_prog", so it can be a program name with args.
9801set dummy $ac_prog; ac_word=$2
9802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9803$as_echo_n "checking for $ac_word... " >&6; }
9804if ${ac_cv_path_MV+:} false; then :
9805  $as_echo_n "(cached) " >&6
9806else
9807  case $MV in
9808  [\\/]* | ?:[\\/]*)
9809  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9810  ;;
9811  *)
9812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9813for as_dir in $PATH
9814do
9815  IFS=$as_save_IFS
9816  test -z "$as_dir" && as_dir=.
9817    for ac_exec_ext in '' $ac_executable_extensions; do
9818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9819    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9821    break 2
9822  fi
9823done
9824  done
9825IFS=$as_save_IFS
9826
9827  ;;
9828esac
9829fi
9830MV=$ac_cv_path_MV
9831if test -n "$MV"; then
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9833$as_echo "$MV" >&6; }
9834else
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9836$as_echo "no" >&6; }
9837fi
9838
9839
9840  test -n "$MV" && break
9841done
9842
9843    else
9844      # If it succeeded, then it was overridden by the user. We will use it
9845      # for the tool.
9846
9847      # First remove it from the list of overridden variables, so we can test
9848      # for unknown variables in the end.
9849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9850
9851      # Check if we try to supply an empty value
9852      if test "x$MV" = x; then
9853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9854$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9856$as_echo_n "checking for MV... " >&6; }
9857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9858$as_echo "disabled" >&6; }
9859      else
9860        # Check if the provided tool contains a complete path.
9861        tool_specified="$MV"
9862        tool_basename="${tool_specified##*/}"
9863        if test "x$tool_basename" = "x$tool_specified"; then
9864          # A command without a complete path is provided, search $PATH.
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9866$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9867          # Extract the first word of "$tool_basename", so it can be a program name with args.
9868set dummy $tool_basename; ac_word=$2
9869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9870$as_echo_n "checking for $ac_word... " >&6; }
9871if ${ac_cv_path_MV+:} false; then :
9872  $as_echo_n "(cached) " >&6
9873else
9874  case $MV in
9875  [\\/]* | ?:[\\/]*)
9876  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9877  ;;
9878  *)
9879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9880for as_dir in $PATH
9881do
9882  IFS=$as_save_IFS
9883  test -z "$as_dir" && as_dir=.
9884    for ac_exec_ext in '' $ac_executable_extensions; do
9885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9886    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9888    break 2
9889  fi
9890done
9891  done
9892IFS=$as_save_IFS
9893
9894  ;;
9895esac
9896fi
9897MV=$ac_cv_path_MV
9898if test -n "$MV"; then
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9900$as_echo "$MV" >&6; }
9901else
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9903$as_echo "no" >&6; }
9904fi
9905
9906
9907          if test "x$MV" = x; then
9908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9909          fi
9910        else
9911          # Otherwise we believe it is a complete path. Use it as it is.
9912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9913$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9915$as_echo_n "checking for MV... " >&6; }
9916          if test ! -x "$tool_specified"; then
9917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9918$as_echo "not found" >&6; }
9919            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9920          fi
9921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9922$as_echo "$tool_specified" >&6; }
9923        fi
9924      fi
9925    fi
9926
9927  fi
9928
9929
9930
9931  if test "x$MV" = x; then
9932    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9933  fi
9934
9935
9936
9937
9938
9939  # Publish this variable in the help.
9940
9941
9942  if [ -z "${NAWK+x}" ]; then
9943    # The variable is not set by user, try to locate tool using the code snippet
9944    for ac_prog in nawk gawk awk
9945do
9946  # Extract the first word of "$ac_prog", so it can be a program name with args.
9947set dummy $ac_prog; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_NAWK+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $NAWK in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976NAWK=$ac_cv_path_NAWK
9977if test -n "$NAWK"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9979$as_echo "$NAWK" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986  test -n "$NAWK" && break
9987done
9988
9989  else
9990    # The variable is set, but is it from the command line or the environment?
9991
9992    # Try to remove the string !NAWK! from our list.
9993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9995      # If it failed, the variable was not from the command line. Ignore it,
9996      # but warn the user (except for BASH, which is always set by the calling BASH).
9997      if test "xNAWK" != xBASH; then
9998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9999$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10000      fi
10001      # Try to locate tool using the code snippet
10002      for ac_prog in nawk gawk awk
10003do
10004  # Extract the first word of "$ac_prog", so it can be a program name with args.
10005set dummy $ac_prog; ac_word=$2
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007$as_echo_n "checking for $ac_word... " >&6; }
10008if ${ac_cv_path_NAWK+:} false; then :
10009  $as_echo_n "(cached) " >&6
10010else
10011  case $NAWK in
10012  [\\/]* | ?:[\\/]*)
10013  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10014  ;;
10015  *)
10016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017for as_dir in $PATH
10018do
10019  IFS=$as_save_IFS
10020  test -z "$as_dir" && as_dir=.
10021    for ac_exec_ext in '' $ac_executable_extensions; do
10022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025    break 2
10026  fi
10027done
10028  done
10029IFS=$as_save_IFS
10030
10031  ;;
10032esac
10033fi
10034NAWK=$ac_cv_path_NAWK
10035if test -n "$NAWK"; then
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10037$as_echo "$NAWK" >&6; }
10038else
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041fi
10042
10043
10044  test -n "$NAWK" && break
10045done
10046
10047    else
10048      # If it succeeded, then it was overridden by the user. We will use it
10049      # for the tool.
10050
10051      # First remove it from the list of overridden variables, so we can test
10052      # for unknown variables in the end.
10053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10054
10055      # Check if we try to supply an empty value
10056      if test "x$NAWK" = x; then
10057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10058$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10060$as_echo_n "checking for NAWK... " >&6; }
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10062$as_echo "disabled" >&6; }
10063      else
10064        # Check if the provided tool contains a complete path.
10065        tool_specified="$NAWK"
10066        tool_basename="${tool_specified##*/}"
10067        if test "x$tool_basename" = "x$tool_specified"; then
10068          # A command without a complete path is provided, search $PATH.
10069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10070$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10071          # Extract the first word of "$tool_basename", so it can be a program name with args.
10072set dummy $tool_basename; ac_word=$2
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10074$as_echo_n "checking for $ac_word... " >&6; }
10075if ${ac_cv_path_NAWK+:} false; then :
10076  $as_echo_n "(cached) " >&6
10077else
10078  case $NAWK in
10079  [\\/]* | ?:[\\/]*)
10080  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10081  ;;
10082  *)
10083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10084for as_dir in $PATH
10085do
10086  IFS=$as_save_IFS
10087  test -z "$as_dir" && as_dir=.
10088    for ac_exec_ext in '' $ac_executable_extensions; do
10089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10090    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10092    break 2
10093  fi
10094done
10095  done
10096IFS=$as_save_IFS
10097
10098  ;;
10099esac
10100fi
10101NAWK=$ac_cv_path_NAWK
10102if test -n "$NAWK"; then
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10104$as_echo "$NAWK" >&6; }
10105else
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108fi
10109
10110
10111          if test "x$NAWK" = x; then
10112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10113          fi
10114        else
10115          # Otherwise we believe it is a complete path. Use it as it is.
10116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10117$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10119$as_echo_n "checking for NAWK... " >&6; }
10120          if test ! -x "$tool_specified"; then
10121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10122$as_echo "not found" >&6; }
10123            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10124          fi
10125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10126$as_echo "$tool_specified" >&6; }
10127        fi
10128      fi
10129    fi
10130
10131  fi
10132
10133
10134
10135  if test "x$NAWK" = x; then
10136    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10137  fi
10138
10139
10140
10141
10142
10143  # Publish this variable in the help.
10144
10145
10146  if [ -z "${PRINTF+x}" ]; then
10147    # The variable is not set by user, try to locate tool using the code snippet
10148    for ac_prog in printf
10149do
10150  # Extract the first word of "$ac_prog", so it can be a program name with args.
10151set dummy $ac_prog; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if ${ac_cv_path_PRINTF+:} false; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $PRINTF in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10169    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180PRINTF=$ac_cv_path_PRINTF
10181if test -n "$PRINTF"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10183$as_echo "$PRINTF" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190  test -n "$PRINTF" && break
10191done
10192
10193  else
10194    # The variable is set, but is it from the command line or the environment?
10195
10196    # Try to remove the string !PRINTF! from our list.
10197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10199      # If it failed, the variable was not from the command line. Ignore it,
10200      # but warn the user (except for BASH, which is always set by the calling BASH).
10201      if test "xPRINTF" != xBASH; then
10202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10203$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10204      fi
10205      # Try to locate tool using the code snippet
10206      for ac_prog in printf
10207do
10208  # Extract the first word of "$ac_prog", so it can be a program name with args.
10209set dummy $ac_prog; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if ${ac_cv_path_PRINTF+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $PRINTF in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10227    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238PRINTF=$ac_cv_path_PRINTF
10239if test -n "$PRINTF"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10241$as_echo "$PRINTF" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248  test -n "$PRINTF" && break
10249done
10250
10251    else
10252      # If it succeeded, then it was overridden by the user. We will use it
10253      # for the tool.
10254
10255      # First remove it from the list of overridden variables, so we can test
10256      # for unknown variables in the end.
10257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10258
10259      # Check if we try to supply an empty value
10260      if test "x$PRINTF" = x; then
10261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10262$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10264$as_echo_n "checking for PRINTF... " >&6; }
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10266$as_echo "disabled" >&6; }
10267      else
10268        # Check if the provided tool contains a complete path.
10269        tool_specified="$PRINTF"
10270        tool_basename="${tool_specified##*/}"
10271        if test "x$tool_basename" = "x$tool_specified"; then
10272          # A command without a complete path is provided, search $PATH.
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10274$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10275          # Extract the first word of "$tool_basename", so it can be a program name with args.
10276set dummy $tool_basename; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_PRINTF+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $PRINTF in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305PRINTF=$ac_cv_path_PRINTF
10306if test -n "$PRINTF"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10308$as_echo "$PRINTF" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315          if test "x$PRINTF" = x; then
10316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10317          fi
10318        else
10319          # Otherwise we believe it is a complete path. Use it as it is.
10320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10321$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10323$as_echo_n "checking for PRINTF... " >&6; }
10324          if test ! -x "$tool_specified"; then
10325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10326$as_echo "not found" >&6; }
10327            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10328          fi
10329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10330$as_echo "$tool_specified" >&6; }
10331        fi
10332      fi
10333    fi
10334
10335  fi
10336
10337
10338
10339  if test "x$PRINTF" = x; then
10340    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10341  fi
10342
10343
10344
10345
10346
10347  # Publish this variable in the help.
10348
10349
10350  if [ -z "${RM+x}" ]; then
10351    # The variable is not set by user, try to locate tool using the code snippet
10352    for ac_prog in rm
10353do
10354  # Extract the first word of "$ac_prog", so it can be a program name with args.
10355set dummy $ac_prog; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_RM+:} false; then :
10359  $as_echo_n "(cached) " >&6
10360else
10361  case $RM in
10362  [\\/]* | ?:[\\/]*)
10363  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10364  ;;
10365  *)
10366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369  IFS=$as_save_IFS
10370  test -z "$as_dir" && as_dir=.
10371    for ac_exec_ext in '' $ac_executable_extensions; do
10372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375    break 2
10376  fi
10377done
10378  done
10379IFS=$as_save_IFS
10380
10381  ;;
10382esac
10383fi
10384RM=$ac_cv_path_RM
10385if test -n "$RM"; then
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10387$as_echo "$RM" >&6; }
10388else
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393
10394  test -n "$RM" && break
10395done
10396
10397  else
10398    # The variable is set, but is it from the command line or the environment?
10399
10400    # Try to remove the string !RM! from our list.
10401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10403      # If it failed, the variable was not from the command line. Ignore it,
10404      # but warn the user (except for BASH, which is always set by the calling BASH).
10405      if test "xRM" != xBASH; then
10406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10407$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10408      fi
10409      # Try to locate tool using the code snippet
10410      for ac_prog in rm
10411do
10412  # Extract the first word of "$ac_prog", so it can be a program name with args.
10413set dummy $ac_prog; ac_word=$2
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415$as_echo_n "checking for $ac_word... " >&6; }
10416if ${ac_cv_path_RM+:} false; then :
10417  $as_echo_n "(cached) " >&6
10418else
10419  case $RM in
10420  [\\/]* | ?:[\\/]*)
10421  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10422  ;;
10423  *)
10424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425for as_dir in $PATH
10426do
10427  IFS=$as_save_IFS
10428  test -z "$as_dir" && as_dir=.
10429    for ac_exec_ext in '' $ac_executable_extensions; do
10430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433    break 2
10434  fi
10435done
10436  done
10437IFS=$as_save_IFS
10438
10439  ;;
10440esac
10441fi
10442RM=$ac_cv_path_RM
10443if test -n "$RM"; then
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10445$as_echo "$RM" >&6; }
10446else
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
10449fi
10450
10451
10452  test -n "$RM" && break
10453done
10454
10455    else
10456      # If it succeeded, then it was overridden by the user. We will use it
10457      # for the tool.
10458
10459      # First remove it from the list of overridden variables, so we can test
10460      # for unknown variables in the end.
10461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10462
10463      # Check if we try to supply an empty value
10464      if test "x$RM" = x; then
10465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10466$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10468$as_echo_n "checking for RM... " >&6; }
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10470$as_echo "disabled" >&6; }
10471      else
10472        # Check if the provided tool contains a complete path.
10473        tool_specified="$RM"
10474        tool_basename="${tool_specified##*/}"
10475        if test "x$tool_basename" = "x$tool_specified"; then
10476          # A command without a complete path is provided, search $PATH.
10477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10478$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10479          # Extract the first word of "$tool_basename", so it can be a program name with args.
10480set dummy $tool_basename; ac_word=$2
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10482$as_echo_n "checking for $ac_word... " >&6; }
10483if ${ac_cv_path_RM+:} false; then :
10484  $as_echo_n "(cached) " >&6
10485else
10486  case $RM in
10487  [\\/]* | ?:[\\/]*)
10488  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10489  ;;
10490  *)
10491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10492for as_dir in $PATH
10493do
10494  IFS=$as_save_IFS
10495  test -z "$as_dir" && as_dir=.
10496    for ac_exec_ext in '' $ac_executable_extensions; do
10497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10498    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10500    break 2
10501  fi
10502done
10503  done
10504IFS=$as_save_IFS
10505
10506  ;;
10507esac
10508fi
10509RM=$ac_cv_path_RM
10510if test -n "$RM"; then
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10512$as_echo "$RM" >&6; }
10513else
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10515$as_echo "no" >&6; }
10516fi
10517
10518
10519          if test "x$RM" = x; then
10520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10521          fi
10522        else
10523          # Otherwise we believe it is a complete path. Use it as it is.
10524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10525$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10527$as_echo_n "checking for RM... " >&6; }
10528          if test ! -x "$tool_specified"; then
10529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10530$as_echo "not found" >&6; }
10531            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10532          fi
10533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10534$as_echo "$tool_specified" >&6; }
10535        fi
10536      fi
10537    fi
10538
10539  fi
10540
10541
10542
10543  if test "x$RM" = x; then
10544    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10545  fi
10546
10547
10548
10549
10550
10551  # Publish this variable in the help.
10552
10553
10554  if [ -z "${RMDIR+x}" ]; then
10555    # The variable is not set by user, try to locate tool using the code snippet
10556    for ac_prog in rmdir
10557do
10558  # Extract the first word of "$ac_prog", so it can be a program name with args.
10559set dummy $ac_prog; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if ${ac_cv_path_RMDIR+:} false; then :
10563  $as_echo_n "(cached) " >&6
10564else
10565  case $RMDIR in
10566  [\\/]* | ?:[\\/]*)
10567  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10568  ;;
10569  *)
10570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10571for as_dir in $PATH
10572do
10573  IFS=$as_save_IFS
10574  test -z "$as_dir" && as_dir=.
10575    for ac_exec_ext in '' $ac_executable_extensions; do
10576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10577    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10579    break 2
10580  fi
10581done
10582  done
10583IFS=$as_save_IFS
10584
10585  ;;
10586esac
10587fi
10588RMDIR=$ac_cv_path_RMDIR
10589if test -n "$RMDIR"; then
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10591$as_echo "$RMDIR" >&6; }
10592else
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10594$as_echo "no" >&6; }
10595fi
10596
10597
10598  test -n "$RMDIR" && break
10599done
10600
10601  else
10602    # The variable is set, but is it from the command line or the environment?
10603
10604    # Try to remove the string !RMDIR! from our list.
10605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10607      # If it failed, the variable was not from the command line. Ignore it,
10608      # but warn the user (except for BASH, which is always set by the calling BASH).
10609      if test "xRMDIR" != xBASH; then
10610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10611$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10612      fi
10613      # Try to locate tool using the code snippet
10614      for ac_prog in rmdir
10615do
10616  # Extract the first word of "$ac_prog", so it can be a program name with args.
10617set dummy $ac_prog; ac_word=$2
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10619$as_echo_n "checking for $ac_word... " >&6; }
10620if ${ac_cv_path_RMDIR+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  case $RMDIR in
10624  [\\/]* | ?:[\\/]*)
10625  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10626  ;;
10627  *)
10628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10635    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643  ;;
10644esac
10645fi
10646RMDIR=$ac_cv_path_RMDIR
10647if test -n "$RMDIR"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10649$as_echo "$RMDIR" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$RMDIR" && break
10657done
10658
10659    else
10660      # If it succeeded, then it was overridden by the user. We will use it
10661      # for the tool.
10662
10663      # First remove it from the list of overridden variables, so we can test
10664      # for unknown variables in the end.
10665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10666
10667      # Check if we try to supply an empty value
10668      if test "x$RMDIR" = x; then
10669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10670$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10672$as_echo_n "checking for RMDIR... " >&6; }
10673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10674$as_echo "disabled" >&6; }
10675      else
10676        # Check if the provided tool contains a complete path.
10677        tool_specified="$RMDIR"
10678        tool_basename="${tool_specified##*/}"
10679        if test "x$tool_basename" = "x$tool_specified"; then
10680          # A command without a complete path is provided, search $PATH.
10681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10682$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10683          # Extract the first word of "$tool_basename", so it can be a program name with args.
10684set dummy $tool_basename; ac_word=$2
10685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686$as_echo_n "checking for $ac_word... " >&6; }
10687if ${ac_cv_path_RMDIR+:} false; then :
10688  $as_echo_n "(cached) " >&6
10689else
10690  case $RMDIR in
10691  [\\/]* | ?:[\\/]*)
10692  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10693  ;;
10694  *)
10695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10696for as_dir in $PATH
10697do
10698  IFS=$as_save_IFS
10699  test -z "$as_dir" && as_dir=.
10700    for ac_exec_ext in '' $ac_executable_extensions; do
10701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10702    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10704    break 2
10705  fi
10706done
10707  done
10708IFS=$as_save_IFS
10709
10710  ;;
10711esac
10712fi
10713RMDIR=$ac_cv_path_RMDIR
10714if test -n "$RMDIR"; then
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10716$as_echo "$RMDIR" >&6; }
10717else
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
10720fi
10721
10722
10723          if test "x$RMDIR" = x; then
10724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10725          fi
10726        else
10727          # Otherwise we believe it is a complete path. Use it as it is.
10728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10729$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10731$as_echo_n "checking for RMDIR... " >&6; }
10732          if test ! -x "$tool_specified"; then
10733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10734$as_echo "not found" >&6; }
10735            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10736          fi
10737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10738$as_echo "$tool_specified" >&6; }
10739        fi
10740      fi
10741    fi
10742
10743  fi
10744
10745
10746
10747  if test "x$RMDIR" = x; then
10748    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10749  fi
10750
10751
10752
10753
10754
10755  # Publish this variable in the help.
10756
10757
10758  if [ -z "${SH+x}" ]; then
10759    # The variable is not set by user, try to locate tool using the code snippet
10760    for ac_prog in sh
10761do
10762  # Extract the first word of "$ac_prog", so it can be a program name with args.
10763set dummy $ac_prog; ac_word=$2
10764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10765$as_echo_n "checking for $ac_word... " >&6; }
10766if ${ac_cv_path_SH+:} false; then :
10767  $as_echo_n "(cached) " >&6
10768else
10769  case $SH in
10770  [\\/]* | ?:[\\/]*)
10771  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10772  ;;
10773  *)
10774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10775for as_dir in $PATH
10776do
10777  IFS=$as_save_IFS
10778  test -z "$as_dir" && as_dir=.
10779    for ac_exec_ext in '' $ac_executable_extensions; do
10780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10781    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10783    break 2
10784  fi
10785done
10786  done
10787IFS=$as_save_IFS
10788
10789  ;;
10790esac
10791fi
10792SH=$ac_cv_path_SH
10793if test -n "$SH"; then
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10795$as_echo "$SH" >&6; }
10796else
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
10799fi
10800
10801
10802  test -n "$SH" && break
10803done
10804
10805  else
10806    # The variable is set, but is it from the command line or the environment?
10807
10808    # Try to remove the string !SH! from our list.
10809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10811      # If it failed, the variable was not from the command line. Ignore it,
10812      # but warn the user (except for BASH, which is always set by the calling BASH).
10813      if test "xSH" != xBASH; then
10814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10815$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10816      fi
10817      # Try to locate tool using the code snippet
10818      for ac_prog in sh
10819do
10820  # Extract the first word of "$ac_prog", so it can be a program name with args.
10821set dummy $ac_prog; ac_word=$2
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10823$as_echo_n "checking for $ac_word... " >&6; }
10824if ${ac_cv_path_SH+:} false; then :
10825  $as_echo_n "(cached) " >&6
10826else
10827  case $SH in
10828  [\\/]* | ?:[\\/]*)
10829  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10830  ;;
10831  *)
10832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10833for as_dir in $PATH
10834do
10835  IFS=$as_save_IFS
10836  test -z "$as_dir" && as_dir=.
10837    for ac_exec_ext in '' $ac_executable_extensions; do
10838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10839    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10841    break 2
10842  fi
10843done
10844  done
10845IFS=$as_save_IFS
10846
10847  ;;
10848esac
10849fi
10850SH=$ac_cv_path_SH
10851if test -n "$SH"; then
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10853$as_echo "$SH" >&6; }
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858
10859
10860  test -n "$SH" && break
10861done
10862
10863    else
10864      # If it succeeded, then it was overridden by the user. We will use it
10865      # for the tool.
10866
10867      # First remove it from the list of overridden variables, so we can test
10868      # for unknown variables in the end.
10869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10870
10871      # Check if we try to supply an empty value
10872      if test "x$SH" = x; then
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10874$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10876$as_echo_n "checking for SH... " >&6; }
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10878$as_echo "disabled" >&6; }
10879      else
10880        # Check if the provided tool contains a complete path.
10881        tool_specified="$SH"
10882        tool_basename="${tool_specified##*/}"
10883        if test "x$tool_basename" = "x$tool_specified"; then
10884          # A command without a complete path is provided, search $PATH.
10885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10886$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10887          # Extract the first word of "$tool_basename", so it can be a program name with args.
10888set dummy $tool_basename; ac_word=$2
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10890$as_echo_n "checking for $ac_word... " >&6; }
10891if ${ac_cv_path_SH+:} false; then :
10892  $as_echo_n "(cached) " >&6
10893else
10894  case $SH in
10895  [\\/]* | ?:[\\/]*)
10896  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10897  ;;
10898  *)
10899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10900for as_dir in $PATH
10901do
10902  IFS=$as_save_IFS
10903  test -z "$as_dir" && as_dir=.
10904    for ac_exec_ext in '' $ac_executable_extensions; do
10905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10906    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10908    break 2
10909  fi
10910done
10911  done
10912IFS=$as_save_IFS
10913
10914  ;;
10915esac
10916fi
10917SH=$ac_cv_path_SH
10918if test -n "$SH"; then
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10920$as_echo "$SH" >&6; }
10921else
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
10924fi
10925
10926
10927          if test "x$SH" = x; then
10928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10929          fi
10930        else
10931          # Otherwise we believe it is a complete path. Use it as it is.
10932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10933$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10935$as_echo_n "checking for SH... " >&6; }
10936          if test ! -x "$tool_specified"; then
10937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10938$as_echo "not found" >&6; }
10939            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10940          fi
10941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10942$as_echo "$tool_specified" >&6; }
10943        fi
10944      fi
10945    fi
10946
10947  fi
10948
10949
10950
10951  if test "x$SH" = x; then
10952    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10953  fi
10954
10955
10956
10957
10958
10959  # Publish this variable in the help.
10960
10961
10962  if [ -z "${SORT+x}" ]; then
10963    # The variable is not set by user, try to locate tool using the code snippet
10964    for ac_prog in sort
10965do
10966  # Extract the first word of "$ac_prog", so it can be a program name with args.
10967set dummy $ac_prog; ac_word=$2
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10969$as_echo_n "checking for $ac_word... " >&6; }
10970if ${ac_cv_path_SORT+:} false; then :
10971  $as_echo_n "(cached) " >&6
10972else
10973  case $SORT in
10974  [\\/]* | ?:[\\/]*)
10975  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10976  ;;
10977  *)
10978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10979for as_dir in $PATH
10980do
10981  IFS=$as_save_IFS
10982  test -z "$as_dir" && as_dir=.
10983    for ac_exec_ext in '' $ac_executable_extensions; do
10984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10985    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10987    break 2
10988  fi
10989done
10990  done
10991IFS=$as_save_IFS
10992
10993  ;;
10994esac
10995fi
10996SORT=$ac_cv_path_SORT
10997if test -n "$SORT"; then
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10999$as_echo "$SORT" >&6; }
11000else
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
11003fi
11004
11005
11006  test -n "$SORT" && break
11007done
11008
11009  else
11010    # The variable is set, but is it from the command line or the environment?
11011
11012    # Try to remove the string !SORT! from our list.
11013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11015      # If it failed, the variable was not from the command line. Ignore it,
11016      # but warn the user (except for BASH, which is always set by the calling BASH).
11017      if test "xSORT" != xBASH; then
11018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11019$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11020      fi
11021      # Try to locate tool using the code snippet
11022      for ac_prog in sort
11023do
11024  # Extract the first word of "$ac_prog", so it can be a program name with args.
11025set dummy $ac_prog; ac_word=$2
11026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11027$as_echo_n "checking for $ac_word... " >&6; }
11028if ${ac_cv_path_SORT+:} false; then :
11029  $as_echo_n "(cached) " >&6
11030else
11031  case $SORT in
11032  [\\/]* | ?:[\\/]*)
11033  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11034  ;;
11035  *)
11036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11037for as_dir in $PATH
11038do
11039  IFS=$as_save_IFS
11040  test -z "$as_dir" && as_dir=.
11041    for ac_exec_ext in '' $ac_executable_extensions; do
11042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11043    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11045    break 2
11046  fi
11047done
11048  done
11049IFS=$as_save_IFS
11050
11051  ;;
11052esac
11053fi
11054SORT=$ac_cv_path_SORT
11055if test -n "$SORT"; then
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11057$as_echo "$SORT" >&6; }
11058else
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
11061fi
11062
11063
11064  test -n "$SORT" && break
11065done
11066
11067    else
11068      # If it succeeded, then it was overridden by the user. We will use it
11069      # for the tool.
11070
11071      # First remove it from the list of overridden variables, so we can test
11072      # for unknown variables in the end.
11073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11074
11075      # Check if we try to supply an empty value
11076      if test "x$SORT" = x; then
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11078$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11080$as_echo_n "checking for SORT... " >&6; }
11081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11082$as_echo "disabled" >&6; }
11083      else
11084        # Check if the provided tool contains a complete path.
11085        tool_specified="$SORT"
11086        tool_basename="${tool_specified##*/}"
11087        if test "x$tool_basename" = "x$tool_specified"; then
11088          # A command without a complete path is provided, search $PATH.
11089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11090$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11091          # Extract the first word of "$tool_basename", so it can be a program name with args.
11092set dummy $tool_basename; ac_word=$2
11093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11094$as_echo_n "checking for $ac_word... " >&6; }
11095if ${ac_cv_path_SORT+:} false; then :
11096  $as_echo_n "(cached) " >&6
11097else
11098  case $SORT in
11099  [\\/]* | ?:[\\/]*)
11100  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11101  ;;
11102  *)
11103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11104for as_dir in $PATH
11105do
11106  IFS=$as_save_IFS
11107  test -z "$as_dir" && as_dir=.
11108    for ac_exec_ext in '' $ac_executable_extensions; do
11109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11110    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11112    break 2
11113  fi
11114done
11115  done
11116IFS=$as_save_IFS
11117
11118  ;;
11119esac
11120fi
11121SORT=$ac_cv_path_SORT
11122if test -n "$SORT"; then
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11124$as_echo "$SORT" >&6; }
11125else
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127$as_echo "no" >&6; }
11128fi
11129
11130
11131          if test "x$SORT" = x; then
11132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11133          fi
11134        else
11135          # Otherwise we believe it is a complete path. Use it as it is.
11136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11137$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11139$as_echo_n "checking for SORT... " >&6; }
11140          if test ! -x "$tool_specified"; then
11141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11142$as_echo "not found" >&6; }
11143            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11144          fi
11145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11146$as_echo "$tool_specified" >&6; }
11147        fi
11148      fi
11149    fi
11150
11151  fi
11152
11153
11154
11155  if test "x$SORT" = x; then
11156    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11157  fi
11158
11159
11160
11161
11162
11163  # Publish this variable in the help.
11164
11165
11166  if [ -z "${TAIL+x}" ]; then
11167    # The variable is not set by user, try to locate tool using the code snippet
11168    for ac_prog in tail
11169do
11170  # Extract the first word of "$ac_prog", so it can be a program name with args.
11171set dummy $ac_prog; ac_word=$2
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11173$as_echo_n "checking for $ac_word... " >&6; }
11174if ${ac_cv_path_TAIL+:} false; then :
11175  $as_echo_n "(cached) " >&6
11176else
11177  case $TAIL in
11178  [\\/]* | ?:[\\/]*)
11179  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11180  ;;
11181  *)
11182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11183for as_dir in $PATH
11184do
11185  IFS=$as_save_IFS
11186  test -z "$as_dir" && as_dir=.
11187    for ac_exec_ext in '' $ac_executable_extensions; do
11188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11189    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11191    break 2
11192  fi
11193done
11194  done
11195IFS=$as_save_IFS
11196
11197  ;;
11198esac
11199fi
11200TAIL=$ac_cv_path_TAIL
11201if test -n "$TAIL"; then
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11203$as_echo "$TAIL" >&6; }
11204else
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11206$as_echo "no" >&6; }
11207fi
11208
11209
11210  test -n "$TAIL" && break
11211done
11212
11213  else
11214    # The variable is set, but is it from the command line or the environment?
11215
11216    # Try to remove the string !TAIL! from our list.
11217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11219      # If it failed, the variable was not from the command line. Ignore it,
11220      # but warn the user (except for BASH, which is always set by the calling BASH).
11221      if test "xTAIL" != xBASH; then
11222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11223$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11224      fi
11225      # Try to locate tool using the code snippet
11226      for ac_prog in tail
11227do
11228  # Extract the first word of "$ac_prog", so it can be a program name with args.
11229set dummy $ac_prog; ac_word=$2
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11231$as_echo_n "checking for $ac_word... " >&6; }
11232if ${ac_cv_path_TAIL+:} false; then :
11233  $as_echo_n "(cached) " >&6
11234else
11235  case $TAIL in
11236  [\\/]* | ?:[\\/]*)
11237  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11238  ;;
11239  *)
11240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11241for as_dir in $PATH
11242do
11243  IFS=$as_save_IFS
11244  test -z "$as_dir" && as_dir=.
11245    for ac_exec_ext in '' $ac_executable_extensions; do
11246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11247    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11249    break 2
11250  fi
11251done
11252  done
11253IFS=$as_save_IFS
11254
11255  ;;
11256esac
11257fi
11258TAIL=$ac_cv_path_TAIL
11259if test -n "$TAIL"; then
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11261$as_echo "$TAIL" >&6; }
11262else
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
11265fi
11266
11267
11268  test -n "$TAIL" && break
11269done
11270
11271    else
11272      # If it succeeded, then it was overridden by the user. We will use it
11273      # for the tool.
11274
11275      # First remove it from the list of overridden variables, so we can test
11276      # for unknown variables in the end.
11277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11278
11279      # Check if we try to supply an empty value
11280      if test "x$TAIL" = x; then
11281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11282$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11284$as_echo_n "checking for TAIL... " >&6; }
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11286$as_echo "disabled" >&6; }
11287      else
11288        # Check if the provided tool contains a complete path.
11289        tool_specified="$TAIL"
11290        tool_basename="${tool_specified##*/}"
11291        if test "x$tool_basename" = "x$tool_specified"; then
11292          # A command without a complete path is provided, search $PATH.
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11294$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11295          # Extract the first word of "$tool_basename", so it can be a program name with args.
11296set dummy $tool_basename; ac_word=$2
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11298$as_echo_n "checking for $ac_word... " >&6; }
11299if ${ac_cv_path_TAIL+:} false; then :
11300  $as_echo_n "(cached) " >&6
11301else
11302  case $TAIL in
11303  [\\/]* | ?:[\\/]*)
11304  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11305  ;;
11306  *)
11307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11308for as_dir in $PATH
11309do
11310  IFS=$as_save_IFS
11311  test -z "$as_dir" && as_dir=.
11312    for ac_exec_ext in '' $ac_executable_extensions; do
11313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11314    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11316    break 2
11317  fi
11318done
11319  done
11320IFS=$as_save_IFS
11321
11322  ;;
11323esac
11324fi
11325TAIL=$ac_cv_path_TAIL
11326if test -n "$TAIL"; then
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11328$as_echo "$TAIL" >&6; }
11329else
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11331$as_echo "no" >&6; }
11332fi
11333
11334
11335          if test "x$TAIL" = x; then
11336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11337          fi
11338        else
11339          # Otherwise we believe it is a complete path. Use it as it is.
11340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11341$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11343$as_echo_n "checking for TAIL... " >&6; }
11344          if test ! -x "$tool_specified"; then
11345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11346$as_echo "not found" >&6; }
11347            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11348          fi
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11350$as_echo "$tool_specified" >&6; }
11351        fi
11352      fi
11353    fi
11354
11355  fi
11356
11357
11358
11359  if test "x$TAIL" = x; then
11360    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11361  fi
11362
11363
11364
11365
11366
11367  # Publish this variable in the help.
11368
11369
11370  if [ -z "${TAR+x}" ]; then
11371    # The variable is not set by user, try to locate tool using the code snippet
11372    for ac_prog in gtar tar
11373do
11374  # Extract the first word of "$ac_prog", so it can be a program name with args.
11375set dummy $ac_prog; ac_word=$2
11376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11377$as_echo_n "checking for $ac_word... " >&6; }
11378if ${ac_cv_path_TAR+:} false; then :
11379  $as_echo_n "(cached) " >&6
11380else
11381  case $TAR in
11382  [\\/]* | ?:[\\/]*)
11383  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11384  ;;
11385  *)
11386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11387for as_dir in $PATH
11388do
11389  IFS=$as_save_IFS
11390  test -z "$as_dir" && as_dir=.
11391    for ac_exec_ext in '' $ac_executable_extensions; do
11392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11393    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11395    break 2
11396  fi
11397done
11398  done
11399IFS=$as_save_IFS
11400
11401  ;;
11402esac
11403fi
11404TAR=$ac_cv_path_TAR
11405if test -n "$TAR"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11407$as_echo "$TAR" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$TAR" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !TAR! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xTAR" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gtar tar
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_path_TAR+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  case $TAR in
11440  [\\/]* | ?:[\\/]*)
11441  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11442  ;;
11443  *)
11444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11445for as_dir in $PATH
11446do
11447  IFS=$as_save_IFS
11448  test -z "$as_dir" && as_dir=.
11449    for ac_exec_ext in '' $ac_executable_extensions; do
11450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11451    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11453    break 2
11454  fi
11455done
11456  done
11457IFS=$as_save_IFS
11458
11459  ;;
11460esac
11461fi
11462TAR=$ac_cv_path_TAR
11463if test -n "$TAR"; then
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11465$as_echo "$TAR" >&6; }
11466else
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11468$as_echo "no" >&6; }
11469fi
11470
11471
11472  test -n "$TAR" && break
11473done
11474
11475    else
11476      # If it succeeded, then it was overridden by the user. We will use it
11477      # for the tool.
11478
11479      # First remove it from the list of overridden variables, so we can test
11480      # for unknown variables in the end.
11481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11482
11483      # Check if we try to supply an empty value
11484      if test "x$TAR" = x; then
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11486$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11488$as_echo_n "checking for TAR... " >&6; }
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11490$as_echo "disabled" >&6; }
11491      else
11492        # Check if the provided tool contains a complete path.
11493        tool_specified="$TAR"
11494        tool_basename="${tool_specified##*/}"
11495        if test "x$tool_basename" = "x$tool_specified"; then
11496          # A command without a complete path is provided, search $PATH.
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11498$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11499          # Extract the first word of "$tool_basename", so it can be a program name with args.
11500set dummy $tool_basename; ac_word=$2
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11502$as_echo_n "checking for $ac_word... " >&6; }
11503if ${ac_cv_path_TAR+:} false; then :
11504  $as_echo_n "(cached) " >&6
11505else
11506  case $TAR in
11507  [\\/]* | ?:[\\/]*)
11508  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11509  ;;
11510  *)
11511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512for as_dir in $PATH
11513do
11514  IFS=$as_save_IFS
11515  test -z "$as_dir" && as_dir=.
11516    for ac_exec_ext in '' $ac_executable_extensions; do
11517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520    break 2
11521  fi
11522done
11523  done
11524IFS=$as_save_IFS
11525
11526  ;;
11527esac
11528fi
11529TAR=$ac_cv_path_TAR
11530if test -n "$TAR"; then
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11532$as_echo "$TAR" >&6; }
11533else
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
11536fi
11537
11538
11539          if test "x$TAR" = x; then
11540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11541          fi
11542        else
11543          # Otherwise we believe it is a complete path. Use it as it is.
11544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11545$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11547$as_echo_n "checking for TAR... " >&6; }
11548          if test ! -x "$tool_specified"; then
11549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11550$as_echo "not found" >&6; }
11551            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11552          fi
11553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11554$as_echo "$tool_specified" >&6; }
11555        fi
11556      fi
11557    fi
11558
11559  fi
11560
11561
11562
11563  if test "x$TAR" = x; then
11564    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11565  fi
11566
11567
11568
11569
11570
11571  # Publish this variable in the help.
11572
11573
11574  if [ -z "${TEE+x}" ]; then
11575    # The variable is not set by user, try to locate tool using the code snippet
11576    for ac_prog in tee
11577do
11578  # Extract the first word of "$ac_prog", so it can be a program name with args.
11579set dummy $ac_prog; ac_word=$2
11580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11581$as_echo_n "checking for $ac_word... " >&6; }
11582if ${ac_cv_path_TEE+:} false; then :
11583  $as_echo_n "(cached) " >&6
11584else
11585  case $TEE in
11586  [\\/]* | ?:[\\/]*)
11587  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11588  ;;
11589  *)
11590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11591for as_dir in $PATH
11592do
11593  IFS=$as_save_IFS
11594  test -z "$as_dir" && as_dir=.
11595    for ac_exec_ext in '' $ac_executable_extensions; do
11596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11597    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11599    break 2
11600  fi
11601done
11602  done
11603IFS=$as_save_IFS
11604
11605  ;;
11606esac
11607fi
11608TEE=$ac_cv_path_TEE
11609if test -n "$TEE"; then
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11611$as_echo "$TEE" >&6; }
11612else
11613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11614$as_echo "no" >&6; }
11615fi
11616
11617
11618  test -n "$TEE" && break
11619done
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !TEE! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xTEE" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      for ac_prog in tee
11635do
11636  # Extract the first word of "$ac_prog", so it can be a program name with args.
11637set dummy $ac_prog; ac_word=$2
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11639$as_echo_n "checking for $ac_word... " >&6; }
11640if ${ac_cv_path_TEE+:} false; then :
11641  $as_echo_n "(cached) " >&6
11642else
11643  case $TEE in
11644  [\\/]* | ?:[\\/]*)
11645  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11646  ;;
11647  *)
11648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649for as_dir in $PATH
11650do
11651  IFS=$as_save_IFS
11652  test -z "$as_dir" && as_dir=.
11653    for ac_exec_ext in '' $ac_executable_extensions; do
11654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11655    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11657    break 2
11658  fi
11659done
11660  done
11661IFS=$as_save_IFS
11662
11663  ;;
11664esac
11665fi
11666TEE=$ac_cv_path_TEE
11667if test -n "$TEE"; then
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11669$as_echo "$TEE" >&6; }
11670else
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11672$as_echo "no" >&6; }
11673fi
11674
11675
11676  test -n "$TEE" && break
11677done
11678
11679    else
11680      # If it succeeded, then it was overridden by the user. We will use it
11681      # for the tool.
11682
11683      # First remove it from the list of overridden variables, so we can test
11684      # for unknown variables in the end.
11685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11686
11687      # Check if we try to supply an empty value
11688      if test "x$TEE" = x; then
11689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11690$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11692$as_echo_n "checking for TEE... " >&6; }
11693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11694$as_echo "disabled" >&6; }
11695      else
11696        # Check if the provided tool contains a complete path.
11697        tool_specified="$TEE"
11698        tool_basename="${tool_specified##*/}"
11699        if test "x$tool_basename" = "x$tool_specified"; then
11700          # A command without a complete path is provided, search $PATH.
11701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11702$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11703          # Extract the first word of "$tool_basename", so it can be a program name with args.
11704set dummy $tool_basename; ac_word=$2
11705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11706$as_echo_n "checking for $ac_word... " >&6; }
11707if ${ac_cv_path_TEE+:} false; then :
11708  $as_echo_n "(cached) " >&6
11709else
11710  case $TEE in
11711  [\\/]* | ?:[\\/]*)
11712  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11713  ;;
11714  *)
11715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11716for as_dir in $PATH
11717do
11718  IFS=$as_save_IFS
11719  test -z "$as_dir" && as_dir=.
11720    for ac_exec_ext in '' $ac_executable_extensions; do
11721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11722    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11724    break 2
11725  fi
11726done
11727  done
11728IFS=$as_save_IFS
11729
11730  ;;
11731esac
11732fi
11733TEE=$ac_cv_path_TEE
11734if test -n "$TEE"; then
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11736$as_echo "$TEE" >&6; }
11737else
11738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
11740fi
11741
11742
11743          if test "x$TEE" = x; then
11744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11745          fi
11746        else
11747          # Otherwise we believe it is a complete path. Use it as it is.
11748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11749$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11751$as_echo_n "checking for TEE... " >&6; }
11752          if test ! -x "$tool_specified"; then
11753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11754$as_echo "not found" >&6; }
11755            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11756          fi
11757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11758$as_echo "$tool_specified" >&6; }
11759        fi
11760      fi
11761    fi
11762
11763  fi
11764
11765
11766
11767  if test "x$TEE" = x; then
11768    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11769  fi
11770
11771
11772
11773
11774
11775  # Publish this variable in the help.
11776
11777
11778  if [ -z "${TOUCH+x}" ]; then
11779    # The variable is not set by user, try to locate tool using the code snippet
11780    for ac_prog in touch
11781do
11782  # Extract the first word of "$ac_prog", so it can be a program name with args.
11783set dummy $ac_prog; ac_word=$2
11784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11785$as_echo_n "checking for $ac_word... " >&6; }
11786if ${ac_cv_path_TOUCH+:} false; then :
11787  $as_echo_n "(cached) " >&6
11788else
11789  case $TOUCH in
11790  [\\/]* | ?:[\\/]*)
11791  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11792  ;;
11793  *)
11794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11795for as_dir in $PATH
11796do
11797  IFS=$as_save_IFS
11798  test -z "$as_dir" && as_dir=.
11799    for ac_exec_ext in '' $ac_executable_extensions; do
11800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11801    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11803    break 2
11804  fi
11805done
11806  done
11807IFS=$as_save_IFS
11808
11809  ;;
11810esac
11811fi
11812TOUCH=$ac_cv_path_TOUCH
11813if test -n "$TOUCH"; then
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11815$as_echo "$TOUCH" >&6; }
11816else
11817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11818$as_echo "no" >&6; }
11819fi
11820
11821
11822  test -n "$TOUCH" && break
11823done
11824
11825  else
11826    # The variable is set, but is it from the command line or the environment?
11827
11828    # Try to remove the string !TOUCH! from our list.
11829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11831      # If it failed, the variable was not from the command line. Ignore it,
11832      # but warn the user (except for BASH, which is always set by the calling BASH).
11833      if test "xTOUCH" != xBASH; then
11834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11835$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11836      fi
11837      # Try to locate tool using the code snippet
11838      for ac_prog in touch
11839do
11840  # Extract the first word of "$ac_prog", so it can be a program name with args.
11841set dummy $ac_prog; ac_word=$2
11842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11843$as_echo_n "checking for $ac_word... " >&6; }
11844if ${ac_cv_path_TOUCH+:} false; then :
11845  $as_echo_n "(cached) " >&6
11846else
11847  case $TOUCH in
11848  [\\/]* | ?:[\\/]*)
11849  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11850  ;;
11851  *)
11852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11853for as_dir in $PATH
11854do
11855  IFS=$as_save_IFS
11856  test -z "$as_dir" && as_dir=.
11857    for ac_exec_ext in '' $ac_executable_extensions; do
11858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11859    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11861    break 2
11862  fi
11863done
11864  done
11865IFS=$as_save_IFS
11866
11867  ;;
11868esac
11869fi
11870TOUCH=$ac_cv_path_TOUCH
11871if test -n "$TOUCH"; then
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11873$as_echo "$TOUCH" >&6; }
11874else
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11876$as_echo "no" >&6; }
11877fi
11878
11879
11880  test -n "$TOUCH" && break
11881done
11882
11883    else
11884      # If it succeeded, then it was overridden by the user. We will use it
11885      # for the tool.
11886
11887      # First remove it from the list of overridden variables, so we can test
11888      # for unknown variables in the end.
11889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11890
11891      # Check if we try to supply an empty value
11892      if test "x$TOUCH" = x; then
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11894$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11896$as_echo_n "checking for TOUCH... " >&6; }
11897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11898$as_echo "disabled" >&6; }
11899      else
11900        # Check if the provided tool contains a complete path.
11901        tool_specified="$TOUCH"
11902        tool_basename="${tool_specified##*/}"
11903        if test "x$tool_basename" = "x$tool_specified"; then
11904          # A command without a complete path is provided, search $PATH.
11905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11906$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11907          # Extract the first word of "$tool_basename", so it can be a program name with args.
11908set dummy $tool_basename; ac_word=$2
11909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11910$as_echo_n "checking for $ac_word... " >&6; }
11911if ${ac_cv_path_TOUCH+:} false; then :
11912  $as_echo_n "(cached) " >&6
11913else
11914  case $TOUCH in
11915  [\\/]* | ?:[\\/]*)
11916  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11917  ;;
11918  *)
11919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11920for as_dir in $PATH
11921do
11922  IFS=$as_save_IFS
11923  test -z "$as_dir" && as_dir=.
11924    for ac_exec_ext in '' $ac_executable_extensions; do
11925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11926    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11928    break 2
11929  fi
11930done
11931  done
11932IFS=$as_save_IFS
11933
11934  ;;
11935esac
11936fi
11937TOUCH=$ac_cv_path_TOUCH
11938if test -n "$TOUCH"; then
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11940$as_echo "$TOUCH" >&6; }
11941else
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11943$as_echo "no" >&6; }
11944fi
11945
11946
11947          if test "x$TOUCH" = x; then
11948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11949          fi
11950        else
11951          # Otherwise we believe it is a complete path. Use it as it is.
11952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11953$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11955$as_echo_n "checking for TOUCH... " >&6; }
11956          if test ! -x "$tool_specified"; then
11957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11958$as_echo "not found" >&6; }
11959            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11960          fi
11961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11962$as_echo "$tool_specified" >&6; }
11963        fi
11964      fi
11965    fi
11966
11967  fi
11968
11969
11970
11971  if test "x$TOUCH" = x; then
11972    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11973  fi
11974
11975
11976
11977
11978
11979  # Publish this variable in the help.
11980
11981
11982  if [ -z "${TR+x}" ]; then
11983    # The variable is not set by user, try to locate tool using the code snippet
11984    for ac_prog in tr
11985do
11986  # Extract the first word of "$ac_prog", so it can be a program name with args.
11987set dummy $ac_prog; ac_word=$2
11988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11989$as_echo_n "checking for $ac_word... " >&6; }
11990if ${ac_cv_path_TR+:} false; then :
11991  $as_echo_n "(cached) " >&6
11992else
11993  case $TR in
11994  [\\/]* | ?:[\\/]*)
11995  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11996  ;;
11997  *)
11998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11999for as_dir in $PATH
12000do
12001  IFS=$as_save_IFS
12002  test -z "$as_dir" && as_dir=.
12003    for ac_exec_ext in '' $ac_executable_extensions; do
12004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12005    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12007    break 2
12008  fi
12009done
12010  done
12011IFS=$as_save_IFS
12012
12013  ;;
12014esac
12015fi
12016TR=$ac_cv_path_TR
12017if test -n "$TR"; then
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12019$as_echo "$TR" >&6; }
12020else
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
12023fi
12024
12025
12026  test -n "$TR" && break
12027done
12028
12029  else
12030    # The variable is set, but is it from the command line or the environment?
12031
12032    # Try to remove the string !TR! from our list.
12033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12035      # If it failed, the variable was not from the command line. Ignore it,
12036      # but warn the user (except for BASH, which is always set by the calling BASH).
12037      if test "xTR" != xBASH; then
12038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12039$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12040      fi
12041      # Try to locate tool using the code snippet
12042      for ac_prog in tr
12043do
12044  # Extract the first word of "$ac_prog", so it can be a program name with args.
12045set dummy $ac_prog; ac_word=$2
12046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12047$as_echo_n "checking for $ac_word... " >&6; }
12048if ${ac_cv_path_TR+:} false; then :
12049  $as_echo_n "(cached) " >&6
12050else
12051  case $TR in
12052  [\\/]* | ?:[\\/]*)
12053  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12054  ;;
12055  *)
12056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12057for as_dir in $PATH
12058do
12059  IFS=$as_save_IFS
12060  test -z "$as_dir" && as_dir=.
12061    for ac_exec_ext in '' $ac_executable_extensions; do
12062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12063    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12065    break 2
12066  fi
12067done
12068  done
12069IFS=$as_save_IFS
12070
12071  ;;
12072esac
12073fi
12074TR=$ac_cv_path_TR
12075if test -n "$TR"; then
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12077$as_echo "$TR" >&6; }
12078else
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12080$as_echo "no" >&6; }
12081fi
12082
12083
12084  test -n "$TR" && break
12085done
12086
12087    else
12088      # If it succeeded, then it was overridden by the user. We will use it
12089      # for the tool.
12090
12091      # First remove it from the list of overridden variables, so we can test
12092      # for unknown variables in the end.
12093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12094
12095      # Check if we try to supply an empty value
12096      if test "x$TR" = x; then
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12098$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12100$as_echo_n "checking for TR... " >&6; }
12101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12102$as_echo "disabled" >&6; }
12103      else
12104        # Check if the provided tool contains a complete path.
12105        tool_specified="$TR"
12106        tool_basename="${tool_specified##*/}"
12107        if test "x$tool_basename" = "x$tool_specified"; then
12108          # A command without a complete path is provided, search $PATH.
12109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12110$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12111          # Extract the first word of "$tool_basename", so it can be a program name with args.
12112set dummy $tool_basename; ac_word=$2
12113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12114$as_echo_n "checking for $ac_word... " >&6; }
12115if ${ac_cv_path_TR+:} false; then :
12116  $as_echo_n "(cached) " >&6
12117else
12118  case $TR in
12119  [\\/]* | ?:[\\/]*)
12120  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12121  ;;
12122  *)
12123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12124for as_dir in $PATH
12125do
12126  IFS=$as_save_IFS
12127  test -z "$as_dir" && as_dir=.
12128    for ac_exec_ext in '' $ac_executable_extensions; do
12129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12130    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12132    break 2
12133  fi
12134done
12135  done
12136IFS=$as_save_IFS
12137
12138  ;;
12139esac
12140fi
12141TR=$ac_cv_path_TR
12142if test -n "$TR"; then
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12144$as_echo "$TR" >&6; }
12145else
12146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147$as_echo "no" >&6; }
12148fi
12149
12150
12151          if test "x$TR" = x; then
12152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12153          fi
12154        else
12155          # Otherwise we believe it is a complete path. Use it as it is.
12156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12157$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12159$as_echo_n "checking for TR... " >&6; }
12160          if test ! -x "$tool_specified"; then
12161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12162$as_echo "not found" >&6; }
12163            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12164          fi
12165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12166$as_echo "$tool_specified" >&6; }
12167        fi
12168      fi
12169    fi
12170
12171  fi
12172
12173
12174
12175  if test "x$TR" = x; then
12176    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12177  fi
12178
12179
12180
12181
12182
12183  # Publish this variable in the help.
12184
12185
12186  if [ -z "${UNAME+x}" ]; then
12187    # The variable is not set by user, try to locate tool using the code snippet
12188    for ac_prog in uname
12189do
12190  # Extract the first word of "$ac_prog", so it can be a program name with args.
12191set dummy $ac_prog; ac_word=$2
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12193$as_echo_n "checking for $ac_word... " >&6; }
12194if ${ac_cv_path_UNAME+:} false; then :
12195  $as_echo_n "(cached) " >&6
12196else
12197  case $UNAME in
12198  [\\/]* | ?:[\\/]*)
12199  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12200  ;;
12201  *)
12202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12203for as_dir in $PATH
12204do
12205  IFS=$as_save_IFS
12206  test -z "$as_dir" && as_dir=.
12207    for ac_exec_ext in '' $ac_executable_extensions; do
12208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12209    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12211    break 2
12212  fi
12213done
12214  done
12215IFS=$as_save_IFS
12216
12217  ;;
12218esac
12219fi
12220UNAME=$ac_cv_path_UNAME
12221if test -n "$UNAME"; then
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12223$as_echo "$UNAME" >&6; }
12224else
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12226$as_echo "no" >&6; }
12227fi
12228
12229
12230  test -n "$UNAME" && break
12231done
12232
12233  else
12234    # The variable is set, but is it from the command line or the environment?
12235
12236    # Try to remove the string !UNAME! from our list.
12237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12239      # If it failed, the variable was not from the command line. Ignore it,
12240      # but warn the user (except for BASH, which is always set by the calling BASH).
12241      if test "xUNAME" != xBASH; then
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12243$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12244      fi
12245      # Try to locate tool using the code snippet
12246      for ac_prog in uname
12247do
12248  # Extract the first word of "$ac_prog", so it can be a program name with args.
12249set dummy $ac_prog; ac_word=$2
12250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12251$as_echo_n "checking for $ac_word... " >&6; }
12252if ${ac_cv_path_UNAME+:} false; then :
12253  $as_echo_n "(cached) " >&6
12254else
12255  case $UNAME in
12256  [\\/]* | ?:[\\/]*)
12257  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12258  ;;
12259  *)
12260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12261for as_dir in $PATH
12262do
12263  IFS=$as_save_IFS
12264  test -z "$as_dir" && as_dir=.
12265    for ac_exec_ext in '' $ac_executable_extensions; do
12266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12267    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12269    break 2
12270  fi
12271done
12272  done
12273IFS=$as_save_IFS
12274
12275  ;;
12276esac
12277fi
12278UNAME=$ac_cv_path_UNAME
12279if test -n "$UNAME"; then
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12281$as_echo "$UNAME" >&6; }
12282else
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12284$as_echo "no" >&6; }
12285fi
12286
12287
12288  test -n "$UNAME" && break
12289done
12290
12291    else
12292      # If it succeeded, then it was overridden by the user. We will use it
12293      # for the tool.
12294
12295      # First remove it from the list of overridden variables, so we can test
12296      # for unknown variables in the end.
12297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12298
12299      # Check if we try to supply an empty value
12300      if test "x$UNAME" = x; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12302$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12304$as_echo_n "checking for UNAME... " >&6; }
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12306$as_echo "disabled" >&6; }
12307      else
12308        # Check if the provided tool contains a complete path.
12309        tool_specified="$UNAME"
12310        tool_basename="${tool_specified##*/}"
12311        if test "x$tool_basename" = "x$tool_specified"; then
12312          # A command without a complete path is provided, search $PATH.
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12314$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12315          # Extract the first word of "$tool_basename", so it can be a program name with args.
12316set dummy $tool_basename; ac_word=$2
12317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12318$as_echo_n "checking for $ac_word... " >&6; }
12319if ${ac_cv_path_UNAME+:} false; then :
12320  $as_echo_n "(cached) " >&6
12321else
12322  case $UNAME in
12323  [\\/]* | ?:[\\/]*)
12324  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12325  ;;
12326  *)
12327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12328for as_dir in $PATH
12329do
12330  IFS=$as_save_IFS
12331  test -z "$as_dir" && as_dir=.
12332    for ac_exec_ext in '' $ac_executable_extensions; do
12333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12334    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12336    break 2
12337  fi
12338done
12339  done
12340IFS=$as_save_IFS
12341
12342  ;;
12343esac
12344fi
12345UNAME=$ac_cv_path_UNAME
12346if test -n "$UNAME"; then
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12348$as_echo "$UNAME" >&6; }
12349else
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
12352fi
12353
12354
12355          if test "x$UNAME" = x; then
12356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12357          fi
12358        else
12359          # Otherwise we believe it is a complete path. Use it as it is.
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12361$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12363$as_echo_n "checking for UNAME... " >&6; }
12364          if test ! -x "$tool_specified"; then
12365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12366$as_echo "not found" >&6; }
12367            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12368          fi
12369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12370$as_echo "$tool_specified" >&6; }
12371        fi
12372      fi
12373    fi
12374
12375  fi
12376
12377
12378
12379  if test "x$UNAME" = x; then
12380    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12381  fi
12382
12383
12384
12385
12386
12387  # Publish this variable in the help.
12388
12389
12390  if [ -z "${UNIQ+x}" ]; then
12391    # The variable is not set by user, try to locate tool using the code snippet
12392    for ac_prog in uniq
12393do
12394  # Extract the first word of "$ac_prog", so it can be a program name with args.
12395set dummy $ac_prog; ac_word=$2
12396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12397$as_echo_n "checking for $ac_word... " >&6; }
12398if ${ac_cv_path_UNIQ+:} false; then :
12399  $as_echo_n "(cached) " >&6
12400else
12401  case $UNIQ in
12402  [\\/]* | ?:[\\/]*)
12403  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12404  ;;
12405  *)
12406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12407for as_dir in $PATH
12408do
12409  IFS=$as_save_IFS
12410  test -z "$as_dir" && as_dir=.
12411    for ac_exec_ext in '' $ac_executable_extensions; do
12412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12413    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12415    break 2
12416  fi
12417done
12418  done
12419IFS=$as_save_IFS
12420
12421  ;;
12422esac
12423fi
12424UNIQ=$ac_cv_path_UNIQ
12425if test -n "$UNIQ"; then
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12427$as_echo "$UNIQ" >&6; }
12428else
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12430$as_echo "no" >&6; }
12431fi
12432
12433
12434  test -n "$UNIQ" && break
12435done
12436
12437  else
12438    # The variable is set, but is it from the command line or the environment?
12439
12440    # Try to remove the string !UNIQ! from our list.
12441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12443      # If it failed, the variable was not from the command line. Ignore it,
12444      # but warn the user (except for BASH, which is always set by the calling BASH).
12445      if test "xUNIQ" != xBASH; then
12446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12447$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12448      fi
12449      # Try to locate tool using the code snippet
12450      for ac_prog in uniq
12451do
12452  # Extract the first word of "$ac_prog", so it can be a program name with args.
12453set dummy $ac_prog; ac_word=$2
12454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455$as_echo_n "checking for $ac_word... " >&6; }
12456if ${ac_cv_path_UNIQ+:} false; then :
12457  $as_echo_n "(cached) " >&6
12458else
12459  case $UNIQ in
12460  [\\/]* | ?:[\\/]*)
12461  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12462  ;;
12463  *)
12464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465for as_dir in $PATH
12466do
12467  IFS=$as_save_IFS
12468  test -z "$as_dir" && as_dir=.
12469    for ac_exec_ext in '' $ac_executable_extensions; do
12470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473    break 2
12474  fi
12475done
12476  done
12477IFS=$as_save_IFS
12478
12479  ;;
12480esac
12481fi
12482UNIQ=$ac_cv_path_UNIQ
12483if test -n "$UNIQ"; then
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12485$as_echo "$UNIQ" >&6; }
12486else
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
12489fi
12490
12491
12492  test -n "$UNIQ" && break
12493done
12494
12495    else
12496      # If it succeeded, then it was overridden by the user. We will use it
12497      # for the tool.
12498
12499      # First remove it from the list of overridden variables, so we can test
12500      # for unknown variables in the end.
12501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12502
12503      # Check if we try to supply an empty value
12504      if test "x$UNIQ" = x; then
12505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12506$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12508$as_echo_n "checking for UNIQ... " >&6; }
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12510$as_echo "disabled" >&6; }
12511      else
12512        # Check if the provided tool contains a complete path.
12513        tool_specified="$UNIQ"
12514        tool_basename="${tool_specified##*/}"
12515        if test "x$tool_basename" = "x$tool_specified"; then
12516          # A command without a complete path is provided, search $PATH.
12517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12518$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12519          # Extract the first word of "$tool_basename", so it can be a program name with args.
12520set dummy $tool_basename; ac_word=$2
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12522$as_echo_n "checking for $ac_word... " >&6; }
12523if ${ac_cv_path_UNIQ+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  case $UNIQ in
12527  [\\/]* | ?:[\\/]*)
12528  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12529  ;;
12530  *)
12531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12532for as_dir in $PATH
12533do
12534  IFS=$as_save_IFS
12535  test -z "$as_dir" && as_dir=.
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12538    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12540    break 2
12541  fi
12542done
12543  done
12544IFS=$as_save_IFS
12545
12546  ;;
12547esac
12548fi
12549UNIQ=$ac_cv_path_UNIQ
12550if test -n "$UNIQ"; then
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12552$as_echo "$UNIQ" >&6; }
12553else
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12555$as_echo "no" >&6; }
12556fi
12557
12558
12559          if test "x$UNIQ" = x; then
12560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12561          fi
12562        else
12563          # Otherwise we believe it is a complete path. Use it as it is.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12565$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12567$as_echo_n "checking for UNIQ... " >&6; }
12568          if test ! -x "$tool_specified"; then
12569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12570$as_echo "not found" >&6; }
12571            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12572          fi
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12574$as_echo "$tool_specified" >&6; }
12575        fi
12576      fi
12577    fi
12578
12579  fi
12580
12581
12582
12583  if test "x$UNIQ" = x; then
12584    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12585  fi
12586
12587
12588
12589
12590
12591  # Publish this variable in the help.
12592
12593
12594  if [ -z "${WC+x}" ]; then
12595    # The variable is not set by user, try to locate tool using the code snippet
12596    for ac_prog in wc
12597do
12598  # Extract the first word of "$ac_prog", so it can be a program name with args.
12599set dummy $ac_prog; ac_word=$2
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12601$as_echo_n "checking for $ac_word... " >&6; }
12602if ${ac_cv_path_WC+:} false; then :
12603  $as_echo_n "(cached) " >&6
12604else
12605  case $WC in
12606  [\\/]* | ?:[\\/]*)
12607  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12608  ;;
12609  *)
12610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12611for as_dir in $PATH
12612do
12613  IFS=$as_save_IFS
12614  test -z "$as_dir" && as_dir=.
12615    for ac_exec_ext in '' $ac_executable_extensions; do
12616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12617    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12619    break 2
12620  fi
12621done
12622  done
12623IFS=$as_save_IFS
12624
12625  ;;
12626esac
12627fi
12628WC=$ac_cv_path_WC
12629if test -n "$WC"; then
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12631$as_echo "$WC" >&6; }
12632else
12633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634$as_echo "no" >&6; }
12635fi
12636
12637
12638  test -n "$WC" && break
12639done
12640
12641  else
12642    # The variable is set, but is it from the command line or the environment?
12643
12644    # Try to remove the string !WC! from our list.
12645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12647      # If it failed, the variable was not from the command line. Ignore it,
12648      # but warn the user (except for BASH, which is always set by the calling BASH).
12649      if test "xWC" != xBASH; then
12650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12651$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12652      fi
12653      # Try to locate tool using the code snippet
12654      for ac_prog in wc
12655do
12656  # Extract the first word of "$ac_prog", so it can be a program name with args.
12657set dummy $ac_prog; ac_word=$2
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12659$as_echo_n "checking for $ac_word... " >&6; }
12660if ${ac_cv_path_WC+:} false; then :
12661  $as_echo_n "(cached) " >&6
12662else
12663  case $WC in
12664  [\\/]* | ?:[\\/]*)
12665  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12666  ;;
12667  *)
12668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669for as_dir in $PATH
12670do
12671  IFS=$as_save_IFS
12672  test -z "$as_dir" && as_dir=.
12673    for ac_exec_ext in '' $ac_executable_extensions; do
12674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12675    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12677    break 2
12678  fi
12679done
12680  done
12681IFS=$as_save_IFS
12682
12683  ;;
12684esac
12685fi
12686WC=$ac_cv_path_WC
12687if test -n "$WC"; then
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12689$as_echo "$WC" >&6; }
12690else
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692$as_echo "no" >&6; }
12693fi
12694
12695
12696  test -n "$WC" && break
12697done
12698
12699    else
12700      # If it succeeded, then it was overridden by the user. We will use it
12701      # for the tool.
12702
12703      # First remove it from the list of overridden variables, so we can test
12704      # for unknown variables in the end.
12705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12706
12707      # Check if we try to supply an empty value
12708      if test "x$WC" = x; then
12709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12710$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12712$as_echo_n "checking for WC... " >&6; }
12713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12714$as_echo "disabled" >&6; }
12715      else
12716        # Check if the provided tool contains a complete path.
12717        tool_specified="$WC"
12718        tool_basename="${tool_specified##*/}"
12719        if test "x$tool_basename" = "x$tool_specified"; then
12720          # A command without a complete path is provided, search $PATH.
12721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12722$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12723          # Extract the first word of "$tool_basename", so it can be a program name with args.
12724set dummy $tool_basename; ac_word=$2
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12726$as_echo_n "checking for $ac_word... " >&6; }
12727if ${ac_cv_path_WC+:} false; then :
12728  $as_echo_n "(cached) " >&6
12729else
12730  case $WC in
12731  [\\/]* | ?:[\\/]*)
12732  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12733  ;;
12734  *)
12735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12736for as_dir in $PATH
12737do
12738  IFS=$as_save_IFS
12739  test -z "$as_dir" && as_dir=.
12740    for ac_exec_ext in '' $ac_executable_extensions; do
12741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12742    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12744    break 2
12745  fi
12746done
12747  done
12748IFS=$as_save_IFS
12749
12750  ;;
12751esac
12752fi
12753WC=$ac_cv_path_WC
12754if test -n "$WC"; then
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12756$as_echo "$WC" >&6; }
12757else
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760fi
12761
12762
12763          if test "x$WC" = x; then
12764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12765          fi
12766        else
12767          # Otherwise we believe it is a complete path. Use it as it is.
12768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12769$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12771$as_echo_n "checking for WC... " >&6; }
12772          if test ! -x "$tool_specified"; then
12773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12774$as_echo "not found" >&6; }
12775            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12776          fi
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12778$as_echo "$tool_specified" >&6; }
12779        fi
12780      fi
12781    fi
12782
12783  fi
12784
12785
12786
12787  if test "x$WC" = x; then
12788    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12789  fi
12790
12791
12792
12793
12794
12795  # Publish this variable in the help.
12796
12797
12798  if [ -z "${WHICH+x}" ]; then
12799    # The variable is not set by user, try to locate tool using the code snippet
12800    for ac_prog in which
12801do
12802  # Extract the first word of "$ac_prog", so it can be a program name with args.
12803set dummy $ac_prog; ac_word=$2
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12805$as_echo_n "checking for $ac_word... " >&6; }
12806if ${ac_cv_path_WHICH+:} false; then :
12807  $as_echo_n "(cached) " >&6
12808else
12809  case $WHICH in
12810  [\\/]* | ?:[\\/]*)
12811  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12812  ;;
12813  *)
12814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12815for as_dir in $PATH
12816do
12817  IFS=$as_save_IFS
12818  test -z "$as_dir" && as_dir=.
12819    for ac_exec_ext in '' $ac_executable_extensions; do
12820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12821    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12823    break 2
12824  fi
12825done
12826  done
12827IFS=$as_save_IFS
12828
12829  ;;
12830esac
12831fi
12832WHICH=$ac_cv_path_WHICH
12833if test -n "$WHICH"; then
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12835$as_echo "$WHICH" >&6; }
12836else
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12838$as_echo "no" >&6; }
12839fi
12840
12841
12842  test -n "$WHICH" && break
12843done
12844
12845  else
12846    # The variable is set, but is it from the command line or the environment?
12847
12848    # Try to remove the string !WHICH! from our list.
12849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12851      # If it failed, the variable was not from the command line. Ignore it,
12852      # but warn the user (except for BASH, which is always set by the calling BASH).
12853      if test "xWHICH" != xBASH; then
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12855$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12856      fi
12857      # Try to locate tool using the code snippet
12858      for ac_prog in which
12859do
12860  # Extract the first word of "$ac_prog", so it can be a program name with args.
12861set dummy $ac_prog; ac_word=$2
12862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12863$as_echo_n "checking for $ac_word... " >&6; }
12864if ${ac_cv_path_WHICH+:} false; then :
12865  $as_echo_n "(cached) " >&6
12866else
12867  case $WHICH in
12868  [\\/]* | ?:[\\/]*)
12869  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12870  ;;
12871  *)
12872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12873for as_dir in $PATH
12874do
12875  IFS=$as_save_IFS
12876  test -z "$as_dir" && as_dir=.
12877    for ac_exec_ext in '' $ac_executable_extensions; do
12878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12879    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12881    break 2
12882  fi
12883done
12884  done
12885IFS=$as_save_IFS
12886
12887  ;;
12888esac
12889fi
12890WHICH=$ac_cv_path_WHICH
12891if test -n "$WHICH"; then
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12893$as_echo "$WHICH" >&6; }
12894else
12895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
12897fi
12898
12899
12900  test -n "$WHICH" && break
12901done
12902
12903    else
12904      # If it succeeded, then it was overridden by the user. We will use it
12905      # for the tool.
12906
12907      # First remove it from the list of overridden variables, so we can test
12908      # for unknown variables in the end.
12909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12910
12911      # Check if we try to supply an empty value
12912      if test "x$WHICH" = x; then
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12914$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12916$as_echo_n "checking for WHICH... " >&6; }
12917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12918$as_echo "disabled" >&6; }
12919      else
12920        # Check if the provided tool contains a complete path.
12921        tool_specified="$WHICH"
12922        tool_basename="${tool_specified##*/}"
12923        if test "x$tool_basename" = "x$tool_specified"; then
12924          # A command without a complete path is provided, search $PATH.
12925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12926$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12927          # Extract the first word of "$tool_basename", so it can be a program name with args.
12928set dummy $tool_basename; ac_word=$2
12929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12930$as_echo_n "checking for $ac_word... " >&6; }
12931if ${ac_cv_path_WHICH+:} false; then :
12932  $as_echo_n "(cached) " >&6
12933else
12934  case $WHICH in
12935  [\\/]* | ?:[\\/]*)
12936  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12937  ;;
12938  *)
12939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12940for as_dir in $PATH
12941do
12942  IFS=$as_save_IFS
12943  test -z "$as_dir" && as_dir=.
12944    for ac_exec_ext in '' $ac_executable_extensions; do
12945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12946    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12948    break 2
12949  fi
12950done
12951  done
12952IFS=$as_save_IFS
12953
12954  ;;
12955esac
12956fi
12957WHICH=$ac_cv_path_WHICH
12958if test -n "$WHICH"; then
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12960$as_echo "$WHICH" >&6; }
12961else
12962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12963$as_echo "no" >&6; }
12964fi
12965
12966
12967          if test "x$WHICH" = x; then
12968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12969          fi
12970        else
12971          # Otherwise we believe it is a complete path. Use it as it is.
12972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12973$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12975$as_echo_n "checking for WHICH... " >&6; }
12976          if test ! -x "$tool_specified"; then
12977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12978$as_echo "not found" >&6; }
12979            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12980          fi
12981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12982$as_echo "$tool_specified" >&6; }
12983        fi
12984      fi
12985    fi
12986
12987  fi
12988
12989
12990
12991  if test "x$WHICH" = x; then
12992    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12993  fi
12994
12995
12996
12997
12998
12999  # Publish this variable in the help.
13000
13001
13002  if [ -z "${XARGS+x}" ]; then
13003    # The variable is not set by user, try to locate tool using the code snippet
13004    for ac_prog in xargs
13005do
13006  # Extract the first word of "$ac_prog", so it can be a program name with args.
13007set dummy $ac_prog; ac_word=$2
13008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009$as_echo_n "checking for $ac_word... " >&6; }
13010if ${ac_cv_path_XARGS+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  case $XARGS in
13014  [\\/]* | ?:[\\/]*)
13015  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13016  ;;
13017  *)
13018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019for as_dir in $PATH
13020do
13021  IFS=$as_save_IFS
13022  test -z "$as_dir" && as_dir=.
13023    for ac_exec_ext in '' $ac_executable_extensions; do
13024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027    break 2
13028  fi
13029done
13030  done
13031IFS=$as_save_IFS
13032
13033  ;;
13034esac
13035fi
13036XARGS=$ac_cv_path_XARGS
13037if test -n "$XARGS"; then
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13039$as_echo "$XARGS" >&6; }
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044
13045
13046  test -n "$XARGS" && break
13047done
13048
13049  else
13050    # The variable is set, but is it from the command line or the environment?
13051
13052    # Try to remove the string !XARGS! from our list.
13053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13055      # If it failed, the variable was not from the command line. Ignore it,
13056      # but warn the user (except for BASH, which is always set by the calling BASH).
13057      if test "xXARGS" != xBASH; then
13058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13059$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13060      fi
13061      # Try to locate tool using the code snippet
13062      for ac_prog in xargs
13063do
13064  # Extract the first word of "$ac_prog", so it can be a program name with args.
13065set dummy $ac_prog; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_XARGS+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $XARGS in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094XARGS=$ac_cv_path_XARGS
13095if test -n "$XARGS"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13097$as_echo "$XARGS" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104  test -n "$XARGS" && break
13105done
13106
13107    else
13108      # If it succeeded, then it was overridden by the user. We will use it
13109      # for the tool.
13110
13111      # First remove it from the list of overridden variables, so we can test
13112      # for unknown variables in the end.
13113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13114
13115      # Check if we try to supply an empty value
13116      if test "x$XARGS" = x; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13118$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13120$as_echo_n "checking for XARGS... " >&6; }
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13122$as_echo "disabled" >&6; }
13123      else
13124        # Check if the provided tool contains a complete path.
13125        tool_specified="$XARGS"
13126        tool_basename="${tool_specified##*/}"
13127        if test "x$tool_basename" = "x$tool_specified"; then
13128          # A command without a complete path is provided, search $PATH.
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13130$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13131          # Extract the first word of "$tool_basename", so it can be a program name with args.
13132set dummy $tool_basename; ac_word=$2
13133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13134$as_echo_n "checking for $ac_word... " >&6; }
13135if ${ac_cv_path_XARGS+:} false; then :
13136  $as_echo_n "(cached) " >&6
13137else
13138  case $XARGS in
13139  [\\/]* | ?:[\\/]*)
13140  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13141  ;;
13142  *)
13143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13144for as_dir in $PATH
13145do
13146  IFS=$as_save_IFS
13147  test -z "$as_dir" && as_dir=.
13148    for ac_exec_ext in '' $ac_executable_extensions; do
13149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13150    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13152    break 2
13153  fi
13154done
13155  done
13156IFS=$as_save_IFS
13157
13158  ;;
13159esac
13160fi
13161XARGS=$ac_cv_path_XARGS
13162if test -n "$XARGS"; then
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13164$as_echo "$XARGS" >&6; }
13165else
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167$as_echo "no" >&6; }
13168fi
13169
13170
13171          if test "x$XARGS" = x; then
13172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13173          fi
13174        else
13175          # Otherwise we believe it is a complete path. Use it as it is.
13176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13177$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13179$as_echo_n "checking for XARGS... " >&6; }
13180          if test ! -x "$tool_specified"; then
13181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13182$as_echo "not found" >&6; }
13183            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13184          fi
13185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13186$as_echo "$tool_specified" >&6; }
13187        fi
13188      fi
13189    fi
13190
13191  fi
13192
13193
13194
13195  if test "x$XARGS" = x; then
13196    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13197  fi
13198
13199
13200
13201  # Then required tools that require some special treatment.
13202
13203
13204  # Publish this variable in the help.
13205
13206
13207  if [ -z "${AWK+x}" ]; then
13208    # The variable is not set by user, try to locate tool using the code snippet
13209    for ac_prog in gawk mawk nawk awk
13210do
13211  # Extract the first word of "$ac_prog", so it can be a program name with args.
13212set dummy $ac_prog; ac_word=$2
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13214$as_echo_n "checking for $ac_word... " >&6; }
13215if ${ac_cv_prog_AWK+:} false; then :
13216  $as_echo_n "(cached) " >&6
13217else
13218  if test -n "$AWK"; then
13219  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13220else
13221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13222for as_dir in $PATH
13223do
13224  IFS=$as_save_IFS
13225  test -z "$as_dir" && as_dir=.
13226    for ac_exec_ext in '' $ac_executable_extensions; do
13227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13228    ac_cv_prog_AWK="$ac_prog"
13229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13230    break 2
13231  fi
13232done
13233  done
13234IFS=$as_save_IFS
13235
13236fi
13237fi
13238AWK=$ac_cv_prog_AWK
13239if test -n "$AWK"; then
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13241$as_echo "$AWK" >&6; }
13242else
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
13245fi
13246
13247
13248  test -n "$AWK" && break
13249done
13250
13251  else
13252    # The variable is set, but is it from the command line or the environment?
13253
13254    # Try to remove the string !AWK! from our list.
13255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13257      # If it failed, the variable was not from the command line. Ignore it,
13258      # but warn the user (except for BASH, which is always set by the calling BASH).
13259      if test "xAWK" != xBASH; then
13260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13261$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13262      fi
13263      # Try to locate tool using the code snippet
13264      for ac_prog in gawk mawk nawk awk
13265do
13266  # Extract the first word of "$ac_prog", so it can be a program name with args.
13267set dummy $ac_prog; ac_word=$2
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13269$as_echo_n "checking for $ac_word... " >&6; }
13270if ${ac_cv_prog_AWK+:} false; then :
13271  $as_echo_n "(cached) " >&6
13272else
13273  if test -n "$AWK"; then
13274  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13275else
13276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13277for as_dir in $PATH
13278do
13279  IFS=$as_save_IFS
13280  test -z "$as_dir" && as_dir=.
13281    for ac_exec_ext in '' $ac_executable_extensions; do
13282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13283    ac_cv_prog_AWK="$ac_prog"
13284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13285    break 2
13286  fi
13287done
13288  done
13289IFS=$as_save_IFS
13290
13291fi
13292fi
13293AWK=$ac_cv_prog_AWK
13294if test -n "$AWK"; then
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13296$as_echo "$AWK" >&6; }
13297else
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13299$as_echo "no" >&6; }
13300fi
13301
13302
13303  test -n "$AWK" && break
13304done
13305
13306    else
13307      # If it succeeded, then it was overridden by the user. We will use it
13308      # for the tool.
13309
13310      # First remove it from the list of overridden variables, so we can test
13311      # for unknown variables in the end.
13312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13313
13314      # Check if we try to supply an empty value
13315      if test "x$AWK" = x; then
13316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13317$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13319$as_echo_n "checking for AWK... " >&6; }
13320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13321$as_echo "disabled" >&6; }
13322      else
13323        # Check if the provided tool contains a complete path.
13324        tool_specified="$AWK"
13325        tool_basename="${tool_specified##*/}"
13326        if test "x$tool_basename" = "x$tool_specified"; then
13327          # A command without a complete path is provided, search $PATH.
13328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13329$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13330          # Extract the first word of "$tool_basename", so it can be a program name with args.
13331set dummy $tool_basename; ac_word=$2
13332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13333$as_echo_n "checking for $ac_word... " >&6; }
13334if ${ac_cv_path_AWK+:} false; then :
13335  $as_echo_n "(cached) " >&6
13336else
13337  case $AWK in
13338  [\\/]* | ?:[\\/]*)
13339  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13340  ;;
13341  *)
13342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13343for as_dir in $PATH
13344do
13345  IFS=$as_save_IFS
13346  test -z "$as_dir" && as_dir=.
13347    for ac_exec_ext in '' $ac_executable_extensions; do
13348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13349    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13351    break 2
13352  fi
13353done
13354  done
13355IFS=$as_save_IFS
13356
13357  ;;
13358esac
13359fi
13360AWK=$ac_cv_path_AWK
13361if test -n "$AWK"; then
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13363$as_echo "$AWK" >&6; }
13364else
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366$as_echo "no" >&6; }
13367fi
13368
13369
13370          if test "x$AWK" = x; then
13371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13372          fi
13373        else
13374          # Otherwise we believe it is a complete path. Use it as it is.
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13376$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13378$as_echo_n "checking for AWK... " >&6; }
13379          if test ! -x "$tool_specified"; then
13380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13381$as_echo "not found" >&6; }
13382            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13383          fi
13384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13385$as_echo "$tool_specified" >&6; }
13386        fi
13387      fi
13388    fi
13389
13390  fi
13391
13392
13393  if test "x$AWK" = x; then
13394    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13395  fi
13396
13397
13398
13399
13400  # Publish this variable in the help.
13401
13402
13403  if [ -z "${GREP+x}" ]; then
13404    # The variable is not set by user, try to locate tool using the code snippet
13405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13406$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13407if ${ac_cv_path_GREP+:} false; then :
13408  $as_echo_n "(cached) " >&6
13409else
13410  if test -z "$GREP"; then
13411  ac_path_GREP_found=false
13412  # Loop through the user's path and test for each of PROGNAME-LIST
13413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13414for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13415do
13416  IFS=$as_save_IFS
13417  test -z "$as_dir" && as_dir=.
13418    for ac_prog in grep ggrep; do
13419    for ac_exec_ext in '' $ac_executable_extensions; do
13420      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13421      as_fn_executable_p "$ac_path_GREP" || continue
13422# Check for GNU ac_path_GREP and select it if it is found.
13423  # Check for GNU $ac_path_GREP
13424case `"$ac_path_GREP" --version 2>&1` in
13425*GNU*)
13426  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13427*)
13428  ac_count=0
13429  $as_echo_n 0123456789 >"conftest.in"
13430  while :
13431  do
13432    cat "conftest.in" "conftest.in" >"conftest.tmp"
13433    mv "conftest.tmp" "conftest.in"
13434    cp "conftest.in" "conftest.nl"
13435    $as_echo 'GREP' >> "conftest.nl"
13436    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13437    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13438    as_fn_arith $ac_count + 1 && ac_count=$as_val
13439    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13440      # Best one so far, save it but keep looking for a better one
13441      ac_cv_path_GREP="$ac_path_GREP"
13442      ac_path_GREP_max=$ac_count
13443    fi
13444    # 10*(2^10) chars as input seems more than enough
13445    test $ac_count -gt 10 && break
13446  done
13447  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13448esac
13449
13450      $ac_path_GREP_found && break 3
13451    done
13452  done
13453  done
13454IFS=$as_save_IFS
13455  if test -z "$ac_cv_path_GREP"; then
13456    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13457  fi
13458else
13459  ac_cv_path_GREP=$GREP
13460fi
13461
13462fi
13463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13464$as_echo "$ac_cv_path_GREP" >&6; }
13465 GREP="$ac_cv_path_GREP"
13466
13467
13468  else
13469    # The variable is set, but is it from the command line or the environment?
13470
13471    # Try to remove the string !GREP! from our list.
13472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13474      # If it failed, the variable was not from the command line. Ignore it,
13475      # but warn the user (except for BASH, which is always set by the calling BASH).
13476      if test "xGREP" != xBASH; then
13477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13478$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13479      fi
13480      # Try to locate tool using the code snippet
13481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13482$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  if test -z "$GREP"; then
13487  ac_path_GREP_found=false
13488  # Loop through the user's path and test for each of PROGNAME-LIST
13489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13490for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13491do
13492  IFS=$as_save_IFS
13493  test -z "$as_dir" && as_dir=.
13494    for ac_prog in grep ggrep; do
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13497      as_fn_executable_p "$ac_path_GREP" || continue
13498# Check for GNU ac_path_GREP and select it if it is found.
13499  # Check for GNU $ac_path_GREP
13500case `"$ac_path_GREP" --version 2>&1` in
13501*GNU*)
13502  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13503*)
13504  ac_count=0
13505  $as_echo_n 0123456789 >"conftest.in"
13506  while :
13507  do
13508    cat "conftest.in" "conftest.in" >"conftest.tmp"
13509    mv "conftest.tmp" "conftest.in"
13510    cp "conftest.in" "conftest.nl"
13511    $as_echo 'GREP' >> "conftest.nl"
13512    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13513    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13514    as_fn_arith $ac_count + 1 && ac_count=$as_val
13515    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13516      # Best one so far, save it but keep looking for a better one
13517      ac_cv_path_GREP="$ac_path_GREP"
13518      ac_path_GREP_max=$ac_count
13519    fi
13520    # 10*(2^10) chars as input seems more than enough
13521    test $ac_count -gt 10 && break
13522  done
13523  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13524esac
13525
13526      $ac_path_GREP_found && break 3
13527    done
13528  done
13529  done
13530IFS=$as_save_IFS
13531  if test -z "$ac_cv_path_GREP"; then
13532    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13533  fi
13534else
13535  ac_cv_path_GREP=$GREP
13536fi
13537
13538fi
13539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13540$as_echo "$ac_cv_path_GREP" >&6; }
13541 GREP="$ac_cv_path_GREP"
13542
13543
13544    else
13545      # If it succeeded, then it was overridden by the user. We will use it
13546      # for the tool.
13547
13548      # First remove it from the list of overridden variables, so we can test
13549      # for unknown variables in the end.
13550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13551
13552      # Check if we try to supply an empty value
13553      if test "x$GREP" = x; then
13554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13555$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13557$as_echo_n "checking for GREP... " >&6; }
13558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13559$as_echo "disabled" >&6; }
13560      else
13561        # Check if the provided tool contains a complete path.
13562        tool_specified="$GREP"
13563        tool_basename="${tool_specified##*/}"
13564        if test "x$tool_basename" = "x$tool_specified"; then
13565          # A command without a complete path is provided, search $PATH.
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13567$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13568          # Extract the first word of "$tool_basename", so it can be a program name with args.
13569set dummy $tool_basename; ac_word=$2
13570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13571$as_echo_n "checking for $ac_word... " >&6; }
13572if ${ac_cv_path_GREP+:} false; then :
13573  $as_echo_n "(cached) " >&6
13574else
13575  case $GREP in
13576  [\\/]* | ?:[\\/]*)
13577  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13578  ;;
13579  *)
13580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13581for as_dir in $PATH
13582do
13583  IFS=$as_save_IFS
13584  test -z "$as_dir" && as_dir=.
13585    for ac_exec_ext in '' $ac_executable_extensions; do
13586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13587    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13589    break 2
13590  fi
13591done
13592  done
13593IFS=$as_save_IFS
13594
13595  ;;
13596esac
13597fi
13598GREP=$ac_cv_path_GREP
13599if test -n "$GREP"; then
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13601$as_echo "$GREP" >&6; }
13602else
13603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13604$as_echo "no" >&6; }
13605fi
13606
13607
13608          if test "x$GREP" = x; then
13609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13610          fi
13611        else
13612          # Otherwise we believe it is a complete path. Use it as it is.
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13614$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13616$as_echo_n "checking for GREP... " >&6; }
13617          if test ! -x "$tool_specified"; then
13618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13619$as_echo "not found" >&6; }
13620            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13621          fi
13622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13623$as_echo "$tool_specified" >&6; }
13624        fi
13625      fi
13626    fi
13627
13628  fi
13629
13630
13631  if test "x$GREP" = x; then
13632    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13633  fi
13634
13635
13636
13637
13638  # Publish this variable in the help.
13639
13640
13641  if [ -z "${EGREP+x}" ]; then
13642    # The variable is not set by user, try to locate tool using the code snippet
13643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13644$as_echo_n "checking for egrep... " >&6; }
13645if ${ac_cv_path_EGREP+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13649   then ac_cv_path_EGREP="$GREP -E"
13650   else
13651     if test -z "$EGREP"; then
13652  ac_path_EGREP_found=false
13653  # Loop through the user's path and test for each of PROGNAME-LIST
13654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13656do
13657  IFS=$as_save_IFS
13658  test -z "$as_dir" && as_dir=.
13659    for ac_prog in egrep; do
13660    for ac_exec_ext in '' $ac_executable_extensions; do
13661      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13662      as_fn_executable_p "$ac_path_EGREP" || continue
13663# Check for GNU ac_path_EGREP and select it if it is found.
13664  # Check for GNU $ac_path_EGREP
13665case `"$ac_path_EGREP" --version 2>&1` in
13666*GNU*)
13667  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13668*)
13669  ac_count=0
13670  $as_echo_n 0123456789 >"conftest.in"
13671  while :
13672  do
13673    cat "conftest.in" "conftest.in" >"conftest.tmp"
13674    mv "conftest.tmp" "conftest.in"
13675    cp "conftest.in" "conftest.nl"
13676    $as_echo 'EGREP' >> "conftest.nl"
13677    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13678    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13679    as_fn_arith $ac_count + 1 && ac_count=$as_val
13680    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13681      # Best one so far, save it but keep looking for a better one
13682      ac_cv_path_EGREP="$ac_path_EGREP"
13683      ac_path_EGREP_max=$ac_count
13684    fi
13685    # 10*(2^10) chars as input seems more than enough
13686    test $ac_count -gt 10 && break
13687  done
13688  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13689esac
13690
13691      $ac_path_EGREP_found && break 3
13692    done
13693  done
13694  done
13695IFS=$as_save_IFS
13696  if test -z "$ac_cv_path_EGREP"; then
13697    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13698  fi
13699else
13700  ac_cv_path_EGREP=$EGREP
13701fi
13702
13703   fi
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13706$as_echo "$ac_cv_path_EGREP" >&6; }
13707 EGREP="$ac_cv_path_EGREP"
13708
13709
13710  else
13711    # The variable is set, but is it from the command line or the environment?
13712
13713    # Try to remove the string !EGREP! from our list.
13714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13716      # If it failed, the variable was not from the command line. Ignore it,
13717      # but warn the user (except for BASH, which is always set by the calling BASH).
13718      if test "xEGREP" != xBASH; then
13719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13720$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13721      fi
13722      # Try to locate tool using the code snippet
13723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13724$as_echo_n "checking for egrep... " >&6; }
13725if ${ac_cv_path_EGREP+:} false; then :
13726  $as_echo_n "(cached) " >&6
13727else
13728  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13729   then ac_cv_path_EGREP="$GREP -E"
13730   else
13731     if test -z "$EGREP"; then
13732  ac_path_EGREP_found=false
13733  # Loop through the user's path and test for each of PROGNAME-LIST
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_prog in egrep; do
13740    for ac_exec_ext in '' $ac_executable_extensions; do
13741      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13742      as_fn_executable_p "$ac_path_EGREP" || continue
13743# Check for GNU ac_path_EGREP and select it if it is found.
13744  # Check for GNU $ac_path_EGREP
13745case `"$ac_path_EGREP" --version 2>&1` in
13746*GNU*)
13747  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13748*)
13749  ac_count=0
13750  $as_echo_n 0123456789 >"conftest.in"
13751  while :
13752  do
13753    cat "conftest.in" "conftest.in" >"conftest.tmp"
13754    mv "conftest.tmp" "conftest.in"
13755    cp "conftest.in" "conftest.nl"
13756    $as_echo 'EGREP' >> "conftest.nl"
13757    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13758    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13759    as_fn_arith $ac_count + 1 && ac_count=$as_val
13760    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13761      # Best one so far, save it but keep looking for a better one
13762      ac_cv_path_EGREP="$ac_path_EGREP"
13763      ac_path_EGREP_max=$ac_count
13764    fi
13765    # 10*(2^10) chars as input seems more than enough
13766    test $ac_count -gt 10 && break
13767  done
13768  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13769esac
13770
13771      $ac_path_EGREP_found && break 3
13772    done
13773  done
13774  done
13775IFS=$as_save_IFS
13776  if test -z "$ac_cv_path_EGREP"; then
13777    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13778  fi
13779else
13780  ac_cv_path_EGREP=$EGREP
13781fi
13782
13783   fi
13784fi
13785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13786$as_echo "$ac_cv_path_EGREP" >&6; }
13787 EGREP="$ac_cv_path_EGREP"
13788
13789
13790    else
13791      # If it succeeded, then it was overridden by the user. We will use it
13792      # for the tool.
13793
13794      # First remove it from the list of overridden variables, so we can test
13795      # for unknown variables in the end.
13796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13797
13798      # Check if we try to supply an empty value
13799      if test "x$EGREP" = x; then
13800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13801$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13803$as_echo_n "checking for EGREP... " >&6; }
13804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13805$as_echo "disabled" >&6; }
13806      else
13807        # Check if the provided tool contains a complete path.
13808        tool_specified="$EGREP"
13809        tool_basename="${tool_specified##*/}"
13810        if test "x$tool_basename" = "x$tool_specified"; then
13811          # A command without a complete path is provided, search $PATH.
13812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13813$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13814          # Extract the first word of "$tool_basename", so it can be a program name with args.
13815set dummy $tool_basename; ac_word=$2
13816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13817$as_echo_n "checking for $ac_word... " >&6; }
13818if ${ac_cv_path_EGREP+:} false; then :
13819  $as_echo_n "(cached) " >&6
13820else
13821  case $EGREP in
13822  [\\/]* | ?:[\\/]*)
13823  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13824  ;;
13825  *)
13826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13827for as_dir in $PATH
13828do
13829  IFS=$as_save_IFS
13830  test -z "$as_dir" && as_dir=.
13831    for ac_exec_ext in '' $ac_executable_extensions; do
13832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13833    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13835    break 2
13836  fi
13837done
13838  done
13839IFS=$as_save_IFS
13840
13841  ;;
13842esac
13843fi
13844EGREP=$ac_cv_path_EGREP
13845if test -n "$EGREP"; then
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13847$as_echo "$EGREP" >&6; }
13848else
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
13851fi
13852
13853
13854          if test "x$EGREP" = x; then
13855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13856          fi
13857        else
13858          # Otherwise we believe it is a complete path. Use it as it is.
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13860$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13862$as_echo_n "checking for EGREP... " >&6; }
13863          if test ! -x "$tool_specified"; then
13864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13865$as_echo "not found" >&6; }
13866            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13867          fi
13868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13869$as_echo "$tool_specified" >&6; }
13870        fi
13871      fi
13872    fi
13873
13874  fi
13875
13876
13877  if test "x$EGREP" = x; then
13878    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13879  fi
13880
13881
13882
13883
13884  # Publish this variable in the help.
13885
13886
13887  if [ -z "${FGREP+x}" ]; then
13888    # The variable is not set by user, try to locate tool using the code snippet
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13890$as_echo_n "checking for fgrep... " >&6; }
13891if ${ac_cv_path_FGREP+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13895   then ac_cv_path_FGREP="$GREP -F"
13896   else
13897     if test -z "$FGREP"; then
13898  ac_path_FGREP_found=false
13899  # Loop through the user's path and test for each of PROGNAME-LIST
13900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13901for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13902do
13903  IFS=$as_save_IFS
13904  test -z "$as_dir" && as_dir=.
13905    for ac_prog in fgrep; do
13906    for ac_exec_ext in '' $ac_executable_extensions; do
13907      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13908      as_fn_executable_p "$ac_path_FGREP" || continue
13909# Check for GNU ac_path_FGREP and select it if it is found.
13910  # Check for GNU $ac_path_FGREP
13911case `"$ac_path_FGREP" --version 2>&1` in
13912*GNU*)
13913  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13914*)
13915  ac_count=0
13916  $as_echo_n 0123456789 >"conftest.in"
13917  while :
13918  do
13919    cat "conftest.in" "conftest.in" >"conftest.tmp"
13920    mv "conftest.tmp" "conftest.in"
13921    cp "conftest.in" "conftest.nl"
13922    $as_echo 'FGREP' >> "conftest.nl"
13923    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13924    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13925    as_fn_arith $ac_count + 1 && ac_count=$as_val
13926    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13927      # Best one so far, save it but keep looking for a better one
13928      ac_cv_path_FGREP="$ac_path_FGREP"
13929      ac_path_FGREP_max=$ac_count
13930    fi
13931    # 10*(2^10) chars as input seems more than enough
13932    test $ac_count -gt 10 && break
13933  done
13934  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13935esac
13936
13937      $ac_path_FGREP_found && break 3
13938    done
13939  done
13940  done
13941IFS=$as_save_IFS
13942  if test -z "$ac_cv_path_FGREP"; then
13943    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13944  fi
13945else
13946  ac_cv_path_FGREP=$FGREP
13947fi
13948
13949   fi
13950fi
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13952$as_echo "$ac_cv_path_FGREP" >&6; }
13953 FGREP="$ac_cv_path_FGREP"
13954
13955
13956  else
13957    # The variable is set, but is it from the command line or the environment?
13958
13959    # Try to remove the string !FGREP! from our list.
13960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13962      # If it failed, the variable was not from the command line. Ignore it,
13963      # but warn the user (except for BASH, which is always set by the calling BASH).
13964      if test "xFGREP" != xBASH; then
13965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13966$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13967      fi
13968      # Try to locate tool using the code snippet
13969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13970$as_echo_n "checking for fgrep... " >&6; }
13971if ${ac_cv_path_FGREP+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13975   then ac_cv_path_FGREP="$GREP -F"
13976   else
13977     if test -z "$FGREP"; then
13978  ac_path_FGREP_found=false
13979  # Loop through the user's path and test for each of PROGNAME-LIST
13980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13982do
13983  IFS=$as_save_IFS
13984  test -z "$as_dir" && as_dir=.
13985    for ac_prog in fgrep; do
13986    for ac_exec_ext in '' $ac_executable_extensions; do
13987      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13988      as_fn_executable_p "$ac_path_FGREP" || continue
13989# Check for GNU ac_path_FGREP and select it if it is found.
13990  # Check for GNU $ac_path_FGREP
13991case `"$ac_path_FGREP" --version 2>&1` in
13992*GNU*)
13993  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13994*)
13995  ac_count=0
13996  $as_echo_n 0123456789 >"conftest.in"
13997  while :
13998  do
13999    cat "conftest.in" "conftest.in" >"conftest.tmp"
14000    mv "conftest.tmp" "conftest.in"
14001    cp "conftest.in" "conftest.nl"
14002    $as_echo 'FGREP' >> "conftest.nl"
14003    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14004    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14005    as_fn_arith $ac_count + 1 && ac_count=$as_val
14006    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14007      # Best one so far, save it but keep looking for a better one
14008      ac_cv_path_FGREP="$ac_path_FGREP"
14009      ac_path_FGREP_max=$ac_count
14010    fi
14011    # 10*(2^10) chars as input seems more than enough
14012    test $ac_count -gt 10 && break
14013  done
14014  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14015esac
14016
14017      $ac_path_FGREP_found && break 3
14018    done
14019  done
14020  done
14021IFS=$as_save_IFS
14022  if test -z "$ac_cv_path_FGREP"; then
14023    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14024  fi
14025else
14026  ac_cv_path_FGREP=$FGREP
14027fi
14028
14029   fi
14030fi
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14032$as_echo "$ac_cv_path_FGREP" >&6; }
14033 FGREP="$ac_cv_path_FGREP"
14034
14035
14036    else
14037      # If it succeeded, then it was overridden by the user. We will use it
14038      # for the tool.
14039
14040      # First remove it from the list of overridden variables, so we can test
14041      # for unknown variables in the end.
14042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14043
14044      # Check if we try to supply an empty value
14045      if test "x$FGREP" = x; then
14046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14047$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14049$as_echo_n "checking for FGREP... " >&6; }
14050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14051$as_echo "disabled" >&6; }
14052      else
14053        # Check if the provided tool contains a complete path.
14054        tool_specified="$FGREP"
14055        tool_basename="${tool_specified##*/}"
14056        if test "x$tool_basename" = "x$tool_specified"; then
14057          # A command without a complete path is provided, search $PATH.
14058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14059$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14060          # Extract the first word of "$tool_basename", so it can be a program name with args.
14061set dummy $tool_basename; ac_word=$2
14062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14063$as_echo_n "checking for $ac_word... " >&6; }
14064if ${ac_cv_path_FGREP+:} false; then :
14065  $as_echo_n "(cached) " >&6
14066else
14067  case $FGREP in
14068  [\\/]* | ?:[\\/]*)
14069  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14070  ;;
14071  *)
14072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14073for as_dir in $PATH
14074do
14075  IFS=$as_save_IFS
14076  test -z "$as_dir" && as_dir=.
14077    for ac_exec_ext in '' $ac_executable_extensions; do
14078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14079    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14081    break 2
14082  fi
14083done
14084  done
14085IFS=$as_save_IFS
14086
14087  ;;
14088esac
14089fi
14090FGREP=$ac_cv_path_FGREP
14091if test -n "$FGREP"; then
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14093$as_echo "$FGREP" >&6; }
14094else
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14096$as_echo "no" >&6; }
14097fi
14098
14099
14100          if test "x$FGREP" = x; then
14101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14102          fi
14103        else
14104          # Otherwise we believe it is a complete path. Use it as it is.
14105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14106$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14108$as_echo_n "checking for FGREP... " >&6; }
14109          if test ! -x "$tool_specified"; then
14110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14111$as_echo "not found" >&6; }
14112            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14113          fi
14114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14115$as_echo "$tool_specified" >&6; }
14116        fi
14117      fi
14118    fi
14119
14120  fi
14121
14122
14123  if test "x$FGREP" = x; then
14124    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14125  fi
14126
14127
14128
14129
14130  # Publish this variable in the help.
14131
14132
14133  if [ -z "${SED+x}" ]; then
14134    # The variable is not set by user, try to locate tool using the code snippet
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14136$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14137if ${ac_cv_path_SED+:} false; then :
14138  $as_echo_n "(cached) " >&6
14139else
14140            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14141     for ac_i in 1 2 3 4 5 6 7; do
14142       ac_script="$ac_script$as_nl$ac_script"
14143     done
14144     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14145     { ac_script=; unset ac_script;}
14146     if test -z "$SED"; then
14147  ac_path_SED_found=false
14148  # Loop through the user's path and test for each of PROGNAME-LIST
14149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14150for as_dir in $PATH
14151do
14152  IFS=$as_save_IFS
14153  test -z "$as_dir" && as_dir=.
14154    for ac_prog in sed gsed; do
14155    for ac_exec_ext in '' $ac_executable_extensions; do
14156      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14157      as_fn_executable_p "$ac_path_SED" || continue
14158# Check for GNU ac_path_SED and select it if it is found.
14159  # Check for GNU $ac_path_SED
14160case `"$ac_path_SED" --version 2>&1` in
14161*GNU*)
14162  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14163*)
14164  ac_count=0
14165  $as_echo_n 0123456789 >"conftest.in"
14166  while :
14167  do
14168    cat "conftest.in" "conftest.in" >"conftest.tmp"
14169    mv "conftest.tmp" "conftest.in"
14170    cp "conftest.in" "conftest.nl"
14171    $as_echo '' >> "conftest.nl"
14172    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14173    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14174    as_fn_arith $ac_count + 1 && ac_count=$as_val
14175    if test $ac_count -gt ${ac_path_SED_max-0}; then
14176      # Best one so far, save it but keep looking for a better one
14177      ac_cv_path_SED="$ac_path_SED"
14178      ac_path_SED_max=$ac_count
14179    fi
14180    # 10*(2^10) chars as input seems more than enough
14181    test $ac_count -gt 10 && break
14182  done
14183  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14184esac
14185
14186      $ac_path_SED_found && break 3
14187    done
14188  done
14189  done
14190IFS=$as_save_IFS
14191  if test -z "$ac_cv_path_SED"; then
14192    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14193  fi
14194else
14195  ac_cv_path_SED=$SED
14196fi
14197
14198fi
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14200$as_echo "$ac_cv_path_SED" >&6; }
14201 SED="$ac_cv_path_SED"
14202  rm -f conftest.sed
14203
14204  else
14205    # The variable is set, but is it from the command line or the environment?
14206
14207    # Try to remove the string !SED! from our list.
14208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14210      # If it failed, the variable was not from the command line. Ignore it,
14211      # but warn the user (except for BASH, which is always set by the calling BASH).
14212      if test "xSED" != xBASH; then
14213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14214$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14215      fi
14216      # Try to locate tool using the code snippet
14217      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14218$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14219if ${ac_cv_path_SED+:} false; then :
14220  $as_echo_n "(cached) " >&6
14221else
14222            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14223     for ac_i in 1 2 3 4 5 6 7; do
14224       ac_script="$ac_script$as_nl$ac_script"
14225     done
14226     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14227     { ac_script=; unset ac_script;}
14228     if test -z "$SED"; then
14229  ac_path_SED_found=false
14230  # Loop through the user's path and test for each of PROGNAME-LIST
14231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14232for as_dir in $PATH
14233do
14234  IFS=$as_save_IFS
14235  test -z "$as_dir" && as_dir=.
14236    for ac_prog in sed gsed; do
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14239      as_fn_executable_p "$ac_path_SED" || continue
14240# Check for GNU ac_path_SED and select it if it is found.
14241  # Check for GNU $ac_path_SED
14242case `"$ac_path_SED" --version 2>&1` in
14243*GNU*)
14244  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14245*)
14246  ac_count=0
14247  $as_echo_n 0123456789 >"conftest.in"
14248  while :
14249  do
14250    cat "conftest.in" "conftest.in" >"conftest.tmp"
14251    mv "conftest.tmp" "conftest.in"
14252    cp "conftest.in" "conftest.nl"
14253    $as_echo '' >> "conftest.nl"
14254    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14255    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14256    as_fn_arith $ac_count + 1 && ac_count=$as_val
14257    if test $ac_count -gt ${ac_path_SED_max-0}; then
14258      # Best one so far, save it but keep looking for a better one
14259      ac_cv_path_SED="$ac_path_SED"
14260      ac_path_SED_max=$ac_count
14261    fi
14262    # 10*(2^10) chars as input seems more than enough
14263    test $ac_count -gt 10 && break
14264  done
14265  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14266esac
14267
14268      $ac_path_SED_found && break 3
14269    done
14270  done
14271  done
14272IFS=$as_save_IFS
14273  if test -z "$ac_cv_path_SED"; then
14274    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14275  fi
14276else
14277  ac_cv_path_SED=$SED
14278fi
14279
14280fi
14281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14282$as_echo "$ac_cv_path_SED" >&6; }
14283 SED="$ac_cv_path_SED"
14284  rm -f conftest.sed
14285
14286    else
14287      # If it succeeded, then it was overridden by the user. We will use it
14288      # for the tool.
14289
14290      # First remove it from the list of overridden variables, so we can test
14291      # for unknown variables in the end.
14292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14293
14294      # Check if we try to supply an empty value
14295      if test "x$SED" = x; then
14296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14297$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14299$as_echo_n "checking for SED... " >&6; }
14300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14301$as_echo "disabled" >&6; }
14302      else
14303        # Check if the provided tool contains a complete path.
14304        tool_specified="$SED"
14305        tool_basename="${tool_specified##*/}"
14306        if test "x$tool_basename" = "x$tool_specified"; then
14307          # A command without a complete path is provided, search $PATH.
14308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14309$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14310          # Extract the first word of "$tool_basename", so it can be a program name with args.
14311set dummy $tool_basename; ac_word=$2
14312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14313$as_echo_n "checking for $ac_word... " >&6; }
14314if ${ac_cv_path_SED+:} false; then :
14315  $as_echo_n "(cached) " >&6
14316else
14317  case $SED in
14318  [\\/]* | ?:[\\/]*)
14319  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14320  ;;
14321  *)
14322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14323for as_dir in $PATH
14324do
14325  IFS=$as_save_IFS
14326  test -z "$as_dir" && as_dir=.
14327    for ac_exec_ext in '' $ac_executable_extensions; do
14328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14329    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14331    break 2
14332  fi
14333done
14334  done
14335IFS=$as_save_IFS
14336
14337  ;;
14338esac
14339fi
14340SED=$ac_cv_path_SED
14341if test -n "$SED"; then
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14343$as_echo "$SED" >&6; }
14344else
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14346$as_echo "no" >&6; }
14347fi
14348
14349
14350          if test "x$SED" = x; then
14351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14352          fi
14353        else
14354          # Otherwise we believe it is a complete path. Use it as it is.
14355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14356$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14358$as_echo_n "checking for SED... " >&6; }
14359          if test ! -x "$tool_specified"; then
14360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14361$as_echo "not found" >&6; }
14362            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14363          fi
14364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14365$as_echo "$tool_specified" >&6; }
14366        fi
14367      fi
14368    fi
14369
14370  fi
14371
14372
14373  if test "x$SED" = x; then
14374    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14375  fi
14376
14377
14378
14379  # Always force rm.
14380  RM="$RM -f"
14381
14382  # pwd behaves differently on various platforms and some don't support the -L flag.
14383  # Always use the bash builtin pwd to get uniform behavior.
14384  THEPWDCMD=pwd
14385
14386  # These are not required on all platforms
14387
14388
14389  # Publish this variable in the help.
14390
14391
14392  if [ -z "${CYGPATH+x}" ]; then
14393    # The variable is not set by user, try to locate tool using the code snippet
14394    for ac_prog in cygpath
14395do
14396  # Extract the first word of "$ac_prog", so it can be a program name with args.
14397set dummy $ac_prog; ac_word=$2
14398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14399$as_echo_n "checking for $ac_word... " >&6; }
14400if ${ac_cv_path_CYGPATH+:} false; then :
14401  $as_echo_n "(cached) " >&6
14402else
14403  case $CYGPATH in
14404  [\\/]* | ?:[\\/]*)
14405  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14406  ;;
14407  *)
14408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14409for as_dir in $PATH
14410do
14411  IFS=$as_save_IFS
14412  test -z "$as_dir" && as_dir=.
14413    for ac_exec_ext in '' $ac_executable_extensions; do
14414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14415    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14417    break 2
14418  fi
14419done
14420  done
14421IFS=$as_save_IFS
14422
14423  ;;
14424esac
14425fi
14426CYGPATH=$ac_cv_path_CYGPATH
14427if test -n "$CYGPATH"; then
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14429$as_echo "$CYGPATH" >&6; }
14430else
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14432$as_echo "no" >&6; }
14433fi
14434
14435
14436  test -n "$CYGPATH" && break
14437done
14438
14439  else
14440    # The variable is set, but is it from the command line or the environment?
14441
14442    # Try to remove the string !CYGPATH! from our list.
14443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14445      # If it failed, the variable was not from the command line. Ignore it,
14446      # but warn the user (except for BASH, which is always set by the calling BASH).
14447      if test "xCYGPATH" != xBASH; then
14448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14449$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14450      fi
14451      # Try to locate tool using the code snippet
14452      for ac_prog in cygpath
14453do
14454  # Extract the first word of "$ac_prog", so it can be a program name with args.
14455set dummy $ac_prog; ac_word=$2
14456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14457$as_echo_n "checking for $ac_word... " >&6; }
14458if ${ac_cv_path_CYGPATH+:} false; then :
14459  $as_echo_n "(cached) " >&6
14460else
14461  case $CYGPATH in
14462  [\\/]* | ?:[\\/]*)
14463  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14464  ;;
14465  *)
14466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14467for as_dir in $PATH
14468do
14469  IFS=$as_save_IFS
14470  test -z "$as_dir" && as_dir=.
14471    for ac_exec_ext in '' $ac_executable_extensions; do
14472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14473    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14475    break 2
14476  fi
14477done
14478  done
14479IFS=$as_save_IFS
14480
14481  ;;
14482esac
14483fi
14484CYGPATH=$ac_cv_path_CYGPATH
14485if test -n "$CYGPATH"; then
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14487$as_echo "$CYGPATH" >&6; }
14488else
14489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14490$as_echo "no" >&6; }
14491fi
14492
14493
14494  test -n "$CYGPATH" && break
14495done
14496
14497    else
14498      # If it succeeded, then it was overridden by the user. We will use it
14499      # for the tool.
14500
14501      # First remove it from the list of overridden variables, so we can test
14502      # for unknown variables in the end.
14503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14504
14505      # Check if we try to supply an empty value
14506      if test "x$CYGPATH" = x; then
14507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14508$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14510$as_echo_n "checking for CYGPATH... " >&6; }
14511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14512$as_echo "disabled" >&6; }
14513      else
14514        # Check if the provided tool contains a complete path.
14515        tool_specified="$CYGPATH"
14516        tool_basename="${tool_specified##*/}"
14517        if test "x$tool_basename" = "x$tool_specified"; then
14518          # A command without a complete path is provided, search $PATH.
14519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14520$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14521          # Extract the first word of "$tool_basename", so it can be a program name with args.
14522set dummy $tool_basename; ac_word=$2
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14524$as_echo_n "checking for $ac_word... " >&6; }
14525if ${ac_cv_path_CYGPATH+:} false; then :
14526  $as_echo_n "(cached) " >&6
14527else
14528  case $CYGPATH in
14529  [\\/]* | ?:[\\/]*)
14530  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14531  ;;
14532  *)
14533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14534for as_dir in $PATH
14535do
14536  IFS=$as_save_IFS
14537  test -z "$as_dir" && as_dir=.
14538    for ac_exec_ext in '' $ac_executable_extensions; do
14539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14540    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14542    break 2
14543  fi
14544done
14545  done
14546IFS=$as_save_IFS
14547
14548  ;;
14549esac
14550fi
14551CYGPATH=$ac_cv_path_CYGPATH
14552if test -n "$CYGPATH"; then
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14554$as_echo "$CYGPATH" >&6; }
14555else
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14557$as_echo "no" >&6; }
14558fi
14559
14560
14561          if test "x$CYGPATH" = x; then
14562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14563          fi
14564        else
14565          # Otherwise we believe it is a complete path. Use it as it is.
14566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14567$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14569$as_echo_n "checking for CYGPATH... " >&6; }
14570          if test ! -x "$tool_specified"; then
14571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14572$as_echo "not found" >&6; }
14573            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14574          fi
14575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14576$as_echo "$tool_specified" >&6; }
14577        fi
14578      fi
14579    fi
14580
14581  fi
14582
14583
14584
14585
14586  # Publish this variable in the help.
14587
14588
14589  if [ -z "${READLINK+x}" ]; then
14590    # The variable is not set by user, try to locate tool using the code snippet
14591    for ac_prog in greadlink readlink
14592do
14593  # Extract the first word of "$ac_prog", so it can be a program name with args.
14594set dummy $ac_prog; ac_word=$2
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14596$as_echo_n "checking for $ac_word... " >&6; }
14597if ${ac_cv_path_READLINK+:} false; then :
14598  $as_echo_n "(cached) " >&6
14599else
14600  case $READLINK in
14601  [\\/]* | ?:[\\/]*)
14602  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14603  ;;
14604  *)
14605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14606for as_dir in $PATH
14607do
14608  IFS=$as_save_IFS
14609  test -z "$as_dir" && as_dir=.
14610    for ac_exec_ext in '' $ac_executable_extensions; do
14611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14612    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14614    break 2
14615  fi
14616done
14617  done
14618IFS=$as_save_IFS
14619
14620  ;;
14621esac
14622fi
14623READLINK=$ac_cv_path_READLINK
14624if test -n "$READLINK"; then
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14626$as_echo "$READLINK" >&6; }
14627else
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14629$as_echo "no" >&6; }
14630fi
14631
14632
14633  test -n "$READLINK" && break
14634done
14635
14636  else
14637    # The variable is set, but is it from the command line or the environment?
14638
14639    # Try to remove the string !READLINK! from our list.
14640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14642      # If it failed, the variable was not from the command line. Ignore it,
14643      # but warn the user (except for BASH, which is always set by the calling BASH).
14644      if test "xREADLINK" != xBASH; then
14645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14646$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14647      fi
14648      # Try to locate tool using the code snippet
14649      for ac_prog in greadlink readlink
14650do
14651  # Extract the first word of "$ac_prog", so it can be a program name with args.
14652set dummy $ac_prog; ac_word=$2
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14654$as_echo_n "checking for $ac_word... " >&6; }
14655if ${ac_cv_path_READLINK+:} false; then :
14656  $as_echo_n "(cached) " >&6
14657else
14658  case $READLINK in
14659  [\\/]* | ?:[\\/]*)
14660  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14661  ;;
14662  *)
14663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14664for as_dir in $PATH
14665do
14666  IFS=$as_save_IFS
14667  test -z "$as_dir" && as_dir=.
14668    for ac_exec_ext in '' $ac_executable_extensions; do
14669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14670    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14672    break 2
14673  fi
14674done
14675  done
14676IFS=$as_save_IFS
14677
14678  ;;
14679esac
14680fi
14681READLINK=$ac_cv_path_READLINK
14682if test -n "$READLINK"; then
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14684$as_echo "$READLINK" >&6; }
14685else
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14687$as_echo "no" >&6; }
14688fi
14689
14690
14691  test -n "$READLINK" && break
14692done
14693
14694    else
14695      # If it succeeded, then it was overridden by the user. We will use it
14696      # for the tool.
14697
14698      # First remove it from the list of overridden variables, so we can test
14699      # for unknown variables in the end.
14700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14701
14702      # Check if we try to supply an empty value
14703      if test "x$READLINK" = x; then
14704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14705$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14707$as_echo_n "checking for READLINK... " >&6; }
14708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14709$as_echo "disabled" >&6; }
14710      else
14711        # Check if the provided tool contains a complete path.
14712        tool_specified="$READLINK"
14713        tool_basename="${tool_specified##*/}"
14714        if test "x$tool_basename" = "x$tool_specified"; then
14715          # A command without a complete path is provided, search $PATH.
14716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14717$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14718          # Extract the first word of "$tool_basename", so it can be a program name with args.
14719set dummy $tool_basename; ac_word=$2
14720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14721$as_echo_n "checking for $ac_word... " >&6; }
14722if ${ac_cv_path_READLINK+:} false; then :
14723  $as_echo_n "(cached) " >&6
14724else
14725  case $READLINK in
14726  [\\/]* | ?:[\\/]*)
14727  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14728  ;;
14729  *)
14730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14731for as_dir in $PATH
14732do
14733  IFS=$as_save_IFS
14734  test -z "$as_dir" && as_dir=.
14735    for ac_exec_ext in '' $ac_executable_extensions; do
14736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14737    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14739    break 2
14740  fi
14741done
14742  done
14743IFS=$as_save_IFS
14744
14745  ;;
14746esac
14747fi
14748READLINK=$ac_cv_path_READLINK
14749if test -n "$READLINK"; then
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14751$as_echo "$READLINK" >&6; }
14752else
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14754$as_echo "no" >&6; }
14755fi
14756
14757
14758          if test "x$READLINK" = x; then
14759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14760          fi
14761        else
14762          # Otherwise we believe it is a complete path. Use it as it is.
14763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14764$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14766$as_echo_n "checking for READLINK... " >&6; }
14767          if test ! -x "$tool_specified"; then
14768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14769$as_echo "not found" >&6; }
14770            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14771          fi
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14773$as_echo "$tool_specified" >&6; }
14774        fi
14775      fi
14776    fi
14777
14778  fi
14779
14780
14781
14782
14783  # Publish this variable in the help.
14784
14785
14786  if [ -z "${DF+x}" ]; then
14787    # The variable is not set by user, try to locate tool using the code snippet
14788    for ac_prog in df
14789do
14790  # Extract the first word of "$ac_prog", so it can be a program name with args.
14791set dummy $ac_prog; ac_word=$2
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14793$as_echo_n "checking for $ac_word... " >&6; }
14794if ${ac_cv_path_DF+:} false; then :
14795  $as_echo_n "(cached) " >&6
14796else
14797  case $DF in
14798  [\\/]* | ?:[\\/]*)
14799  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14800  ;;
14801  *)
14802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14803for as_dir in $PATH
14804do
14805  IFS=$as_save_IFS
14806  test -z "$as_dir" && as_dir=.
14807    for ac_exec_ext in '' $ac_executable_extensions; do
14808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14809    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14811    break 2
14812  fi
14813done
14814  done
14815IFS=$as_save_IFS
14816
14817  ;;
14818esac
14819fi
14820DF=$ac_cv_path_DF
14821if test -n "$DF"; then
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14823$as_echo "$DF" >&6; }
14824else
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14826$as_echo "no" >&6; }
14827fi
14828
14829
14830  test -n "$DF" && break
14831done
14832
14833  else
14834    # The variable is set, but is it from the command line or the environment?
14835
14836    # Try to remove the string !DF! from our list.
14837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14839      # If it failed, the variable was not from the command line. Ignore it,
14840      # but warn the user (except for BASH, which is always set by the calling BASH).
14841      if test "xDF" != xBASH; then
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14843$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14844      fi
14845      # Try to locate tool using the code snippet
14846      for ac_prog in df
14847do
14848  # Extract the first word of "$ac_prog", so it can be a program name with args.
14849set dummy $ac_prog; ac_word=$2
14850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14851$as_echo_n "checking for $ac_word... " >&6; }
14852if ${ac_cv_path_DF+:} false; then :
14853  $as_echo_n "(cached) " >&6
14854else
14855  case $DF in
14856  [\\/]* | ?:[\\/]*)
14857  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14858  ;;
14859  *)
14860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14861for as_dir in $PATH
14862do
14863  IFS=$as_save_IFS
14864  test -z "$as_dir" && as_dir=.
14865    for ac_exec_ext in '' $ac_executable_extensions; do
14866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14867    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14869    break 2
14870  fi
14871done
14872  done
14873IFS=$as_save_IFS
14874
14875  ;;
14876esac
14877fi
14878DF=$ac_cv_path_DF
14879if test -n "$DF"; then
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14881$as_echo "$DF" >&6; }
14882else
14883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14884$as_echo "no" >&6; }
14885fi
14886
14887
14888  test -n "$DF" && break
14889done
14890
14891    else
14892      # If it succeeded, then it was overridden by the user. We will use it
14893      # for the tool.
14894
14895      # First remove it from the list of overridden variables, so we can test
14896      # for unknown variables in the end.
14897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14898
14899      # Check if we try to supply an empty value
14900      if test "x$DF" = x; then
14901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14902$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14904$as_echo_n "checking for DF... " >&6; }
14905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14906$as_echo "disabled" >&6; }
14907      else
14908        # Check if the provided tool contains a complete path.
14909        tool_specified="$DF"
14910        tool_basename="${tool_specified##*/}"
14911        if test "x$tool_basename" = "x$tool_specified"; then
14912          # A command without a complete path is provided, search $PATH.
14913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14914$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14915          # Extract the first word of "$tool_basename", so it can be a program name with args.
14916set dummy $tool_basename; ac_word=$2
14917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14918$as_echo_n "checking for $ac_word... " >&6; }
14919if ${ac_cv_path_DF+:} false; then :
14920  $as_echo_n "(cached) " >&6
14921else
14922  case $DF in
14923  [\\/]* | ?:[\\/]*)
14924  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14925  ;;
14926  *)
14927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14928for as_dir in $PATH
14929do
14930  IFS=$as_save_IFS
14931  test -z "$as_dir" && as_dir=.
14932    for ac_exec_ext in '' $ac_executable_extensions; do
14933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14934    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14936    break 2
14937  fi
14938done
14939  done
14940IFS=$as_save_IFS
14941
14942  ;;
14943esac
14944fi
14945DF=$ac_cv_path_DF
14946if test -n "$DF"; then
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14948$as_echo "$DF" >&6; }
14949else
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14951$as_echo "no" >&6; }
14952fi
14953
14954
14955          if test "x$DF" = x; then
14956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14957          fi
14958        else
14959          # Otherwise we believe it is a complete path. Use it as it is.
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14961$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14963$as_echo_n "checking for DF... " >&6; }
14964          if test ! -x "$tool_specified"; then
14965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14966$as_echo "not found" >&6; }
14967            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14968          fi
14969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14970$as_echo "$tool_specified" >&6; }
14971        fi
14972      fi
14973    fi
14974
14975  fi
14976
14977
14978
14979
14980  # Publish this variable in the help.
14981
14982
14983  if [ -z "${CPIO+x}" ]; then
14984    # The variable is not set by user, try to locate tool using the code snippet
14985    for ac_prog in cpio bsdcpio
14986do
14987  # Extract the first word of "$ac_prog", so it can be a program name with args.
14988set dummy $ac_prog; ac_word=$2
14989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14990$as_echo_n "checking for $ac_word... " >&6; }
14991if ${ac_cv_path_CPIO+:} false; then :
14992  $as_echo_n "(cached) " >&6
14993else
14994  case $CPIO in
14995  [\\/]* | ?:[\\/]*)
14996  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14997  ;;
14998  *)
14999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15000for as_dir in $PATH
15001do
15002  IFS=$as_save_IFS
15003  test -z "$as_dir" && as_dir=.
15004    for ac_exec_ext in '' $ac_executable_extensions; do
15005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15006    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15008    break 2
15009  fi
15010done
15011  done
15012IFS=$as_save_IFS
15013
15014  ;;
15015esac
15016fi
15017CPIO=$ac_cv_path_CPIO
15018if test -n "$CPIO"; then
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15020$as_echo "$CPIO" >&6; }
15021else
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15023$as_echo "no" >&6; }
15024fi
15025
15026
15027  test -n "$CPIO" && break
15028done
15029
15030  else
15031    # The variable is set, but is it from the command line or the environment?
15032
15033    # Try to remove the string !CPIO! from our list.
15034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15036      # If it failed, the variable was not from the command line. Ignore it,
15037      # but warn the user (except for BASH, which is always set by the calling BASH).
15038      if test "xCPIO" != xBASH; then
15039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15040$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15041      fi
15042      # Try to locate tool using the code snippet
15043      for ac_prog in cpio bsdcpio
15044do
15045  # Extract the first word of "$ac_prog", so it can be a program name with args.
15046set dummy $ac_prog; ac_word=$2
15047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15048$as_echo_n "checking for $ac_word... " >&6; }
15049if ${ac_cv_path_CPIO+:} false; then :
15050  $as_echo_n "(cached) " >&6
15051else
15052  case $CPIO in
15053  [\\/]* | ?:[\\/]*)
15054  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15055  ;;
15056  *)
15057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15058for as_dir in $PATH
15059do
15060  IFS=$as_save_IFS
15061  test -z "$as_dir" && as_dir=.
15062    for ac_exec_ext in '' $ac_executable_extensions; do
15063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15064    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15066    break 2
15067  fi
15068done
15069  done
15070IFS=$as_save_IFS
15071
15072  ;;
15073esac
15074fi
15075CPIO=$ac_cv_path_CPIO
15076if test -n "$CPIO"; then
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15078$as_echo "$CPIO" >&6; }
15079else
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15081$as_echo "no" >&6; }
15082fi
15083
15084
15085  test -n "$CPIO" && break
15086done
15087
15088    else
15089      # If it succeeded, then it was overridden by the user. We will use it
15090      # for the tool.
15091
15092      # First remove it from the list of overridden variables, so we can test
15093      # for unknown variables in the end.
15094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15095
15096      # Check if we try to supply an empty value
15097      if test "x$CPIO" = x; then
15098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15099$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15101$as_echo_n "checking for CPIO... " >&6; }
15102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15103$as_echo "disabled" >&6; }
15104      else
15105        # Check if the provided tool contains a complete path.
15106        tool_specified="$CPIO"
15107        tool_basename="${tool_specified##*/}"
15108        if test "x$tool_basename" = "x$tool_specified"; then
15109          # A command without a complete path is provided, search $PATH.
15110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15111$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15112          # Extract the first word of "$tool_basename", so it can be a program name with args.
15113set dummy $tool_basename; ac_word=$2
15114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15115$as_echo_n "checking for $ac_word... " >&6; }
15116if ${ac_cv_path_CPIO+:} false; then :
15117  $as_echo_n "(cached) " >&6
15118else
15119  case $CPIO in
15120  [\\/]* | ?:[\\/]*)
15121  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15122  ;;
15123  *)
15124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15125for as_dir in $PATH
15126do
15127  IFS=$as_save_IFS
15128  test -z "$as_dir" && as_dir=.
15129    for ac_exec_ext in '' $ac_executable_extensions; do
15130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15131    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15133    break 2
15134  fi
15135done
15136  done
15137IFS=$as_save_IFS
15138
15139  ;;
15140esac
15141fi
15142CPIO=$ac_cv_path_CPIO
15143if test -n "$CPIO"; then
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15145$as_echo "$CPIO" >&6; }
15146else
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15148$as_echo "no" >&6; }
15149fi
15150
15151
15152          if test "x$CPIO" = x; then
15153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15154          fi
15155        else
15156          # Otherwise we believe it is a complete path. Use it as it is.
15157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15158$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15160$as_echo_n "checking for CPIO... " >&6; }
15161          if test ! -x "$tool_specified"; then
15162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15163$as_echo "not found" >&6; }
15164            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15165          fi
15166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15167$as_echo "$tool_specified" >&6; }
15168        fi
15169      fi
15170    fi
15171
15172  fi
15173
15174
15175
15176
15177  # Publish this variable in the help.
15178
15179
15180  if [ -z "${NICE+x}" ]; then
15181    # The variable is not set by user, try to locate tool using the code snippet
15182    for ac_prog in nice
15183do
15184  # Extract the first word of "$ac_prog", so it can be a program name with args.
15185set dummy $ac_prog; ac_word=$2
15186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15187$as_echo_n "checking for $ac_word... " >&6; }
15188if ${ac_cv_path_NICE+:} false; then :
15189  $as_echo_n "(cached) " >&6
15190else
15191  case $NICE in
15192  [\\/]* | ?:[\\/]*)
15193  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15194  ;;
15195  *)
15196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15197for as_dir in $PATH
15198do
15199  IFS=$as_save_IFS
15200  test -z "$as_dir" && as_dir=.
15201    for ac_exec_ext in '' $ac_executable_extensions; do
15202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15203    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15205    break 2
15206  fi
15207done
15208  done
15209IFS=$as_save_IFS
15210
15211  ;;
15212esac
15213fi
15214NICE=$ac_cv_path_NICE
15215if test -n "$NICE"; then
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15217$as_echo "$NICE" >&6; }
15218else
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220$as_echo "no" >&6; }
15221fi
15222
15223
15224  test -n "$NICE" && break
15225done
15226
15227  else
15228    # The variable is set, but is it from the command line or the environment?
15229
15230    # Try to remove the string !NICE! from our list.
15231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15233      # If it failed, the variable was not from the command line. Ignore it,
15234      # but warn the user (except for BASH, which is always set by the calling BASH).
15235      if test "xNICE" != xBASH; then
15236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15237$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15238      fi
15239      # Try to locate tool using the code snippet
15240      for ac_prog in nice
15241do
15242  # Extract the first word of "$ac_prog", so it can be a program name with args.
15243set dummy $ac_prog; ac_word=$2
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15245$as_echo_n "checking for $ac_word... " >&6; }
15246if ${ac_cv_path_NICE+:} false; then :
15247  $as_echo_n "(cached) " >&6
15248else
15249  case $NICE in
15250  [\\/]* | ?:[\\/]*)
15251  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15252  ;;
15253  *)
15254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15255for as_dir in $PATH
15256do
15257  IFS=$as_save_IFS
15258  test -z "$as_dir" && as_dir=.
15259    for ac_exec_ext in '' $ac_executable_extensions; do
15260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15261    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15263    break 2
15264  fi
15265done
15266  done
15267IFS=$as_save_IFS
15268
15269  ;;
15270esac
15271fi
15272NICE=$ac_cv_path_NICE
15273if test -n "$NICE"; then
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15275$as_echo "$NICE" >&6; }
15276else
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15278$as_echo "no" >&6; }
15279fi
15280
15281
15282  test -n "$NICE" && break
15283done
15284
15285    else
15286      # If it succeeded, then it was overridden by the user. We will use it
15287      # for the tool.
15288
15289      # First remove it from the list of overridden variables, so we can test
15290      # for unknown variables in the end.
15291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15292
15293      # Check if we try to supply an empty value
15294      if test "x$NICE" = x; then
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15296$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15298$as_echo_n "checking for NICE... " >&6; }
15299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15300$as_echo "disabled" >&6; }
15301      else
15302        # Check if the provided tool contains a complete path.
15303        tool_specified="$NICE"
15304        tool_basename="${tool_specified##*/}"
15305        if test "x$tool_basename" = "x$tool_specified"; then
15306          # A command without a complete path is provided, search $PATH.
15307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15308$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15309          # Extract the first word of "$tool_basename", so it can be a program name with args.
15310set dummy $tool_basename; ac_word=$2
15311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15312$as_echo_n "checking for $ac_word... " >&6; }
15313if ${ac_cv_path_NICE+:} false; then :
15314  $as_echo_n "(cached) " >&6
15315else
15316  case $NICE in
15317  [\\/]* | ?:[\\/]*)
15318  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15319  ;;
15320  *)
15321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15322for as_dir in $PATH
15323do
15324  IFS=$as_save_IFS
15325  test -z "$as_dir" && as_dir=.
15326    for ac_exec_ext in '' $ac_executable_extensions; do
15327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15328    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15330    break 2
15331  fi
15332done
15333  done
15334IFS=$as_save_IFS
15335
15336  ;;
15337esac
15338fi
15339NICE=$ac_cv_path_NICE
15340if test -n "$NICE"; then
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15342$as_echo "$NICE" >&6; }
15343else
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15345$as_echo "no" >&6; }
15346fi
15347
15348
15349          if test "x$NICE" = x; then
15350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15351          fi
15352        else
15353          # Otherwise we believe it is a complete path. Use it as it is.
15354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15355$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15357$as_echo_n "checking for NICE... " >&6; }
15358          if test ! -x "$tool_specified"; then
15359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15360$as_echo "not found" >&6; }
15361            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15362          fi
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15364$as_echo "$tool_specified" >&6; }
15365        fi
15366      fi
15367    fi
15368
15369  fi
15370
15371
15372
15373
15374  # Publish this variable in the help.
15375
15376
15377  if [ -z "${PANDOC+x}" ]; then
15378    # The variable is not set by user, try to locate tool using the code snippet
15379    for ac_prog in pandoc
15380do
15381  # Extract the first word of "$ac_prog", so it can be a program name with args.
15382set dummy $ac_prog; ac_word=$2
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15384$as_echo_n "checking for $ac_word... " >&6; }
15385if ${ac_cv_path_PANDOC+:} false; then :
15386  $as_echo_n "(cached) " >&6
15387else
15388  case $PANDOC in
15389  [\\/]* | ?:[\\/]*)
15390  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15391  ;;
15392  *)
15393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15394for as_dir in $PATH
15395do
15396  IFS=$as_save_IFS
15397  test -z "$as_dir" && as_dir=.
15398    for ac_exec_ext in '' $ac_executable_extensions; do
15399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15400    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15402    break 2
15403  fi
15404done
15405  done
15406IFS=$as_save_IFS
15407
15408  ;;
15409esac
15410fi
15411PANDOC=$ac_cv_path_PANDOC
15412if test -n "$PANDOC"; then
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15414$as_echo "$PANDOC" >&6; }
15415else
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15417$as_echo "no" >&6; }
15418fi
15419
15420
15421  test -n "$PANDOC" && break
15422done
15423
15424  else
15425    # The variable is set, but is it from the command line or the environment?
15426
15427    # Try to remove the string !PANDOC! from our list.
15428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15430      # If it failed, the variable was not from the command line. Ignore it,
15431      # but warn the user (except for BASH, which is always set by the calling BASH).
15432      if test "xPANDOC" != xBASH; then
15433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15434$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15435      fi
15436      # Try to locate tool using the code snippet
15437      for ac_prog in pandoc
15438do
15439  # Extract the first word of "$ac_prog", so it can be a program name with args.
15440set dummy $ac_prog; ac_word=$2
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15442$as_echo_n "checking for $ac_word... " >&6; }
15443if ${ac_cv_path_PANDOC+:} false; then :
15444  $as_echo_n "(cached) " >&6
15445else
15446  case $PANDOC in
15447  [\\/]* | ?:[\\/]*)
15448  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15449  ;;
15450  *)
15451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15452for as_dir in $PATH
15453do
15454  IFS=$as_save_IFS
15455  test -z "$as_dir" && as_dir=.
15456    for ac_exec_ext in '' $ac_executable_extensions; do
15457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15458    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15460    break 2
15461  fi
15462done
15463  done
15464IFS=$as_save_IFS
15465
15466  ;;
15467esac
15468fi
15469PANDOC=$ac_cv_path_PANDOC
15470if test -n "$PANDOC"; then
15471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15472$as_echo "$PANDOC" >&6; }
15473else
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15475$as_echo "no" >&6; }
15476fi
15477
15478
15479  test -n "$PANDOC" && break
15480done
15481
15482    else
15483      # If it succeeded, then it was overridden by the user. We will use it
15484      # for the tool.
15485
15486      # First remove it from the list of overridden variables, so we can test
15487      # for unknown variables in the end.
15488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15489
15490      # Check if we try to supply an empty value
15491      if test "x$PANDOC" = x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15493$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15495$as_echo_n "checking for PANDOC... " >&6; }
15496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15497$as_echo "disabled" >&6; }
15498      else
15499        # Check if the provided tool contains a complete path.
15500        tool_specified="$PANDOC"
15501        tool_basename="${tool_specified##*/}"
15502        if test "x$tool_basename" = "x$tool_specified"; then
15503          # A command without a complete path is provided, search $PATH.
15504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15505$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15506          # Extract the first word of "$tool_basename", so it can be a program name with args.
15507set dummy $tool_basename; ac_word=$2
15508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15509$as_echo_n "checking for $ac_word... " >&6; }
15510if ${ac_cv_path_PANDOC+:} false; then :
15511  $as_echo_n "(cached) " >&6
15512else
15513  case $PANDOC in
15514  [\\/]* | ?:[\\/]*)
15515  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15516  ;;
15517  *)
15518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15519for as_dir in $PATH
15520do
15521  IFS=$as_save_IFS
15522  test -z "$as_dir" && as_dir=.
15523    for ac_exec_ext in '' $ac_executable_extensions; do
15524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15525    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15527    break 2
15528  fi
15529done
15530  done
15531IFS=$as_save_IFS
15532
15533  ;;
15534esac
15535fi
15536PANDOC=$ac_cv_path_PANDOC
15537if test -n "$PANDOC"; then
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15539$as_echo "$PANDOC" >&6; }
15540else
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15542$as_echo "no" >&6; }
15543fi
15544
15545
15546          if test "x$PANDOC" = x; then
15547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15548          fi
15549        else
15550          # Otherwise we believe it is a complete path. Use it as it is.
15551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15552$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15554$as_echo_n "checking for PANDOC... " >&6; }
15555          if test ! -x "$tool_specified"; then
15556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15557$as_echo "not found" >&6; }
15558            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15559          fi
15560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15561$as_echo "$tool_specified" >&6; }
15562        fi
15563      fi
15564    fi
15565
15566  fi
15567
15568
15569
15570
15571# Now we can determine OpenJDK build and target platforms. This is required to
15572# have early on.
15573# Make sure we can run config.sub.
15574$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15575  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15576
15577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15578$as_echo_n "checking build system type... " >&6; }
15579if ${ac_cv_build+:} false; then :
15580  $as_echo_n "(cached) " >&6
15581else
15582  ac_build_alias=$build_alias
15583test "x$ac_build_alias" = x &&
15584  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15585test "x$ac_build_alias" = x &&
15586  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15587ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15588  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15589
15590fi
15591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15592$as_echo "$ac_cv_build" >&6; }
15593case $ac_cv_build in
15594*-*-*) ;;
15595*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15596esac
15597build=$ac_cv_build
15598ac_save_IFS=$IFS; IFS='-'
15599set x $ac_cv_build
15600shift
15601build_cpu=$1
15602build_vendor=$2
15603shift; shift
15604# Remember, the first character of IFS is used to create $*,
15605# except with old shells:
15606build_os=$*
15607IFS=$ac_save_IFS
15608case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15609
15610
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15612$as_echo_n "checking host system type... " >&6; }
15613if ${ac_cv_host+:} false; then :
15614  $as_echo_n "(cached) " >&6
15615else
15616  if test "x$host_alias" = x; then
15617  ac_cv_host=$ac_cv_build
15618else
15619  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15620    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15621fi
15622
15623fi
15624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15625$as_echo "$ac_cv_host" >&6; }
15626case $ac_cv_host in
15627*-*-*) ;;
15628*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15629esac
15630host=$ac_cv_host
15631ac_save_IFS=$IFS; IFS='-'
15632set x $ac_cv_host
15633shift
15634host_cpu=$1
15635host_vendor=$2
15636shift; shift
15637# Remember, the first character of IFS is used to create $*,
15638# except with old shells:
15639host_os=$*
15640IFS=$ac_save_IFS
15641case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15642
15643
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15645$as_echo_n "checking target system type... " >&6; }
15646if ${ac_cv_target+:} false; then :
15647  $as_echo_n "(cached) " >&6
15648else
15649  if test "x$target_alias" = x; then
15650  ac_cv_target=$ac_cv_host
15651else
15652  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15653    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15654fi
15655
15656fi
15657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15658$as_echo "$ac_cv_target" >&6; }
15659case $ac_cv_target in
15660*-*-*) ;;
15661*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15662esac
15663target=$ac_cv_target
15664ac_save_IFS=$IFS; IFS='-'
15665set x $ac_cv_target
15666shift
15667target_cpu=$1
15668target_vendor=$2
15669shift; shift
15670# Remember, the first character of IFS is used to create $*,
15671# except with old shells:
15672target_os=$*
15673IFS=$ac_save_IFS
15674case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15675
15676
15677# The aliases save the names the user supplied, while $host etc.
15678# will get canonicalized.
15679test -n "$target_alias" &&
15680  test "$program_prefix$program_suffix$program_transform_name" = \
15681    NONENONEs,x,x, &&
15682  program_prefix=${target_alias}-
15683
15684  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15685  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15686  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15687  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15688  # to use the configure naming style.
15689
15690
15691
15692
15693
15694  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15695  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15696  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15697  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15698  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15699  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15700
15701
15702
15703  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15704
15705  case "$build_os" in
15706    *linux*)
15707      VAR_OS=linux
15708      VAR_OS_TYPE=unix
15709      ;;
15710    *solaris*)
15711      VAR_OS=solaris
15712      VAR_OS_TYPE=unix
15713      ;;
15714    *darwin*)
15715      VAR_OS=macosx
15716      VAR_OS_TYPE=unix
15717      ;;
15718    *bsd*)
15719      VAR_OS=bsd
15720      VAR_OS_TYPE=unix
15721      ;;
15722    *cygwin*)
15723      VAR_OS=windows
15724      VAR_OS_ENV=windows.cygwin
15725      ;;
15726    *mingw*)
15727      VAR_OS=windows
15728      VAR_OS_ENV=windows.msys
15729      ;;
15730    *aix*)
15731      VAR_OS=aix
15732      VAR_OS_TYPE=unix
15733      ;;
15734    *)
15735      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15736      ;;
15737  esac
15738
15739
15740  # First argument is the cpu name from the trip/quad
15741  case "$build_cpu" in
15742    x86_64)
15743      VAR_CPU=x86_64
15744      VAR_CPU_ARCH=x86
15745      VAR_CPU_BITS=64
15746      VAR_CPU_ENDIAN=little
15747      ;;
15748    i?86)
15749      VAR_CPU=x86
15750      VAR_CPU_ARCH=x86
15751      VAR_CPU_BITS=32
15752      VAR_CPU_ENDIAN=little
15753      ;;
15754    arm*)
15755      VAR_CPU=arm
15756      VAR_CPU_ARCH=arm
15757      VAR_CPU_BITS=32
15758      VAR_CPU_ENDIAN=little
15759      ;;
15760    aarch64)
15761      VAR_CPU=aarch64
15762      VAR_CPU_ARCH=aarch64
15763      VAR_CPU_BITS=64
15764      VAR_CPU_ENDIAN=little
15765      ;;
15766    powerpc)
15767      VAR_CPU=ppc
15768      VAR_CPU_ARCH=ppc
15769      VAR_CPU_BITS=32
15770      VAR_CPU_ENDIAN=big
15771      ;;
15772    powerpc64)
15773      VAR_CPU=ppc64
15774      VAR_CPU_ARCH=ppc
15775      VAR_CPU_BITS=64
15776      VAR_CPU_ENDIAN=big
15777      ;;
15778    powerpc64le)
15779      VAR_CPU=ppc64le
15780      VAR_CPU_ARCH=ppc
15781      VAR_CPU_BITS=64
15782      VAR_CPU_ENDIAN=little
15783      ;;
15784    s390)
15785      VAR_CPU=s390
15786      VAR_CPU_ARCH=s390
15787      VAR_CPU_BITS=32
15788      VAR_CPU_ENDIAN=big
15789      ;;
15790    s390x)
15791      VAR_CPU=s390x
15792      VAR_CPU_ARCH=s390
15793      VAR_CPU_BITS=64
15794      VAR_CPU_ENDIAN=big
15795      ;;
15796    sparc)
15797      VAR_CPU=sparc
15798      VAR_CPU_ARCH=sparc
15799      VAR_CPU_BITS=32
15800      VAR_CPU_ENDIAN=big
15801      ;;
15802    sparcv9|sparc64)
15803      VAR_CPU=sparcv9
15804      VAR_CPU_ARCH=sparc
15805      VAR_CPU_BITS=64
15806      VAR_CPU_ENDIAN=big
15807      ;;
15808    *)
15809      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15810      ;;
15811  esac
15812
15813  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15814  OPENJDK_BUILD_OS="$VAR_OS"
15815  if test "x$VAR_OS_TYPE" != x; then
15816    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15817  else
15818    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15819  fi
15820  if test "x$VAR_OS_ENV" != x; then
15821    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15822  else
15823    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15824  fi
15825  OPENJDK_BUILD_CPU="$VAR_CPU"
15826  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15827  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15828  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15829
15830
15831
15832
15833
15834
15835
15836
15837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15838$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15840$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15841
15842  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15843
15844  case "$host_os" in
15845    *linux*)
15846      VAR_OS=linux
15847      VAR_OS_TYPE=unix
15848      ;;
15849    *solaris*)
15850      VAR_OS=solaris
15851      VAR_OS_TYPE=unix
15852      ;;
15853    *darwin*)
15854      VAR_OS=macosx
15855      VAR_OS_TYPE=unix
15856      ;;
15857    *bsd*)
15858      VAR_OS=bsd
15859      VAR_OS_TYPE=unix
15860      ;;
15861    *cygwin*)
15862      VAR_OS=windows
15863      VAR_OS_ENV=windows.cygwin
15864      ;;
15865    *mingw*)
15866      VAR_OS=windows
15867      VAR_OS_ENV=windows.msys
15868      ;;
15869    *aix*)
15870      VAR_OS=aix
15871      VAR_OS_TYPE=unix
15872      ;;
15873    *)
15874      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15875      ;;
15876  esac
15877
15878
15879  # First argument is the cpu name from the trip/quad
15880  case "$host_cpu" in
15881    x86_64)
15882      VAR_CPU=x86_64
15883      VAR_CPU_ARCH=x86
15884      VAR_CPU_BITS=64
15885      VAR_CPU_ENDIAN=little
15886      ;;
15887    i?86)
15888      VAR_CPU=x86
15889      VAR_CPU_ARCH=x86
15890      VAR_CPU_BITS=32
15891      VAR_CPU_ENDIAN=little
15892      ;;
15893    arm*)
15894      VAR_CPU=arm
15895      VAR_CPU_ARCH=arm
15896      VAR_CPU_BITS=32
15897      VAR_CPU_ENDIAN=little
15898      ;;
15899    aarch64)
15900      VAR_CPU=aarch64
15901      VAR_CPU_ARCH=aarch64
15902      VAR_CPU_BITS=64
15903      VAR_CPU_ENDIAN=little
15904      ;;
15905    powerpc)
15906      VAR_CPU=ppc
15907      VAR_CPU_ARCH=ppc
15908      VAR_CPU_BITS=32
15909      VAR_CPU_ENDIAN=big
15910      ;;
15911    powerpc64)
15912      VAR_CPU=ppc64
15913      VAR_CPU_ARCH=ppc
15914      VAR_CPU_BITS=64
15915      VAR_CPU_ENDIAN=big
15916      ;;
15917    powerpc64le)
15918      VAR_CPU=ppc64le
15919      VAR_CPU_ARCH=ppc
15920      VAR_CPU_BITS=64
15921      VAR_CPU_ENDIAN=little
15922      ;;
15923    s390)
15924      VAR_CPU=s390
15925      VAR_CPU_ARCH=s390
15926      VAR_CPU_BITS=32
15927      VAR_CPU_ENDIAN=big
15928      ;;
15929    s390x)
15930      VAR_CPU=s390x
15931      VAR_CPU_ARCH=s390
15932      VAR_CPU_BITS=64
15933      VAR_CPU_ENDIAN=big
15934      ;;
15935    sparc)
15936      VAR_CPU=sparc
15937      VAR_CPU_ARCH=sparc
15938      VAR_CPU_BITS=32
15939      VAR_CPU_ENDIAN=big
15940      ;;
15941    sparcv9|sparc64)
15942      VAR_CPU=sparcv9
15943      VAR_CPU_ARCH=sparc
15944      VAR_CPU_BITS=64
15945      VAR_CPU_ENDIAN=big
15946      ;;
15947    *)
15948      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15949      ;;
15950  esac
15951
15952  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15953  OPENJDK_TARGET_OS="$VAR_OS"
15954  if test "x$VAR_OS_TYPE" != x; then
15955    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15956  else
15957    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15958  fi
15959  if test "x$VAR_OS_ENV" != x; then
15960    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15961  else
15962    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15963  fi
15964  OPENJDK_TARGET_CPU="$VAR_CPU"
15965  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15966  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15967  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15968
15969
15970
15971
15972
15973
15974
15975
15976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15977$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15979$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15980
15981
15982
15983# Check whether --with-target-bits was given.
15984if test "${with_target_bits+set}" = set; then :
15985  withval=$with_target_bits;
15986fi
15987
15988
15989  # We have three types of compiles:
15990  # native  == normal compilation, target system == build system
15991  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15992  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15993  #
15994  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15995    # We're doing a proper cross-compilation
15996    COMPILE_TYPE="cross"
15997  else
15998    COMPILE_TYPE="native"
15999  fi
16000
16001  if test "x$with_target_bits" != x; then
16002    if test "x$COMPILE_TYPE" = "xcross"; then
16003      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16004    fi
16005
16006    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16007      # A reduced build is requested
16008      COMPILE_TYPE="reduced"
16009      OPENJDK_TARGET_CPU_BITS=32
16010      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16011        OPENJDK_TARGET_CPU=x86
16012      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16013        OPENJDK_TARGET_CPU=sparc
16014      else
16015        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16016      fi
16017    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16018      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
16019    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16020      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16021$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16022    else
16023      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16024    fi
16025  fi
16026
16027
16028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16029$as_echo_n "checking compilation type... " >&6; }
16030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16031$as_echo "$COMPILE_TYPE" >&6; }
16032
16033
16034  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16035    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16036  else
16037    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16038  fi
16039
16040  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16041    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16042  else
16043    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16044  fi
16045
16046  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16047
16048
16049
16050  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16051    RELEASE_FILE_OS_NAME=SunOS
16052  fi
16053  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16054    RELEASE_FILE_OS_NAME=Linux
16055  fi
16056  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16057    RELEASE_FILE_OS_NAME=Windows
16058  fi
16059  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16060    RELEASE_FILE_OS_NAME="Darwin"
16061  fi
16062  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16063    RELEASE_FILE_OS_NAME="AIX"
16064  fi
16065  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16066
16067
16068
16069
16070
16071
16072  # Also store the legacy naming of the cpu.
16073  # Ie i586 and amd64 instead of x86 and x86_64
16074  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16075  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16076    OPENJDK_TARGET_CPU_LEGACY="i586"
16077  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16078    # On all platforms except MacOSX replace x86_64 with amd64.
16079    OPENJDK_TARGET_CPU_LEGACY="amd64"
16080  fi
16081
16082
16083  # And the second legacy naming of the cpu.
16084  # Ie i386 and amd64 instead of x86 and x86_64.
16085  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16087    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16088  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16089    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16090  fi
16091
16092
16093  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16094  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16095  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16096  OPENJDK_TARGET_CPU_ISADIR=""
16097  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16098    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16099      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16100    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16101      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16102    fi
16103  fi
16104
16105
16106  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16107  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16108  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16109    # On linux only, we replace x86 with i386.
16110    OPENJDK_TARGET_CPU_OSARCH="i386"
16111  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16112    # On all platforms except macosx, we replace x86_64 with amd64.
16113    OPENJDK_TARGET_CPU_OSARCH="amd64"
16114  fi
16115
16116
16117  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16118  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16119    OPENJDK_TARGET_CPU_JLI="i386"
16120  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16121    # On all platforms except macosx, we replace x86_64 with amd64.
16122    OPENJDK_TARGET_CPU_JLI="amd64"
16123  fi
16124
16125  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16126      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16127  else
16128      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16129  fi
16130
16131
16132  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16133  # Macosx is osx and x86_64 is x64
16134  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16135    OPENJDK_TARGET_OS_BUNDLE="osx"
16136  else
16137    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16138  fi
16139  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16140    OPENJDK_TARGET_CPU_BUNDLE="x64"
16141  else
16142    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16143  fi
16144  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16145
16146
16147  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16148    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16149    # unpack200.exe. This variable is used in
16150    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16151    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16152      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16153    fi
16154  fi
16155
16156  if test "x$COMPILE_TYPE" = "xcross"; then
16157    # FIXME: ... or should this include reduced builds..?
16158    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16159  else
16160    DEFINE_CROSS_COMPILE_ARCH=""
16161  fi
16162
16163
16164  # Convert openjdk platform names to hotspot names
16165
16166  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16167  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16168    HOTSPOT_TARGET_OS=bsd
16169  fi
16170
16171
16172  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16173  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16174    HOTSPOT_TARGET_OS_TYPE=posix
16175  fi
16176
16177
16178  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16179  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16180    HOTSPOT_TARGET_CPU=x86_32
16181  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16182    HOTSPOT_TARGET_CPU=sparc
16183  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16184    HOTSPOT_TARGET_CPU=ppc_64
16185  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16186    HOTSPOT_TARGET_CPU=ppc_64
16187  fi
16188
16189
16190  # This is identical with OPENJDK_*, but define anyway for consistency.
16191  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16192
16193
16194  # Setup HOTSPOT_TARGET_CPU_DEFINE
16195  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16196    HOTSPOT_TARGET_CPU_DEFINE=IA32
16197  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16198    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16199  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16200    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16201  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16202    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16203  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16204    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16205  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16206    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16207
16208  # The cpu defines below are for zero, we don't support them directly.
16209  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16210    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16211  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16212    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16213  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16214    HOTSPOT_TARGET_CPU_DEFINE=S390
16215  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16216    HOTSPOT_TARGET_CPU_DEFINE=S390
16217  elif test "x$OPENJDK_TARGET_CPU" != x; then
16218    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16219  fi
16220
16221
16222
16223
16224  # Also store the legacy naming of the cpu.
16225  # Ie i586 and amd64 instead of x86 and x86_64
16226  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16227  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16228    OPENJDK_BUILD_CPU_LEGACY="i586"
16229  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16230    # On all platforms except MacOSX replace x86_64 with amd64.
16231    OPENJDK_BUILD_CPU_LEGACY="amd64"
16232  fi
16233
16234
16235  # And the second legacy naming of the cpu.
16236  # Ie i386 and amd64 instead of x86 and x86_64.
16237  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16238  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16239    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16240  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16241    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16242  fi
16243
16244
16245  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16246  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16247  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16248  OPENJDK_BUILD_CPU_ISADIR=""
16249  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16250    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16251      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16252    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16253      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16254    fi
16255  fi
16256
16257
16258  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16259  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16260  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16261    # On linux only, we replace x86 with i386.
16262    OPENJDK_BUILD_CPU_OSARCH="i386"
16263  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16264    # On all platforms except macosx, we replace x86_64 with amd64.
16265    OPENJDK_BUILD_CPU_OSARCH="amd64"
16266  fi
16267
16268
16269  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16270  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16271    OPENJDK_BUILD_CPU_JLI="i386"
16272  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16273    # On all platforms except macosx, we replace x86_64 with amd64.
16274    OPENJDK_BUILD_CPU_JLI="amd64"
16275  fi
16276
16277  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16278      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16279  else
16280      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16281  fi
16282
16283
16284  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16285  # Macosx is osx and x86_64 is x64
16286  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16287    OPENJDK_BUILD_OS_BUNDLE="osx"
16288  else
16289    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16290  fi
16291  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16292    OPENJDK_BUILD_CPU_BUNDLE="x64"
16293  else
16294    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16295  fi
16296  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16297
16298
16299  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16300    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16301    # unpack200.exe. This variable is used in
16302    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16303    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16304      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16305    fi
16306  fi
16307
16308  if test "x$COMPILE_TYPE" = "xcross"; then
16309    # FIXME: ... or should this include reduced builds..?
16310    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16311  else
16312    DEFINE_CROSS_COMPILE_ARCH=""
16313  fi
16314
16315
16316  # Convert openjdk platform names to hotspot names
16317
16318  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16319  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16320    HOTSPOT_BUILD_OS=bsd
16321  fi
16322
16323
16324  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16325  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16326    HOTSPOT_BUILD_OS_TYPE=posix
16327  fi
16328
16329
16330  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16331  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16332    HOTSPOT_BUILD_CPU=x86_32
16333  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16334    HOTSPOT_BUILD_CPU=sparc
16335  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16336    HOTSPOT_BUILD_CPU=ppc_64
16337  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16338    HOTSPOT_BUILD_CPU=ppc_64
16339  fi
16340
16341
16342  # This is identical with OPENJDK_*, but define anyway for consistency.
16343  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16344
16345
16346  # Setup HOTSPOT_BUILD_CPU_DEFINE
16347  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16348    HOTSPOT_BUILD_CPU_DEFINE=IA32
16349  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16350    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16351  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16352    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16353  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16354    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16355  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16356    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16357  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16358    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16359
16360  # The cpu defines below are for zero, we don't support them directly.
16361  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16362    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16363  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16364    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16365  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16366    HOTSPOT_BUILD_CPU_DEFINE=S390
16367  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16368    HOTSPOT_BUILD_CPU_DEFINE=S390
16369  elif test "x$OPENJDK_BUILD_CPU" != x; then
16370    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16371  fi
16372
16373
16374
16375
16376
16377
16378# Continue setting up basic stuff. Most remaining code require fundamental tools.
16379
16380  # Save the current directory this script was started from
16381  CURDIR="$PWD"
16382
16383  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16384  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16385  # was not available at that time.
16386  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16387  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16388    ORIGINAL_PATH="$REWRITTEN_PATH"
16389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16390$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16391  fi
16392
16393  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16394    PATH_SEP=";"
16395
16396  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16397  if test $SRC_ROOT_LENGTH -gt 100; then
16398    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16399  fi
16400
16401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16403$as_echo_n "checking cygwin release... " >&6; }
16404    CYGWIN_VERSION=`$UNAME -r`
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16406$as_echo "$CYGWIN_VERSION" >&6; }
16407    WINDOWS_ENV_VENDOR='cygwin'
16408    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16409
16410    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16411    if test "x$CYGWIN_VERSION_OLD" != x; then
16412      { $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
16413$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;}
16414      as_fn_error $? "Cannot continue" "$LINENO" 5
16415    fi
16416    if test "x$CYGPATH" = x; then
16417      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16418    fi
16419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16420$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16421    # The cmd output ends with Windows line endings (CR/LF)
16422    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16423    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16424    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16426$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16427    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16428    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16429    if test "x$test_cygdrive_prefix" = x; then
16430      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16431    fi
16432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16434$as_echo_n "checking msys release... " >&6; }
16435    MSYS_VERSION=`$UNAME -r`
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16437$as_echo "$MSYS_VERSION" >&6; }
16438
16439    WINDOWS_ENV_VENDOR='msys'
16440    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16441
16442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16443$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16444    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16445    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16446
16447  windows_path="$MSYS_ROOT_PATH"
16448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16449    unix_path=`$CYGPATH -u "$windows_path"`
16450    MSYS_ROOT_PATH="$unix_path"
16451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16453    MSYS_ROOT_PATH="$unix_path"
16454  fi
16455
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16457$as_echo "$MSYS_ROOT_PATH" >&6; }
16458    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16459  else
16460    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16461  fi
16462
16463  # Test if windows or unix (cygwin/msys) find is first in path.
16464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16465$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16466  FIND_BINARY_OUTPUT=`find --version 2>&1`
16467  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16469$as_echo "unix style" >&6; }
16470  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16472$as_echo "Windows" >&6; }
16473    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16474$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16475    { $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
16476$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16477    as_fn_error $? "Cannot continue" "$LINENO" 5
16478  else
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16480$as_echo "unknown" >&6; }
16481    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16482$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16483  fi
16484
16485  else
16486    PATH_SEP=":"
16487  fi
16488
16489
16490  # We get the top-level directory from the supporting wrappers.
16491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16492$as_echo_n "checking for top-level directory... " >&6; }
16493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16494$as_echo "$TOPDIR" >&6; }
16495
16496
16497  # Save the original version of TOPDIR for string comparisons
16498  ORIGINAL_TOPDIR="$TOPDIR"
16499
16500
16501  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16502
16503  # Only process if variable expands to non-empty
16504
16505  if test "x$CURDIR" != x; then
16506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16507
16508  # Input might be given as Windows format, start by converting to
16509  # unix format.
16510  path="$CURDIR"
16511  new_path=`$CYGPATH -u "$path"`
16512
16513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16516  # "foo.exe" is OK but "foo" is an error.
16517  #
16518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16519  # It is also a way to make sure we got the proper file name for the real test later on.
16520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16521  if test "x$test_shortpath" = x; then
16522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16523$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16524    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16525  fi
16526
16527  # Call helper function which possibly converts this using DOS-style short mode.
16528  # If so, the updated path is stored in $new_path.
16529
16530  input_path="$new_path"
16531  # Check if we need to convert this using DOS-style short mode. If the path
16532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16533  # take no chances and rewrite it.
16534  # Note: m4 eats our [], so we need to use [ and ] instead.
16535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16536  if test "x$has_forbidden_chars" != x; then
16537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16541      # Going to short mode and back again did indeed matter. Since short mode is
16542      # case insensitive, let's make it lowercase to improve readability.
16543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16544      # Now convert it back to Unix-style (cygpath)
16545      input_path=`$CYGPATH -u "$shortmode_path"`
16546      new_path="$input_path"
16547    fi
16548  fi
16549
16550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16551  if test "x$test_cygdrive_prefix" = x; then
16552    # As a simple fix, exclude /usr/bin since it's not a real path.
16553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16555      # a path prefixed by /cygdrive for fixpath to work.
16556      new_path="$CYGWIN_ROOT_PATH$input_path"
16557    fi
16558  fi
16559
16560
16561  if test "x$path" != "x$new_path"; then
16562    CURDIR="$new_path"
16563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16564$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16565  fi
16566
16567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568
16569  path="$CURDIR"
16570  has_colon=`$ECHO $path | $GREP ^.:`
16571  new_path="$path"
16572  if test "x$has_colon" = x; then
16573    # Not in mixed or Windows style, start by that.
16574    new_path=`cmd //c echo $path`
16575  fi
16576
16577
16578  input_path="$new_path"
16579  # Check if we need to convert this using DOS-style short mode. If the path
16580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16581  # take no chances and rewrite it.
16582  # Note: m4 eats our [], so we need to use [ and ] instead.
16583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16584  if test "x$has_forbidden_chars" != x; then
16585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16587  fi
16588
16589
16590  windows_path="$new_path"
16591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16592    unix_path=`$CYGPATH -u "$windows_path"`
16593    new_path="$unix_path"
16594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16596    new_path="$unix_path"
16597  fi
16598
16599  if test "x$path" != "x$new_path"; then
16600    CURDIR="$new_path"
16601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16602$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16603  fi
16604
16605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16607
16608    else
16609      # We're on a unix platform. Hooray! :)
16610      path="$CURDIR"
16611      has_space=`$ECHO "$path" | $GREP " "`
16612      if test "x$has_space" != x; then
16613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16614$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16616      fi
16617
16618      # Use eval to expand a potential ~
16619      eval path="$path"
16620      if test ! -f "$path" && test ! -d "$path"; then
16621        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16622      fi
16623
16624      if test -d "$path"; then
16625        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16626      else
16627        dir="`$DIRNAME "$path"`"
16628        base="`$BASENAME "$path"`"
16629        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16630      fi
16631    fi
16632  fi
16633
16634
16635  # Only process if variable expands to non-empty
16636
16637  if test "x$TOPDIR" != x; then
16638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16639
16640  # Input might be given as Windows format, start by converting to
16641  # unix format.
16642  path="$TOPDIR"
16643  new_path=`$CYGPATH -u "$path"`
16644
16645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16648  # "foo.exe" is OK but "foo" is an error.
16649  #
16650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16651  # It is also a way to make sure we got the proper file name for the real test later on.
16652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16653  if test "x$test_shortpath" = x; then
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16655$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16656    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16657  fi
16658
16659  # Call helper function which possibly converts this using DOS-style short mode.
16660  # If so, the updated path is stored in $new_path.
16661
16662  input_path="$new_path"
16663  # Check if we need to convert this using DOS-style short mode. If the path
16664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16665  # take no chances and rewrite it.
16666  # Note: m4 eats our [], so we need to use [ and ] instead.
16667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16668  if test "x$has_forbidden_chars" != x; then
16669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16673      # Going to short mode and back again did indeed matter. Since short mode is
16674      # case insensitive, let's make it lowercase to improve readability.
16675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16676      # Now convert it back to Unix-style (cygpath)
16677      input_path=`$CYGPATH -u "$shortmode_path"`
16678      new_path="$input_path"
16679    fi
16680  fi
16681
16682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16683  if test "x$test_cygdrive_prefix" = x; then
16684    # As a simple fix, exclude /usr/bin since it's not a real path.
16685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16687      # a path prefixed by /cygdrive for fixpath to work.
16688      new_path="$CYGWIN_ROOT_PATH$input_path"
16689    fi
16690  fi
16691
16692
16693  if test "x$path" != "x$new_path"; then
16694    TOPDIR="$new_path"
16695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16696$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16697  fi
16698
16699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16700
16701  path="$TOPDIR"
16702  has_colon=`$ECHO $path | $GREP ^.:`
16703  new_path="$path"
16704  if test "x$has_colon" = x; then
16705    # Not in mixed or Windows style, start by that.
16706    new_path=`cmd //c echo $path`
16707  fi
16708
16709
16710  input_path="$new_path"
16711  # Check if we need to convert this using DOS-style short mode. If the path
16712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16713  # take no chances and rewrite it.
16714  # Note: m4 eats our [], so we need to use [ and ] instead.
16715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16716  if test "x$has_forbidden_chars" != x; then
16717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16719  fi
16720
16721
16722  windows_path="$new_path"
16723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16724    unix_path=`$CYGPATH -u "$windows_path"`
16725    new_path="$unix_path"
16726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16728    new_path="$unix_path"
16729  fi
16730
16731  if test "x$path" != "x$new_path"; then
16732    TOPDIR="$new_path"
16733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16734$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16735  fi
16736
16737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16739
16740    else
16741      # We're on a unix platform. Hooray! :)
16742      path="$TOPDIR"
16743      has_space=`$ECHO "$path" | $GREP " "`
16744      if test "x$has_space" != x; then
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16746$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16748      fi
16749
16750      # Use eval to expand a potential ~
16751      eval path="$path"
16752      if test ! -f "$path" && test ! -d "$path"; then
16753        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16754      fi
16755
16756      if test -d "$path"; then
16757        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16758      else
16759        dir="`$DIRNAME "$path"`"
16760        base="`$BASENAME "$path"`"
16761        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16762      fi
16763    fi
16764  fi
16765
16766  # SRC_ROOT is a traditional alias for TOPDIR.
16767  SRC_ROOT=$TOPDIR
16768
16769  # Calculate a canonical version of TOPDIR for string comparisons
16770  CANONICAL_TOPDIR=$TOPDIR
16771
16772  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16773    # Follow a chain of symbolic links. Use readlink
16774    # where it exists, else fall back to horribly
16775    # complicated shell code.
16776    if test "x$READLINK_TESTED" != yes; then
16777      # On MacOSX there is a readlink tool with a different
16778      # purpose than the GNU readlink tool. Check the found readlink.
16779      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16780      if test "x$ISGNU" = x; then
16781        # A readlink that we do not know how to use.
16782        # Are there other non-GNU readlinks out there?
16783        READLINK_TESTED=yes
16784        READLINK=
16785      fi
16786    fi
16787
16788    if test "x$READLINK" != x; then
16789      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16790    else
16791      # Save the current directory for restoring afterwards
16792      STARTDIR=$PWD
16793      COUNTER=0
16794      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16795      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16796      cd $sym_link_dir
16797      # Use -P flag to resolve symlinks in directories.
16798      cd `$THEPWDCMD -P`
16799      sym_link_dir=`$THEPWDCMD -P`
16800      # Resolve file symlinks
16801      while test $COUNTER -lt 20; do
16802        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16803        if test "x$ISLINK" == x; then
16804          # This is not a symbolic link! We are done!
16805          break
16806        fi
16807        # Again resolve directory symlinks since the target of the just found
16808        # link could be in a different directory
16809        cd `$DIRNAME $ISLINK`
16810        sym_link_dir=`$THEPWDCMD -P`
16811        sym_link_file=`$BASENAME $ISLINK`
16812        let COUNTER=COUNTER+1
16813      done
16814      cd $STARTDIR
16815      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16816    fi
16817  fi
16818
16819
16820
16821  # Locate the directory of this script.
16822  AUTOCONF_DIR=$TOPDIR/common/autoconf
16823
16824  # Setup username (for use in adhoc version strings etc)
16825  # Outer [ ] to quote m4.
16826   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16827
16828
16829
16830# Check if it's a pure open build or if custom sources are to be used.
16831
16832  # Check whether --enable-openjdk-only was given.
16833if test "${enable_openjdk_only+set}" = set; then :
16834  enableval=$enable_openjdk_only;
16835else
16836  enable_openjdk_only="no"
16837fi
16838
16839
16840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16841$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16843$as_echo "$enable_openjdk_only" >&6; }
16844  if test "x$enable_openjdk_only" = "xyes"; then
16845    SUPPRESS_CUSTOM_EXTENSIONS="true"
16846  elif test "x$enable_openjdk_only" = "xno"; then
16847    SUPPRESS_CUSTOM_EXTENSIONS="false"
16848  else
16849    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16850  fi
16851
16852  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16853  # the IncludeCustomExtension macro.
16854
16855
16856# Check whether --with-custom-make-dir was given.
16857if test "${with_custom_make_dir+set}" = set; then :
16858  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
16859$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16860fi
16861
16862
16863
16864
16865# These are needed to be able to create a configuration name (and thus the output directory)
16866
16867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16868$as_echo_n "checking which variant of the JDK to build... " >&6; }
16869
16870# Check whether --with-jdk-variant was given.
16871if test "${with_jdk_variant+set}" = set; then :
16872  withval=$with_jdk_variant;
16873fi
16874
16875
16876  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16877    JDK_VARIANT="normal"
16878  else
16879    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16880  fi
16881
16882
16883
16884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16885$as_echo "$JDK_VARIANT" >&6; }
16886
16887
16888  DEBUG_LEVEL="release"
16889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16890$as_echo_n "checking which debug level to use... " >&6; }
16891  # Check whether --enable-debug was given.
16892if test "${enable_debug+set}" = set; then :
16893  enableval=$enable_debug;
16894        ENABLE_DEBUG="${enableval}"
16895        DEBUG_LEVEL="fastdebug"
16896
16897else
16898  ENABLE_DEBUG="no"
16899fi
16900
16901
16902
16903# Check whether --with-debug-level was given.
16904if test "${with_debug_level+set}" = set; then :
16905  withval=$with_debug_level;
16906        DEBUG_LEVEL="${withval}"
16907        if test "x$ENABLE_DEBUG" = xyes; then
16908          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16909        fi
16910
16911fi
16912
16913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16914$as_echo "$DEBUG_LEVEL" >&6; }
16915
16916  if test "x$DEBUG_LEVEL" != xrelease && \
16917      test "x$DEBUG_LEVEL" != xoptimized && \
16918      test "x$DEBUG_LEVEL" != xfastdebug && \
16919      test "x$DEBUG_LEVEL" != xslowdebug; then
16920    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16921  fi
16922
16923  # Translate DEBUG_LEVEL to debug level used by Hotspot
16924  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16925  if test "x$DEBUG_LEVEL" = xrelease; then
16926    HOTSPOT_DEBUG_LEVEL="product"
16927  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16928    HOTSPOT_DEBUG_LEVEL="debug"
16929  fi
16930
16931  if test "x$DEBUG_LEVEL" = xoptimized; then
16932    # The debug level 'optimized' is a little special because it is currently only
16933    # applicable to the HotSpot build where it means to build a completely
16934    # optimized version of the VM without any debugging code (like for the
16935    # 'release' debug level which is called 'product' in the HotSpot build) but
16936    # with the exception that it can contain additional code which is otherwise
16937    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16938    # test new and/or experimental features which are not intended for customer
16939    # shipment. Because these new features need to be tested and benchmarked in
16940    # real world scenarios, we want to build the containing JDK at the 'release'
16941    # debug level.
16942    DEBUG_LEVEL="release"
16943  fi
16944
16945
16946
16947
16948
16949
16950# Check whether --with-jvm-variants was given.
16951if test "${with_jvm_variants+set}" = set; then :
16952  withval=$with_jvm_variants;
16953fi
16954
16955
16956
16957
16958# Check whether --with-cpu-port was given.
16959if test "${with_cpu_port+set}" = set; then :
16960  withval=$with_cpu_port;
16961fi
16962
16963
16964  if test "x$with_cpu_port" != x; then
16965    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16966      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16967    fi
16968    if test "x$with_cpu_port" != xarm64 && \
16969        test "x$with_cpu_port" != xaarch64; then
16970      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16971    fi
16972    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16973  fi
16974
16975
16976  if test "x$with_jvm_variants" = x; then
16977    with_jvm_variants="server"
16978  fi
16979  JVM_VARIANTS_OPT="$with_jvm_variants"
16980
16981  # Has the user listed more than one variant?
16982  # Additional [] needed to keep m4 from mangling shell constructs.
16983  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16984    BUILDING_MULTIPLE_JVM_VARIANTS=true
16985  else
16986    BUILDING_MULTIPLE_JVM_VARIANTS=false
16987  fi
16988  # Replace the commas with AND for use in the build directory name.
16989  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16990
16991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16992$as_echo_n "checking which variants of the JVM to build... " >&6; }
16993  # JVM_VARIANTS is a space-separated list.
16994  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16995  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16997$as_echo "$JVM_VARIANTS" >&6; }
16998
16999  # Check that the selected variants are valid
17000
17001  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17002  # Notice that the original variant failes on SLES 10 and 11
17003  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17004  STACK=${JVM_VARIANTS// /$'\n'}
17005  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17006  if test "x$INVALID_VARIANTS" != x; then
17007    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17008$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17009    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17010  fi
17011
17012  # All "special" variants share the same output directory ("server")
17013  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17014  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17015  STACK=${JVM_VARIANTS// /$'\n'}
17016  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17017  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17018    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17019  fi
17020
17021  # The "main" variant is the one used by other libs to link against during the
17022  # build.
17023  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17024    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17025    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17026      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17027        JVM_VARIANT_MAIN="$variant"
17028        break
17029      fi
17030    done
17031  else
17032    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17033  fi
17034
17035
17036
17037
17038
17039  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17040    # zero behaves as a platform and rewrites these values. This is really weird. :(
17041    # We are guaranteed that we do not build any other variants when building zero.
17042    HOTSPOT_TARGET_CPU=zero
17043    HOTSPOT_TARGET_CPU_ARCH=zero
17044  fi
17045
17046
17047# With basic setup done, call the custom early hook.
17048
17049
17050# Check if we have devkits, extra paths or sysroot set.
17051
17052
17053# Check whether --with-devkit was given.
17054if test "${with_devkit+set}" = set; then :
17055  withval=$with_devkit;
17056
17057  # Only process if variable expands to non-empty
17058
17059  if test "x$with_devkit" != x; then
17060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061
17062  # Input might be given as Windows format, start by converting to
17063  # unix format.
17064  path="$with_devkit"
17065  new_path=`$CYGPATH -u "$path"`
17066
17067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17070  # "foo.exe" is OK but "foo" is an error.
17071  #
17072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17073  # It is also a way to make sure we got the proper file name for the real test later on.
17074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17075  if test "x$test_shortpath" = x; then
17076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17077$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17078    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17079  fi
17080
17081  # Call helper function which possibly converts this using DOS-style short mode.
17082  # If so, the updated path is stored in $new_path.
17083
17084  input_path="$new_path"
17085  # Check if we need to convert this using DOS-style short mode. If the path
17086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17087  # take no chances and rewrite it.
17088  # Note: m4 eats our [], so we need to use [ and ] instead.
17089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17090  if test "x$has_forbidden_chars" != x; then
17091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17095      # Going to short mode and back again did indeed matter. Since short mode is
17096      # case insensitive, let's make it lowercase to improve readability.
17097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17098      # Now convert it back to Unix-style (cygpath)
17099      input_path=`$CYGPATH -u "$shortmode_path"`
17100      new_path="$input_path"
17101    fi
17102  fi
17103
17104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17105  if test "x$test_cygdrive_prefix" = x; then
17106    # As a simple fix, exclude /usr/bin since it's not a real path.
17107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17109      # a path prefixed by /cygdrive for fixpath to work.
17110      new_path="$CYGWIN_ROOT_PATH$input_path"
17111    fi
17112  fi
17113
17114
17115  if test "x$path" != "x$new_path"; then
17116    with_devkit="$new_path"
17117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17118$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17119  fi
17120
17121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122
17123  path="$with_devkit"
17124  has_colon=`$ECHO $path | $GREP ^.:`
17125  new_path="$path"
17126  if test "x$has_colon" = x; then
17127    # Not in mixed or Windows style, start by that.
17128    new_path=`cmd //c echo $path`
17129  fi
17130
17131
17132  input_path="$new_path"
17133  # Check if we need to convert this using DOS-style short mode. If the path
17134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17135  # take no chances and rewrite it.
17136  # Note: m4 eats our [], so we need to use [ and ] instead.
17137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17138  if test "x$has_forbidden_chars" != x; then
17139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17141  fi
17142
17143
17144  windows_path="$new_path"
17145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146    unix_path=`$CYGPATH -u "$windows_path"`
17147    new_path="$unix_path"
17148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17150    new_path="$unix_path"
17151  fi
17152
17153  if test "x$path" != "x$new_path"; then
17154    with_devkit="$new_path"
17155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17156$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17157  fi
17158
17159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17161
17162    else
17163      # We're on a unix platform. Hooray! :)
17164      path="$with_devkit"
17165      has_space=`$ECHO "$path" | $GREP " "`
17166      if test "x$has_space" != x; then
17167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17168$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17169        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17170      fi
17171
17172      # Use eval to expand a potential ~
17173      eval path="$path"
17174      if test ! -f "$path" && test ! -d "$path"; then
17175        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17176      fi
17177
17178      if test -d "$path"; then
17179        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17180      else
17181        dir="`$DIRNAME "$path"`"
17182        base="`$BASENAME "$path"`"
17183        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17184      fi
17185    fi
17186  fi
17187
17188        DEVKIT_ROOT="$with_devkit"
17189        # Check for a meta data info file in the root of the devkit
17190        if test -f "$DEVKIT_ROOT/devkit.info"; then
17191          . $DEVKIT_ROOT/devkit.info
17192          # This potentially sets the following:
17193          # A descriptive name of the devkit
17194
17195  if test "x$DEVKIT_NAME" = x; then
17196    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17197  fi
17198
17199          # Corresponds to --with-extra-path
17200
17201  if test "x$DEVKIT_EXTRA_PATH" = x; then
17202    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17203  fi
17204
17205          # Corresponds to --with-toolchain-path
17206
17207  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17208    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17209  fi
17210
17211          # Corresponds to --with-sysroot
17212
17213  if test "x$DEVKIT_SYSROOT" = x; then
17214    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17215  fi
17216
17217
17218          # Identifies the Visual Studio version in the devkit
17219
17220  if test "x$DEVKIT_VS_VERSION" = x; then
17221    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17222  fi
17223
17224          # The Visual Studio include environment variable
17225
17226  if test "x$DEVKIT_VS_INCLUDE" = x; then
17227    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17228  fi
17229
17230          # The Visual Studio lib environment variable
17231
17232  if test "x$DEVKIT_VS_LIB" = x; then
17233    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17234  fi
17235
17236          # Corresponds to --with-msvcr-dll
17237
17238  if test "x$DEVKIT_MSVCR_DLL" = x; then
17239    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17240  fi
17241
17242          # Corresponds to --with-msvcp-dll
17243
17244  if test "x$DEVKIT_MSVCP_DLL" = x; then
17245    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17246  fi
17247
17248        fi
17249
17250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17251$as_echo_n "checking for devkit... " >&6; }
17252        if test "x$DEVKIT_NAME" != x; then
17253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17254$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17255        else
17256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17257$as_echo "$DEVKIT_ROOT" >&6; }
17258        fi
17259
17260
17261  if test "x$DEVKIT_EXTRA_PATH" != x; then
17262    if test "x$EXTRA_PATH" = x; then
17263      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17264    else
17265      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17266    fi
17267  fi
17268
17269
17270        # Fallback default of just /bin if DEVKIT_PATH is not defined
17271        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17272          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17273        fi
17274
17275  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17276    if test "x$TOOLCHAIN_PATH" = x; then
17277      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17278    else
17279      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17280    fi
17281  fi
17282
17283
17284        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17285        # places for backwards compatiblity.
17286        if test "x$DEVKIT_SYSROOT" != x; then
17287          SYSROOT="$DEVKIT_SYSROOT"
17288        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17289          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17290        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17291          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17292        fi
17293
17294
17295fi
17296
17297
17298  # You can force the sysroot if the sysroot encoded into the compiler tools
17299  # is not correct.
17300
17301# Check whether --with-sys-root was given.
17302if test "${with_sys_root+set}" = set; then :
17303  withval=$with_sys_root; SYSROOT=$with_sys_root
17304
17305fi
17306
17307
17308
17309# Check whether --with-sysroot was given.
17310if test "${with_sysroot+set}" = set; then :
17311  withval=$with_sysroot; SYSROOT=$with_sysroot
17312
17313fi
17314
17315
17316
17317# Check whether --with-tools-dir was given.
17318if test "${with_tools_dir+set}" = set; then :
17319  withval=$with_tools_dir;
17320  if test "x$with_tools_dir" != x; then
17321    if test "x$TOOLCHAIN_PATH" = x; then
17322      TOOLCHAIN_PATH="$with_tools_dir"
17323    else
17324      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17325    fi
17326  fi
17327
17328
17329fi
17330
17331
17332
17333# Check whether --with-toolchain-path was given.
17334if test "${with_toolchain_path+set}" = set; then :
17335  withval=$with_toolchain_path;
17336  if test "x$with_toolchain_path" != x; then
17337    if test "x$TOOLCHAIN_PATH" = x; then
17338      TOOLCHAIN_PATH="$with_toolchain_path"
17339    else
17340      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17341    fi
17342  fi
17343
17344
17345fi
17346
17347
17348
17349# Check whether --with-extra-path was given.
17350if test "${with_extra_path+set}" = set; then :
17351  withval=$with_extra_path;
17352  if test "x$with_extra_path" != x; then
17353    if test "x$EXTRA_PATH" = x; then
17354      EXTRA_PATH="$with_extra_path"
17355    else
17356      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17357    fi
17358  fi
17359
17360
17361fi
17362
17363
17364  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17365    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17366    # If not, detect if Xcode is installed by running xcodebuild -version
17367    # if no Xcode installed, xcodebuild exits with 1
17368    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17369    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17370      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17371      # fall back on the stub binary in /usr/bin/xcodebuild
17372      # Extract the first word of "xcodebuild", so it can be a program name with args.
17373set dummy xcodebuild; ac_word=$2
17374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17375$as_echo_n "checking for $ac_word... " >&6; }
17376if ${ac_cv_path_XCODEBUILD+:} false; then :
17377  $as_echo_n "(cached) " >&6
17378else
17379  case $XCODEBUILD in
17380  [\\/]* | ?:[\\/]*)
17381  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17382  ;;
17383  *)
17384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17385for as_dir in $TOOLCHAIN_PATH
17386do
17387  IFS=$as_save_IFS
17388  test -z "$as_dir" && as_dir=.
17389    for ac_exec_ext in '' $ac_executable_extensions; do
17390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17391    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17393    break 2
17394  fi
17395done
17396  done
17397IFS=$as_save_IFS
17398
17399  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17400  ;;
17401esac
17402fi
17403XCODEBUILD=$ac_cv_path_XCODEBUILD
17404if test -n "$XCODEBUILD"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17406$as_echo "$XCODEBUILD" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413    else
17414      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17415      # when only the command line tools are installed there are no SDKs, so headers
17416      # are copied into the system frameworks
17417      XCODEBUILD=
17418
17419    fi
17420
17421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17422$as_echo_n "checking for sdk name... " >&6; }
17423
17424# Check whether --with-sdk-name was given.
17425if test "${with_sdk_name+set}" = set; then :
17426  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17427
17428fi
17429
17430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17431$as_echo "$SDKNAME" >&6; }
17432
17433    # if toolchain path is specified then don't rely on system headers, they may not compile
17434    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17435    test -z "$TOOLCHAIN_PATH" && \
17436      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17437
17438    if test -z "$SYSROOT"; then
17439      if test -n "$XCODEBUILD"; then
17440        # if we don't have system headers, use default SDK name (last resort)
17441        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17442          SDKNAME=${SDKNAME:-macosx}
17443        fi
17444
17445        if test -n "$SDKNAME"; then
17446          # Call xcodebuild to determine SYSROOT
17447          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17448        fi
17449      else
17450        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17451          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
17452        fi
17453      fi
17454    else
17455      # warn user if --with-sdk-name was also set
17456      if test -n "$with_sdk_name"; then
17457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17458$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17459      fi
17460    fi
17461
17462    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17463      # If no system framework headers, then SYSROOT must be set, or we won't build
17464      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
17465    fi
17466
17467    # Perform a basic sanity test
17468    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17469      if test -z "$SYSROOT"; then
17470        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
17471      else
17472        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17473      fi
17474    fi
17475
17476    # set SDKROOT too, Xcode tools will pick it up
17477    SDKROOT="$SYSROOT"
17478
17479  fi
17480
17481  # Prepend the extra path to the global path
17482
17483  if test "x$EXTRA_PATH" != x; then
17484    if test "x$PATH" = x; then
17485      PATH="$EXTRA_PATH"
17486    else
17487      PATH="$EXTRA_PATH:$PATH"
17488    fi
17489  fi
17490
17491
17492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17493$as_echo_n "checking for sysroot... " >&6; }
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17495$as_echo "$SYSROOT" >&6; }
17496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17497$as_echo_n "checking for toolchain path... " >&6; }
17498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17499$as_echo "$TOOLCHAIN_PATH" >&6; }
17500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17501$as_echo_n "checking for extra path... " >&6; }
17502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17503$as_echo "$EXTRA_PATH" >&6; }
17504
17505
17506# To properly create a configuration name, we need to have the OpenJDK target
17507# and options (variants and debug level) parsed.
17508
17509
17510
17511# Check whether --with-conf-name was given.
17512if test "${with_conf_name+set}" = set; then :
17513  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17514fi
17515
17516
17517  # Test from where we are running configure, in or outside of src root.
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17519$as_echo_n "checking where to store configuration... " >&6; }
17520  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17521      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17522      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17523    # We are running configure from the src root.
17524    # Create a default ./build/target-variant-debuglevel output root.
17525    if test "x${CONF_NAME}" = x; then
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17527$as_echo "in default location" >&6; }
17528      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17529    else
17530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17531$as_echo "in build directory with custom name" >&6; }
17532    fi
17533    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17534    $MKDIR -p "$OUTPUT_ROOT"
17535    if test ! -d "$OUTPUT_ROOT"; then
17536      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17537    fi
17538  else
17539    # We are running configure from outside of the src dir.
17540    # Then use the current directory as output dir!
17541    # If configuration is situated in normal build directory, just use the build
17542    # directory name as configuration name, otherwise use the complete path.
17543    if test "x${CONF_NAME}" = x; then
17544      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17545    fi
17546    OUTPUT_ROOT="$CURDIR"
17547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17548$as_echo "in current directory" >&6; }
17549
17550    # WARNING: This might be a bad thing to do. You need to be sure you want to
17551    # have a configuration in this directory. Do some sanity checks!
17552
17553    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17554      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17555      # other files
17556      files_present=`$LS $OUTPUT_ROOT`
17557      # Configure has already touched config.log and confdefs.h in the current dir when this check
17558      # is performed.
17559      filtered_files=`$ECHO "$files_present" \
17560          | $SED -e 's/config.log//g' \
17561              -e 's/configure.log//g' \
17562              -e 's/confdefs.h//g' \
17563              -e 's/ //g' \
17564          | $TR -d '\n'`
17565      if test "x$filtered_files" != x; then
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17567$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17569$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17570        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17571$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17572        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17573$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17575$as_echo "$as_me: seriously mess up just about everything." >&6;}
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17577$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17578        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17579$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17580        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17581      fi
17582    fi
17583  fi
17584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17585$as_echo_n "checking what configuration name to use... " >&6; }
17586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17587$as_echo "$CONF_NAME" >&6; }
17588
17589
17590  # Only process if variable expands to non-empty
17591
17592  if test "x$OUTPUT_ROOT" != x; then
17593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17594
17595  # Input might be given as Windows format, start by converting to
17596  # unix format.
17597  path="$OUTPUT_ROOT"
17598  new_path=`$CYGPATH -u "$path"`
17599
17600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17603  # "foo.exe" is OK but "foo" is an error.
17604  #
17605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17606  # It is also a way to make sure we got the proper file name for the real test later on.
17607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17608  if test "x$test_shortpath" = x; then
17609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17610$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17611    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17612  fi
17613
17614  # Call helper function which possibly converts this using DOS-style short mode.
17615  # If so, the updated path is stored in $new_path.
17616
17617  input_path="$new_path"
17618  # Check if we need to convert this using DOS-style short mode. If the path
17619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17620  # take no chances and rewrite it.
17621  # Note: m4 eats our [], so we need to use [ and ] instead.
17622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17623  if test "x$has_forbidden_chars" != x; then
17624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17628      # Going to short mode and back again did indeed matter. Since short mode is
17629      # case insensitive, let's make it lowercase to improve readability.
17630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17631      # Now convert it back to Unix-style (cygpath)
17632      input_path=`$CYGPATH -u "$shortmode_path"`
17633      new_path="$input_path"
17634    fi
17635  fi
17636
17637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17638  if test "x$test_cygdrive_prefix" = x; then
17639    # As a simple fix, exclude /usr/bin since it's not a real path.
17640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17642      # a path prefixed by /cygdrive for fixpath to work.
17643      new_path="$CYGWIN_ROOT_PATH$input_path"
17644    fi
17645  fi
17646
17647
17648  if test "x$path" != "x$new_path"; then
17649    OUTPUT_ROOT="$new_path"
17650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17651$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17652  fi
17653
17654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17655
17656  path="$OUTPUT_ROOT"
17657  has_colon=`$ECHO $path | $GREP ^.:`
17658  new_path="$path"
17659  if test "x$has_colon" = x; then
17660    # Not in mixed or Windows style, start by that.
17661    new_path=`cmd //c echo $path`
17662  fi
17663
17664
17665  input_path="$new_path"
17666  # Check if we need to convert this using DOS-style short mode. If the path
17667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17668  # take no chances and rewrite it.
17669  # Note: m4 eats our [], so we need to use [ and ] instead.
17670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17671  if test "x$has_forbidden_chars" != x; then
17672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17674  fi
17675
17676
17677  windows_path="$new_path"
17678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17679    unix_path=`$CYGPATH -u "$windows_path"`
17680    new_path="$unix_path"
17681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17683    new_path="$unix_path"
17684  fi
17685
17686  if test "x$path" != "x$new_path"; then
17687    OUTPUT_ROOT="$new_path"
17688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17689$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17690  fi
17691
17692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17694
17695    else
17696      # We're on a unix platform. Hooray! :)
17697      path="$OUTPUT_ROOT"
17698      has_space=`$ECHO "$path" | $GREP " "`
17699      if test "x$has_space" != x; then
17700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17701$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17703      fi
17704
17705      # Use eval to expand a potential ~
17706      eval path="$path"
17707      if test ! -f "$path" && test ! -d "$path"; then
17708        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17709      fi
17710
17711      if test -d "$path"; then
17712        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17713      else
17714        dir="`$DIRNAME "$path"`"
17715        base="`$BASENAME "$path"`"
17716        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17717      fi
17718    fi
17719  fi
17720
17721
17722  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17723  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17724
17725  SPEC="$OUTPUT_ROOT/spec.gmk"
17726
17727
17728
17729
17730
17731  # The spec.gmk file contains all variables for the make system.
17732  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17733
17734  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17735  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17736
17737  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17738  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17739
17740  # The compare.sh is used to compare the build output to other builds.
17741  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17742
17743  # The generated Makefile knows where the spec.gmk is and where the source is.
17744  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17745  # which will look for generated configurations
17746  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17747
17748
17749
17750# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17751
17752  for ac_prog in apt-get yum brew port pkgutil pkgadd
17753do
17754  # Extract the first word of "$ac_prog", so it can be a program name with args.
17755set dummy $ac_prog; ac_word=$2
17756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17757$as_echo_n "checking for $ac_word... " >&6; }
17758if ${ac_cv_prog_PKGHANDLER+:} false; then :
17759  $as_echo_n "(cached) " >&6
17760else
17761  if test -n "$PKGHANDLER"; then
17762  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17763else
17764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17765for as_dir in $PATH
17766do
17767  IFS=$as_save_IFS
17768  test -z "$as_dir" && as_dir=.
17769    for ac_exec_ext in '' $ac_executable_extensions; do
17770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17771    ac_cv_prog_PKGHANDLER="$ac_prog"
17772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17773    break 2
17774  fi
17775done
17776  done
17777IFS=$as_save_IFS
17778
17779fi
17780fi
17781PKGHANDLER=$ac_cv_prog_PKGHANDLER
17782if test -n "$PKGHANDLER"; then
17783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17784$as_echo "$PKGHANDLER" >&6; }
17785else
17786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17787$as_echo "no" >&6; }
17788fi
17789
17790
17791  test -n "$PKGHANDLER" && break
17792done
17793
17794
17795
17796# Setup tools that requires more complex handling, or that is not needed by the configure script.
17797
17798
17799
17800  # Publish this variable in the help.
17801
17802
17803  if [ -z "${MAKE+x}" ]; then
17804    # The variable is not set by user, try to locate tool using the code snippet
17805
17806    # Try our hardest to locate a correct version of GNU make
17807    for ac_prog in gmake
17808do
17809  # Extract the first word of "$ac_prog", so it can be a program name with args.
17810set dummy $ac_prog; ac_word=$2
17811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17812$as_echo_n "checking for $ac_word... " >&6; }
17813if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17814  $as_echo_n "(cached) " >&6
17815else
17816  case $CHECK_GMAKE in
17817  [\\/]* | ?:[\\/]*)
17818  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17819  ;;
17820  *)
17821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17822for as_dir in $PATH
17823do
17824  IFS=$as_save_IFS
17825  test -z "$as_dir" && as_dir=.
17826    for ac_exec_ext in '' $ac_executable_extensions; do
17827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17828    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17830    break 2
17831  fi
17832done
17833  done
17834IFS=$as_save_IFS
17835
17836  ;;
17837esac
17838fi
17839CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17840if test -n "$CHECK_GMAKE"; then
17841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17842$as_echo "$CHECK_GMAKE" >&6; }
17843else
17844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845$as_echo "no" >&6; }
17846fi
17847
17848
17849  test -n "$CHECK_GMAKE" && break
17850done
17851
17852
17853  MAKE_CANDIDATE=""$CHECK_GMAKE""
17854  DESCRIPTION="gmake in PATH"
17855
17856  # On Cygwin, we require a newer version of make than on other platforms
17857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17858    MAKE_VERSION_EXPR="-e 4\."
17859    MAKE_REQUIRED_VERSION="4.0"
17860   else
17861    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17862    MAKE_REQUIRED_VERSION="3.81"
17863  fi
17864
17865  if test "x$MAKE_CANDIDATE" != x; then
17866    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17867$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17868    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17869    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17870    if test "x$IS_GNU_MAKE" = x; then
17871      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17872$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17873    else
17874      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17875      if test "x$IS_MODERN_MAKE" = x; then
17876        { $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
17877$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;}
17878      else
17879        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17880          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17881            MAKE_EXPECTED_ENV='cygwin'
17882          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17883            MAKE_EXPECTED_ENV='msys'
17884          else
17885            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17886          fi
17887          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17888          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17889        else
17890          # Not relevant for non-Windows
17891          IS_MAKE_CORRECT_ENV=true
17892        fi
17893        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17894          { $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
17895$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;}
17896        else
17897          FOUND_MAKE=$MAKE_CANDIDATE
17898
17899  # Only process if variable expands to non-empty
17900
17901  if test "x$FOUND_MAKE" != x; then
17902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17903
17904  # First separate the path from the arguments. This will split at the first
17905  # space.
17906  complete="$FOUND_MAKE"
17907  path="${complete%% *}"
17908  tmp="$complete EOL"
17909  arguments="${tmp#* }"
17910
17911  # Input might be given as Windows format, start by converting to
17912  # unix format.
17913  new_path=`$CYGPATH -u "$path"`
17914
17915  # Now try to locate executable using which
17916  new_path=`$WHICH "$new_path" 2> /dev/null`
17917  # bat and cmd files are not always considered executable in cygwin causing which
17918  # to not find them
17919  if test "x$new_path" = x \
17920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17922    new_path=`$CYGPATH -u "$path"`
17923  fi
17924  if test "x$new_path" = x; then
17925    # Oops. Which didn't find the executable.
17926    # The splitting of arguments from the executable at a space might have been incorrect,
17927    # since paths with space are more likely in Windows. Give it another try with the whole
17928    # argument.
17929    path="$complete"
17930    arguments="EOL"
17931    new_path=`$CYGPATH -u "$path"`
17932    new_path=`$WHICH "$new_path" 2> /dev/null`
17933    # bat and cmd files are not always considered executable in cygwin causing which
17934    # to not find them
17935    if test "x$new_path" = x \
17936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17938      new_path=`$CYGPATH -u "$path"`
17939    fi
17940    if test "x$new_path" = x; then
17941      # It's still not found. Now this is an unrecoverable error.
17942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17943$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17944      has_space=`$ECHO "$complete" | $GREP " "`
17945      if test "x$has_space" != x; then
17946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17948      fi
17949      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17950    fi
17951  fi
17952
17953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17956  # "foo.exe" is OK but "foo" is an error.
17957  #
17958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17959  # It is also a way to make sure we got the proper file name for the real test later on.
17960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17961  if test "x$test_shortpath" = x; then
17962    # Short path failed, file does not exist as specified.
17963    # Try adding .exe or .cmd
17964    if test -f "${new_path}.exe"; then
17965      input_to_shortpath="${new_path}.exe"
17966    elif test -f "${new_path}.cmd"; then
17967      input_to_shortpath="${new_path}.cmd"
17968    else
17969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17973      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17974    fi
17975  else
17976    input_to_shortpath="$new_path"
17977  fi
17978
17979  # Call helper function which possibly converts this using DOS-style short mode.
17980  # If so, the updated path is stored in $new_path.
17981  new_path="$input_to_shortpath"
17982
17983  input_path="$input_to_shortpath"
17984  # Check if we need to convert this using DOS-style short mode. If the path
17985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17986  # take no chances and rewrite it.
17987  # Note: m4 eats our [], so we need to use [ and ] instead.
17988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17989  if test "x$has_forbidden_chars" != x; then
17990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17994      # Going to short mode and back again did indeed matter. Since short mode is
17995      # case insensitive, let's make it lowercase to improve readability.
17996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17997      # Now convert it back to Unix-style (cygpath)
17998      input_path=`$CYGPATH -u "$shortmode_path"`
17999      new_path="$input_path"
18000    fi
18001  fi
18002
18003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18004  if test "x$test_cygdrive_prefix" = x; then
18005    # As a simple fix, exclude /usr/bin since it's not a real path.
18006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18008      # a path prefixed by /cygdrive for fixpath to work.
18009      new_path="$CYGWIN_ROOT_PATH$input_path"
18010    fi
18011  fi
18012
18013  # remove trailing .exe if any
18014  new_path="${new_path/%.exe/}"
18015
18016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18017
18018  # First separate the path from the arguments. This will split at the first
18019  # space.
18020  complete="$FOUND_MAKE"
18021  path="${complete%% *}"
18022  tmp="$complete EOL"
18023  arguments="${tmp#* }"
18024
18025  # Input might be given as Windows format, start by converting to
18026  # unix format.
18027  new_path="$path"
18028
18029  windows_path="$new_path"
18030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18031    unix_path=`$CYGPATH -u "$windows_path"`
18032    new_path="$unix_path"
18033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18035    new_path="$unix_path"
18036  fi
18037
18038
18039  # Now try to locate executable using which
18040  new_path=`$WHICH "$new_path" 2> /dev/null`
18041
18042  if test "x$new_path" = x; then
18043    # Oops. Which didn't find the executable.
18044    # The splitting of arguments from the executable at a space might have been incorrect,
18045    # since paths with space are more likely in Windows. Give it another try with the whole
18046    # argument.
18047    path="$complete"
18048    arguments="EOL"
18049    new_path="$path"
18050
18051  windows_path="$new_path"
18052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18053    unix_path=`$CYGPATH -u "$windows_path"`
18054    new_path="$unix_path"
18055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18057    new_path="$unix_path"
18058  fi
18059
18060
18061    new_path=`$WHICH "$new_path" 2> /dev/null`
18062    # bat and cmd files are not always considered executable in MSYS causing which
18063    # to not find them
18064    if test "x$new_path" = x \
18065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18067      new_path="$path"
18068
18069  windows_path="$new_path"
18070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18071    unix_path=`$CYGPATH -u "$windows_path"`
18072    new_path="$unix_path"
18073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18075    new_path="$unix_path"
18076  fi
18077
18078    fi
18079
18080    if test "x$new_path" = x; then
18081      # It's still not found. Now this is an unrecoverable error.
18082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18084      has_space=`$ECHO "$complete" | $GREP " "`
18085      if test "x$has_space" != x; then
18086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18088      fi
18089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18090    fi
18091  fi
18092
18093  # Now new_path has a complete unix path to the binary
18094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18095    # Keep paths in /bin as-is, but remove trailing .exe if any
18096    new_path="${new_path/%.exe/}"
18097    # Do not save /bin paths to all_fixpath_prefixes!
18098  else
18099    # Not in mixed or Windows style, start by that.
18100    new_path=`cmd //c echo $new_path`
18101
18102  input_path="$new_path"
18103  # Check if we need to convert this using DOS-style short mode. If the path
18104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18105  # take no chances and rewrite it.
18106  # Note: m4 eats our [], so we need to use [ and ] instead.
18107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18108  if test "x$has_forbidden_chars" != x; then
18109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18111  fi
18112
18113    # Output is in $new_path
18114
18115  windows_path="$new_path"
18116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18117    unix_path=`$CYGPATH -u "$windows_path"`
18118    new_path="$unix_path"
18119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18121    new_path="$unix_path"
18122  fi
18123
18124    # remove trailing .exe if any
18125    new_path="${new_path/%.exe/}"
18126
18127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18129  fi
18130
18131    else
18132      # We're on a unix platform. Hooray! :)
18133      # First separate the path from the arguments. This will split at the first
18134      # space.
18135      complete="$FOUND_MAKE"
18136      path="${complete%% *}"
18137      tmp="$complete EOL"
18138      arguments="${tmp#* }"
18139
18140      # Cannot rely on the command "which" here since it doesn't always work.
18141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18142      if test -z "$is_absolute_path"; then
18143        # Path to executable is not absolute. Find it.
18144        IFS_save="$IFS"
18145        IFS=:
18146        for p in $PATH; do
18147          if test -f "$p/$path" && test -x "$p/$path"; then
18148            new_path="$p/$path"
18149            break
18150          fi
18151        done
18152        IFS="$IFS_save"
18153      else
18154        # This is an absolute path, we can use it without further modifications.
18155        new_path="$path"
18156      fi
18157
18158      if test "x$new_path" = x; then
18159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18161        has_space=`$ECHO "$complete" | $GREP " "`
18162        if test "x$has_space" != x; then
18163          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18164$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18165        fi
18166        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18167      fi
18168    fi
18169
18170    # Now join together the path and the arguments once again
18171    if test "x$arguments" != xEOL; then
18172      new_complete="$new_path ${arguments% *}"
18173    else
18174      new_complete="$new_path"
18175    fi
18176
18177    if test "x$complete" != "x$new_complete"; then
18178      FOUND_MAKE="$new_complete"
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18180$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18181    fi
18182  fi
18183
18184        fi
18185      fi
18186    fi
18187  fi
18188
18189
18190    if test "x$FOUND_MAKE" = x; then
18191      for ac_prog in make
18192do
18193  # Extract the first word of "$ac_prog", so it can be a program name with args.
18194set dummy $ac_prog; ac_word=$2
18195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18196$as_echo_n "checking for $ac_word... " >&6; }
18197if ${ac_cv_path_CHECK_MAKE+:} false; then :
18198  $as_echo_n "(cached) " >&6
18199else
18200  case $CHECK_MAKE in
18201  [\\/]* | ?:[\\/]*)
18202  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18203  ;;
18204  *)
18205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18206for as_dir in $PATH
18207do
18208  IFS=$as_save_IFS
18209  test -z "$as_dir" && as_dir=.
18210    for ac_exec_ext in '' $ac_executable_extensions; do
18211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18212    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18214    break 2
18215  fi
18216done
18217  done
18218IFS=$as_save_IFS
18219
18220  ;;
18221esac
18222fi
18223CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18224if test -n "$CHECK_MAKE"; then
18225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18226$as_echo "$CHECK_MAKE" >&6; }
18227else
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18229$as_echo "no" >&6; }
18230fi
18231
18232
18233  test -n "$CHECK_MAKE" && break
18234done
18235
18236
18237  MAKE_CANDIDATE=""$CHECK_MAKE""
18238  DESCRIPTION="make in PATH"
18239
18240  # On Cygwin, we require a newer version of make than on other platforms
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    MAKE_VERSION_EXPR="-e 4\."
18243    MAKE_REQUIRED_VERSION="4.0"
18244   else
18245    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18246    MAKE_REQUIRED_VERSION="3.81"
18247  fi
18248
18249  if test "x$MAKE_CANDIDATE" != x; then
18250    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18251$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18252    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18253    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18254    if test "x$IS_GNU_MAKE" = x; then
18255      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18256$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18257    else
18258      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18259      if test "x$IS_MODERN_MAKE" = x; then
18260        { $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
18261$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;}
18262      else
18263        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18264          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18265            MAKE_EXPECTED_ENV='cygwin'
18266          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18267            MAKE_EXPECTED_ENV='msys'
18268          else
18269            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18270          fi
18271          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18272          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18273        else
18274          # Not relevant for non-Windows
18275          IS_MAKE_CORRECT_ENV=true
18276        fi
18277        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18278          { $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
18279$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;}
18280        else
18281          FOUND_MAKE=$MAKE_CANDIDATE
18282
18283  # Only process if variable expands to non-empty
18284
18285  if test "x$FOUND_MAKE" != x; then
18286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18287
18288  # First separate the path from the arguments. This will split at the first
18289  # space.
18290  complete="$FOUND_MAKE"
18291  path="${complete%% *}"
18292  tmp="$complete EOL"
18293  arguments="${tmp#* }"
18294
18295  # Input might be given as Windows format, start by converting to
18296  # unix format.
18297  new_path=`$CYGPATH -u "$path"`
18298
18299  # Now try to locate executable using which
18300  new_path=`$WHICH "$new_path" 2> /dev/null`
18301  # bat and cmd files are not always considered executable in cygwin causing which
18302  # to not find them
18303  if test "x$new_path" = x \
18304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18306    new_path=`$CYGPATH -u "$path"`
18307  fi
18308  if test "x$new_path" = x; then
18309    # Oops. Which didn't find the executable.
18310    # The splitting of arguments from the executable at a space might have been incorrect,
18311    # since paths with space are more likely in Windows. Give it another try with the whole
18312    # argument.
18313    path="$complete"
18314    arguments="EOL"
18315    new_path=`$CYGPATH -u "$path"`
18316    new_path=`$WHICH "$new_path" 2> /dev/null`
18317    # bat and cmd files are not always considered executable in cygwin causing which
18318    # to not find them
18319    if test "x$new_path" = x \
18320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18322      new_path=`$CYGPATH -u "$path"`
18323    fi
18324    if test "x$new_path" = x; then
18325      # It's still not found. Now this is an unrecoverable error.
18326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18327$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18328      has_space=`$ECHO "$complete" | $GREP " "`
18329      if test "x$has_space" != x; then
18330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18332      fi
18333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18334    fi
18335  fi
18336
18337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18340  # "foo.exe" is OK but "foo" is an error.
18341  #
18342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18343  # It is also a way to make sure we got the proper file name for the real test later on.
18344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18345  if test "x$test_shortpath" = x; then
18346    # Short path failed, file does not exist as specified.
18347    # Try adding .exe or .cmd
18348    if test -f "${new_path}.exe"; then
18349      input_to_shortpath="${new_path}.exe"
18350    elif test -f "${new_path}.cmd"; then
18351      input_to_shortpath="${new_path}.cmd"
18352    else
18353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18354$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18357      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18358    fi
18359  else
18360    input_to_shortpath="$new_path"
18361  fi
18362
18363  # Call helper function which possibly converts this using DOS-style short mode.
18364  # If so, the updated path is stored in $new_path.
18365  new_path="$input_to_shortpath"
18366
18367  input_path="$input_to_shortpath"
18368  # Check if we need to convert this using DOS-style short mode. If the path
18369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18370  # take no chances and rewrite it.
18371  # Note: m4 eats our [], so we need to use [ and ] instead.
18372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18373  if test "x$has_forbidden_chars" != x; then
18374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18378      # Going to short mode and back again did indeed matter. Since short mode is
18379      # case insensitive, let's make it lowercase to improve readability.
18380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18381      # Now convert it back to Unix-style (cygpath)
18382      input_path=`$CYGPATH -u "$shortmode_path"`
18383      new_path="$input_path"
18384    fi
18385  fi
18386
18387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18388  if test "x$test_cygdrive_prefix" = x; then
18389    # As a simple fix, exclude /usr/bin since it's not a real path.
18390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18392      # a path prefixed by /cygdrive for fixpath to work.
18393      new_path="$CYGWIN_ROOT_PATH$input_path"
18394    fi
18395  fi
18396
18397  # remove trailing .exe if any
18398  new_path="${new_path/%.exe/}"
18399
18400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18401
18402  # First separate the path from the arguments. This will split at the first
18403  # space.
18404  complete="$FOUND_MAKE"
18405  path="${complete%% *}"
18406  tmp="$complete EOL"
18407  arguments="${tmp#* }"
18408
18409  # Input might be given as Windows format, start by converting to
18410  # unix format.
18411  new_path="$path"
18412
18413  windows_path="$new_path"
18414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18415    unix_path=`$CYGPATH -u "$windows_path"`
18416    new_path="$unix_path"
18417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18419    new_path="$unix_path"
18420  fi
18421
18422
18423  # Now try to locate executable using which
18424  new_path=`$WHICH "$new_path" 2> /dev/null`
18425
18426  if test "x$new_path" = x; then
18427    # Oops. Which didn't find the executable.
18428    # The splitting of arguments from the executable at a space might have been incorrect,
18429    # since paths with space are more likely in Windows. Give it another try with the whole
18430    # argument.
18431    path="$complete"
18432    arguments="EOL"
18433    new_path="$path"
18434
18435  windows_path="$new_path"
18436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18437    unix_path=`$CYGPATH -u "$windows_path"`
18438    new_path="$unix_path"
18439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18441    new_path="$unix_path"
18442  fi
18443
18444
18445    new_path=`$WHICH "$new_path" 2> /dev/null`
18446    # bat and cmd files are not always considered executable in MSYS causing which
18447    # to not find them
18448    if test "x$new_path" = x \
18449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18451      new_path="$path"
18452
18453  windows_path="$new_path"
18454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18455    unix_path=`$CYGPATH -u "$windows_path"`
18456    new_path="$unix_path"
18457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18459    new_path="$unix_path"
18460  fi
18461
18462    fi
18463
18464    if test "x$new_path" = x; then
18465      # It's still not found. Now this is an unrecoverable error.
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18468      has_space=`$ECHO "$complete" | $GREP " "`
18469      if test "x$has_space" != x; then
18470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18472      fi
18473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18474    fi
18475  fi
18476
18477  # Now new_path has a complete unix path to the binary
18478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18479    # Keep paths in /bin as-is, but remove trailing .exe if any
18480    new_path="${new_path/%.exe/}"
18481    # Do not save /bin paths to all_fixpath_prefixes!
18482  else
18483    # Not in mixed or Windows style, start by that.
18484    new_path=`cmd //c echo $new_path`
18485
18486  input_path="$new_path"
18487  # Check if we need to convert this using DOS-style short mode. If the path
18488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18489  # take no chances and rewrite it.
18490  # Note: m4 eats our [], so we need to use [ and ] instead.
18491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18492  if test "x$has_forbidden_chars" != x; then
18493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18495  fi
18496
18497    # Output is in $new_path
18498
18499  windows_path="$new_path"
18500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18501    unix_path=`$CYGPATH -u "$windows_path"`
18502    new_path="$unix_path"
18503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18505    new_path="$unix_path"
18506  fi
18507
18508    # remove trailing .exe if any
18509    new_path="${new_path/%.exe/}"
18510
18511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18513  fi
18514
18515    else
18516      # We're on a unix platform. Hooray! :)
18517      # First separate the path from the arguments. This will split at the first
18518      # space.
18519      complete="$FOUND_MAKE"
18520      path="${complete%% *}"
18521      tmp="$complete EOL"
18522      arguments="${tmp#* }"
18523
18524      # Cannot rely on the command "which" here since it doesn't always work.
18525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18526      if test -z "$is_absolute_path"; then
18527        # Path to executable is not absolute. Find it.
18528        IFS_save="$IFS"
18529        IFS=:
18530        for p in $PATH; do
18531          if test -f "$p/$path" && test -x "$p/$path"; then
18532            new_path="$p/$path"
18533            break
18534          fi
18535        done
18536        IFS="$IFS_save"
18537      else
18538        # This is an absolute path, we can use it without further modifications.
18539        new_path="$path"
18540      fi
18541
18542      if test "x$new_path" = x; then
18543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18544$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18545        has_space=`$ECHO "$complete" | $GREP " "`
18546        if test "x$has_space" != x; then
18547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18549        fi
18550        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18551      fi
18552    fi
18553
18554    # Now join together the path and the arguments once again
18555    if test "x$arguments" != xEOL; then
18556      new_complete="$new_path ${arguments% *}"
18557    else
18558      new_complete="$new_path"
18559    fi
18560
18561    if test "x$complete" != "x$new_complete"; then
18562      FOUND_MAKE="$new_complete"
18563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18564$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18565    fi
18566  fi
18567
18568        fi
18569      fi
18570    fi
18571  fi
18572
18573    fi
18574
18575    if test "x$FOUND_MAKE" = x; then
18576      if test "x$TOOLCHAIN_PATH" != x; then
18577        # We have a toolchain path, check that as well before giving up.
18578        OLD_PATH=$PATH
18579        PATH=$TOOLCHAIN_PATH:$PATH
18580        for ac_prog in gmake
18581do
18582  # Extract the first word of "$ac_prog", so it can be a program name with args.
18583set dummy $ac_prog; ac_word=$2
18584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18585$as_echo_n "checking for $ac_word... " >&6; }
18586if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18587  $as_echo_n "(cached) " >&6
18588else
18589  case $CHECK_TOOLSDIR_GMAKE in
18590  [\\/]* | ?:[\\/]*)
18591  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18592  ;;
18593  *)
18594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18595for as_dir in $PATH
18596do
18597  IFS=$as_save_IFS
18598  test -z "$as_dir" && as_dir=.
18599    for ac_exec_ext in '' $ac_executable_extensions; do
18600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18601    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603    break 2
18604  fi
18605done
18606  done
18607IFS=$as_save_IFS
18608
18609  ;;
18610esac
18611fi
18612CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18613if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18615$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18616else
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18618$as_echo "no" >&6; }
18619fi
18620
18621
18622  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18623done
18624
18625
18626  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18627  DESCRIPTION="gmake in tools-dir"
18628
18629  # On Cygwin, we require a newer version of make than on other platforms
18630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18631    MAKE_VERSION_EXPR="-e 4\."
18632    MAKE_REQUIRED_VERSION="4.0"
18633   else
18634    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18635    MAKE_REQUIRED_VERSION="3.81"
18636  fi
18637
18638  if test "x$MAKE_CANDIDATE" != x; then
18639    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18640$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18641    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18642    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18643    if test "x$IS_GNU_MAKE" = x; then
18644      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18645$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18646    else
18647      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18648      if test "x$IS_MODERN_MAKE" = x; then
18649        { $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
18650$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;}
18651      else
18652        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18653          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18654            MAKE_EXPECTED_ENV='cygwin'
18655          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18656            MAKE_EXPECTED_ENV='msys'
18657          else
18658            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18659          fi
18660          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18661          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18662        else
18663          # Not relevant for non-Windows
18664          IS_MAKE_CORRECT_ENV=true
18665        fi
18666        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18667          { $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
18668$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;}
18669        else
18670          FOUND_MAKE=$MAKE_CANDIDATE
18671
18672  # Only process if variable expands to non-empty
18673
18674  if test "x$FOUND_MAKE" != x; then
18675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18676
18677  # First separate the path from the arguments. This will split at the first
18678  # space.
18679  complete="$FOUND_MAKE"
18680  path="${complete%% *}"
18681  tmp="$complete EOL"
18682  arguments="${tmp#* }"
18683
18684  # Input might be given as Windows format, start by converting to
18685  # unix format.
18686  new_path=`$CYGPATH -u "$path"`
18687
18688  # Now try to locate executable using which
18689  new_path=`$WHICH "$new_path" 2> /dev/null`
18690  # bat and cmd files are not always considered executable in cygwin causing which
18691  # to not find them
18692  if test "x$new_path" = x \
18693      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18694      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18695    new_path=`$CYGPATH -u "$path"`
18696  fi
18697  if test "x$new_path" = x; then
18698    # Oops. Which didn't find the executable.
18699    # The splitting of arguments from the executable at a space might have been incorrect,
18700    # since paths with space are more likely in Windows. Give it another try with the whole
18701    # argument.
18702    path="$complete"
18703    arguments="EOL"
18704    new_path=`$CYGPATH -u "$path"`
18705    new_path=`$WHICH "$new_path" 2> /dev/null`
18706    # bat and cmd files are not always considered executable in cygwin causing which
18707    # to not find them
18708    if test "x$new_path" = x \
18709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18711      new_path=`$CYGPATH -u "$path"`
18712    fi
18713    if test "x$new_path" = x; then
18714      # It's still not found. Now this is an unrecoverable error.
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18717      has_space=`$ECHO "$complete" | $GREP " "`
18718      if test "x$has_space" != x; then
18719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18721      fi
18722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18723    fi
18724  fi
18725
18726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18729  # "foo.exe" is OK but "foo" is an error.
18730  #
18731  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18732  # It is also a way to make sure we got the proper file name for the real test later on.
18733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18734  if test "x$test_shortpath" = x; then
18735    # Short path failed, file does not exist as specified.
18736    # Try adding .exe or .cmd
18737    if test -f "${new_path}.exe"; then
18738      input_to_shortpath="${new_path}.exe"
18739    elif test -f "${new_path}.cmd"; then
18740      input_to_shortpath="${new_path}.cmd"
18741    else
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18746      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18747    fi
18748  else
18749    input_to_shortpath="$new_path"
18750  fi
18751
18752  # Call helper function which possibly converts this using DOS-style short mode.
18753  # If so, the updated path is stored in $new_path.
18754  new_path="$input_to_shortpath"
18755
18756  input_path="$input_to_shortpath"
18757  # Check if we need to convert this using DOS-style short mode. If the path
18758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18759  # take no chances and rewrite it.
18760  # Note: m4 eats our [], so we need to use [ and ] instead.
18761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18762  if test "x$has_forbidden_chars" != x; then
18763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18767      # Going to short mode and back again did indeed matter. Since short mode is
18768      # case insensitive, let's make it lowercase to improve readability.
18769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18770      # Now convert it back to Unix-style (cygpath)
18771      input_path=`$CYGPATH -u "$shortmode_path"`
18772      new_path="$input_path"
18773    fi
18774  fi
18775
18776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18777  if test "x$test_cygdrive_prefix" = x; then
18778    # As a simple fix, exclude /usr/bin since it's not a real path.
18779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18781      # a path prefixed by /cygdrive for fixpath to work.
18782      new_path="$CYGWIN_ROOT_PATH$input_path"
18783    fi
18784  fi
18785
18786  # remove trailing .exe if any
18787  new_path="${new_path/%.exe/}"
18788
18789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18790
18791  # First separate the path from the arguments. This will split at the first
18792  # space.
18793  complete="$FOUND_MAKE"
18794  path="${complete%% *}"
18795  tmp="$complete EOL"
18796  arguments="${tmp#* }"
18797
18798  # Input might be given as Windows format, start by converting to
18799  # unix format.
18800  new_path="$path"
18801
18802  windows_path="$new_path"
18803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18804    unix_path=`$CYGPATH -u "$windows_path"`
18805    new_path="$unix_path"
18806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18808    new_path="$unix_path"
18809  fi
18810
18811
18812  # Now try to locate executable using which
18813  new_path=`$WHICH "$new_path" 2> /dev/null`
18814
18815  if test "x$new_path" = x; then
18816    # Oops. Which didn't find the executable.
18817    # The splitting of arguments from the executable at a space might have been incorrect,
18818    # since paths with space are more likely in Windows. Give it another try with the whole
18819    # argument.
18820    path="$complete"
18821    arguments="EOL"
18822    new_path="$path"
18823
18824  windows_path="$new_path"
18825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18826    unix_path=`$CYGPATH -u "$windows_path"`
18827    new_path="$unix_path"
18828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18830    new_path="$unix_path"
18831  fi
18832
18833
18834    new_path=`$WHICH "$new_path" 2> /dev/null`
18835    # bat and cmd files are not always considered executable in MSYS causing which
18836    # to not find them
18837    if test "x$new_path" = x \
18838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18840      new_path="$path"
18841
18842  windows_path="$new_path"
18843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18844    unix_path=`$CYGPATH -u "$windows_path"`
18845    new_path="$unix_path"
18846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18848    new_path="$unix_path"
18849  fi
18850
18851    fi
18852
18853    if test "x$new_path" = x; then
18854      # It's still not found. Now this is an unrecoverable error.
18855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18857      has_space=`$ECHO "$complete" | $GREP " "`
18858      if test "x$has_space" != x; then
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18861      fi
18862      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18863    fi
18864  fi
18865
18866  # Now new_path has a complete unix path to the binary
18867  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18868    # Keep paths in /bin as-is, but remove trailing .exe if any
18869    new_path="${new_path/%.exe/}"
18870    # Do not save /bin paths to all_fixpath_prefixes!
18871  else
18872    # Not in mixed or Windows style, start by that.
18873    new_path=`cmd //c echo $new_path`
18874
18875  input_path="$new_path"
18876  # Check if we need to convert this using DOS-style short mode. If the path
18877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18878  # take no chances and rewrite it.
18879  # Note: m4 eats our [], so we need to use [ and ] instead.
18880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18881  if test "x$has_forbidden_chars" != x; then
18882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18884  fi
18885
18886    # Output is in $new_path
18887
18888  windows_path="$new_path"
18889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18890    unix_path=`$CYGPATH -u "$windows_path"`
18891    new_path="$unix_path"
18892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18894    new_path="$unix_path"
18895  fi
18896
18897    # remove trailing .exe if any
18898    new_path="${new_path/%.exe/}"
18899
18900    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18901    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18902  fi
18903
18904    else
18905      # We're on a unix platform. Hooray! :)
18906      # First separate the path from the arguments. This will split at the first
18907      # space.
18908      complete="$FOUND_MAKE"
18909      path="${complete%% *}"
18910      tmp="$complete EOL"
18911      arguments="${tmp#* }"
18912
18913      # Cannot rely on the command "which" here since it doesn't always work.
18914      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18915      if test -z "$is_absolute_path"; then
18916        # Path to executable is not absolute. Find it.
18917        IFS_save="$IFS"
18918        IFS=:
18919        for p in $PATH; do
18920          if test -f "$p/$path" && test -x "$p/$path"; then
18921            new_path="$p/$path"
18922            break
18923          fi
18924        done
18925        IFS="$IFS_save"
18926      else
18927        # This is an absolute path, we can use it without further modifications.
18928        new_path="$path"
18929      fi
18930
18931      if test "x$new_path" = x; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18934        has_space=`$ECHO "$complete" | $GREP " "`
18935        if test "x$has_space" != x; then
18936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18938        fi
18939        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18940      fi
18941    fi
18942
18943    # Now join together the path and the arguments once again
18944    if test "x$arguments" != xEOL; then
18945      new_complete="$new_path ${arguments% *}"
18946    else
18947      new_complete="$new_path"
18948    fi
18949
18950    if test "x$complete" != "x$new_complete"; then
18951      FOUND_MAKE="$new_complete"
18952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18953$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18954    fi
18955  fi
18956
18957        fi
18958      fi
18959    fi
18960  fi
18961
18962        if test "x$FOUND_MAKE" = x; then
18963          for ac_prog in make
18964do
18965  # Extract the first word of "$ac_prog", so it can be a program name with args.
18966set dummy $ac_prog; ac_word=$2
18967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18968$as_echo_n "checking for $ac_word... " >&6; }
18969if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18970  $as_echo_n "(cached) " >&6
18971else
18972  case $CHECK_TOOLSDIR_MAKE in
18973  [\\/]* | ?:[\\/]*)
18974  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18975  ;;
18976  *)
18977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18978for as_dir in $PATH
18979do
18980  IFS=$as_save_IFS
18981  test -z "$as_dir" && as_dir=.
18982    for ac_exec_ext in '' $ac_executable_extensions; do
18983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18984    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18986    break 2
18987  fi
18988done
18989  done
18990IFS=$as_save_IFS
18991
18992  ;;
18993esac
18994fi
18995CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18996if test -n "$CHECK_TOOLSDIR_MAKE"; then
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18998$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18999else
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19001$as_echo "no" >&6; }
19002fi
19003
19004
19005  test -n "$CHECK_TOOLSDIR_MAKE" && break
19006done
19007
19008
19009  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19010  DESCRIPTION="make in tools-dir"
19011
19012  # On Cygwin, we require a newer version of make than on other platforms
19013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19014    MAKE_VERSION_EXPR="-e 4\."
19015    MAKE_REQUIRED_VERSION="4.0"
19016   else
19017    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19018    MAKE_REQUIRED_VERSION="3.81"
19019  fi
19020
19021  if test "x$MAKE_CANDIDATE" != x; then
19022    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19023$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19024    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19025    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19026    if test "x$IS_GNU_MAKE" = x; then
19027      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19028$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19029    else
19030      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19031      if test "x$IS_MODERN_MAKE" = x; then
19032        { $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
19033$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;}
19034      else
19035        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19036          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19037            MAKE_EXPECTED_ENV='cygwin'
19038          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19039            MAKE_EXPECTED_ENV='msys'
19040          else
19041            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19042          fi
19043          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19044          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19045        else
19046          # Not relevant for non-Windows
19047          IS_MAKE_CORRECT_ENV=true
19048        fi
19049        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19050          { $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
19051$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;}
19052        else
19053          FOUND_MAKE=$MAKE_CANDIDATE
19054
19055  # Only process if variable expands to non-empty
19056
19057  if test "x$FOUND_MAKE" != x; then
19058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19059
19060  # First separate the path from the arguments. This will split at the first
19061  # space.
19062  complete="$FOUND_MAKE"
19063  path="${complete%% *}"
19064  tmp="$complete EOL"
19065  arguments="${tmp#* }"
19066
19067  # Input might be given as Windows format, start by converting to
19068  # unix format.
19069  new_path=`$CYGPATH -u "$path"`
19070
19071  # Now try to locate executable using which
19072  new_path=`$WHICH "$new_path" 2> /dev/null`
19073  # bat and cmd files are not always considered executable in cygwin causing which
19074  # to not find them
19075  if test "x$new_path" = x \
19076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19078    new_path=`$CYGPATH -u "$path"`
19079  fi
19080  if test "x$new_path" = x; then
19081    # Oops. Which didn't find the executable.
19082    # The splitting of arguments from the executable at a space might have been incorrect,
19083    # since paths with space are more likely in Windows. Give it another try with the whole
19084    # argument.
19085    path="$complete"
19086    arguments="EOL"
19087    new_path=`$CYGPATH -u "$path"`
19088    new_path=`$WHICH "$new_path" 2> /dev/null`
19089    # bat and cmd files are not always considered executable in cygwin causing which
19090    # to not find them
19091    if test "x$new_path" = x \
19092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19094      new_path=`$CYGPATH -u "$path"`
19095    fi
19096    if test "x$new_path" = x; then
19097      # It's still not found. Now this is an unrecoverable error.
19098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19099$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19100      has_space=`$ECHO "$complete" | $GREP " "`
19101      if test "x$has_space" != x; then
19102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19104      fi
19105      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19106    fi
19107  fi
19108
19109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19112  # "foo.exe" is OK but "foo" is an error.
19113  #
19114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19115  # It is also a way to make sure we got the proper file name for the real test later on.
19116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19117  if test "x$test_shortpath" = x; then
19118    # Short path failed, file does not exist as specified.
19119    # Try adding .exe or .cmd
19120    if test -f "${new_path}.exe"; then
19121      input_to_shortpath="${new_path}.exe"
19122    elif test -f "${new_path}.cmd"; then
19123      input_to_shortpath="${new_path}.cmd"
19124    else
19125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19126$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19129      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19130    fi
19131  else
19132    input_to_shortpath="$new_path"
19133  fi
19134
19135  # Call helper function which possibly converts this using DOS-style short mode.
19136  # If so, the updated path is stored in $new_path.
19137  new_path="$input_to_shortpath"
19138
19139  input_path="$input_to_shortpath"
19140  # Check if we need to convert this using DOS-style short mode. If the path
19141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19142  # take no chances and rewrite it.
19143  # Note: m4 eats our [], so we need to use [ and ] instead.
19144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19145  if test "x$has_forbidden_chars" != x; then
19146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19150      # Going to short mode and back again did indeed matter. Since short mode is
19151      # case insensitive, let's make it lowercase to improve readability.
19152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19153      # Now convert it back to Unix-style (cygpath)
19154      input_path=`$CYGPATH -u "$shortmode_path"`
19155      new_path="$input_path"
19156    fi
19157  fi
19158
19159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19160  if test "x$test_cygdrive_prefix" = x; then
19161    # As a simple fix, exclude /usr/bin since it's not a real path.
19162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19164      # a path prefixed by /cygdrive for fixpath to work.
19165      new_path="$CYGWIN_ROOT_PATH$input_path"
19166    fi
19167  fi
19168
19169  # remove trailing .exe if any
19170  new_path="${new_path/%.exe/}"
19171
19172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19173
19174  # First separate the path from the arguments. This will split at the first
19175  # space.
19176  complete="$FOUND_MAKE"
19177  path="${complete%% *}"
19178  tmp="$complete EOL"
19179  arguments="${tmp#* }"
19180
19181  # Input might be given as Windows format, start by converting to
19182  # unix format.
19183  new_path="$path"
19184
19185  windows_path="$new_path"
19186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187    unix_path=`$CYGPATH -u "$windows_path"`
19188    new_path="$unix_path"
19189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19191    new_path="$unix_path"
19192  fi
19193
19194
19195  # Now try to locate executable using which
19196  new_path=`$WHICH "$new_path" 2> /dev/null`
19197
19198  if test "x$new_path" = x; then
19199    # Oops. Which didn't find the executable.
19200    # The splitting of arguments from the executable at a space might have been incorrect,
19201    # since paths with space are more likely in Windows. Give it another try with the whole
19202    # argument.
19203    path="$complete"
19204    arguments="EOL"
19205    new_path="$path"
19206
19207  windows_path="$new_path"
19208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19209    unix_path=`$CYGPATH -u "$windows_path"`
19210    new_path="$unix_path"
19211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19213    new_path="$unix_path"
19214  fi
19215
19216
19217    new_path=`$WHICH "$new_path" 2> /dev/null`
19218    # bat and cmd files are not always considered executable in MSYS causing which
19219    # to not find them
19220    if test "x$new_path" = x \
19221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19223      new_path="$path"
19224
19225  windows_path="$new_path"
19226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19227    unix_path=`$CYGPATH -u "$windows_path"`
19228    new_path="$unix_path"
19229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19231    new_path="$unix_path"
19232  fi
19233
19234    fi
19235
19236    if test "x$new_path" = x; then
19237      # It's still not found. Now this is an unrecoverable error.
19238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19240      has_space=`$ECHO "$complete" | $GREP " "`
19241      if test "x$has_space" != x; then
19242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19244      fi
19245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19246    fi
19247  fi
19248
19249  # Now new_path has a complete unix path to the binary
19250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19251    # Keep paths in /bin as-is, but remove trailing .exe if any
19252    new_path="${new_path/%.exe/}"
19253    # Do not save /bin paths to all_fixpath_prefixes!
19254  else
19255    # Not in mixed or Windows style, start by that.
19256    new_path=`cmd //c echo $new_path`
19257
19258  input_path="$new_path"
19259  # Check if we need to convert this using DOS-style short mode. If the path
19260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19261  # take no chances and rewrite it.
19262  # Note: m4 eats our [], so we need to use [ and ] instead.
19263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19264  if test "x$has_forbidden_chars" != x; then
19265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19267  fi
19268
19269    # Output is in $new_path
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280    # remove trailing .exe if any
19281    new_path="${new_path/%.exe/}"
19282
19283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19285  fi
19286
19287    else
19288      # We're on a unix platform. Hooray! :)
19289      # First separate the path from the arguments. This will split at the first
19290      # space.
19291      complete="$FOUND_MAKE"
19292      path="${complete%% *}"
19293      tmp="$complete EOL"
19294      arguments="${tmp#* }"
19295
19296      # Cannot rely on the command "which" here since it doesn't always work.
19297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19298      if test -z "$is_absolute_path"; then
19299        # Path to executable is not absolute. Find it.
19300        IFS_save="$IFS"
19301        IFS=:
19302        for p in $PATH; do
19303          if test -f "$p/$path" && test -x "$p/$path"; then
19304            new_path="$p/$path"
19305            break
19306          fi
19307        done
19308        IFS="$IFS_save"
19309      else
19310        # This is an absolute path, we can use it without further modifications.
19311        new_path="$path"
19312      fi
19313
19314      if test "x$new_path" = x; then
19315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19317        has_space=`$ECHO "$complete" | $GREP " "`
19318        if test "x$has_space" != x; then
19319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19321        fi
19322        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19323      fi
19324    fi
19325
19326    # Now join together the path and the arguments once again
19327    if test "x$arguments" != xEOL; then
19328      new_complete="$new_path ${arguments% *}"
19329    else
19330      new_complete="$new_path"
19331    fi
19332
19333    if test "x$complete" != "x$new_complete"; then
19334      FOUND_MAKE="$new_complete"
19335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19336$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19337    fi
19338  fi
19339
19340        fi
19341      fi
19342    fi
19343  fi
19344
19345        fi
19346        PATH=$OLD_PATH
19347      fi
19348    fi
19349
19350    if test "x$FOUND_MAKE" = x; then
19351      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
19352    fi
19353
19354  else
19355    # The variable is set, but is it from the command line or the environment?
19356
19357    # Try to remove the string !MAKE! from our list.
19358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19360      # If it failed, the variable was not from the command line. Ignore it,
19361      # but warn the user (except for BASH, which is always set by the calling BASH).
19362      if test "xMAKE" != xBASH; then
19363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19364$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19365      fi
19366      # Try to locate tool using the code snippet
19367
19368    # Try our hardest to locate a correct version of GNU make
19369    for ac_prog in gmake
19370do
19371  # Extract the first word of "$ac_prog", so it can be a program name with args.
19372set dummy $ac_prog; ac_word=$2
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19374$as_echo_n "checking for $ac_word... " >&6; }
19375if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19376  $as_echo_n "(cached) " >&6
19377else
19378  case $CHECK_GMAKE in
19379  [\\/]* | ?:[\\/]*)
19380  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19381  ;;
19382  *)
19383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19384for as_dir in $PATH
19385do
19386  IFS=$as_save_IFS
19387  test -z "$as_dir" && as_dir=.
19388    for ac_exec_ext in '' $ac_executable_extensions; do
19389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19390    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19392    break 2
19393  fi
19394done
19395  done
19396IFS=$as_save_IFS
19397
19398  ;;
19399esac
19400fi
19401CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19402if test -n "$CHECK_GMAKE"; then
19403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19404$as_echo "$CHECK_GMAKE" >&6; }
19405else
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19407$as_echo "no" >&6; }
19408fi
19409
19410
19411  test -n "$CHECK_GMAKE" && break
19412done
19413
19414
19415  MAKE_CANDIDATE=""$CHECK_GMAKE""
19416  DESCRIPTION="gmake in PATH"
19417
19418  # On Cygwin, we require a newer version of make than on other platforms
19419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19420    MAKE_VERSION_EXPR="-e 4\."
19421    MAKE_REQUIRED_VERSION="4.0"
19422   else
19423    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19424    MAKE_REQUIRED_VERSION="3.81"
19425  fi
19426
19427  if test "x$MAKE_CANDIDATE" != x; then
19428    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19429$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19430    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19431    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19432    if test "x$IS_GNU_MAKE" = x; then
19433      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19434$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19435    else
19436      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19437      if test "x$IS_MODERN_MAKE" = x; then
19438        { $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
19439$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;}
19440      else
19441        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19442          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19443            MAKE_EXPECTED_ENV='cygwin'
19444          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19445            MAKE_EXPECTED_ENV='msys'
19446          else
19447            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19448          fi
19449          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19450          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19451        else
19452          # Not relevant for non-Windows
19453          IS_MAKE_CORRECT_ENV=true
19454        fi
19455        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19456          { $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
19457$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;}
19458        else
19459          FOUND_MAKE=$MAKE_CANDIDATE
19460
19461  # Only process if variable expands to non-empty
19462
19463  if test "x$FOUND_MAKE" != x; then
19464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19465
19466  # First separate the path from the arguments. This will split at the first
19467  # space.
19468  complete="$FOUND_MAKE"
19469  path="${complete%% *}"
19470  tmp="$complete EOL"
19471  arguments="${tmp#* }"
19472
19473  # Input might be given as Windows format, start by converting to
19474  # unix format.
19475  new_path=`$CYGPATH -u "$path"`
19476
19477  # Now try to locate executable using which
19478  new_path=`$WHICH "$new_path" 2> /dev/null`
19479  # bat and cmd files are not always considered executable in cygwin causing which
19480  # to not find them
19481  if test "x$new_path" = x \
19482      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19483      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19484    new_path=`$CYGPATH -u "$path"`
19485  fi
19486  if test "x$new_path" = x; then
19487    # Oops. Which didn't find the executable.
19488    # The splitting of arguments from the executable at a space might have been incorrect,
19489    # since paths with space are more likely in Windows. Give it another try with the whole
19490    # argument.
19491    path="$complete"
19492    arguments="EOL"
19493    new_path=`$CYGPATH -u "$path"`
19494    new_path=`$WHICH "$new_path" 2> /dev/null`
19495    # bat and cmd files are not always considered executable in cygwin causing which
19496    # to not find them
19497    if test "x$new_path" = x \
19498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19500      new_path=`$CYGPATH -u "$path"`
19501    fi
19502    if test "x$new_path" = x; then
19503      # It's still not found. Now this is an unrecoverable error.
19504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19505$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19506      has_space=`$ECHO "$complete" | $GREP " "`
19507      if test "x$has_space" != x; then
19508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19510      fi
19511      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19512    fi
19513  fi
19514
19515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19518  # "foo.exe" is OK but "foo" is an error.
19519  #
19520  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19521  # It is also a way to make sure we got the proper file name for the real test later on.
19522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19523  if test "x$test_shortpath" = x; then
19524    # Short path failed, file does not exist as specified.
19525    # Try adding .exe or .cmd
19526    if test -f "${new_path}.exe"; then
19527      input_to_shortpath="${new_path}.exe"
19528    elif test -f "${new_path}.cmd"; then
19529      input_to_shortpath="${new_path}.cmd"
19530    else
19531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19533      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19534$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19535      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19536    fi
19537  else
19538    input_to_shortpath="$new_path"
19539  fi
19540
19541  # Call helper function which possibly converts this using DOS-style short mode.
19542  # If so, the updated path is stored in $new_path.
19543  new_path="$input_to_shortpath"
19544
19545  input_path="$input_to_shortpath"
19546  # Check if we need to convert this using DOS-style short mode. If the path
19547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19548  # take no chances and rewrite it.
19549  # Note: m4 eats our [], so we need to use [ and ] instead.
19550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19551  if test "x$has_forbidden_chars" != x; then
19552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19556      # Going to short mode and back again did indeed matter. Since short mode is
19557      # case insensitive, let's make it lowercase to improve readability.
19558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19559      # Now convert it back to Unix-style (cygpath)
19560      input_path=`$CYGPATH -u "$shortmode_path"`
19561      new_path="$input_path"
19562    fi
19563  fi
19564
19565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19566  if test "x$test_cygdrive_prefix" = x; then
19567    # As a simple fix, exclude /usr/bin since it's not a real path.
19568    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19570      # a path prefixed by /cygdrive for fixpath to work.
19571      new_path="$CYGWIN_ROOT_PATH$input_path"
19572    fi
19573  fi
19574
19575  # remove trailing .exe if any
19576  new_path="${new_path/%.exe/}"
19577
19578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19579
19580  # First separate the path from the arguments. This will split at the first
19581  # space.
19582  complete="$FOUND_MAKE"
19583  path="${complete%% *}"
19584  tmp="$complete EOL"
19585  arguments="${tmp#* }"
19586
19587  # Input might be given as Windows format, start by converting to
19588  # unix format.
19589  new_path="$path"
19590
19591  windows_path="$new_path"
19592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19593    unix_path=`$CYGPATH -u "$windows_path"`
19594    new_path="$unix_path"
19595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19597    new_path="$unix_path"
19598  fi
19599
19600
19601  # Now try to locate executable using which
19602  new_path=`$WHICH "$new_path" 2> /dev/null`
19603
19604  if test "x$new_path" = x; then
19605    # Oops. Which didn't find the executable.
19606    # The splitting of arguments from the executable at a space might have been incorrect,
19607    # since paths with space are more likely in Windows. Give it another try with the whole
19608    # argument.
19609    path="$complete"
19610    arguments="EOL"
19611    new_path="$path"
19612
19613  windows_path="$new_path"
19614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19615    unix_path=`$CYGPATH -u "$windows_path"`
19616    new_path="$unix_path"
19617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19619    new_path="$unix_path"
19620  fi
19621
19622
19623    new_path=`$WHICH "$new_path" 2> /dev/null`
19624    # bat and cmd files are not always considered executable in MSYS causing which
19625    # to not find them
19626    if test "x$new_path" = x \
19627        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19628        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19629      new_path="$path"
19630
19631  windows_path="$new_path"
19632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19633    unix_path=`$CYGPATH -u "$windows_path"`
19634    new_path="$unix_path"
19635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19637    new_path="$unix_path"
19638  fi
19639
19640    fi
19641
19642    if test "x$new_path" = x; then
19643      # It's still not found. Now this is an unrecoverable error.
19644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19646      has_space=`$ECHO "$complete" | $GREP " "`
19647      if test "x$has_space" != x; then
19648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19650      fi
19651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19652    fi
19653  fi
19654
19655  # Now new_path has a complete unix path to the binary
19656  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19657    # Keep paths in /bin as-is, but remove trailing .exe if any
19658    new_path="${new_path/%.exe/}"
19659    # Do not save /bin paths to all_fixpath_prefixes!
19660  else
19661    # Not in mixed or Windows style, start by that.
19662    new_path=`cmd //c echo $new_path`
19663
19664  input_path="$new_path"
19665  # Check if we need to convert this using DOS-style short mode. If the path
19666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19667  # take no chances and rewrite it.
19668  # Note: m4 eats our [], so we need to use [ and ] instead.
19669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19670  if test "x$has_forbidden_chars" != x; then
19671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19673  fi
19674
19675    # Output is in $new_path
19676
19677  windows_path="$new_path"
19678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679    unix_path=`$CYGPATH -u "$windows_path"`
19680    new_path="$unix_path"
19681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19683    new_path="$unix_path"
19684  fi
19685
19686    # remove trailing .exe if any
19687    new_path="${new_path/%.exe/}"
19688
19689    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19690    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19691  fi
19692
19693    else
19694      # We're on a unix platform. Hooray! :)
19695      # First separate the path from the arguments. This will split at the first
19696      # space.
19697      complete="$FOUND_MAKE"
19698      path="${complete%% *}"
19699      tmp="$complete EOL"
19700      arguments="${tmp#* }"
19701
19702      # Cannot rely on the command "which" here since it doesn't always work.
19703      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19704      if test -z "$is_absolute_path"; then
19705        # Path to executable is not absolute. Find it.
19706        IFS_save="$IFS"
19707        IFS=:
19708        for p in $PATH; do
19709          if test -f "$p/$path" && test -x "$p/$path"; then
19710            new_path="$p/$path"
19711            break
19712          fi
19713        done
19714        IFS="$IFS_save"
19715      else
19716        # This is an absolute path, we can use it without further modifications.
19717        new_path="$path"
19718      fi
19719
19720      if test "x$new_path" = x; then
19721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19723        has_space=`$ECHO "$complete" | $GREP " "`
19724        if test "x$has_space" != x; then
19725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19727        fi
19728        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19729      fi
19730    fi
19731
19732    # Now join together the path and the arguments once again
19733    if test "x$arguments" != xEOL; then
19734      new_complete="$new_path ${arguments% *}"
19735    else
19736      new_complete="$new_path"
19737    fi
19738
19739    if test "x$complete" != "x$new_complete"; then
19740      FOUND_MAKE="$new_complete"
19741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19742$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19743    fi
19744  fi
19745
19746        fi
19747      fi
19748    fi
19749  fi
19750
19751
19752    if test "x$FOUND_MAKE" = x; then
19753      for ac_prog in make
19754do
19755  # Extract the first word of "$ac_prog", so it can be a program name with args.
19756set dummy $ac_prog; ac_word=$2
19757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19758$as_echo_n "checking for $ac_word... " >&6; }
19759if ${ac_cv_path_CHECK_MAKE+:} false; then :
19760  $as_echo_n "(cached) " >&6
19761else
19762  case $CHECK_MAKE in
19763  [\\/]* | ?:[\\/]*)
19764  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19765  ;;
19766  *)
19767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19768for as_dir in $PATH
19769do
19770  IFS=$as_save_IFS
19771  test -z "$as_dir" && as_dir=.
19772    for ac_exec_ext in '' $ac_executable_extensions; do
19773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19774    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19776    break 2
19777  fi
19778done
19779  done
19780IFS=$as_save_IFS
19781
19782  ;;
19783esac
19784fi
19785CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19786if test -n "$CHECK_MAKE"; then
19787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19788$as_echo "$CHECK_MAKE" >&6; }
19789else
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19791$as_echo "no" >&6; }
19792fi
19793
19794
19795  test -n "$CHECK_MAKE" && break
19796done
19797
19798
19799  MAKE_CANDIDATE=""$CHECK_MAKE""
19800  DESCRIPTION="make in PATH"
19801
19802  # On Cygwin, we require a newer version of make than on other platforms
19803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19804    MAKE_VERSION_EXPR="-e 4\."
19805    MAKE_REQUIRED_VERSION="4.0"
19806   else
19807    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19808    MAKE_REQUIRED_VERSION="3.81"
19809  fi
19810
19811  if test "x$MAKE_CANDIDATE" != x; then
19812    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19813$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19814    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19815    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19816    if test "x$IS_GNU_MAKE" = x; then
19817      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19818$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19819    else
19820      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19821      if test "x$IS_MODERN_MAKE" = x; then
19822        { $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
19823$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;}
19824      else
19825        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19826          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19827            MAKE_EXPECTED_ENV='cygwin'
19828          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829            MAKE_EXPECTED_ENV='msys'
19830          else
19831            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19832          fi
19833          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19834          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19835        else
19836          # Not relevant for non-Windows
19837          IS_MAKE_CORRECT_ENV=true
19838        fi
19839        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19840          { $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
19841$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;}
19842        else
19843          FOUND_MAKE=$MAKE_CANDIDATE
19844
19845  # Only process if variable expands to non-empty
19846
19847  if test "x$FOUND_MAKE" != x; then
19848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19849
19850  # First separate the path from the arguments. This will split at the first
19851  # space.
19852  complete="$FOUND_MAKE"
19853  path="${complete%% *}"
19854  tmp="$complete EOL"
19855  arguments="${tmp#* }"
19856
19857  # Input might be given as Windows format, start by converting to
19858  # unix format.
19859  new_path=`$CYGPATH -u "$path"`
19860
19861  # Now try to locate executable using which
19862  new_path=`$WHICH "$new_path" 2> /dev/null`
19863  # bat and cmd files are not always considered executable in cygwin causing which
19864  # to not find them
19865  if test "x$new_path" = x \
19866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19868    new_path=`$CYGPATH -u "$path"`
19869  fi
19870  if test "x$new_path" = x; then
19871    # Oops. Which didn't find the executable.
19872    # The splitting of arguments from the executable at a space might have been incorrect,
19873    # since paths with space are more likely in Windows. Give it another try with the whole
19874    # argument.
19875    path="$complete"
19876    arguments="EOL"
19877    new_path=`$CYGPATH -u "$path"`
19878    new_path=`$WHICH "$new_path" 2> /dev/null`
19879    # bat and cmd files are not always considered executable in cygwin causing which
19880    # to not find them
19881    if test "x$new_path" = x \
19882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19884      new_path=`$CYGPATH -u "$path"`
19885    fi
19886    if test "x$new_path" = x; then
19887      # It's still not found. Now this is an unrecoverable error.
19888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19889$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19890      has_space=`$ECHO "$complete" | $GREP " "`
19891      if test "x$has_space" != x; then
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19894      fi
19895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19896    fi
19897  fi
19898
19899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19902  # "foo.exe" is OK but "foo" is an error.
19903  #
19904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19905  # It is also a way to make sure we got the proper file name for the real test later on.
19906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19907  if test "x$test_shortpath" = x; then
19908    # Short path failed, file does not exist as specified.
19909    # Try adding .exe or .cmd
19910    if test -f "${new_path}.exe"; then
19911      input_to_shortpath="${new_path}.exe"
19912    elif test -f "${new_path}.cmd"; then
19913      input_to_shortpath="${new_path}.cmd"
19914    else
19915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19916$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19919      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19920    fi
19921  else
19922    input_to_shortpath="$new_path"
19923  fi
19924
19925  # Call helper function which possibly converts this using DOS-style short mode.
19926  # If so, the updated path is stored in $new_path.
19927  new_path="$input_to_shortpath"
19928
19929  input_path="$input_to_shortpath"
19930  # Check if we need to convert this using DOS-style short mode. If the path
19931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19932  # take no chances and rewrite it.
19933  # Note: m4 eats our [], so we need to use [ and ] instead.
19934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19935  if test "x$has_forbidden_chars" != x; then
19936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19940      # Going to short mode and back again did indeed matter. Since short mode is
19941      # case insensitive, let's make it lowercase to improve readability.
19942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19943      # Now convert it back to Unix-style (cygpath)
19944      input_path=`$CYGPATH -u "$shortmode_path"`
19945      new_path="$input_path"
19946    fi
19947  fi
19948
19949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19950  if test "x$test_cygdrive_prefix" = x; then
19951    # As a simple fix, exclude /usr/bin since it's not a real path.
19952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19954      # a path prefixed by /cygdrive for fixpath to work.
19955      new_path="$CYGWIN_ROOT_PATH$input_path"
19956    fi
19957  fi
19958
19959  # remove trailing .exe if any
19960  new_path="${new_path/%.exe/}"
19961
19962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19963
19964  # First separate the path from the arguments. This will split at the first
19965  # space.
19966  complete="$FOUND_MAKE"
19967  path="${complete%% *}"
19968  tmp="$complete EOL"
19969  arguments="${tmp#* }"
19970
19971  # Input might be given as Windows format, start by converting to
19972  # unix format.
19973  new_path="$path"
19974
19975  windows_path="$new_path"
19976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19977    unix_path=`$CYGPATH -u "$windows_path"`
19978    new_path="$unix_path"
19979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19981    new_path="$unix_path"
19982  fi
19983
19984
19985  # Now try to locate executable using which
19986  new_path=`$WHICH "$new_path" 2> /dev/null`
19987
19988  if test "x$new_path" = x; then
19989    # Oops. Which didn't find the executable.
19990    # The splitting of arguments from the executable at a space might have been incorrect,
19991    # since paths with space are more likely in Windows. Give it another try with the whole
19992    # argument.
19993    path="$complete"
19994    arguments="EOL"
19995    new_path="$path"
19996
19997  windows_path="$new_path"
19998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999    unix_path=`$CYGPATH -u "$windows_path"`
20000    new_path="$unix_path"
20001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20003    new_path="$unix_path"
20004  fi
20005
20006
20007    new_path=`$WHICH "$new_path" 2> /dev/null`
20008    # bat and cmd files are not always considered executable in MSYS causing which
20009    # to not find them
20010    if test "x$new_path" = x \
20011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20013      new_path="$path"
20014
20015  windows_path="$new_path"
20016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20017    unix_path=`$CYGPATH -u "$windows_path"`
20018    new_path="$unix_path"
20019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20021    new_path="$unix_path"
20022  fi
20023
20024    fi
20025
20026    if test "x$new_path" = x; then
20027      # It's still not found. Now this is an unrecoverable error.
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20030      has_space=`$ECHO "$complete" | $GREP " "`
20031      if test "x$has_space" != x; then
20032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20034      fi
20035      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20036    fi
20037  fi
20038
20039  # Now new_path has a complete unix path to the binary
20040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20041    # Keep paths in /bin as-is, but remove trailing .exe if any
20042    new_path="${new_path/%.exe/}"
20043    # Do not save /bin paths to all_fixpath_prefixes!
20044  else
20045    # Not in mixed or Windows style, start by that.
20046    new_path=`cmd //c echo $new_path`
20047
20048  input_path="$new_path"
20049  # Check if we need to convert this using DOS-style short mode. If the path
20050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20051  # take no chances and rewrite it.
20052  # Note: m4 eats our [], so we need to use [ and ] instead.
20053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20054  if test "x$has_forbidden_chars" != x; then
20055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20057  fi
20058
20059    # Output is in $new_path
20060
20061  windows_path="$new_path"
20062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20063    unix_path=`$CYGPATH -u "$windows_path"`
20064    new_path="$unix_path"
20065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20067    new_path="$unix_path"
20068  fi
20069
20070    # remove trailing .exe if any
20071    new_path="${new_path/%.exe/}"
20072
20073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20075  fi
20076
20077    else
20078      # We're on a unix platform. Hooray! :)
20079      # First separate the path from the arguments. This will split at the first
20080      # space.
20081      complete="$FOUND_MAKE"
20082      path="${complete%% *}"
20083      tmp="$complete EOL"
20084      arguments="${tmp#* }"
20085
20086      # Cannot rely on the command "which" here since it doesn't always work.
20087      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20088      if test -z "$is_absolute_path"; then
20089        # Path to executable is not absolute. Find it.
20090        IFS_save="$IFS"
20091        IFS=:
20092        for p in $PATH; do
20093          if test -f "$p/$path" && test -x "$p/$path"; then
20094            new_path="$p/$path"
20095            break
20096          fi
20097        done
20098        IFS="$IFS_save"
20099      else
20100        # This is an absolute path, we can use it without further modifications.
20101        new_path="$path"
20102      fi
20103
20104      if test "x$new_path" = x; then
20105        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20107        has_space=`$ECHO "$complete" | $GREP " "`
20108        if test "x$has_space" != x; then
20109          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20111        fi
20112        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20113      fi
20114    fi
20115
20116    # Now join together the path and the arguments once again
20117    if test "x$arguments" != xEOL; then
20118      new_complete="$new_path ${arguments% *}"
20119    else
20120      new_complete="$new_path"
20121    fi
20122
20123    if test "x$complete" != "x$new_complete"; then
20124      FOUND_MAKE="$new_complete"
20125      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20126$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20127    fi
20128  fi
20129
20130        fi
20131      fi
20132    fi
20133  fi
20134
20135    fi
20136
20137    if test "x$FOUND_MAKE" = x; then
20138      if test "x$TOOLCHAIN_PATH" != x; then
20139        # We have a toolchain path, check that as well before giving up.
20140        OLD_PATH=$PATH
20141        PATH=$TOOLCHAIN_PATH:$PATH
20142        for ac_prog in gmake
20143do
20144  # Extract the first word of "$ac_prog", so it can be a program name with args.
20145set dummy $ac_prog; ac_word=$2
20146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20147$as_echo_n "checking for $ac_word... " >&6; }
20148if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20149  $as_echo_n "(cached) " >&6
20150else
20151  case $CHECK_TOOLSDIR_GMAKE in
20152  [\\/]* | ?:[\\/]*)
20153  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20154  ;;
20155  *)
20156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20157for as_dir in $PATH
20158do
20159  IFS=$as_save_IFS
20160  test -z "$as_dir" && as_dir=.
20161    for ac_exec_ext in '' $ac_executable_extensions; do
20162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20163    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20165    break 2
20166  fi
20167done
20168  done
20169IFS=$as_save_IFS
20170
20171  ;;
20172esac
20173fi
20174CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20175if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20177$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20178else
20179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20180$as_echo "no" >&6; }
20181fi
20182
20183
20184  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20185done
20186
20187
20188  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20189  DESCRIPTION="gmake in tools-dir"
20190
20191  # On Cygwin, we require a newer version of make than on other platforms
20192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20193    MAKE_VERSION_EXPR="-e 4\."
20194    MAKE_REQUIRED_VERSION="4.0"
20195   else
20196    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20197    MAKE_REQUIRED_VERSION="3.81"
20198  fi
20199
20200  if test "x$MAKE_CANDIDATE" != x; then
20201    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20202$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20203    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20204    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20205    if test "x$IS_GNU_MAKE" = x; then
20206      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20207$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20208    else
20209      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20210      if test "x$IS_MODERN_MAKE" = x; then
20211        { $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
20212$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;}
20213      else
20214        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20215          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20216            MAKE_EXPECTED_ENV='cygwin'
20217          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20218            MAKE_EXPECTED_ENV='msys'
20219          else
20220            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20221          fi
20222          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20223          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20224        else
20225          # Not relevant for non-Windows
20226          IS_MAKE_CORRECT_ENV=true
20227        fi
20228        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20229          { $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
20230$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;}
20231        else
20232          FOUND_MAKE=$MAKE_CANDIDATE
20233
20234  # Only process if variable expands to non-empty
20235
20236  if test "x$FOUND_MAKE" != x; then
20237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20238
20239  # First separate the path from the arguments. This will split at the first
20240  # space.
20241  complete="$FOUND_MAKE"
20242  path="${complete%% *}"
20243  tmp="$complete EOL"
20244  arguments="${tmp#* }"
20245
20246  # Input might be given as Windows format, start by converting to
20247  # unix format.
20248  new_path=`$CYGPATH -u "$path"`
20249
20250  # Now try to locate executable using which
20251  new_path=`$WHICH "$new_path" 2> /dev/null`
20252  # bat and cmd files are not always considered executable in cygwin causing which
20253  # to not find them
20254  if test "x$new_path" = x \
20255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20257    new_path=`$CYGPATH -u "$path"`
20258  fi
20259  if test "x$new_path" = x; then
20260    # Oops. Which didn't find the executable.
20261    # The splitting of arguments from the executable at a space might have been incorrect,
20262    # since paths with space are more likely in Windows. Give it another try with the whole
20263    # argument.
20264    path="$complete"
20265    arguments="EOL"
20266    new_path=`$CYGPATH -u "$path"`
20267    new_path=`$WHICH "$new_path" 2> /dev/null`
20268    # bat and cmd files are not always considered executable in cygwin causing which
20269    # to not find them
20270    if test "x$new_path" = x \
20271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20273      new_path=`$CYGPATH -u "$path"`
20274    fi
20275    if test "x$new_path" = x; then
20276      # It's still not found. Now this is an unrecoverable error.
20277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20279      has_space=`$ECHO "$complete" | $GREP " "`
20280      if test "x$has_space" != x; then
20281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20283      fi
20284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20285    fi
20286  fi
20287
20288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20291  # "foo.exe" is OK but "foo" is an error.
20292  #
20293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20294  # It is also a way to make sure we got the proper file name for the real test later on.
20295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20296  if test "x$test_shortpath" = x; then
20297    # Short path failed, file does not exist as specified.
20298    # Try adding .exe or .cmd
20299    if test -f "${new_path}.exe"; then
20300      input_to_shortpath="${new_path}.exe"
20301    elif test -f "${new_path}.cmd"; then
20302      input_to_shortpath="${new_path}.cmd"
20303    else
20304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20308      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20309    fi
20310  else
20311    input_to_shortpath="$new_path"
20312  fi
20313
20314  # Call helper function which possibly converts this using DOS-style short mode.
20315  # If so, the updated path is stored in $new_path.
20316  new_path="$input_to_shortpath"
20317
20318  input_path="$input_to_shortpath"
20319  # Check if we need to convert this using DOS-style short mode. If the path
20320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20321  # take no chances and rewrite it.
20322  # Note: m4 eats our [], so we need to use [ and ] instead.
20323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20324  if test "x$has_forbidden_chars" != x; then
20325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20329      # Going to short mode and back again did indeed matter. Since short mode is
20330      # case insensitive, let's make it lowercase to improve readability.
20331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20332      # Now convert it back to Unix-style (cygpath)
20333      input_path=`$CYGPATH -u "$shortmode_path"`
20334      new_path="$input_path"
20335    fi
20336  fi
20337
20338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20339  if test "x$test_cygdrive_prefix" = x; then
20340    # As a simple fix, exclude /usr/bin since it's not a real path.
20341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20343      # a path prefixed by /cygdrive for fixpath to work.
20344      new_path="$CYGWIN_ROOT_PATH$input_path"
20345    fi
20346  fi
20347
20348  # remove trailing .exe if any
20349  new_path="${new_path/%.exe/}"
20350
20351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20352
20353  # First separate the path from the arguments. This will split at the first
20354  # space.
20355  complete="$FOUND_MAKE"
20356  path="${complete%% *}"
20357  tmp="$complete EOL"
20358  arguments="${tmp#* }"
20359
20360  # Input might be given as Windows format, start by converting to
20361  # unix format.
20362  new_path="$path"
20363
20364  windows_path="$new_path"
20365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20366    unix_path=`$CYGPATH -u "$windows_path"`
20367    new_path="$unix_path"
20368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20370    new_path="$unix_path"
20371  fi
20372
20373
20374  # Now try to locate executable using which
20375  new_path=`$WHICH "$new_path" 2> /dev/null`
20376
20377  if test "x$new_path" = x; then
20378    # Oops. Which didn't find the executable.
20379    # The splitting of arguments from the executable at a space might have been incorrect,
20380    # since paths with space are more likely in Windows. Give it another try with the whole
20381    # argument.
20382    path="$complete"
20383    arguments="EOL"
20384    new_path="$path"
20385
20386  windows_path="$new_path"
20387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20388    unix_path=`$CYGPATH -u "$windows_path"`
20389    new_path="$unix_path"
20390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20392    new_path="$unix_path"
20393  fi
20394
20395
20396    new_path=`$WHICH "$new_path" 2> /dev/null`
20397    # bat and cmd files are not always considered executable in MSYS causing which
20398    # to not find them
20399    if test "x$new_path" = x \
20400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20402      new_path="$path"
20403
20404  windows_path="$new_path"
20405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20406    unix_path=`$CYGPATH -u "$windows_path"`
20407    new_path="$unix_path"
20408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20410    new_path="$unix_path"
20411  fi
20412
20413    fi
20414
20415    if test "x$new_path" = x; then
20416      # It's still not found. Now this is an unrecoverable error.
20417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20419      has_space=`$ECHO "$complete" | $GREP " "`
20420      if test "x$has_space" != x; then
20421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20423      fi
20424      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20425    fi
20426  fi
20427
20428  # Now new_path has a complete unix path to the binary
20429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20430    # Keep paths in /bin as-is, but remove trailing .exe if any
20431    new_path="${new_path/%.exe/}"
20432    # Do not save /bin paths to all_fixpath_prefixes!
20433  else
20434    # Not in mixed or Windows style, start by that.
20435    new_path=`cmd //c echo $new_path`
20436
20437  input_path="$new_path"
20438  # Check if we need to convert this using DOS-style short mode. If the path
20439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20440  # take no chances and rewrite it.
20441  # Note: m4 eats our [], so we need to use [ and ] instead.
20442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20443  if test "x$has_forbidden_chars" != x; then
20444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20446  fi
20447
20448    # Output is in $new_path
20449
20450  windows_path="$new_path"
20451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20452    unix_path=`$CYGPATH -u "$windows_path"`
20453    new_path="$unix_path"
20454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20456    new_path="$unix_path"
20457  fi
20458
20459    # remove trailing .exe if any
20460    new_path="${new_path/%.exe/}"
20461
20462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20464  fi
20465
20466    else
20467      # We're on a unix platform. Hooray! :)
20468      # First separate the path from the arguments. This will split at the first
20469      # space.
20470      complete="$FOUND_MAKE"
20471      path="${complete%% *}"
20472      tmp="$complete EOL"
20473      arguments="${tmp#* }"
20474
20475      # Cannot rely on the command "which" here since it doesn't always work.
20476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20477      if test -z "$is_absolute_path"; then
20478        # Path to executable is not absolute. Find it.
20479        IFS_save="$IFS"
20480        IFS=:
20481        for p in $PATH; do
20482          if test -f "$p/$path" && test -x "$p/$path"; then
20483            new_path="$p/$path"
20484            break
20485          fi
20486        done
20487        IFS="$IFS_save"
20488      else
20489        # This is an absolute path, we can use it without further modifications.
20490        new_path="$path"
20491      fi
20492
20493      if test "x$new_path" = x; then
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20496        has_space=`$ECHO "$complete" | $GREP " "`
20497        if test "x$has_space" != x; then
20498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20500        fi
20501        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20502      fi
20503    fi
20504
20505    # Now join together the path and the arguments once again
20506    if test "x$arguments" != xEOL; then
20507      new_complete="$new_path ${arguments% *}"
20508    else
20509      new_complete="$new_path"
20510    fi
20511
20512    if test "x$complete" != "x$new_complete"; then
20513      FOUND_MAKE="$new_complete"
20514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20515$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20516    fi
20517  fi
20518
20519        fi
20520      fi
20521    fi
20522  fi
20523
20524        if test "x$FOUND_MAKE" = x; then
20525          for ac_prog in make
20526do
20527  # Extract the first word of "$ac_prog", so it can be a program name with args.
20528set dummy $ac_prog; ac_word=$2
20529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20530$as_echo_n "checking for $ac_word... " >&6; }
20531if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20532  $as_echo_n "(cached) " >&6
20533else
20534  case $CHECK_TOOLSDIR_MAKE in
20535  [\\/]* | ?:[\\/]*)
20536  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20537  ;;
20538  *)
20539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20540for as_dir in $PATH
20541do
20542  IFS=$as_save_IFS
20543  test -z "$as_dir" && as_dir=.
20544    for ac_exec_ext in '' $ac_executable_extensions; do
20545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20546    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20548    break 2
20549  fi
20550done
20551  done
20552IFS=$as_save_IFS
20553
20554  ;;
20555esac
20556fi
20557CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20558if test -n "$CHECK_TOOLSDIR_MAKE"; then
20559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20560$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20561else
20562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20563$as_echo "no" >&6; }
20564fi
20565
20566
20567  test -n "$CHECK_TOOLSDIR_MAKE" && break
20568done
20569
20570
20571  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20572  DESCRIPTION="make in tools-dir"
20573
20574  # On Cygwin, we require a newer version of make than on other platforms
20575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20576    MAKE_VERSION_EXPR="-e 4\."
20577    MAKE_REQUIRED_VERSION="4.0"
20578   else
20579    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20580    MAKE_REQUIRED_VERSION="3.81"
20581  fi
20582
20583  if test "x$MAKE_CANDIDATE" != x; then
20584    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20585$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20586    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20587    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20588    if test "x$IS_GNU_MAKE" = x; then
20589      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20590$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20591    else
20592      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20593      if test "x$IS_MODERN_MAKE" = x; then
20594        { $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
20595$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;}
20596      else
20597        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20598          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20599            MAKE_EXPECTED_ENV='cygwin'
20600          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20601            MAKE_EXPECTED_ENV='msys'
20602          else
20603            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20604          fi
20605          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20606          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20607        else
20608          # Not relevant for non-Windows
20609          IS_MAKE_CORRECT_ENV=true
20610        fi
20611        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20612          { $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
20613$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;}
20614        else
20615          FOUND_MAKE=$MAKE_CANDIDATE
20616
20617  # Only process if variable expands to non-empty
20618
20619  if test "x$FOUND_MAKE" != x; then
20620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20621
20622  # First separate the path from the arguments. This will split at the first
20623  # space.
20624  complete="$FOUND_MAKE"
20625  path="${complete%% *}"
20626  tmp="$complete EOL"
20627  arguments="${tmp#* }"
20628
20629  # Input might be given as Windows format, start by converting to
20630  # unix format.
20631  new_path=`$CYGPATH -u "$path"`
20632
20633  # Now try to locate executable using which
20634  new_path=`$WHICH "$new_path" 2> /dev/null`
20635  # bat and cmd files are not always considered executable in cygwin causing which
20636  # to not find them
20637  if test "x$new_path" = x \
20638      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20639      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20640    new_path=`$CYGPATH -u "$path"`
20641  fi
20642  if test "x$new_path" = x; then
20643    # Oops. Which didn't find the executable.
20644    # The splitting of arguments from the executable at a space might have been incorrect,
20645    # since paths with space are more likely in Windows. Give it another try with the whole
20646    # argument.
20647    path="$complete"
20648    arguments="EOL"
20649    new_path=`$CYGPATH -u "$path"`
20650    new_path=`$WHICH "$new_path" 2> /dev/null`
20651    # bat and cmd files are not always considered executable in cygwin causing which
20652    # to not find them
20653    if test "x$new_path" = x \
20654        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20655        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20656      new_path=`$CYGPATH -u "$path"`
20657    fi
20658    if test "x$new_path" = x; then
20659      # It's still not found. Now this is an unrecoverable error.
20660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20662      has_space=`$ECHO "$complete" | $GREP " "`
20663      if test "x$has_space" != x; then
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20666      fi
20667      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20668    fi
20669  fi
20670
20671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20674  # "foo.exe" is OK but "foo" is an error.
20675  #
20676  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20677  # It is also a way to make sure we got the proper file name for the real test later on.
20678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20679  if test "x$test_shortpath" = x; then
20680    # Short path failed, file does not exist as specified.
20681    # Try adding .exe or .cmd
20682    if test -f "${new_path}.exe"; then
20683      input_to_shortpath="${new_path}.exe"
20684    elif test -f "${new_path}.cmd"; then
20685      input_to_shortpath="${new_path}.cmd"
20686    else
20687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20692    fi
20693  else
20694    input_to_shortpath="$new_path"
20695  fi
20696
20697  # Call helper function which possibly converts this using DOS-style short mode.
20698  # If so, the updated path is stored in $new_path.
20699  new_path="$input_to_shortpath"
20700
20701  input_path="$input_to_shortpath"
20702  # Check if we need to convert this using DOS-style short mode. If the path
20703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20704  # take no chances and rewrite it.
20705  # Note: m4 eats our [], so we need to use [ and ] instead.
20706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20707  if test "x$has_forbidden_chars" != x; then
20708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20712      # Going to short mode and back again did indeed matter. Since short mode is
20713      # case insensitive, let's make it lowercase to improve readability.
20714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20715      # Now convert it back to Unix-style (cygpath)
20716      input_path=`$CYGPATH -u "$shortmode_path"`
20717      new_path="$input_path"
20718    fi
20719  fi
20720
20721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20722  if test "x$test_cygdrive_prefix" = x; then
20723    # As a simple fix, exclude /usr/bin since it's not a real path.
20724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20726      # a path prefixed by /cygdrive for fixpath to work.
20727      new_path="$CYGWIN_ROOT_PATH$input_path"
20728    fi
20729  fi
20730
20731  # remove trailing .exe if any
20732  new_path="${new_path/%.exe/}"
20733
20734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20735
20736  # First separate the path from the arguments. This will split at the first
20737  # space.
20738  complete="$FOUND_MAKE"
20739  path="${complete%% *}"
20740  tmp="$complete EOL"
20741  arguments="${tmp#* }"
20742
20743  # Input might be given as Windows format, start by converting to
20744  # unix format.
20745  new_path="$path"
20746
20747  windows_path="$new_path"
20748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20749    unix_path=`$CYGPATH -u "$windows_path"`
20750    new_path="$unix_path"
20751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20753    new_path="$unix_path"
20754  fi
20755
20756
20757  # Now try to locate executable using which
20758  new_path=`$WHICH "$new_path" 2> /dev/null`
20759
20760  if test "x$new_path" = x; then
20761    # Oops. Which didn't find the executable.
20762    # The splitting of arguments from the executable at a space might have been incorrect,
20763    # since paths with space are more likely in Windows. Give it another try with the whole
20764    # argument.
20765    path="$complete"
20766    arguments="EOL"
20767    new_path="$path"
20768
20769  windows_path="$new_path"
20770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20771    unix_path=`$CYGPATH -u "$windows_path"`
20772    new_path="$unix_path"
20773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20775    new_path="$unix_path"
20776  fi
20777
20778
20779    new_path=`$WHICH "$new_path" 2> /dev/null`
20780    # bat and cmd files are not always considered executable in MSYS causing which
20781    # to not find them
20782    if test "x$new_path" = x \
20783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20785      new_path="$path"
20786
20787  windows_path="$new_path"
20788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789    unix_path=`$CYGPATH -u "$windows_path"`
20790    new_path="$unix_path"
20791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20793    new_path="$unix_path"
20794  fi
20795
20796    fi
20797
20798    if test "x$new_path" = x; then
20799      # It's still not found. Now this is an unrecoverable error.
20800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20802      has_space=`$ECHO "$complete" | $GREP " "`
20803      if test "x$has_space" != x; then
20804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20806      fi
20807      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20808    fi
20809  fi
20810
20811  # Now new_path has a complete unix path to the binary
20812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20813    # Keep paths in /bin as-is, but remove trailing .exe if any
20814    new_path="${new_path/%.exe/}"
20815    # Do not save /bin paths to all_fixpath_prefixes!
20816  else
20817    # Not in mixed or Windows style, start by that.
20818    new_path=`cmd //c echo $new_path`
20819
20820  input_path="$new_path"
20821  # Check if we need to convert this using DOS-style short mode. If the path
20822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20823  # take no chances and rewrite it.
20824  # Note: m4 eats our [], so we need to use [ and ] instead.
20825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20826  if test "x$has_forbidden_chars" != x; then
20827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20829  fi
20830
20831    # Output is in $new_path
20832
20833  windows_path="$new_path"
20834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20835    unix_path=`$CYGPATH -u "$windows_path"`
20836    new_path="$unix_path"
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20839    new_path="$unix_path"
20840  fi
20841
20842    # remove trailing .exe if any
20843    new_path="${new_path/%.exe/}"
20844
20845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20847  fi
20848
20849    else
20850      # We're on a unix platform. Hooray! :)
20851      # First separate the path from the arguments. This will split at the first
20852      # space.
20853      complete="$FOUND_MAKE"
20854      path="${complete%% *}"
20855      tmp="$complete EOL"
20856      arguments="${tmp#* }"
20857
20858      # Cannot rely on the command "which" here since it doesn't always work.
20859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20860      if test -z "$is_absolute_path"; then
20861        # Path to executable is not absolute. Find it.
20862        IFS_save="$IFS"
20863        IFS=:
20864        for p in $PATH; do
20865          if test -f "$p/$path" && test -x "$p/$path"; then
20866            new_path="$p/$path"
20867            break
20868          fi
20869        done
20870        IFS="$IFS_save"
20871      else
20872        # This is an absolute path, we can use it without further modifications.
20873        new_path="$path"
20874      fi
20875
20876      if test "x$new_path" = x; then
20877        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20878$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20879        has_space=`$ECHO "$complete" | $GREP " "`
20880        if test "x$has_space" != x; then
20881          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20882$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20883        fi
20884        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20885      fi
20886    fi
20887
20888    # Now join together the path and the arguments once again
20889    if test "x$arguments" != xEOL; then
20890      new_complete="$new_path ${arguments% *}"
20891    else
20892      new_complete="$new_path"
20893    fi
20894
20895    if test "x$complete" != "x$new_complete"; then
20896      FOUND_MAKE="$new_complete"
20897      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20898$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20899    fi
20900  fi
20901
20902        fi
20903      fi
20904    fi
20905  fi
20906
20907        fi
20908        PATH=$OLD_PATH
20909      fi
20910    fi
20911
20912    if test "x$FOUND_MAKE" = x; then
20913      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
20914    fi
20915
20916    else
20917      # If it succeeded, then it was overridden by the user. We will use it
20918      # for the tool.
20919
20920      # First remove it from the list of overridden variables, so we can test
20921      # for unknown variables in the end.
20922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20923
20924      # Check if we try to supply an empty value
20925      if test "x$MAKE" = x; then
20926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20927$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20929$as_echo_n "checking for MAKE... " >&6; }
20930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20931$as_echo "disabled" >&6; }
20932      else
20933        # Check if the provided tool contains a complete path.
20934        tool_specified="$MAKE"
20935        tool_basename="${tool_specified##*/}"
20936        if test "x$tool_basename" = "x$tool_specified"; then
20937          # A command without a complete path is provided, search $PATH.
20938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20939$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20940          # Extract the first word of "$tool_basename", so it can be a program name with args.
20941set dummy $tool_basename; ac_word=$2
20942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20943$as_echo_n "checking for $ac_word... " >&6; }
20944if ${ac_cv_path_MAKE+:} false; then :
20945  $as_echo_n "(cached) " >&6
20946else
20947  case $MAKE in
20948  [\\/]* | ?:[\\/]*)
20949  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20950  ;;
20951  *)
20952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20953for as_dir in $PATH
20954do
20955  IFS=$as_save_IFS
20956  test -z "$as_dir" && as_dir=.
20957    for ac_exec_ext in '' $ac_executable_extensions; do
20958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20959    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20961    break 2
20962  fi
20963done
20964  done
20965IFS=$as_save_IFS
20966
20967  ;;
20968esac
20969fi
20970MAKE=$ac_cv_path_MAKE
20971if test -n "$MAKE"; then
20972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20973$as_echo "$MAKE" >&6; }
20974else
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20976$as_echo "no" >&6; }
20977fi
20978
20979
20980          if test "x$MAKE" = x; then
20981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20982          fi
20983        else
20984          # Otherwise we believe it is a complete path. Use it as it is.
20985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20986$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20988$as_echo_n "checking for MAKE... " >&6; }
20989          if test ! -x "$tool_specified"; then
20990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20991$as_echo "not found" >&6; }
20992            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20993          fi
20994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20995$as_echo "$tool_specified" >&6; }
20996        fi
20997      fi
20998    fi
20999
21000    # If MAKE was set by user, verify the version
21001
21002  MAKE_CANDIDATE=""$MAKE""
21003  DESCRIPTION="user supplied MAKE=$MAKE"
21004
21005  # On Cygwin, we require a newer version of make than on other platforms
21006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21007    MAKE_VERSION_EXPR="-e 4\."
21008    MAKE_REQUIRED_VERSION="4.0"
21009   else
21010    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21011    MAKE_REQUIRED_VERSION="3.81"
21012  fi
21013
21014  if test "x$MAKE_CANDIDATE" != x; then
21015    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21016$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21017    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21018    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21019    if test "x$IS_GNU_MAKE" = x; then
21020      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21021$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21022    else
21023      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21024      if test "x$IS_MODERN_MAKE" = x; then
21025        { $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
21026$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;}
21027      else
21028        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21029          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21030            MAKE_EXPECTED_ENV='cygwin'
21031          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21032            MAKE_EXPECTED_ENV='msys'
21033          else
21034            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21035          fi
21036          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21037          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21038        else
21039          # Not relevant for non-Windows
21040          IS_MAKE_CORRECT_ENV=true
21041        fi
21042        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21043          { $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
21044$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;}
21045        else
21046          FOUND_MAKE=$MAKE_CANDIDATE
21047
21048  # Only process if variable expands to non-empty
21049
21050  if test "x$FOUND_MAKE" != x; then
21051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21052
21053  # First separate the path from the arguments. This will split at the first
21054  # space.
21055  complete="$FOUND_MAKE"
21056  path="${complete%% *}"
21057  tmp="$complete EOL"
21058  arguments="${tmp#* }"
21059
21060  # Input might be given as Windows format, start by converting to
21061  # unix format.
21062  new_path=`$CYGPATH -u "$path"`
21063
21064  # Now try to locate executable using which
21065  new_path=`$WHICH "$new_path" 2> /dev/null`
21066  # bat and cmd files are not always considered executable in cygwin causing which
21067  # to not find them
21068  if test "x$new_path" = x \
21069      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21070      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21071    new_path=`$CYGPATH -u "$path"`
21072  fi
21073  if test "x$new_path" = x; then
21074    # Oops. Which didn't find the executable.
21075    # The splitting of arguments from the executable at a space might have been incorrect,
21076    # since paths with space are more likely in Windows. Give it another try with the whole
21077    # argument.
21078    path="$complete"
21079    arguments="EOL"
21080    new_path=`$CYGPATH -u "$path"`
21081    new_path=`$WHICH "$new_path" 2> /dev/null`
21082    # bat and cmd files are not always considered executable in cygwin causing which
21083    # to not find them
21084    if test "x$new_path" = x \
21085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21087      new_path=`$CYGPATH -u "$path"`
21088    fi
21089    if test "x$new_path" = x; then
21090      # It's still not found. Now this is an unrecoverable error.
21091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21092$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21093      has_space=`$ECHO "$complete" | $GREP " "`
21094      if test "x$has_space" != x; then
21095        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21096$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21097      fi
21098      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21099    fi
21100  fi
21101
21102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21105  # "foo.exe" is OK but "foo" is an error.
21106  #
21107  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21108  # It is also a way to make sure we got the proper file name for the real test later on.
21109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21110  if test "x$test_shortpath" = x; then
21111    # Short path failed, file does not exist as specified.
21112    # Try adding .exe or .cmd
21113    if test -f "${new_path}.exe"; then
21114      input_to_shortpath="${new_path}.exe"
21115    elif test -f "${new_path}.cmd"; then
21116      input_to_shortpath="${new_path}.cmd"
21117    else
21118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21120      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21121$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21122      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21123    fi
21124  else
21125    input_to_shortpath="$new_path"
21126  fi
21127
21128  # Call helper function which possibly converts this using DOS-style short mode.
21129  # If so, the updated path is stored in $new_path.
21130  new_path="$input_to_shortpath"
21131
21132  input_path="$input_to_shortpath"
21133  # Check if we need to convert this using DOS-style short mode. If the path
21134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21135  # take no chances and rewrite it.
21136  # Note: m4 eats our [], so we need to use [ and ] instead.
21137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21138  if test "x$has_forbidden_chars" != x; then
21139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21143      # Going to short mode and back again did indeed matter. Since short mode is
21144      # case insensitive, let's make it lowercase to improve readability.
21145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21146      # Now convert it back to Unix-style (cygpath)
21147      input_path=`$CYGPATH -u "$shortmode_path"`
21148      new_path="$input_path"
21149    fi
21150  fi
21151
21152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21153  if test "x$test_cygdrive_prefix" = x; then
21154    # As a simple fix, exclude /usr/bin since it's not a real path.
21155    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21157      # a path prefixed by /cygdrive for fixpath to work.
21158      new_path="$CYGWIN_ROOT_PATH$input_path"
21159    fi
21160  fi
21161
21162  # remove trailing .exe if any
21163  new_path="${new_path/%.exe/}"
21164
21165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21166
21167  # First separate the path from the arguments. This will split at the first
21168  # space.
21169  complete="$FOUND_MAKE"
21170  path="${complete%% *}"
21171  tmp="$complete EOL"
21172  arguments="${tmp#* }"
21173
21174  # Input might be given as Windows format, start by converting to
21175  # unix format.
21176  new_path="$path"
21177
21178  windows_path="$new_path"
21179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21180    unix_path=`$CYGPATH -u "$windows_path"`
21181    new_path="$unix_path"
21182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21184    new_path="$unix_path"
21185  fi
21186
21187
21188  # Now try to locate executable using which
21189  new_path=`$WHICH "$new_path" 2> /dev/null`
21190
21191  if test "x$new_path" = x; then
21192    # Oops. Which didn't find the executable.
21193    # The splitting of arguments from the executable at a space might have been incorrect,
21194    # since paths with space are more likely in Windows. Give it another try with the whole
21195    # argument.
21196    path="$complete"
21197    arguments="EOL"
21198    new_path="$path"
21199
21200  windows_path="$new_path"
21201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21202    unix_path=`$CYGPATH -u "$windows_path"`
21203    new_path="$unix_path"
21204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21206    new_path="$unix_path"
21207  fi
21208
21209
21210    new_path=`$WHICH "$new_path" 2> /dev/null`
21211    # bat and cmd files are not always considered executable in MSYS causing which
21212    # to not find them
21213    if test "x$new_path" = x \
21214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21216      new_path="$path"
21217
21218  windows_path="$new_path"
21219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21220    unix_path=`$CYGPATH -u "$windows_path"`
21221    new_path="$unix_path"
21222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21224    new_path="$unix_path"
21225  fi
21226
21227    fi
21228
21229    if test "x$new_path" = x; then
21230      # It's still not found. Now this is an unrecoverable error.
21231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21232$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21233      has_space=`$ECHO "$complete" | $GREP " "`
21234      if test "x$has_space" != x; then
21235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21237      fi
21238      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21239    fi
21240  fi
21241
21242  # Now new_path has a complete unix path to the binary
21243  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21244    # Keep paths in /bin as-is, but remove trailing .exe if any
21245    new_path="${new_path/%.exe/}"
21246    # Do not save /bin paths to all_fixpath_prefixes!
21247  else
21248    # Not in mixed or Windows style, start by that.
21249    new_path=`cmd //c echo $new_path`
21250
21251  input_path="$new_path"
21252  # Check if we need to convert this using DOS-style short mode. If the path
21253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21254  # take no chances and rewrite it.
21255  # Note: m4 eats our [], so we need to use [ and ] instead.
21256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21257  if test "x$has_forbidden_chars" != x; then
21258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21260  fi
21261
21262    # Output is in $new_path
21263
21264  windows_path="$new_path"
21265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21266    unix_path=`$CYGPATH -u "$windows_path"`
21267    new_path="$unix_path"
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21270    new_path="$unix_path"
21271  fi
21272
21273    # remove trailing .exe if any
21274    new_path="${new_path/%.exe/}"
21275
21276    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21277    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21278  fi
21279
21280    else
21281      # We're on a unix platform. Hooray! :)
21282      # First separate the path from the arguments. This will split at the first
21283      # space.
21284      complete="$FOUND_MAKE"
21285      path="${complete%% *}"
21286      tmp="$complete EOL"
21287      arguments="${tmp#* }"
21288
21289      # Cannot rely on the command "which" here since it doesn't always work.
21290      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21291      if test -z "$is_absolute_path"; then
21292        # Path to executable is not absolute. Find it.
21293        IFS_save="$IFS"
21294        IFS=:
21295        for p in $PATH; do
21296          if test -f "$p/$path" && test -x "$p/$path"; then
21297            new_path="$p/$path"
21298            break
21299          fi
21300        done
21301        IFS="$IFS_save"
21302      else
21303        # This is an absolute path, we can use it without further modifications.
21304        new_path="$path"
21305      fi
21306
21307      if test "x$new_path" = x; then
21308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21309$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21310        has_space=`$ECHO "$complete" | $GREP " "`
21311        if test "x$has_space" != x; then
21312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21314        fi
21315        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21316      fi
21317    fi
21318
21319    # Now join together the path and the arguments once again
21320    if test "x$arguments" != xEOL; then
21321      new_complete="$new_path ${arguments% *}"
21322    else
21323      new_complete="$new_path"
21324    fi
21325
21326    if test "x$complete" != "x$new_complete"; then
21327      FOUND_MAKE="$new_complete"
21328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21329$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21330    fi
21331  fi
21332
21333        fi
21334      fi
21335    fi
21336  fi
21337
21338    if test "x$FOUND_MAKE" = x; then
21339      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21340    fi
21341
21342  fi
21343
21344
21345  MAKE=$FOUND_MAKE
21346
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21348$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21349
21350
21351  # Check if make supports the output sync option and if so, setup using it.
21352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21353$as_echo_n "checking if make --output-sync is supported... " >&6; }
21354  if $MAKE --version -O > /dev/null 2>&1; then
21355    OUTPUT_SYNC_SUPPORTED=true
21356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21357$as_echo "yes" >&6; }
21358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21359$as_echo_n "checking for output-sync value... " >&6; }
21360
21361# Check whether --with-output-sync was given.
21362if test "${with_output_sync+set}" = set; then :
21363  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21364fi
21365
21366    if test "x$OUTPUT_SYNC" = "x"; then
21367      OUTPUT_SYNC=none
21368    fi
21369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21370$as_echo "$OUTPUT_SYNC" >&6; }
21371    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21372      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21373    fi
21374  else
21375    OUTPUT_SYNC_SUPPORTED=false
21376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21377$as_echo "no" >&6; }
21378  fi
21379
21380
21381
21382
21383
21384
21385  # Test if find supports -delete
21386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21387$as_echo_n "checking if find supports -delete... " >&6; }
21388  FIND_DELETE="-delete"
21389
21390  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21391
21392  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21393
21394  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21395  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21396    # No, it does not.
21397    $RM $DELETEDIR/TestIfFindSupportsDelete
21398    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21399      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21400      FIND_DELETE="-print | $XARGS $RM"
21401    else
21402      FIND_DELETE="-exec $RM \{\} \+"
21403    fi
21404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21405$as_echo "no" >&6; }
21406  else
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21408$as_echo "yes" >&6; }
21409  fi
21410  $RMDIR $DELETEDIR
21411
21412
21413
21414  # Test which kind of tar was found
21415  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21416    TAR_TYPE="gnu"
21417  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21418    TAR_TYPE="bsd"
21419  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21420    TAR_TYPE="bsd"
21421  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21422    TAR_TYPE="solaris"
21423  fi
21424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21425$as_echo_n "checking what type of tar was found... " >&6; }
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21427$as_echo "$TAR_TYPE" >&6; }
21428
21429  TAR_CREATE_FILE_PARAM=""
21430
21431  if test "x$TAR_TYPE" = "xgnu"; then
21432    TAR_INCLUDE_PARAM="T"
21433    TAR_SUPPORTS_TRANSFORM="true"
21434    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21435      # When using gnu tar for Solaris targets, need to use compatibility mode
21436      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21437    fi
21438  else
21439    TAR_INCLUDE_PARAM="I"
21440    TAR_SUPPORTS_TRANSFORM="false"
21441  fi
21442
21443
21444
21445
21446
21447
21448  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21449  # This is a problem for the grep resident on AIX.
21450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21451$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21452  # Multiple subsequent spaces..
21453  STACK_SPACES='aaa   bbb   ccc'
21454  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21455  # patterns in it.
21456  STACK_LIST=${STACK_SPACES// /$'\n'}
21457  NEEDLE_SPACES='ccc bbb aaa'
21458  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21459  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21460  if test "x$RESULT" == "x"; then
21461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21462$as_echo "yes" >&6; }
21463  else
21464    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21465      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21466    fi
21467    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21468  fi
21469
21470
21471  # These tools might not be installed by default,
21472  # need hint on how to install them.
21473
21474
21475
21476  # Publish this variable in the help.
21477
21478
21479  if [ -z "${UNZIP+x}" ]; then
21480    # The variable is not set by user, try to locate tool using the code snippet
21481    for ac_prog in unzip
21482do
21483  # Extract the first word of "$ac_prog", so it can be a program name with args.
21484set dummy $ac_prog; ac_word=$2
21485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21486$as_echo_n "checking for $ac_word... " >&6; }
21487if ${ac_cv_path_UNZIP+:} false; then :
21488  $as_echo_n "(cached) " >&6
21489else
21490  case $UNZIP in
21491  [\\/]* | ?:[\\/]*)
21492  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21493  ;;
21494  *)
21495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21496for as_dir in $PATH
21497do
21498  IFS=$as_save_IFS
21499  test -z "$as_dir" && as_dir=.
21500    for ac_exec_ext in '' $ac_executable_extensions; do
21501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21502    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21504    break 2
21505  fi
21506done
21507  done
21508IFS=$as_save_IFS
21509
21510  ;;
21511esac
21512fi
21513UNZIP=$ac_cv_path_UNZIP
21514if test -n "$UNZIP"; then
21515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21516$as_echo "$UNZIP" >&6; }
21517else
21518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21519$as_echo "no" >&6; }
21520fi
21521
21522
21523  test -n "$UNZIP" && break
21524done
21525
21526  else
21527    # The variable is set, but is it from the command line or the environment?
21528
21529    # Try to remove the string !UNZIP! from our list.
21530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21532      # If it failed, the variable was not from the command line. Ignore it,
21533      # but warn the user (except for BASH, which is always set by the calling BASH).
21534      if test "xUNZIP" != xBASH; then
21535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21536$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21537      fi
21538      # Try to locate tool using the code snippet
21539      for ac_prog in unzip
21540do
21541  # Extract the first word of "$ac_prog", so it can be a program name with args.
21542set dummy $ac_prog; ac_word=$2
21543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21544$as_echo_n "checking for $ac_word... " >&6; }
21545if ${ac_cv_path_UNZIP+:} false; then :
21546  $as_echo_n "(cached) " >&6
21547else
21548  case $UNZIP in
21549  [\\/]* | ?:[\\/]*)
21550  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21551  ;;
21552  *)
21553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21554for as_dir in $PATH
21555do
21556  IFS=$as_save_IFS
21557  test -z "$as_dir" && as_dir=.
21558    for ac_exec_ext in '' $ac_executable_extensions; do
21559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21560    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21562    break 2
21563  fi
21564done
21565  done
21566IFS=$as_save_IFS
21567
21568  ;;
21569esac
21570fi
21571UNZIP=$ac_cv_path_UNZIP
21572if test -n "$UNZIP"; then
21573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21574$as_echo "$UNZIP" >&6; }
21575else
21576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21577$as_echo "no" >&6; }
21578fi
21579
21580
21581  test -n "$UNZIP" && break
21582done
21583
21584    else
21585      # If it succeeded, then it was overridden by the user. We will use it
21586      # for the tool.
21587
21588      # First remove it from the list of overridden variables, so we can test
21589      # for unknown variables in the end.
21590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21591
21592      # Check if we try to supply an empty value
21593      if test "x$UNZIP" = x; then
21594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21595$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21597$as_echo_n "checking for UNZIP... " >&6; }
21598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21599$as_echo "disabled" >&6; }
21600      else
21601        # Check if the provided tool contains a complete path.
21602        tool_specified="$UNZIP"
21603        tool_basename="${tool_specified##*/}"
21604        if test "x$tool_basename" = "x$tool_specified"; then
21605          # A command without a complete path is provided, search $PATH.
21606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21607$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21608          # Extract the first word of "$tool_basename", so it can be a program name with args.
21609set dummy $tool_basename; ac_word=$2
21610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21611$as_echo_n "checking for $ac_word... " >&6; }
21612if ${ac_cv_path_UNZIP+:} false; then :
21613  $as_echo_n "(cached) " >&6
21614else
21615  case $UNZIP in
21616  [\\/]* | ?:[\\/]*)
21617  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21618  ;;
21619  *)
21620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21621for as_dir in $PATH
21622do
21623  IFS=$as_save_IFS
21624  test -z "$as_dir" && as_dir=.
21625    for ac_exec_ext in '' $ac_executable_extensions; do
21626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21627    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21629    break 2
21630  fi
21631done
21632  done
21633IFS=$as_save_IFS
21634
21635  ;;
21636esac
21637fi
21638UNZIP=$ac_cv_path_UNZIP
21639if test -n "$UNZIP"; then
21640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21641$as_echo "$UNZIP" >&6; }
21642else
21643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21644$as_echo "no" >&6; }
21645fi
21646
21647
21648          if test "x$UNZIP" = x; then
21649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21650          fi
21651        else
21652          # Otherwise we believe it is a complete path. Use it as it is.
21653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21654$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21656$as_echo_n "checking for UNZIP... " >&6; }
21657          if test ! -x "$tool_specified"; then
21658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21659$as_echo "not found" >&6; }
21660            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21661          fi
21662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21663$as_echo "$tool_specified" >&6; }
21664        fi
21665      fi
21666    fi
21667
21668  fi
21669
21670
21671
21672  if test "x$UNZIP" = x; then
21673    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21674  fi
21675
21676
21677  # Since zip uses "ZIP" as a environment variable for passing options, we need
21678  # to name our variable differently, hence ZIPEXE.
21679
21680
21681
21682  # Publish this variable in the help.
21683
21684
21685  if [ -z "${ZIPEXE+x}" ]; then
21686    # The variable is not set by user, try to locate tool using the code snippet
21687    for ac_prog in zip
21688do
21689  # Extract the first word of "$ac_prog", so it can be a program name with args.
21690set dummy $ac_prog; ac_word=$2
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21692$as_echo_n "checking for $ac_word... " >&6; }
21693if ${ac_cv_path_ZIPEXE+:} false; then :
21694  $as_echo_n "(cached) " >&6
21695else
21696  case $ZIPEXE in
21697  [\\/]* | ?:[\\/]*)
21698  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21699  ;;
21700  *)
21701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21702for as_dir in $PATH
21703do
21704  IFS=$as_save_IFS
21705  test -z "$as_dir" && as_dir=.
21706    for ac_exec_ext in '' $ac_executable_extensions; do
21707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21708    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21710    break 2
21711  fi
21712done
21713  done
21714IFS=$as_save_IFS
21715
21716  ;;
21717esac
21718fi
21719ZIPEXE=$ac_cv_path_ZIPEXE
21720if test -n "$ZIPEXE"; then
21721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21722$as_echo "$ZIPEXE" >&6; }
21723else
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21725$as_echo "no" >&6; }
21726fi
21727
21728
21729  test -n "$ZIPEXE" && break
21730done
21731
21732  else
21733    # The variable is set, but is it from the command line or the environment?
21734
21735    # Try to remove the string !ZIPEXE! from our list.
21736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21738      # If it failed, the variable was not from the command line. Ignore it,
21739      # but warn the user (except for BASH, which is always set by the calling BASH).
21740      if test "xZIPEXE" != xBASH; then
21741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21742$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21743      fi
21744      # Try to locate tool using the code snippet
21745      for ac_prog in zip
21746do
21747  # Extract the first word of "$ac_prog", so it can be a program name with args.
21748set dummy $ac_prog; ac_word=$2
21749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21750$as_echo_n "checking for $ac_word... " >&6; }
21751if ${ac_cv_path_ZIPEXE+:} false; then :
21752  $as_echo_n "(cached) " >&6
21753else
21754  case $ZIPEXE in
21755  [\\/]* | ?:[\\/]*)
21756  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21757  ;;
21758  *)
21759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21760for as_dir in $PATH
21761do
21762  IFS=$as_save_IFS
21763  test -z "$as_dir" && as_dir=.
21764    for ac_exec_ext in '' $ac_executable_extensions; do
21765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21766    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21768    break 2
21769  fi
21770done
21771  done
21772IFS=$as_save_IFS
21773
21774  ;;
21775esac
21776fi
21777ZIPEXE=$ac_cv_path_ZIPEXE
21778if test -n "$ZIPEXE"; then
21779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21780$as_echo "$ZIPEXE" >&6; }
21781else
21782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21783$as_echo "no" >&6; }
21784fi
21785
21786
21787  test -n "$ZIPEXE" && break
21788done
21789
21790    else
21791      # If it succeeded, then it was overridden by the user. We will use it
21792      # for the tool.
21793
21794      # First remove it from the list of overridden variables, so we can test
21795      # for unknown variables in the end.
21796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21797
21798      # Check if we try to supply an empty value
21799      if test "x$ZIPEXE" = x; then
21800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21801$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21803$as_echo_n "checking for ZIPEXE... " >&6; }
21804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21805$as_echo "disabled" >&6; }
21806      else
21807        # Check if the provided tool contains a complete path.
21808        tool_specified="$ZIPEXE"
21809        tool_basename="${tool_specified##*/}"
21810        if test "x$tool_basename" = "x$tool_specified"; then
21811          # A command without a complete path is provided, search $PATH.
21812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21813$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21814          # Extract the first word of "$tool_basename", so it can be a program name with args.
21815set dummy $tool_basename; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if ${ac_cv_path_ZIPEXE+:} false; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  case $ZIPEXE in
21822  [\\/]* | ?:[\\/]*)
21823  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21824  ;;
21825  *)
21826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827for as_dir in $PATH
21828do
21829  IFS=$as_save_IFS
21830  test -z "$as_dir" && as_dir=.
21831    for ac_exec_ext in '' $ac_executable_extensions; do
21832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21833    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21835    break 2
21836  fi
21837done
21838  done
21839IFS=$as_save_IFS
21840
21841  ;;
21842esac
21843fi
21844ZIPEXE=$ac_cv_path_ZIPEXE
21845if test -n "$ZIPEXE"; then
21846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21847$as_echo "$ZIPEXE" >&6; }
21848else
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850$as_echo "no" >&6; }
21851fi
21852
21853
21854          if test "x$ZIPEXE" = x; then
21855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21856          fi
21857        else
21858          # Otherwise we believe it is a complete path. Use it as it is.
21859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21860$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21862$as_echo_n "checking for ZIPEXE... " >&6; }
21863          if test ! -x "$tool_specified"; then
21864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21865$as_echo "not found" >&6; }
21866            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21867          fi
21868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21869$as_echo "$tool_specified" >&6; }
21870        fi
21871      fi
21872    fi
21873
21874  fi
21875
21876
21877
21878  if test "x$ZIPEXE" = x; then
21879    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21880  fi
21881
21882
21883
21884  # Non-required basic tools
21885
21886
21887
21888  # Publish this variable in the help.
21889
21890
21891  if [ -z "${LDD+x}" ]; then
21892    # The variable is not set by user, try to locate tool using the code snippet
21893    for ac_prog in ldd
21894do
21895  # Extract the first word of "$ac_prog", so it can be a program name with args.
21896set dummy $ac_prog; ac_word=$2
21897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21898$as_echo_n "checking for $ac_word... " >&6; }
21899if ${ac_cv_path_LDD+:} false; then :
21900  $as_echo_n "(cached) " >&6
21901else
21902  case $LDD in
21903  [\\/]* | ?:[\\/]*)
21904  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21905  ;;
21906  *)
21907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21908for as_dir in $PATH
21909do
21910  IFS=$as_save_IFS
21911  test -z "$as_dir" && as_dir=.
21912    for ac_exec_ext in '' $ac_executable_extensions; do
21913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21914    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21916    break 2
21917  fi
21918done
21919  done
21920IFS=$as_save_IFS
21921
21922  ;;
21923esac
21924fi
21925LDD=$ac_cv_path_LDD
21926if test -n "$LDD"; then
21927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21928$as_echo "$LDD" >&6; }
21929else
21930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21931$as_echo "no" >&6; }
21932fi
21933
21934
21935  test -n "$LDD" && break
21936done
21937
21938  else
21939    # The variable is set, but is it from the command line or the environment?
21940
21941    # Try to remove the string !LDD! from our list.
21942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21944      # If it failed, the variable was not from the command line. Ignore it,
21945      # but warn the user (except for BASH, which is always set by the calling BASH).
21946      if test "xLDD" != xBASH; then
21947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21948$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21949      fi
21950      # Try to locate tool using the code snippet
21951      for ac_prog in ldd
21952do
21953  # Extract the first word of "$ac_prog", so it can be a program name with args.
21954set dummy $ac_prog; ac_word=$2
21955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21956$as_echo_n "checking for $ac_word... " >&6; }
21957if ${ac_cv_path_LDD+:} false; then :
21958  $as_echo_n "(cached) " >&6
21959else
21960  case $LDD in
21961  [\\/]* | ?:[\\/]*)
21962  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21963  ;;
21964  *)
21965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21966for as_dir in $PATH
21967do
21968  IFS=$as_save_IFS
21969  test -z "$as_dir" && as_dir=.
21970    for ac_exec_ext in '' $ac_executable_extensions; do
21971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21972    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21974    break 2
21975  fi
21976done
21977  done
21978IFS=$as_save_IFS
21979
21980  ;;
21981esac
21982fi
21983LDD=$ac_cv_path_LDD
21984if test -n "$LDD"; then
21985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21986$as_echo "$LDD" >&6; }
21987else
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989$as_echo "no" >&6; }
21990fi
21991
21992
21993  test -n "$LDD" && break
21994done
21995
21996    else
21997      # If it succeeded, then it was overridden by the user. We will use it
21998      # for the tool.
21999
22000      # First remove it from the list of overridden variables, so we can test
22001      # for unknown variables in the end.
22002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22003
22004      # Check if we try to supply an empty value
22005      if test "x$LDD" = x; then
22006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22007$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22009$as_echo_n "checking for LDD... " >&6; }
22010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22011$as_echo "disabled" >&6; }
22012      else
22013        # Check if the provided tool contains a complete path.
22014        tool_specified="$LDD"
22015        tool_basename="${tool_specified##*/}"
22016        if test "x$tool_basename" = "x$tool_specified"; then
22017          # A command without a complete path is provided, search $PATH.
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22019$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22020          # Extract the first word of "$tool_basename", so it can be a program name with args.
22021set dummy $tool_basename; ac_word=$2
22022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22023$as_echo_n "checking for $ac_word... " >&6; }
22024if ${ac_cv_path_LDD+:} false; then :
22025  $as_echo_n "(cached) " >&6
22026else
22027  case $LDD in
22028  [\\/]* | ?:[\\/]*)
22029  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22030  ;;
22031  *)
22032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22033for as_dir in $PATH
22034do
22035  IFS=$as_save_IFS
22036  test -z "$as_dir" && as_dir=.
22037    for ac_exec_ext in '' $ac_executable_extensions; do
22038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22039    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22041    break 2
22042  fi
22043done
22044  done
22045IFS=$as_save_IFS
22046
22047  ;;
22048esac
22049fi
22050LDD=$ac_cv_path_LDD
22051if test -n "$LDD"; then
22052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22053$as_echo "$LDD" >&6; }
22054else
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22056$as_echo "no" >&6; }
22057fi
22058
22059
22060          if test "x$LDD" = x; then
22061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22062          fi
22063        else
22064          # Otherwise we believe it is a complete path. Use it as it is.
22065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22066$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22068$as_echo_n "checking for LDD... " >&6; }
22069          if test ! -x "$tool_specified"; then
22070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22071$as_echo "not found" >&6; }
22072            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22073          fi
22074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22075$as_echo "$tool_specified" >&6; }
22076        fi
22077      fi
22078    fi
22079
22080  fi
22081
22082
22083  if test "x$LDD" = "x"; then
22084    # List shared lib dependencies is used for
22085    # debug output and checking for forbidden dependencies.
22086    # We can build without it.
22087    LDD="true"
22088  fi
22089
22090
22091  # Publish this variable in the help.
22092
22093
22094  if [ -z "${OTOOL+x}" ]; then
22095    # The variable is not set by user, try to locate tool using the code snippet
22096    for ac_prog in otool
22097do
22098  # Extract the first word of "$ac_prog", so it can be a program name with args.
22099set dummy $ac_prog; ac_word=$2
22100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22101$as_echo_n "checking for $ac_word... " >&6; }
22102if ${ac_cv_path_OTOOL+:} false; then :
22103  $as_echo_n "(cached) " >&6
22104else
22105  case $OTOOL in
22106  [\\/]* | ?:[\\/]*)
22107  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22108  ;;
22109  *)
22110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22111for as_dir in $PATH
22112do
22113  IFS=$as_save_IFS
22114  test -z "$as_dir" && as_dir=.
22115    for ac_exec_ext in '' $ac_executable_extensions; do
22116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22117    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22119    break 2
22120  fi
22121done
22122  done
22123IFS=$as_save_IFS
22124
22125  ;;
22126esac
22127fi
22128OTOOL=$ac_cv_path_OTOOL
22129if test -n "$OTOOL"; then
22130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22131$as_echo "$OTOOL" >&6; }
22132else
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22134$as_echo "no" >&6; }
22135fi
22136
22137
22138  test -n "$OTOOL" && break
22139done
22140
22141  else
22142    # The variable is set, but is it from the command line or the environment?
22143
22144    # Try to remove the string !OTOOL! from our list.
22145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22147      # If it failed, the variable was not from the command line. Ignore it,
22148      # but warn the user (except for BASH, which is always set by the calling BASH).
22149      if test "xOTOOL" != xBASH; then
22150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22151$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22152      fi
22153      # Try to locate tool using the code snippet
22154      for ac_prog in otool
22155do
22156  # Extract the first word of "$ac_prog", so it can be a program name with args.
22157set dummy $ac_prog; ac_word=$2
22158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22159$as_echo_n "checking for $ac_word... " >&6; }
22160if ${ac_cv_path_OTOOL+:} false; then :
22161  $as_echo_n "(cached) " >&6
22162else
22163  case $OTOOL in
22164  [\\/]* | ?:[\\/]*)
22165  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22166  ;;
22167  *)
22168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22169for as_dir in $PATH
22170do
22171  IFS=$as_save_IFS
22172  test -z "$as_dir" && as_dir=.
22173    for ac_exec_ext in '' $ac_executable_extensions; do
22174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22175    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22177    break 2
22178  fi
22179done
22180  done
22181IFS=$as_save_IFS
22182
22183  ;;
22184esac
22185fi
22186OTOOL=$ac_cv_path_OTOOL
22187if test -n "$OTOOL"; then
22188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22189$as_echo "$OTOOL" >&6; }
22190else
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22192$as_echo "no" >&6; }
22193fi
22194
22195
22196  test -n "$OTOOL" && break
22197done
22198
22199    else
22200      # If it succeeded, then it was overridden by the user. We will use it
22201      # for the tool.
22202
22203      # First remove it from the list of overridden variables, so we can test
22204      # for unknown variables in the end.
22205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22206
22207      # Check if we try to supply an empty value
22208      if test "x$OTOOL" = x; then
22209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22210$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22212$as_echo_n "checking for OTOOL... " >&6; }
22213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22214$as_echo "disabled" >&6; }
22215      else
22216        # Check if the provided tool contains a complete path.
22217        tool_specified="$OTOOL"
22218        tool_basename="${tool_specified##*/}"
22219        if test "x$tool_basename" = "x$tool_specified"; then
22220          # A command without a complete path is provided, search $PATH.
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22222$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22223          # Extract the first word of "$tool_basename", so it can be a program name with args.
22224set dummy $tool_basename; ac_word=$2
22225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22226$as_echo_n "checking for $ac_word... " >&6; }
22227if ${ac_cv_path_OTOOL+:} false; then :
22228  $as_echo_n "(cached) " >&6
22229else
22230  case $OTOOL in
22231  [\\/]* | ?:[\\/]*)
22232  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22233  ;;
22234  *)
22235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22236for as_dir in $PATH
22237do
22238  IFS=$as_save_IFS
22239  test -z "$as_dir" && as_dir=.
22240    for ac_exec_ext in '' $ac_executable_extensions; do
22241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22242    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22244    break 2
22245  fi
22246done
22247  done
22248IFS=$as_save_IFS
22249
22250  ;;
22251esac
22252fi
22253OTOOL=$ac_cv_path_OTOOL
22254if test -n "$OTOOL"; then
22255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22256$as_echo "$OTOOL" >&6; }
22257else
22258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22259$as_echo "no" >&6; }
22260fi
22261
22262
22263          if test "x$OTOOL" = x; then
22264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22265          fi
22266        else
22267          # Otherwise we believe it is a complete path. Use it as it is.
22268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22269$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22271$as_echo_n "checking for OTOOL... " >&6; }
22272          if test ! -x "$tool_specified"; then
22273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22274$as_echo "not found" >&6; }
22275            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22276          fi
22277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22278$as_echo "$tool_specified" >&6; }
22279        fi
22280      fi
22281    fi
22282
22283  fi
22284
22285
22286  if test "x$OTOOL" = "x"; then
22287    OTOOL="true"
22288  fi
22289
22290
22291  # Publish this variable in the help.
22292
22293
22294  if [ -z "${READELF+x}" ]; then
22295    # The variable is not set by user, try to locate tool using the code snippet
22296    for ac_prog in greadelf readelf
22297do
22298  # Extract the first word of "$ac_prog", so it can be a program name with args.
22299set dummy $ac_prog; ac_word=$2
22300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22301$as_echo_n "checking for $ac_word... " >&6; }
22302if ${ac_cv_path_READELF+:} false; then :
22303  $as_echo_n "(cached) " >&6
22304else
22305  case $READELF in
22306  [\\/]* | ?:[\\/]*)
22307  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22308  ;;
22309  *)
22310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22311for as_dir in $PATH
22312do
22313  IFS=$as_save_IFS
22314  test -z "$as_dir" && as_dir=.
22315    for ac_exec_ext in '' $ac_executable_extensions; do
22316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22317    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22319    break 2
22320  fi
22321done
22322  done
22323IFS=$as_save_IFS
22324
22325  ;;
22326esac
22327fi
22328READELF=$ac_cv_path_READELF
22329if test -n "$READELF"; then
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22331$as_echo "$READELF" >&6; }
22332else
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22334$as_echo "no" >&6; }
22335fi
22336
22337
22338  test -n "$READELF" && break
22339done
22340
22341  else
22342    # The variable is set, but is it from the command line or the environment?
22343
22344    # Try to remove the string !READELF! from our list.
22345    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22346    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22347      # If it failed, the variable was not from the command line. Ignore it,
22348      # but warn the user (except for BASH, which is always set by the calling BASH).
22349      if test "xREADELF" != xBASH; then
22350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22351$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22352      fi
22353      # Try to locate tool using the code snippet
22354      for ac_prog in greadelf readelf
22355do
22356  # Extract the first word of "$ac_prog", so it can be a program name with args.
22357set dummy $ac_prog; ac_word=$2
22358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22359$as_echo_n "checking for $ac_word... " >&6; }
22360if ${ac_cv_path_READELF+:} false; then :
22361  $as_echo_n "(cached) " >&6
22362else
22363  case $READELF in
22364  [\\/]* | ?:[\\/]*)
22365  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22366  ;;
22367  *)
22368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22369for as_dir in $PATH
22370do
22371  IFS=$as_save_IFS
22372  test -z "$as_dir" && as_dir=.
22373    for ac_exec_ext in '' $ac_executable_extensions; do
22374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22375    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22377    break 2
22378  fi
22379done
22380  done
22381IFS=$as_save_IFS
22382
22383  ;;
22384esac
22385fi
22386READELF=$ac_cv_path_READELF
22387if test -n "$READELF"; then
22388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22389$as_echo "$READELF" >&6; }
22390else
22391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22392$as_echo "no" >&6; }
22393fi
22394
22395
22396  test -n "$READELF" && break
22397done
22398
22399    else
22400      # If it succeeded, then it was overridden by the user. We will use it
22401      # for the tool.
22402
22403      # First remove it from the list of overridden variables, so we can test
22404      # for unknown variables in the end.
22405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22406
22407      # Check if we try to supply an empty value
22408      if test "x$READELF" = x; then
22409        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22410$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22412$as_echo_n "checking for READELF... " >&6; }
22413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22414$as_echo "disabled" >&6; }
22415      else
22416        # Check if the provided tool contains a complete path.
22417        tool_specified="$READELF"
22418        tool_basename="${tool_specified##*/}"
22419        if test "x$tool_basename" = "x$tool_specified"; then
22420          # A command without a complete path is provided, search $PATH.
22421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22422$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22423          # Extract the first word of "$tool_basename", so it can be a program name with args.
22424set dummy $tool_basename; ac_word=$2
22425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22426$as_echo_n "checking for $ac_word... " >&6; }
22427if ${ac_cv_path_READELF+:} false; then :
22428  $as_echo_n "(cached) " >&6
22429else
22430  case $READELF in
22431  [\\/]* | ?:[\\/]*)
22432  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22433  ;;
22434  *)
22435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22436for as_dir in $PATH
22437do
22438  IFS=$as_save_IFS
22439  test -z "$as_dir" && as_dir=.
22440    for ac_exec_ext in '' $ac_executable_extensions; do
22441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22442    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22444    break 2
22445  fi
22446done
22447  done
22448IFS=$as_save_IFS
22449
22450  ;;
22451esac
22452fi
22453READELF=$ac_cv_path_READELF
22454if test -n "$READELF"; then
22455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22456$as_echo "$READELF" >&6; }
22457else
22458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22459$as_echo "no" >&6; }
22460fi
22461
22462
22463          if test "x$READELF" = x; then
22464            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22465          fi
22466        else
22467          # Otherwise we believe it is a complete path. Use it as it is.
22468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22469$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22470          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22471$as_echo_n "checking for READELF... " >&6; }
22472          if test ! -x "$tool_specified"; then
22473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22474$as_echo "not found" >&6; }
22475            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22476          fi
22477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22478$as_echo "$tool_specified" >&6; }
22479        fi
22480      fi
22481    fi
22482
22483  fi
22484
22485
22486
22487
22488  # Publish this variable in the help.
22489
22490
22491  if [ -z "${DOT+x}" ]; then
22492    # The variable is not set by user, try to locate tool using the code snippet
22493    for ac_prog in dot
22494do
22495  # Extract the first word of "$ac_prog", so it can be a program name with args.
22496set dummy $ac_prog; ac_word=$2
22497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22498$as_echo_n "checking for $ac_word... " >&6; }
22499if ${ac_cv_path_DOT+:} false; then :
22500  $as_echo_n "(cached) " >&6
22501else
22502  case $DOT in
22503  [\\/]* | ?:[\\/]*)
22504  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22505  ;;
22506  *)
22507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22508for as_dir in $PATH
22509do
22510  IFS=$as_save_IFS
22511  test -z "$as_dir" && as_dir=.
22512    for ac_exec_ext in '' $ac_executable_extensions; do
22513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22514    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22516    break 2
22517  fi
22518done
22519  done
22520IFS=$as_save_IFS
22521
22522  ;;
22523esac
22524fi
22525DOT=$ac_cv_path_DOT
22526if test -n "$DOT"; then
22527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22528$as_echo "$DOT" >&6; }
22529else
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22531$as_echo "no" >&6; }
22532fi
22533
22534
22535  test -n "$DOT" && break
22536done
22537
22538  else
22539    # The variable is set, but is it from the command line or the environment?
22540
22541    # Try to remove the string !DOT! from our list.
22542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22544      # If it failed, the variable was not from the command line. Ignore it,
22545      # but warn the user (except for BASH, which is always set by the calling BASH).
22546      if test "xDOT" != xBASH; then
22547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22548$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22549      fi
22550      # Try to locate tool using the code snippet
22551      for ac_prog in dot
22552do
22553  # Extract the first word of "$ac_prog", so it can be a program name with args.
22554set dummy $ac_prog; ac_word=$2
22555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22556$as_echo_n "checking for $ac_word... " >&6; }
22557if ${ac_cv_path_DOT+:} false; then :
22558  $as_echo_n "(cached) " >&6
22559else
22560  case $DOT in
22561  [\\/]* | ?:[\\/]*)
22562  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22563  ;;
22564  *)
22565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22566for as_dir in $PATH
22567do
22568  IFS=$as_save_IFS
22569  test -z "$as_dir" && as_dir=.
22570    for ac_exec_ext in '' $ac_executable_extensions; do
22571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22572    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22574    break 2
22575  fi
22576done
22577  done
22578IFS=$as_save_IFS
22579
22580  ;;
22581esac
22582fi
22583DOT=$ac_cv_path_DOT
22584if test -n "$DOT"; then
22585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22586$as_echo "$DOT" >&6; }
22587else
22588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22589$as_echo "no" >&6; }
22590fi
22591
22592
22593  test -n "$DOT" && break
22594done
22595
22596    else
22597      # If it succeeded, then it was overridden by the user. We will use it
22598      # for the tool.
22599
22600      # First remove it from the list of overridden variables, so we can test
22601      # for unknown variables in the end.
22602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22603
22604      # Check if we try to supply an empty value
22605      if test "x$DOT" = x; then
22606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22607$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22609$as_echo_n "checking for DOT... " >&6; }
22610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22611$as_echo "disabled" >&6; }
22612      else
22613        # Check if the provided tool contains a complete path.
22614        tool_specified="$DOT"
22615        tool_basename="${tool_specified##*/}"
22616        if test "x$tool_basename" = "x$tool_specified"; then
22617          # A command without a complete path is provided, search $PATH.
22618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22619$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22620          # Extract the first word of "$tool_basename", so it can be a program name with args.
22621set dummy $tool_basename; ac_word=$2
22622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22623$as_echo_n "checking for $ac_word... " >&6; }
22624if ${ac_cv_path_DOT+:} false; then :
22625  $as_echo_n "(cached) " >&6
22626else
22627  case $DOT in
22628  [\\/]* | ?:[\\/]*)
22629  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22630  ;;
22631  *)
22632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22633for as_dir in $PATH
22634do
22635  IFS=$as_save_IFS
22636  test -z "$as_dir" && as_dir=.
22637    for ac_exec_ext in '' $ac_executable_extensions; do
22638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22639    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22641    break 2
22642  fi
22643done
22644  done
22645IFS=$as_save_IFS
22646
22647  ;;
22648esac
22649fi
22650DOT=$ac_cv_path_DOT
22651if test -n "$DOT"; then
22652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22653$as_echo "$DOT" >&6; }
22654else
22655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22656$as_echo "no" >&6; }
22657fi
22658
22659
22660          if test "x$DOT" = x; then
22661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22662          fi
22663        else
22664          # Otherwise we believe it is a complete path. Use it as it is.
22665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22666$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22668$as_echo_n "checking for DOT... " >&6; }
22669          if test ! -x "$tool_specified"; then
22670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22671$as_echo "not found" >&6; }
22672            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22673          fi
22674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22675$as_echo "$tool_specified" >&6; }
22676        fi
22677      fi
22678    fi
22679
22680  fi
22681
22682
22683
22684
22685  # Publish this variable in the help.
22686
22687
22688  if [ -z "${HG+x}" ]; then
22689    # The variable is not set by user, try to locate tool using the code snippet
22690    for ac_prog in hg
22691do
22692  # Extract the first word of "$ac_prog", so it can be a program name with args.
22693set dummy $ac_prog; ac_word=$2
22694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22695$as_echo_n "checking for $ac_word... " >&6; }
22696if ${ac_cv_path_HG+:} false; then :
22697  $as_echo_n "(cached) " >&6
22698else
22699  case $HG in
22700  [\\/]* | ?:[\\/]*)
22701  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22702  ;;
22703  *)
22704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22705for as_dir in $PATH
22706do
22707  IFS=$as_save_IFS
22708  test -z "$as_dir" && as_dir=.
22709    for ac_exec_ext in '' $ac_executable_extensions; do
22710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22711    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22713    break 2
22714  fi
22715done
22716  done
22717IFS=$as_save_IFS
22718
22719  ;;
22720esac
22721fi
22722HG=$ac_cv_path_HG
22723if test -n "$HG"; then
22724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22725$as_echo "$HG" >&6; }
22726else
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22728$as_echo "no" >&6; }
22729fi
22730
22731
22732  test -n "$HG" && break
22733done
22734
22735  else
22736    # The variable is set, but is it from the command line or the environment?
22737
22738    # Try to remove the string !HG! from our list.
22739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22741      # If it failed, the variable was not from the command line. Ignore it,
22742      # but warn the user (except for BASH, which is always set by the calling BASH).
22743      if test "xHG" != xBASH; then
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22745$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22746      fi
22747      # Try to locate tool using the code snippet
22748      for ac_prog in hg
22749do
22750  # Extract the first word of "$ac_prog", so it can be a program name with args.
22751set dummy $ac_prog; ac_word=$2
22752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753$as_echo_n "checking for $ac_word... " >&6; }
22754if ${ac_cv_path_HG+:} false; then :
22755  $as_echo_n "(cached) " >&6
22756else
22757  case $HG in
22758  [\\/]* | ?:[\\/]*)
22759  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22760  ;;
22761  *)
22762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22763for as_dir in $PATH
22764do
22765  IFS=$as_save_IFS
22766  test -z "$as_dir" && as_dir=.
22767    for ac_exec_ext in '' $ac_executable_extensions; do
22768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22769    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22771    break 2
22772  fi
22773done
22774  done
22775IFS=$as_save_IFS
22776
22777  ;;
22778esac
22779fi
22780HG=$ac_cv_path_HG
22781if test -n "$HG"; then
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22783$as_echo "$HG" >&6; }
22784else
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787fi
22788
22789
22790  test -n "$HG" && break
22791done
22792
22793    else
22794      # If it succeeded, then it was overridden by the user. We will use it
22795      # for the tool.
22796
22797      # First remove it from the list of overridden variables, so we can test
22798      # for unknown variables in the end.
22799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22800
22801      # Check if we try to supply an empty value
22802      if test "x$HG" = x; then
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22804$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22806$as_echo_n "checking for HG... " >&6; }
22807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22808$as_echo "disabled" >&6; }
22809      else
22810        # Check if the provided tool contains a complete path.
22811        tool_specified="$HG"
22812        tool_basename="${tool_specified##*/}"
22813        if test "x$tool_basename" = "x$tool_specified"; then
22814          # A command without a complete path is provided, search $PATH.
22815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22816$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22817          # Extract the first word of "$tool_basename", so it can be a program name with args.
22818set dummy $tool_basename; ac_word=$2
22819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22820$as_echo_n "checking for $ac_word... " >&6; }
22821if ${ac_cv_path_HG+:} false; then :
22822  $as_echo_n "(cached) " >&6
22823else
22824  case $HG in
22825  [\\/]* | ?:[\\/]*)
22826  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22827  ;;
22828  *)
22829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22830for as_dir in $PATH
22831do
22832  IFS=$as_save_IFS
22833  test -z "$as_dir" && as_dir=.
22834    for ac_exec_ext in '' $ac_executable_extensions; do
22835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22836    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22838    break 2
22839  fi
22840done
22841  done
22842IFS=$as_save_IFS
22843
22844  ;;
22845esac
22846fi
22847HG=$ac_cv_path_HG
22848if test -n "$HG"; then
22849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22850$as_echo "$HG" >&6; }
22851else
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22853$as_echo "no" >&6; }
22854fi
22855
22856
22857          if test "x$HG" = x; then
22858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22859          fi
22860        else
22861          # Otherwise we believe it is a complete path. Use it as it is.
22862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22863$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22865$as_echo_n "checking for HG... " >&6; }
22866          if test ! -x "$tool_specified"; then
22867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22868$as_echo "not found" >&6; }
22869            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22870          fi
22871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22872$as_echo "$tool_specified" >&6; }
22873        fi
22874      fi
22875    fi
22876
22877  fi
22878
22879
22880
22881
22882  # Publish this variable in the help.
22883
22884
22885  if [ -z "${STAT+x}" ]; then
22886    # The variable is not set by user, try to locate tool using the code snippet
22887    for ac_prog in stat
22888do
22889  # Extract the first word of "$ac_prog", so it can be a program name with args.
22890set dummy $ac_prog; ac_word=$2
22891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22892$as_echo_n "checking for $ac_word... " >&6; }
22893if ${ac_cv_path_STAT+:} false; then :
22894  $as_echo_n "(cached) " >&6
22895else
22896  case $STAT in
22897  [\\/]* | ?:[\\/]*)
22898  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22899  ;;
22900  *)
22901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22902for as_dir in $PATH
22903do
22904  IFS=$as_save_IFS
22905  test -z "$as_dir" && as_dir=.
22906    for ac_exec_ext in '' $ac_executable_extensions; do
22907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22908    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22910    break 2
22911  fi
22912done
22913  done
22914IFS=$as_save_IFS
22915
22916  ;;
22917esac
22918fi
22919STAT=$ac_cv_path_STAT
22920if test -n "$STAT"; then
22921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22922$as_echo "$STAT" >&6; }
22923else
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22925$as_echo "no" >&6; }
22926fi
22927
22928
22929  test -n "$STAT" && break
22930done
22931
22932  else
22933    # The variable is set, but is it from the command line or the environment?
22934
22935    # Try to remove the string !STAT! from our list.
22936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22938      # If it failed, the variable was not from the command line. Ignore it,
22939      # but warn the user (except for BASH, which is always set by the calling BASH).
22940      if test "xSTAT" != xBASH; then
22941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22942$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22943      fi
22944      # Try to locate tool using the code snippet
22945      for ac_prog in stat
22946do
22947  # Extract the first word of "$ac_prog", so it can be a program name with args.
22948set dummy $ac_prog; ac_word=$2
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22950$as_echo_n "checking for $ac_word... " >&6; }
22951if ${ac_cv_path_STAT+:} false; then :
22952  $as_echo_n "(cached) " >&6
22953else
22954  case $STAT in
22955  [\\/]* | ?:[\\/]*)
22956  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22957  ;;
22958  *)
22959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22960for as_dir in $PATH
22961do
22962  IFS=$as_save_IFS
22963  test -z "$as_dir" && as_dir=.
22964    for ac_exec_ext in '' $ac_executable_extensions; do
22965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22966    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22968    break 2
22969  fi
22970done
22971  done
22972IFS=$as_save_IFS
22973
22974  ;;
22975esac
22976fi
22977STAT=$ac_cv_path_STAT
22978if test -n "$STAT"; then
22979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22980$as_echo "$STAT" >&6; }
22981else
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22983$as_echo "no" >&6; }
22984fi
22985
22986
22987  test -n "$STAT" && break
22988done
22989
22990    else
22991      # If it succeeded, then it was overridden by the user. We will use it
22992      # for the tool.
22993
22994      # First remove it from the list of overridden variables, so we can test
22995      # for unknown variables in the end.
22996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22997
22998      # Check if we try to supply an empty value
22999      if test "x$STAT" = x; then
23000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23001$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23003$as_echo_n "checking for STAT... " >&6; }
23004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23005$as_echo "disabled" >&6; }
23006      else
23007        # Check if the provided tool contains a complete path.
23008        tool_specified="$STAT"
23009        tool_basename="${tool_specified##*/}"
23010        if test "x$tool_basename" = "x$tool_specified"; then
23011          # A command without a complete path is provided, search $PATH.
23012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23013$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23014          # Extract the first word of "$tool_basename", so it can be a program name with args.
23015set dummy $tool_basename; ac_word=$2
23016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23017$as_echo_n "checking for $ac_word... " >&6; }
23018if ${ac_cv_path_STAT+:} false; then :
23019  $as_echo_n "(cached) " >&6
23020else
23021  case $STAT in
23022  [\\/]* | ?:[\\/]*)
23023  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23024  ;;
23025  *)
23026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23027for as_dir in $PATH
23028do
23029  IFS=$as_save_IFS
23030  test -z "$as_dir" && as_dir=.
23031    for ac_exec_ext in '' $ac_executable_extensions; do
23032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23033    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23035    break 2
23036  fi
23037done
23038  done
23039IFS=$as_save_IFS
23040
23041  ;;
23042esac
23043fi
23044STAT=$ac_cv_path_STAT
23045if test -n "$STAT"; then
23046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23047$as_echo "$STAT" >&6; }
23048else
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23050$as_echo "no" >&6; }
23051fi
23052
23053
23054          if test "x$STAT" = x; then
23055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23056          fi
23057        else
23058          # Otherwise we believe it is a complete path. Use it as it is.
23059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23060$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23062$as_echo_n "checking for STAT... " >&6; }
23063          if test ! -x "$tool_specified"; then
23064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23065$as_echo "not found" >&6; }
23066            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23067          fi
23068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23069$as_echo "$tool_specified" >&6; }
23070        fi
23071      fi
23072    fi
23073
23074  fi
23075
23076
23077
23078
23079  # Publish this variable in the help.
23080
23081
23082  if [ -z "${TIME+x}" ]; then
23083    # The variable is not set by user, try to locate tool using the code snippet
23084    for ac_prog in time
23085do
23086  # Extract the first word of "$ac_prog", so it can be a program name with args.
23087set dummy $ac_prog; ac_word=$2
23088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23089$as_echo_n "checking for $ac_word... " >&6; }
23090if ${ac_cv_path_TIME+:} false; then :
23091  $as_echo_n "(cached) " >&6
23092else
23093  case $TIME in
23094  [\\/]* | ?:[\\/]*)
23095  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23096  ;;
23097  *)
23098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23099for as_dir in $PATH
23100do
23101  IFS=$as_save_IFS
23102  test -z "$as_dir" && as_dir=.
23103    for ac_exec_ext in '' $ac_executable_extensions; do
23104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23105    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23107    break 2
23108  fi
23109done
23110  done
23111IFS=$as_save_IFS
23112
23113  ;;
23114esac
23115fi
23116TIME=$ac_cv_path_TIME
23117if test -n "$TIME"; then
23118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23119$as_echo "$TIME" >&6; }
23120else
23121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23122$as_echo "no" >&6; }
23123fi
23124
23125
23126  test -n "$TIME" && break
23127done
23128
23129  else
23130    # The variable is set, but is it from the command line or the environment?
23131
23132    # Try to remove the string !TIME! from our list.
23133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23135      # If it failed, the variable was not from the command line. Ignore it,
23136      # but warn the user (except for BASH, which is always set by the calling BASH).
23137      if test "xTIME" != xBASH; then
23138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23139$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23140      fi
23141      # Try to locate tool using the code snippet
23142      for ac_prog in time
23143do
23144  # Extract the first word of "$ac_prog", so it can be a program name with args.
23145set dummy $ac_prog; ac_word=$2
23146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23147$as_echo_n "checking for $ac_word... " >&6; }
23148if ${ac_cv_path_TIME+:} false; then :
23149  $as_echo_n "(cached) " >&6
23150else
23151  case $TIME in
23152  [\\/]* | ?:[\\/]*)
23153  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23154  ;;
23155  *)
23156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23157for as_dir in $PATH
23158do
23159  IFS=$as_save_IFS
23160  test -z "$as_dir" && as_dir=.
23161    for ac_exec_ext in '' $ac_executable_extensions; do
23162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23163    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23165    break 2
23166  fi
23167done
23168  done
23169IFS=$as_save_IFS
23170
23171  ;;
23172esac
23173fi
23174TIME=$ac_cv_path_TIME
23175if test -n "$TIME"; then
23176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23177$as_echo "$TIME" >&6; }
23178else
23179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23180$as_echo "no" >&6; }
23181fi
23182
23183
23184  test -n "$TIME" && break
23185done
23186
23187    else
23188      # If it succeeded, then it was overridden by the user. We will use it
23189      # for the tool.
23190
23191      # First remove it from the list of overridden variables, so we can test
23192      # for unknown variables in the end.
23193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23194
23195      # Check if we try to supply an empty value
23196      if test "x$TIME" = x; then
23197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23198$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23200$as_echo_n "checking for TIME... " >&6; }
23201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23202$as_echo "disabled" >&6; }
23203      else
23204        # Check if the provided tool contains a complete path.
23205        tool_specified="$TIME"
23206        tool_basename="${tool_specified##*/}"
23207        if test "x$tool_basename" = "x$tool_specified"; then
23208          # A command without a complete path is provided, search $PATH.
23209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23210$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23211          # Extract the first word of "$tool_basename", so it can be a program name with args.
23212set dummy $tool_basename; ac_word=$2
23213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23214$as_echo_n "checking for $ac_word... " >&6; }
23215if ${ac_cv_path_TIME+:} false; then :
23216  $as_echo_n "(cached) " >&6
23217else
23218  case $TIME in
23219  [\\/]* | ?:[\\/]*)
23220  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23221  ;;
23222  *)
23223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23224for as_dir in $PATH
23225do
23226  IFS=$as_save_IFS
23227  test -z "$as_dir" && as_dir=.
23228    for ac_exec_ext in '' $ac_executable_extensions; do
23229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23230    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23232    break 2
23233  fi
23234done
23235  done
23236IFS=$as_save_IFS
23237
23238  ;;
23239esac
23240fi
23241TIME=$ac_cv_path_TIME
23242if test -n "$TIME"; then
23243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23244$as_echo "$TIME" >&6; }
23245else
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23247$as_echo "no" >&6; }
23248fi
23249
23250
23251          if test "x$TIME" = x; then
23252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23253          fi
23254        else
23255          # Otherwise we believe it is a complete path. Use it as it is.
23256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23257$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23259$as_echo_n "checking for TIME... " >&6; }
23260          if test ! -x "$tool_specified"; then
23261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23262$as_echo "not found" >&6; }
23263            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23264          fi
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23266$as_echo "$tool_specified" >&6; }
23267        fi
23268      fi
23269    fi
23270
23271  fi
23272
23273
23274  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23275  # be in the user path.
23276
23277
23278  # Publish this variable in the help.
23279
23280
23281  if [ -z "${DTRACE+x}" ]; then
23282    # The variable is not set by user, try to locate tool using the code snippet
23283    for ac_prog in dtrace
23284do
23285  # Extract the first word of "$ac_prog", so it can be a program name with args.
23286set dummy $ac_prog; ac_word=$2
23287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23288$as_echo_n "checking for $ac_word... " >&6; }
23289if ${ac_cv_path_DTRACE+:} false; then :
23290  $as_echo_n "(cached) " >&6
23291else
23292  case $DTRACE in
23293  [\\/]* | ?:[\\/]*)
23294  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23295  ;;
23296  *)
23297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23298as_dummy="$PATH:/usr/sbin"
23299for as_dir in $as_dummy
23300do
23301  IFS=$as_save_IFS
23302  test -z "$as_dir" && as_dir=.
23303    for ac_exec_ext in '' $ac_executable_extensions; do
23304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23305    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23307    break 2
23308  fi
23309done
23310  done
23311IFS=$as_save_IFS
23312
23313  ;;
23314esac
23315fi
23316DTRACE=$ac_cv_path_DTRACE
23317if test -n "$DTRACE"; then
23318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23319$as_echo "$DTRACE" >&6; }
23320else
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23322$as_echo "no" >&6; }
23323fi
23324
23325
23326  test -n "$DTRACE" && break
23327done
23328
23329  else
23330    # The variable is set, but is it from the command line or the environment?
23331
23332    # Try to remove the string !DTRACE! from our list.
23333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23335      # If it failed, the variable was not from the command line. Ignore it,
23336      # but warn the user (except for BASH, which is always set by the calling BASH).
23337      if test "xDTRACE" != xBASH; then
23338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23339$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23340      fi
23341      # Try to locate tool using the code snippet
23342      for ac_prog in dtrace
23343do
23344  # Extract the first word of "$ac_prog", so it can be a program name with args.
23345set dummy $ac_prog; ac_word=$2
23346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23347$as_echo_n "checking for $ac_word... " >&6; }
23348if ${ac_cv_path_DTRACE+:} false; then :
23349  $as_echo_n "(cached) " >&6
23350else
23351  case $DTRACE in
23352  [\\/]* | ?:[\\/]*)
23353  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23354  ;;
23355  *)
23356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23357as_dummy="$PATH:/usr/sbin"
23358for as_dir in $as_dummy
23359do
23360  IFS=$as_save_IFS
23361  test -z "$as_dir" && as_dir=.
23362    for ac_exec_ext in '' $ac_executable_extensions; do
23363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23364    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23366    break 2
23367  fi
23368done
23369  done
23370IFS=$as_save_IFS
23371
23372  ;;
23373esac
23374fi
23375DTRACE=$ac_cv_path_DTRACE
23376if test -n "$DTRACE"; then
23377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23378$as_echo "$DTRACE" >&6; }
23379else
23380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23381$as_echo "no" >&6; }
23382fi
23383
23384
23385  test -n "$DTRACE" && break
23386done
23387
23388    else
23389      # If it succeeded, then it was overridden by the user. We will use it
23390      # for the tool.
23391
23392      # First remove it from the list of overridden variables, so we can test
23393      # for unknown variables in the end.
23394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23395
23396      # Check if we try to supply an empty value
23397      if test "x$DTRACE" = x; then
23398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23399$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23401$as_echo_n "checking for DTRACE... " >&6; }
23402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23403$as_echo "disabled" >&6; }
23404      else
23405        # Check if the provided tool contains a complete path.
23406        tool_specified="$DTRACE"
23407        tool_basename="${tool_specified##*/}"
23408        if test "x$tool_basename" = "x$tool_specified"; then
23409          # A command without a complete path is provided, search $PATH.
23410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23411$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23412          # Extract the first word of "$tool_basename", so it can be a program name with args.
23413set dummy $tool_basename; ac_word=$2
23414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23415$as_echo_n "checking for $ac_word... " >&6; }
23416if ${ac_cv_path_DTRACE+:} false; then :
23417  $as_echo_n "(cached) " >&6
23418else
23419  case $DTRACE in
23420  [\\/]* | ?:[\\/]*)
23421  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23422  ;;
23423  *)
23424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23425for as_dir in $PATH
23426do
23427  IFS=$as_save_IFS
23428  test -z "$as_dir" && as_dir=.
23429    for ac_exec_ext in '' $ac_executable_extensions; do
23430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23431    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23433    break 2
23434  fi
23435done
23436  done
23437IFS=$as_save_IFS
23438
23439  ;;
23440esac
23441fi
23442DTRACE=$ac_cv_path_DTRACE
23443if test -n "$DTRACE"; then
23444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23445$as_echo "$DTRACE" >&6; }
23446else
23447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23448$as_echo "no" >&6; }
23449fi
23450
23451
23452          if test "x$DTRACE" = x; then
23453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23454          fi
23455        else
23456          # Otherwise we believe it is a complete path. Use it as it is.
23457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23458$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23460$as_echo_n "checking for DTRACE... " >&6; }
23461          if test ! -x "$tool_specified"; then
23462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23463$as_echo "not found" >&6; }
23464            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23465          fi
23466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23467$as_echo "$tool_specified" >&6; }
23468        fi
23469      fi
23470    fi
23471
23472  fi
23473
23474
23475
23476
23477  # Publish this variable in the help.
23478
23479
23480  if [ -z "${PATCH+x}" ]; then
23481    # The variable is not set by user, try to locate tool using the code snippet
23482    for ac_prog in gpatch patch
23483do
23484  # Extract the first word of "$ac_prog", so it can be a program name with args.
23485set dummy $ac_prog; ac_word=$2
23486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23487$as_echo_n "checking for $ac_word... " >&6; }
23488if ${ac_cv_path_PATCH+:} false; then :
23489  $as_echo_n "(cached) " >&6
23490else
23491  case $PATCH in
23492  [\\/]* | ?:[\\/]*)
23493  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23494  ;;
23495  *)
23496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23497for as_dir in $PATH
23498do
23499  IFS=$as_save_IFS
23500  test -z "$as_dir" && as_dir=.
23501    for ac_exec_ext in '' $ac_executable_extensions; do
23502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23503    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23505    break 2
23506  fi
23507done
23508  done
23509IFS=$as_save_IFS
23510
23511  ;;
23512esac
23513fi
23514PATCH=$ac_cv_path_PATCH
23515if test -n "$PATCH"; then
23516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23517$as_echo "$PATCH" >&6; }
23518else
23519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23520$as_echo "no" >&6; }
23521fi
23522
23523
23524  test -n "$PATCH" && break
23525done
23526
23527  else
23528    # The variable is set, but is it from the command line or the environment?
23529
23530    # Try to remove the string !PATCH! from our list.
23531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23533      # If it failed, the variable was not from the command line. Ignore it,
23534      # but warn the user (except for BASH, which is always set by the calling BASH).
23535      if test "xPATCH" != xBASH; then
23536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23537$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23538      fi
23539      # Try to locate tool using the code snippet
23540      for ac_prog in gpatch patch
23541do
23542  # Extract the first word of "$ac_prog", so it can be a program name with args.
23543set dummy $ac_prog; ac_word=$2
23544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23545$as_echo_n "checking for $ac_word... " >&6; }
23546if ${ac_cv_path_PATCH+:} false; then :
23547  $as_echo_n "(cached) " >&6
23548else
23549  case $PATCH in
23550  [\\/]* | ?:[\\/]*)
23551  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23552  ;;
23553  *)
23554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23555for as_dir in $PATH
23556do
23557  IFS=$as_save_IFS
23558  test -z "$as_dir" && as_dir=.
23559    for ac_exec_ext in '' $ac_executable_extensions; do
23560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23561    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23563    break 2
23564  fi
23565done
23566  done
23567IFS=$as_save_IFS
23568
23569  ;;
23570esac
23571fi
23572PATCH=$ac_cv_path_PATCH
23573if test -n "$PATCH"; then
23574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23575$as_echo "$PATCH" >&6; }
23576else
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23578$as_echo "no" >&6; }
23579fi
23580
23581
23582  test -n "$PATCH" && break
23583done
23584
23585    else
23586      # If it succeeded, then it was overridden by the user. We will use it
23587      # for the tool.
23588
23589      # First remove it from the list of overridden variables, so we can test
23590      # for unknown variables in the end.
23591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23592
23593      # Check if we try to supply an empty value
23594      if test "x$PATCH" = x; then
23595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23596$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23598$as_echo_n "checking for PATCH... " >&6; }
23599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23600$as_echo "disabled" >&6; }
23601      else
23602        # Check if the provided tool contains a complete path.
23603        tool_specified="$PATCH"
23604        tool_basename="${tool_specified##*/}"
23605        if test "x$tool_basename" = "x$tool_specified"; then
23606          # A command without a complete path is provided, search $PATH.
23607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23608$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23609          # Extract the first word of "$tool_basename", so it can be a program name with args.
23610set dummy $tool_basename; ac_word=$2
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23612$as_echo_n "checking for $ac_word... " >&6; }
23613if ${ac_cv_path_PATCH+:} false; then :
23614  $as_echo_n "(cached) " >&6
23615else
23616  case $PATCH in
23617  [\\/]* | ?:[\\/]*)
23618  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23619  ;;
23620  *)
23621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23622for as_dir in $PATH
23623do
23624  IFS=$as_save_IFS
23625  test -z "$as_dir" && as_dir=.
23626    for ac_exec_ext in '' $ac_executable_extensions; do
23627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23628    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23630    break 2
23631  fi
23632done
23633  done
23634IFS=$as_save_IFS
23635
23636  ;;
23637esac
23638fi
23639PATCH=$ac_cv_path_PATCH
23640if test -n "$PATCH"; then
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23642$as_echo "$PATCH" >&6; }
23643else
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23645$as_echo "no" >&6; }
23646fi
23647
23648
23649          if test "x$PATCH" = x; then
23650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23651          fi
23652        else
23653          # Otherwise we believe it is a complete path. Use it as it is.
23654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23655$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23657$as_echo_n "checking for PATCH... " >&6; }
23658          if test ! -x "$tool_specified"; then
23659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23660$as_echo "not found" >&6; }
23661            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23662          fi
23663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23664$as_echo "$tool_specified" >&6; }
23665        fi
23666      fi
23667    fi
23668
23669  fi
23670
23671
23672  # Check if it's GNU time
23673  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23674  if test "x$IS_GNU_TIME" != x; then
23675    IS_GNU_TIME=yes
23676  else
23677    IS_GNU_TIME=no
23678  fi
23679
23680
23681  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23682
23683
23684
23685  # Publish this variable in the help.
23686
23687
23688  if [ -z "${DSYMUTIL+x}" ]; then
23689    # The variable is not set by user, try to locate tool using the code snippet
23690    for ac_prog in dsymutil
23691do
23692  # Extract the first word of "$ac_prog", so it can be a program name with args.
23693set dummy $ac_prog; ac_word=$2
23694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23695$as_echo_n "checking for $ac_word... " >&6; }
23696if ${ac_cv_path_DSYMUTIL+:} false; then :
23697  $as_echo_n "(cached) " >&6
23698else
23699  case $DSYMUTIL in
23700  [\\/]* | ?:[\\/]*)
23701  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23702  ;;
23703  *)
23704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23705for as_dir in $PATH
23706do
23707  IFS=$as_save_IFS
23708  test -z "$as_dir" && as_dir=.
23709    for ac_exec_ext in '' $ac_executable_extensions; do
23710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23711    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23713    break 2
23714  fi
23715done
23716  done
23717IFS=$as_save_IFS
23718
23719  ;;
23720esac
23721fi
23722DSYMUTIL=$ac_cv_path_DSYMUTIL
23723if test -n "$DSYMUTIL"; then
23724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23725$as_echo "$DSYMUTIL" >&6; }
23726else
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23728$as_echo "no" >&6; }
23729fi
23730
23731
23732  test -n "$DSYMUTIL" && break
23733done
23734
23735  else
23736    # The variable is set, but is it from the command line or the environment?
23737
23738    # Try to remove the string !DSYMUTIL! from our list.
23739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23741      # If it failed, the variable was not from the command line. Ignore it,
23742      # but warn the user (except for BASH, which is always set by the calling BASH).
23743      if test "xDSYMUTIL" != xBASH; then
23744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23745$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23746      fi
23747      # Try to locate tool using the code snippet
23748      for ac_prog in dsymutil
23749do
23750  # Extract the first word of "$ac_prog", so it can be a program name with args.
23751set dummy $ac_prog; ac_word=$2
23752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23753$as_echo_n "checking for $ac_word... " >&6; }
23754if ${ac_cv_path_DSYMUTIL+:} false; then :
23755  $as_echo_n "(cached) " >&6
23756else
23757  case $DSYMUTIL in
23758  [\\/]* | ?:[\\/]*)
23759  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23760  ;;
23761  *)
23762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23763for as_dir in $PATH
23764do
23765  IFS=$as_save_IFS
23766  test -z "$as_dir" && as_dir=.
23767    for ac_exec_ext in '' $ac_executable_extensions; do
23768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23769    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23771    break 2
23772  fi
23773done
23774  done
23775IFS=$as_save_IFS
23776
23777  ;;
23778esac
23779fi
23780DSYMUTIL=$ac_cv_path_DSYMUTIL
23781if test -n "$DSYMUTIL"; then
23782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23783$as_echo "$DSYMUTIL" >&6; }
23784else
23785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23786$as_echo "no" >&6; }
23787fi
23788
23789
23790  test -n "$DSYMUTIL" && break
23791done
23792
23793    else
23794      # If it succeeded, then it was overridden by the user. We will use it
23795      # for the tool.
23796
23797      # First remove it from the list of overridden variables, so we can test
23798      # for unknown variables in the end.
23799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23800
23801      # Check if we try to supply an empty value
23802      if test "x$DSYMUTIL" = x; then
23803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23804$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23806$as_echo_n "checking for DSYMUTIL... " >&6; }
23807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23808$as_echo "disabled" >&6; }
23809      else
23810        # Check if the provided tool contains a complete path.
23811        tool_specified="$DSYMUTIL"
23812        tool_basename="${tool_specified##*/}"
23813        if test "x$tool_basename" = "x$tool_specified"; then
23814          # A command without a complete path is provided, search $PATH.
23815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23816$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23817          # Extract the first word of "$tool_basename", so it can be a program name with args.
23818set dummy $tool_basename; ac_word=$2
23819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23820$as_echo_n "checking for $ac_word... " >&6; }
23821if ${ac_cv_path_DSYMUTIL+:} false; then :
23822  $as_echo_n "(cached) " >&6
23823else
23824  case $DSYMUTIL in
23825  [\\/]* | ?:[\\/]*)
23826  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23827  ;;
23828  *)
23829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23830for as_dir in $PATH
23831do
23832  IFS=$as_save_IFS
23833  test -z "$as_dir" && as_dir=.
23834    for ac_exec_ext in '' $ac_executable_extensions; do
23835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23836    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23838    break 2
23839  fi
23840done
23841  done
23842IFS=$as_save_IFS
23843
23844  ;;
23845esac
23846fi
23847DSYMUTIL=$ac_cv_path_DSYMUTIL
23848if test -n "$DSYMUTIL"; then
23849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23850$as_echo "$DSYMUTIL" >&6; }
23851else
23852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23853$as_echo "no" >&6; }
23854fi
23855
23856
23857          if test "x$DSYMUTIL" = x; then
23858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23859          fi
23860        else
23861          # Otherwise we believe it is a complete path. Use it as it is.
23862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23863$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23865$as_echo_n "checking for DSYMUTIL... " >&6; }
23866          if test ! -x "$tool_specified"; then
23867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23868$as_echo "not found" >&6; }
23869            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23870          fi
23871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23872$as_echo "$tool_specified" >&6; }
23873        fi
23874      fi
23875    fi
23876
23877  fi
23878
23879
23880
23881  if test "x$DSYMUTIL" = x; then
23882    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23883  fi
23884
23885
23886
23887
23888
23889  # Publish this variable in the help.
23890
23891
23892  if [ -z "${XATTR+x}" ]; then
23893    # The variable is not set by user, try to locate tool using the code snippet
23894    for ac_prog in xattr
23895do
23896  # Extract the first word of "$ac_prog", so it can be a program name with args.
23897set dummy $ac_prog; ac_word=$2
23898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23899$as_echo_n "checking for $ac_word... " >&6; }
23900if ${ac_cv_path_XATTR+:} false; then :
23901  $as_echo_n "(cached) " >&6
23902else
23903  case $XATTR in
23904  [\\/]* | ?:[\\/]*)
23905  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23906  ;;
23907  *)
23908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23909for as_dir in $PATH
23910do
23911  IFS=$as_save_IFS
23912  test -z "$as_dir" && as_dir=.
23913    for ac_exec_ext in '' $ac_executable_extensions; do
23914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23915    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23917    break 2
23918  fi
23919done
23920  done
23921IFS=$as_save_IFS
23922
23923  ;;
23924esac
23925fi
23926XATTR=$ac_cv_path_XATTR
23927if test -n "$XATTR"; then
23928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23929$as_echo "$XATTR" >&6; }
23930else
23931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23932$as_echo "no" >&6; }
23933fi
23934
23935
23936  test -n "$XATTR" && break
23937done
23938
23939  else
23940    # The variable is set, but is it from the command line or the environment?
23941
23942    # Try to remove the string !XATTR! from our list.
23943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23945      # If it failed, the variable was not from the command line. Ignore it,
23946      # but warn the user (except for BASH, which is always set by the calling BASH).
23947      if test "xXATTR" != xBASH; then
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23949$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23950      fi
23951      # Try to locate tool using the code snippet
23952      for ac_prog in xattr
23953do
23954  # Extract the first word of "$ac_prog", so it can be a program name with args.
23955set dummy $ac_prog; ac_word=$2
23956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23957$as_echo_n "checking for $ac_word... " >&6; }
23958if ${ac_cv_path_XATTR+:} false; then :
23959  $as_echo_n "(cached) " >&6
23960else
23961  case $XATTR in
23962  [\\/]* | ?:[\\/]*)
23963  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23964  ;;
23965  *)
23966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23967for as_dir in $PATH
23968do
23969  IFS=$as_save_IFS
23970  test -z "$as_dir" && as_dir=.
23971    for ac_exec_ext in '' $ac_executable_extensions; do
23972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23973    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23975    break 2
23976  fi
23977done
23978  done
23979IFS=$as_save_IFS
23980
23981  ;;
23982esac
23983fi
23984XATTR=$ac_cv_path_XATTR
23985if test -n "$XATTR"; then
23986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23987$as_echo "$XATTR" >&6; }
23988else
23989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23990$as_echo "no" >&6; }
23991fi
23992
23993
23994  test -n "$XATTR" && break
23995done
23996
23997    else
23998      # If it succeeded, then it was overridden by the user. We will use it
23999      # for the tool.
24000
24001      # First remove it from the list of overridden variables, so we can test
24002      # for unknown variables in the end.
24003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24004
24005      # Check if we try to supply an empty value
24006      if test "x$XATTR" = x; then
24007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24008$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24010$as_echo_n "checking for XATTR... " >&6; }
24011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24012$as_echo "disabled" >&6; }
24013      else
24014        # Check if the provided tool contains a complete path.
24015        tool_specified="$XATTR"
24016        tool_basename="${tool_specified##*/}"
24017        if test "x$tool_basename" = "x$tool_specified"; then
24018          # A command without a complete path is provided, search $PATH.
24019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24020$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24021          # Extract the first word of "$tool_basename", so it can be a program name with args.
24022set dummy $tool_basename; ac_word=$2
24023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24024$as_echo_n "checking for $ac_word... " >&6; }
24025if ${ac_cv_path_XATTR+:} false; then :
24026  $as_echo_n "(cached) " >&6
24027else
24028  case $XATTR in
24029  [\\/]* | ?:[\\/]*)
24030  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24031  ;;
24032  *)
24033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24034for as_dir in $PATH
24035do
24036  IFS=$as_save_IFS
24037  test -z "$as_dir" && as_dir=.
24038    for ac_exec_ext in '' $ac_executable_extensions; do
24039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24040    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24042    break 2
24043  fi
24044done
24045  done
24046IFS=$as_save_IFS
24047
24048  ;;
24049esac
24050fi
24051XATTR=$ac_cv_path_XATTR
24052if test -n "$XATTR"; then
24053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24054$as_echo "$XATTR" >&6; }
24055else
24056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24057$as_echo "no" >&6; }
24058fi
24059
24060
24061          if test "x$XATTR" = x; then
24062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24063          fi
24064        else
24065          # Otherwise we believe it is a complete path. Use it as it is.
24066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24067$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24069$as_echo_n "checking for XATTR... " >&6; }
24070          if test ! -x "$tool_specified"; then
24071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24072$as_echo "not found" >&6; }
24073            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24074          fi
24075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24076$as_echo "$tool_specified" >&6; }
24077        fi
24078      fi
24079    fi
24080
24081  fi
24082
24083
24084
24085  if test "x$XATTR" = x; then
24086    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24087  fi
24088
24089
24090
24091
24092  # Publish this variable in the help.
24093
24094
24095  if [ -z "${CODESIGN+x}" ]; then
24096    # The variable is not set by user, try to locate tool using the code snippet
24097    for ac_prog in codesign
24098do
24099  # Extract the first word of "$ac_prog", so it can be a program name with args.
24100set dummy $ac_prog; ac_word=$2
24101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24102$as_echo_n "checking for $ac_word... " >&6; }
24103if ${ac_cv_path_CODESIGN+:} false; then :
24104  $as_echo_n "(cached) " >&6
24105else
24106  case $CODESIGN in
24107  [\\/]* | ?:[\\/]*)
24108  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24109  ;;
24110  *)
24111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24112for as_dir in $PATH
24113do
24114  IFS=$as_save_IFS
24115  test -z "$as_dir" && as_dir=.
24116    for ac_exec_ext in '' $ac_executable_extensions; do
24117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24118    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24120    break 2
24121  fi
24122done
24123  done
24124IFS=$as_save_IFS
24125
24126  ;;
24127esac
24128fi
24129CODESIGN=$ac_cv_path_CODESIGN
24130if test -n "$CODESIGN"; then
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24132$as_echo "$CODESIGN" >&6; }
24133else
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24135$as_echo "no" >&6; }
24136fi
24137
24138
24139  test -n "$CODESIGN" && break
24140done
24141
24142  else
24143    # The variable is set, but is it from the command line or the environment?
24144
24145    # Try to remove the string !CODESIGN! from our list.
24146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24148      # If it failed, the variable was not from the command line. Ignore it,
24149      # but warn the user (except for BASH, which is always set by the calling BASH).
24150      if test "xCODESIGN" != xBASH; then
24151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24152$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24153      fi
24154      # Try to locate tool using the code snippet
24155      for ac_prog in codesign
24156do
24157  # Extract the first word of "$ac_prog", so it can be a program name with args.
24158set dummy $ac_prog; ac_word=$2
24159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160$as_echo_n "checking for $ac_word... " >&6; }
24161if ${ac_cv_path_CODESIGN+:} false; then :
24162  $as_echo_n "(cached) " >&6
24163else
24164  case $CODESIGN in
24165  [\\/]* | ?:[\\/]*)
24166  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24167  ;;
24168  *)
24169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170for as_dir in $PATH
24171do
24172  IFS=$as_save_IFS
24173  test -z "$as_dir" && as_dir=.
24174    for ac_exec_ext in '' $ac_executable_extensions; do
24175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24176    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178    break 2
24179  fi
24180done
24181  done
24182IFS=$as_save_IFS
24183
24184  ;;
24185esac
24186fi
24187CODESIGN=$ac_cv_path_CODESIGN
24188if test -n "$CODESIGN"; then
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24190$as_echo "$CODESIGN" >&6; }
24191else
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193$as_echo "no" >&6; }
24194fi
24195
24196
24197  test -n "$CODESIGN" && break
24198done
24199
24200    else
24201      # If it succeeded, then it was overridden by the user. We will use it
24202      # for the tool.
24203
24204      # First remove it from the list of overridden variables, so we can test
24205      # for unknown variables in the end.
24206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24207
24208      # Check if we try to supply an empty value
24209      if test "x$CODESIGN" = x; then
24210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24211$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24213$as_echo_n "checking for CODESIGN... " >&6; }
24214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24215$as_echo "disabled" >&6; }
24216      else
24217        # Check if the provided tool contains a complete path.
24218        tool_specified="$CODESIGN"
24219        tool_basename="${tool_specified##*/}"
24220        if test "x$tool_basename" = "x$tool_specified"; then
24221          # A command without a complete path is provided, search $PATH.
24222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24223$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24224          # Extract the first word of "$tool_basename", so it can be a program name with args.
24225set dummy $tool_basename; ac_word=$2
24226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24227$as_echo_n "checking for $ac_word... " >&6; }
24228if ${ac_cv_path_CODESIGN+:} false; then :
24229  $as_echo_n "(cached) " >&6
24230else
24231  case $CODESIGN in
24232  [\\/]* | ?:[\\/]*)
24233  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24234  ;;
24235  *)
24236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24237for as_dir in $PATH
24238do
24239  IFS=$as_save_IFS
24240  test -z "$as_dir" && as_dir=.
24241    for ac_exec_ext in '' $ac_executable_extensions; do
24242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24243    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24245    break 2
24246  fi
24247done
24248  done
24249IFS=$as_save_IFS
24250
24251  ;;
24252esac
24253fi
24254CODESIGN=$ac_cv_path_CODESIGN
24255if test -n "$CODESIGN"; then
24256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24257$as_echo "$CODESIGN" >&6; }
24258else
24259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24260$as_echo "no" >&6; }
24261fi
24262
24263
24264          if test "x$CODESIGN" = x; then
24265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24266          fi
24267        else
24268          # Otherwise we believe it is a complete path. Use it as it is.
24269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24270$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24272$as_echo_n "checking for CODESIGN... " >&6; }
24273          if test ! -x "$tool_specified"; then
24274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24275$as_echo "not found" >&6; }
24276            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24277          fi
24278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24279$as_echo "$tool_specified" >&6; }
24280        fi
24281      fi
24282    fi
24283
24284  fi
24285
24286
24287    if test "x$CODESIGN" != "x"; then
24288      # Verify that the openjdk_codesign certificate is present
24289      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24290$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24291      $RM codesign-testfile
24292      $TOUCH codesign-testfile
24293      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24294      $RM codesign-testfile
24295      if test "x$CODESIGN" = x; then
24296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24297$as_echo "no" >&6; }
24298      else
24299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24300$as_echo "yes" >&6; }
24301      fi
24302    fi
24303
24304
24305
24306  # Publish this variable in the help.
24307
24308
24309  if [ -z "${SETFILE+x}" ]; then
24310    # The variable is not set by user, try to locate tool using the code snippet
24311    for ac_prog in SetFile
24312do
24313  # Extract the first word of "$ac_prog", so it can be a program name with args.
24314set dummy $ac_prog; ac_word=$2
24315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24316$as_echo_n "checking for $ac_word... " >&6; }
24317if ${ac_cv_path_SETFILE+:} false; then :
24318  $as_echo_n "(cached) " >&6
24319else
24320  case $SETFILE in
24321  [\\/]* | ?:[\\/]*)
24322  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24323  ;;
24324  *)
24325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24326for as_dir in $PATH
24327do
24328  IFS=$as_save_IFS
24329  test -z "$as_dir" && as_dir=.
24330    for ac_exec_ext in '' $ac_executable_extensions; do
24331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24332    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24334    break 2
24335  fi
24336done
24337  done
24338IFS=$as_save_IFS
24339
24340  ;;
24341esac
24342fi
24343SETFILE=$ac_cv_path_SETFILE
24344if test -n "$SETFILE"; then
24345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24346$as_echo "$SETFILE" >&6; }
24347else
24348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24349$as_echo "no" >&6; }
24350fi
24351
24352
24353  test -n "$SETFILE" && break
24354done
24355
24356  else
24357    # The variable is set, but is it from the command line or the environment?
24358
24359    # Try to remove the string !SETFILE! from our list.
24360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24362      # If it failed, the variable was not from the command line. Ignore it,
24363      # but warn the user (except for BASH, which is always set by the calling BASH).
24364      if test "xSETFILE" != xBASH; then
24365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24366$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24367      fi
24368      # Try to locate tool using the code snippet
24369      for ac_prog in SetFile
24370do
24371  # Extract the first word of "$ac_prog", so it can be a program name with args.
24372set dummy $ac_prog; ac_word=$2
24373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24374$as_echo_n "checking for $ac_word... " >&6; }
24375if ${ac_cv_path_SETFILE+:} false; then :
24376  $as_echo_n "(cached) " >&6
24377else
24378  case $SETFILE in
24379  [\\/]* | ?:[\\/]*)
24380  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24381  ;;
24382  *)
24383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24384for as_dir in $PATH
24385do
24386  IFS=$as_save_IFS
24387  test -z "$as_dir" && as_dir=.
24388    for ac_exec_ext in '' $ac_executable_extensions; do
24389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24390    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24392    break 2
24393  fi
24394done
24395  done
24396IFS=$as_save_IFS
24397
24398  ;;
24399esac
24400fi
24401SETFILE=$ac_cv_path_SETFILE
24402if test -n "$SETFILE"; then
24403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24404$as_echo "$SETFILE" >&6; }
24405else
24406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24407$as_echo "no" >&6; }
24408fi
24409
24410
24411  test -n "$SETFILE" && break
24412done
24413
24414    else
24415      # If it succeeded, then it was overridden by the user. We will use it
24416      # for the tool.
24417
24418      # First remove it from the list of overridden variables, so we can test
24419      # for unknown variables in the end.
24420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24421
24422      # Check if we try to supply an empty value
24423      if test "x$SETFILE" = x; then
24424        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24425$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24427$as_echo_n "checking for SETFILE... " >&6; }
24428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24429$as_echo "disabled" >&6; }
24430      else
24431        # Check if the provided tool contains a complete path.
24432        tool_specified="$SETFILE"
24433        tool_basename="${tool_specified##*/}"
24434        if test "x$tool_basename" = "x$tool_specified"; then
24435          # A command without a complete path is provided, search $PATH.
24436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24437$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24438          # Extract the first word of "$tool_basename", so it can be a program name with args.
24439set dummy $tool_basename; ac_word=$2
24440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24441$as_echo_n "checking for $ac_word... " >&6; }
24442if ${ac_cv_path_SETFILE+:} false; then :
24443  $as_echo_n "(cached) " >&6
24444else
24445  case $SETFILE in
24446  [\\/]* | ?:[\\/]*)
24447  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24448  ;;
24449  *)
24450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24451for as_dir in $PATH
24452do
24453  IFS=$as_save_IFS
24454  test -z "$as_dir" && as_dir=.
24455    for ac_exec_ext in '' $ac_executable_extensions; do
24456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24457    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24459    break 2
24460  fi
24461done
24462  done
24463IFS=$as_save_IFS
24464
24465  ;;
24466esac
24467fi
24468SETFILE=$ac_cv_path_SETFILE
24469if test -n "$SETFILE"; then
24470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24471$as_echo "$SETFILE" >&6; }
24472else
24473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24474$as_echo "no" >&6; }
24475fi
24476
24477
24478          if test "x$SETFILE" = x; then
24479            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24480          fi
24481        else
24482          # Otherwise we believe it is a complete path. Use it as it is.
24483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24484$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24485          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24486$as_echo_n "checking for SETFILE... " >&6; }
24487          if test ! -x "$tool_specified"; then
24488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24489$as_echo "not found" >&6; }
24490            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24491          fi
24492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24493$as_echo "$tool_specified" >&6; }
24494        fi
24495      fi
24496    fi
24497
24498  fi
24499
24500
24501
24502  if test "x$SETFILE" = x; then
24503    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24504  fi
24505
24506
24507  fi
24508
24509
24510  # Check bash version
24511  # Extra [ ] to stop m4 mangling
24512   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24514$as_echo_n "checking bash version... " >&6; }
24515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24516$as_echo "$BASH_VER" >&6; }
24517
24518  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24519  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24520  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24521    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24522  fi
24523
24524  # Test if bash supports pipefail.
24525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24526$as_echo_n "checking if bash supports pipefail... " >&6; }
24527  if ${BASH} -c 'set -o pipefail'; then
24528    BASH_ARGS="$BASH_ARGS -o pipefail"
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24530$as_echo "yes" >&6; }
24531  else
24532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24533$as_echo "no" >&6; }
24534  fi
24535
24536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24537$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24538  if ${BASH} -e -c 'true'; then
24539    BASH_ARGS="$BASH_ARGS -e"
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24541$as_echo "yes" >&6; }
24542  else
24543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24544$as_echo "no" >&6; }
24545  fi
24546
24547
24548
24549
24550# Check if pkg-config is available.
24551
24552
24553if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24554	if test -n "$ac_tool_prefix"; then
24555  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24556set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24558$as_echo_n "checking for $ac_word... " >&6; }
24559if ${ac_cv_path_PKG_CONFIG+:} false; then :
24560  $as_echo_n "(cached) " >&6
24561else
24562  case $PKG_CONFIG in
24563  [\\/]* | ?:[\\/]*)
24564  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24565  ;;
24566  *)
24567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24568for as_dir in $PATH
24569do
24570  IFS=$as_save_IFS
24571  test -z "$as_dir" && as_dir=.
24572    for ac_exec_ext in '' $ac_executable_extensions; do
24573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24574    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24576    break 2
24577  fi
24578done
24579  done
24580IFS=$as_save_IFS
24581
24582  ;;
24583esac
24584fi
24585PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24586if test -n "$PKG_CONFIG"; then
24587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24588$as_echo "$PKG_CONFIG" >&6; }
24589else
24590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24591$as_echo "no" >&6; }
24592fi
24593
24594
24595fi
24596if test -z "$ac_cv_path_PKG_CONFIG"; then
24597  ac_pt_PKG_CONFIG=$PKG_CONFIG
24598  # Extract the first word of "pkg-config", so it can be a program name with args.
24599set dummy pkg-config; ac_word=$2
24600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24601$as_echo_n "checking for $ac_word... " >&6; }
24602if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24603  $as_echo_n "(cached) " >&6
24604else
24605  case $ac_pt_PKG_CONFIG in
24606  [\\/]* | ?:[\\/]*)
24607  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24608  ;;
24609  *)
24610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24611for as_dir in $PATH
24612do
24613  IFS=$as_save_IFS
24614  test -z "$as_dir" && as_dir=.
24615    for ac_exec_ext in '' $ac_executable_extensions; do
24616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24617    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24619    break 2
24620  fi
24621done
24622  done
24623IFS=$as_save_IFS
24624
24625  ;;
24626esac
24627fi
24628ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24629if test -n "$ac_pt_PKG_CONFIG"; then
24630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24631$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24632else
24633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24634$as_echo "no" >&6; }
24635fi
24636
24637  if test "x$ac_pt_PKG_CONFIG" = x; then
24638    PKG_CONFIG=""
24639  else
24640    case $cross_compiling:$ac_tool_warned in
24641yes:)
24642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24644ac_tool_warned=yes ;;
24645esac
24646    PKG_CONFIG=$ac_pt_PKG_CONFIG
24647  fi
24648else
24649  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24650fi
24651
24652fi
24653if test -n "$PKG_CONFIG"; then
24654	_pkg_min_version=0.9.0
24655	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24656$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24657	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24658		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24659$as_echo "yes" >&6; }
24660	else
24661		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24662$as_echo "no" >&6; }
24663		PKG_CONFIG=""
24664	fi
24665
24666fi
24667
24668# After basic tools have been setup, we can check build os specific details.
24669
24670  ###############################################################################
24671
24672  # Note that this is the build platform OS version!
24673
24674  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24675  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24676  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24677  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24678
24679
24680
24681
24682
24683# Misc basic settings
24684
24685
24686# Check whether --with-default-make-target was given.
24687if test "${with_default_make_target+set}" = set; then :
24688  withval=$with_default_make_target;
24689fi
24690
24691  if test "x$with_default_make_target" = "x" \
24692      || test "x$with_default_make_target" = "xyes"; then
24693    DEFAULT_MAKE_TARGET="exploded-image"
24694  elif test "x$with_default_make_target" = "xno"; then
24695    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24696  else
24697    DEFAULT_MAKE_TARGET="$with_default_make_target"
24698  fi
24699
24700
24701
24702
24703###############################################################################
24704#
24705# Determine OpenJDK variants, options and version numbers.
24706#
24707###############################################################################
24708
24709# We need build & target for this.
24710
24711  # Should we build a JDK without a graphical UI?
24712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24713$as_echo_n "checking headless only... " >&6; }
24714  # Check whether --enable-headless-only was given.
24715if test "${enable_headless_only+set}" = set; then :
24716  enableval=$enable_headless_only;
24717fi
24718
24719
24720  if test "x$enable_headless_only" = "xyes"; then
24721    ENABLE_HEADLESS_ONLY="true"
24722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24723$as_echo "yes" >&6; }
24724  elif test "x$enable_headless_only" = "xno"; then
24725    ENABLE_HEADLESS_ONLY="false"
24726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24727$as_echo "no" >&6; }
24728  elif test "x$enable_headless_only" = "x"; then
24729    ENABLE_HEADLESS_ONLY="false"
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24731$as_echo "no" >&6; }
24732  else
24733    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24734  fi
24735
24736
24737
24738  # Should we build the complete docs, or just a lightweight version?
24739  # Check whether --enable-full-docs was given.
24740if test "${enable_full_docs+set}" = set; then :
24741  enableval=$enable_full_docs;
24742fi
24743
24744
24745  # Verify dependencies
24746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24747$as_echo_n "checking for graphviz dot... " >&6; }
24748  if test "x$DOT" != "x"; then
24749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24750$as_echo "yes" >&6; }
24751  else
24752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24753$as_echo "no, cannot generate full docs" >&6; }
24754    FULL_DOCS_DEP_MISSING=true
24755  fi
24756
24757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24758$as_echo_n "checking for pandoc... " >&6; }
24759  if test "x$PANDOC" != "x"; then
24760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24761$as_echo "yes" >&6; }
24762  else
24763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24764$as_echo "no, cannot generate full docs" >&6; }
24765    FULL_DOCS_DEP_MISSING=true
24766  fi
24767
24768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24769$as_echo_n "checking full docs... " >&6; }
24770  if test "x$enable_full_docs" = xyes; then
24771    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24773$as_echo "no, missing dependencies" >&6; }
24774
24775  # Print a helpful message on how to acquire the necessary build dependency.
24776  # dot is the help tag: freetype, cups, alsa etc
24777  MISSING_DEPENDENCY=dot
24778
24779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24780    cygwin_help $MISSING_DEPENDENCY
24781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782    msys_help $MISSING_DEPENDENCY
24783  else
24784    PKGHANDLER_COMMAND=
24785
24786    case $PKGHANDLER in
24787      apt-get)
24788        apt_help     $MISSING_DEPENDENCY ;;
24789      yum)
24790        yum_help     $MISSING_DEPENDENCY ;;
24791      brew)
24792        brew_help    $MISSING_DEPENDENCY ;;
24793      port)
24794        port_help    $MISSING_DEPENDENCY ;;
24795      pkgutil)
24796        pkgutil_help $MISSING_DEPENDENCY ;;
24797      pkgadd)
24798        pkgadd_help  $MISSING_DEPENDENCY ;;
24799    esac
24800
24801    if test "x$PKGHANDLER_COMMAND" != x; then
24802      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24803    fi
24804  fi
24805
24806      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24807    else
24808      ENABLE_FULL_DOCS=true
24809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24810$as_echo "yes, forced" >&6; }
24811    fi
24812  elif test "x$enable_full_docs" = xno; then
24813    ENABLE_FULL_DOCS=false
24814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24815$as_echo "no, forced" >&6; }
24816  elif test "x$enable_full_docs" = x; then
24817    # Check for prerequisites
24818    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24819      ENABLE_FULL_DOCS=false
24820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24821$as_echo "no, missing dependencies" >&6; }
24822    else
24823      ENABLE_FULL_DOCS=true
24824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24825$as_echo "yes, dependencies present" >&6; }
24826    fi
24827  else
24828    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24829  fi
24830
24831
24832
24833  # Choose cacerts source file
24834
24835# Check whether --with-cacerts-file was given.
24836if test "${with_cacerts_file+set}" = set; then :
24837  withval=$with_cacerts_file;
24838fi
24839
24840  if test "x$with_cacerts_file" != x; then
24841    CACERTS_FILE=$with_cacerts_file
24842  fi
24843
24844
24845  # Enable or disable unlimited crypto
24846  # Check whether --enable-unlimited-crypto was given.
24847if test "${enable_unlimited_crypto+set}" = set; then :
24848  enableval=$enable_unlimited_crypto;
24849else
24850  enable_unlimited_crypto=yes
24851fi
24852
24853  if test "x$enable_unlimited_crypto" = "xyes"; then
24854    UNLIMITED_CRYPTO=true
24855  else
24856    UNLIMITED_CRYPTO=false
24857  fi
24858
24859
24860  # Should we build the serviceability agent (SA)?
24861  INCLUDE_SA=true
24862  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24863    INCLUDE_SA=false
24864  fi
24865  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24866    INCLUDE_SA=false
24867  fi
24868
24869
24870  # Compress jars
24871  COMPRESS_JARS=false
24872
24873
24874
24875  # Setup default copyright year. Mostly overridden when building close to a new year.
24876
24877# Check whether --with-copyright-year was given.
24878if test "${with_copyright_year+set}" = set; then :
24879  withval=$with_copyright_year;
24880fi
24881
24882  if test "x$with_copyright_year" = xyes; then
24883    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24884  elif test "x$with_copyright_year" != x; then
24885    COPYRIGHT_YEAR="$with_copyright_year"
24886  else
24887    COPYRIGHT_YEAR=`$DATE +'%Y'`
24888  fi
24889
24890
24891
24892  # Check whether --enable-keep-packaged-modules was given.
24893if test "${enable_keep_packaged_modules+set}" = set; then :
24894  enableval=$enable_keep_packaged_modules;
24895fi
24896
24897
24898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24899$as_echo_n "checking if packaged modules are kept... " >&6; }
24900  if test "x$enable_keep_packaged_modules" = "xyes"; then
24901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24902$as_echo "yes" >&6; }
24903    JLINK_KEEP_PACKAGED_MODULES=true
24904  elif test "x$enable_keep_packaged_modules" = "xno"; then
24905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24906$as_echo "no" >&6; }
24907    JLINK_KEEP_PACKAGED_MODULES=false
24908  elif test "x$enable_keep_packaged_modules" = "x"; then
24909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24910$as_echo "yes (default)" >&6; }
24911    JLINK_KEEP_PACKAGED_MODULES=true
24912  else
24913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24914$as_echo "error" >&6; }
24915    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24916  fi
24917
24918
24919
24920
24921  # Warn user that old version arguments are deprecated.
24922
24923
24924# Check whether --with-milestone was given.
24925if test "${with_milestone+set}" = set; then :
24926  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24927$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24928fi
24929
24930
24931
24932
24933# Check whether --with-update-version was given.
24934if test "${with_update_version+set}" = set; then :
24935  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24936$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24937fi
24938
24939
24940
24941
24942# Check whether --with-user-release-suffix was given.
24943if test "${with_user_release_suffix+set}" = set; then :
24944  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
24945$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24946fi
24947
24948
24949
24950
24951# Check whether --with-build-number was given.
24952if test "${with_build_number+set}" = set; then :
24953  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24954$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24955fi
24956
24957
24958
24959  # Source the version numbers file
24960  . $AUTOCONF_DIR/version-numbers
24961
24962  # Some non-version number information is set in that file
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972  # Override version from arguments
24973
24974  # If --with-version-string is set, process it first. It is possible to
24975  # override parts with more specific flags, since these are processed later.
24976
24977# Check whether --with-version-string was given.
24978if test "${with_version_string+set}" = set; then :
24979  withval=$with_version_string;
24980fi
24981
24982  if test "x$with_version_string" = xyes; then
24983    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24984  elif test "x$with_version_string" != x; then
24985    # Additional [] needed to keep m4 from mangling shell constructs.
24986    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24987      VERSION_MAJOR=${BASH_REMATCH[1]}
24988      VERSION_MINOR=${BASH_REMATCH[3]}
24989      VERSION_SECURITY=${BASH_REMATCH[5]}
24990      VERSION_PATCH=${BASH_REMATCH[7]}
24991      VERSION_PRE=${BASH_REMATCH[9]}
24992      version_plus_separator=${BASH_REMATCH[11]}
24993      VERSION_BUILD=${BASH_REMATCH[12]}
24994      VERSION_OPT=${BASH_REMATCH[14]}
24995      # Unspecified numerical fields are interpreted as 0.
24996      if test "x$VERSION_MINOR" = x; then
24997        VERSION_MINOR=0
24998      fi
24999      if test "x$VERSION_SECURITY" = x; then
25000        VERSION_SECURITY=0
25001      fi
25002      if test "x$VERSION_PATCH" = x; then
25003        VERSION_PATCH=0
25004      fi
25005      if test "x$version_plus_separator" != x \
25006          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25007        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25008      fi
25009      # Stop the version part process from setting default values.
25010      # We still allow them to explicitly override though.
25011      NO_DEFAULT_VERSION_PARTS=true
25012    else
25013      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25014    fi
25015  fi
25016
25017
25018# Check whether --with-version-pre was given.
25019if test "${with_version_pre+set}" = set; then :
25020  withval=$with_version_pre; with_version_pre_present=true
25021else
25022  with_version_pre_present=false
25023fi
25024
25025
25026  if test "x$with_version_pre_present" = xtrue; then
25027    if test "x$with_version_pre" = xyes; then
25028      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25029    elif test "x$with_version_pre" = xno; then
25030      # Interpret --without-* as empty string instead of the literal "no"
25031      VERSION_PRE=
25032    else
25033      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25034       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25035      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25037$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25038      fi
25039    fi
25040  else
25041    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25042      # Default is to use "internal" as pre
25043      VERSION_PRE="internal"
25044    fi
25045  fi
25046
25047
25048# Check whether --with-version-opt was given.
25049if test "${with_version_opt+set}" = set; then :
25050  withval=$with_version_opt; with_version_opt_present=true
25051else
25052  with_version_opt_present=false
25053fi
25054
25055
25056  if test "x$with_version_opt_present" = xtrue; then
25057    if test "x$with_version_opt" = xyes; then
25058      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25059    elif test "x$with_version_opt" = xno; then
25060      # Interpret --without-* as empty string instead of the literal "no"
25061      VERSION_OPT=
25062    else
25063      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25064       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25065      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25067$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25068      fi
25069    fi
25070  else
25071    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25072      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25073      # Outer [ ] to quote m4.
25074       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25075      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25076    fi
25077  fi
25078
25079
25080# Check whether --with-version-build was given.
25081if test "${with_version_build+set}" = set; then :
25082  withval=$with_version_build; with_version_build_present=true
25083else
25084  with_version_build_present=false
25085fi
25086
25087
25088  if test "x$with_version_build_present" = xtrue; then
25089    if test "x$with_version_build" = xyes; then
25090      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25091    elif test "x$with_version_build" = xno; then
25092      # Interpret --without-* as empty string instead of the literal "no"
25093      VERSION_BUILD=
25094    elif test "x$with_version_build" = x; then
25095      VERSION_BUILD=
25096    else
25097
25098  # Additional [] needed to keep m4 from mangling shell constructs.
25099  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25100    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25101  fi
25102  # Extract the version number without leading zeros.
25103  cleaned_value=${BASH_REMATCH[1]}
25104  if test "x$cleaned_value" = x; then
25105    # Special case for zero
25106    cleaned_value=${BASH_REMATCH[2]}
25107  fi
25108
25109  if test $cleaned_value -gt 255; then
25110    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25111  fi
25112  if test "x$cleaned_value" != "x$with_version_build"; then
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25114$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25115  fi
25116  VERSION_BUILD=$cleaned_value
25117
25118    fi
25119  else
25120    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25121      # Default is to not have a build number.
25122      VERSION_BUILD=""
25123      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25124      VERSION_BUILD=0
25125    fi
25126  fi
25127
25128
25129# Check whether --with-version-major was given.
25130if test "${with_version_major+set}" = set; then :
25131  withval=$with_version_major; with_version_major_present=true
25132else
25133  with_version_major_present=false
25134fi
25135
25136
25137  if test "x$with_version_major_present" = xtrue; then
25138    if test "x$with_version_major" = xyes; then
25139      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25140    else
25141
25142  # Additional [] needed to keep m4 from mangling shell constructs.
25143  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25144    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25145  fi
25146  # Extract the version number without leading zeros.
25147  cleaned_value=${BASH_REMATCH[1]}
25148  if test "x$cleaned_value" = x; then
25149    # Special case for zero
25150    cleaned_value=${BASH_REMATCH[2]}
25151  fi
25152
25153  if test $cleaned_value -gt 255; then
25154    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25155  fi
25156  if test "x$cleaned_value" != "x$with_version_major"; then
25157    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25158$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25159  fi
25160  VERSION_MAJOR=$cleaned_value
25161
25162    fi
25163  else
25164    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25165      # Default is to get value from version-numbers
25166      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25167    fi
25168  fi
25169
25170
25171# Check whether --with-version-minor was given.
25172if test "${with_version_minor+set}" = set; then :
25173  withval=$with_version_minor; with_version_minor_present=true
25174else
25175  with_version_minor_present=false
25176fi
25177
25178
25179  if test "x$with_version_minor_present" = xtrue; then
25180    if test "x$with_version_minor" = xyes; then
25181      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25182    elif test "x$with_version_minor" = xno; then
25183      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25184      VERSION_MINOR=0
25185    elif test "x$with_version_minor" = x; then
25186      VERSION_MINOR=0
25187    else
25188
25189  # Additional [] needed to keep m4 from mangling shell constructs.
25190  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25191    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25192  fi
25193  # Extract the version number without leading zeros.
25194  cleaned_value=${BASH_REMATCH[1]}
25195  if test "x$cleaned_value" = x; then
25196    # Special case for zero
25197    cleaned_value=${BASH_REMATCH[2]}
25198  fi
25199
25200  if test $cleaned_value -gt 255; then
25201    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25202  fi
25203  if test "x$cleaned_value" != "x$with_version_minor"; then
25204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25205$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25206  fi
25207  VERSION_MINOR=$cleaned_value
25208
25209    fi
25210  else
25211    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25212      # Default is 0, if unspecified
25213      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25214    fi
25215  fi
25216
25217
25218# Check whether --with-version-security was given.
25219if test "${with_version_security+set}" = set; then :
25220  withval=$with_version_security; with_version_security_present=true
25221else
25222  with_version_security_present=false
25223fi
25224
25225
25226  if test "x$with_version_security_present" = xtrue; then
25227    if test "x$with_version_security" = xyes; then
25228      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25229    elif test "x$with_version_security" = xno; then
25230      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25231      VERSION_SECURITY=0
25232    elif test "x$with_version_security" = x; then
25233      VERSION_SECURITY=0
25234    else
25235
25236  # Additional [] needed to keep m4 from mangling shell constructs.
25237  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25238    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25239  fi
25240  # Extract the version number without leading zeros.
25241  cleaned_value=${BASH_REMATCH[1]}
25242  if test "x$cleaned_value" = x; then
25243    # Special case for zero
25244    cleaned_value=${BASH_REMATCH[2]}
25245  fi
25246
25247  if test $cleaned_value -gt 255; then
25248    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25249  fi
25250  if test "x$cleaned_value" != "x$with_version_security"; then
25251    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25252$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25253  fi
25254  VERSION_SECURITY=$cleaned_value
25255
25256    fi
25257  else
25258    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25259      # Default is 0, if unspecified
25260      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25261    fi
25262  fi
25263
25264
25265# Check whether --with-version-patch was given.
25266if test "${with_version_patch+set}" = set; then :
25267  withval=$with_version_patch; with_version_patch_present=true
25268else
25269  with_version_patch_present=false
25270fi
25271
25272
25273  if test "x$with_version_patch_present" = xtrue; then
25274    if test "x$with_version_patch" = xyes; then
25275      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25276    elif test "x$with_version_patch" = xno; then
25277      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25278      VERSION_PATCH=0
25279    elif test "x$with_version_patch" = x; then
25280      VERSION_PATCH=0
25281    else
25282
25283  # Additional [] needed to keep m4 from mangling shell constructs.
25284  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25285    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25286  fi
25287  # Extract the version number without leading zeros.
25288  cleaned_value=${BASH_REMATCH[1]}
25289  if test "x$cleaned_value" = x; then
25290    # Special case for zero
25291    cleaned_value=${BASH_REMATCH[2]}
25292  fi
25293
25294  if test $cleaned_value -gt 255; then
25295    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25296  fi
25297  if test "x$cleaned_value" != "x$with_version_patch"; then
25298    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25299$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25300  fi
25301  VERSION_PATCH=$cleaned_value
25302
25303    fi
25304  else
25305    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25306      # Default is 0, if unspecified
25307      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25308    fi
25309  fi
25310
25311  # Calculate derived version properties
25312
25313  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25314  if test "x$VERSION_PRE" = x; then
25315    VERSION_IS_GA=true
25316  else
25317    VERSION_IS_GA=false
25318  fi
25319
25320  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25321  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25322
25323  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25324  # Strip trailing zeroes from stripped_version_number
25325  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25326  VERSION_NUMBER=$stripped_version_number
25327
25328  # The complete version string, with additional build information
25329  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25330    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25331  else
25332    # If either build or opt is set, we need a + separator
25333    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25334  fi
25335
25336  # The short version string, just VERSION_NUMBER and PRE, if present.
25337  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25338
25339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25340$as_echo_n "checking for version string... " >&6; }
25341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25342$as_echo "$VERSION_STRING" >&6; }
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358###############################################################################
25359#
25360# Setup BootJDK, used to bootstrap the build.
25361#
25362###############################################################################
25363
25364
25365  BOOT_JDK_FOUND=no
25366
25367# Check whether --with-boot-jdk was given.
25368if test "${with_boot_jdk+set}" = set; then :
25369  withval=$with_boot_jdk;
25370fi
25371
25372
25373  # We look for the Boot JDK through various means, going from more certain to
25374  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25375  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25376  # must check if this is indeed valid; otherwise we'll continue looking.
25377
25378  # Test: Is bootjdk explicitly set by command line arguments?
25379
25380  if test "x$BOOT_JDK_FOUND" = xno; then
25381    # Now execute the test
25382
25383  if test "x$with_boot_jdk" != x; then
25384    BOOT_JDK=$with_boot_jdk
25385    BOOT_JDK_FOUND=maybe
25386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25387$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25388  fi
25389
25390
25391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25393      # Do we have a bin/java?
25394      if test ! -x "$BOOT_JDK/bin/java"; then
25395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25397        BOOT_JDK_FOUND=no
25398      else
25399        # Do we have a bin/javac?
25400        if test ! -x "$BOOT_JDK/bin/javac"; then
25401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25405          BOOT_JDK_FOUND=no
25406        else
25407          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25408          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25409
25410          # Extra M4 quote needed to protect [] in grep expression.
25411          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25412          if test "x$FOUND_CORRECT_VERSION" = x; then
25413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25415            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25416$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25417            BOOT_JDK_FOUND=no
25418          else
25419            # We're done! :-)
25420            BOOT_JDK_FOUND=yes
25421
25422  # Only process if variable expands to non-empty
25423
25424  if test "x$BOOT_JDK" != x; then
25425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426
25427  # Input might be given as Windows format, start by converting to
25428  # unix format.
25429  path="$BOOT_JDK"
25430  new_path=`$CYGPATH -u "$path"`
25431
25432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25435  # "foo.exe" is OK but "foo" is an error.
25436  #
25437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25438  # It is also a way to make sure we got the proper file name for the real test later on.
25439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25440  if test "x$test_shortpath" = x; then
25441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25443    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25444  fi
25445
25446  # Call helper function which possibly converts this using DOS-style short mode.
25447  # If so, the updated path is stored in $new_path.
25448
25449  input_path="$new_path"
25450  # Check if we need to convert this using DOS-style short mode. If the path
25451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25452  # take no chances and rewrite it.
25453  # Note: m4 eats our [], so we need to use [ and ] instead.
25454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25455  if test "x$has_forbidden_chars" != x; then
25456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25460      # Going to short mode and back again did indeed matter. Since short mode is
25461      # case insensitive, let's make it lowercase to improve readability.
25462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463      # Now convert it back to Unix-style (cygpath)
25464      input_path=`$CYGPATH -u "$shortmode_path"`
25465      new_path="$input_path"
25466    fi
25467  fi
25468
25469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25470  if test "x$test_cygdrive_prefix" = x; then
25471    # As a simple fix, exclude /usr/bin since it's not a real path.
25472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25474      # a path prefixed by /cygdrive for fixpath to work.
25475      new_path="$CYGWIN_ROOT_PATH$input_path"
25476    fi
25477  fi
25478
25479
25480  if test "x$path" != "x$new_path"; then
25481    BOOT_JDK="$new_path"
25482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25484  fi
25485
25486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487
25488  path="$BOOT_JDK"
25489  has_colon=`$ECHO $path | $GREP ^.:`
25490  new_path="$path"
25491  if test "x$has_colon" = x; then
25492    # Not in mixed or Windows style, start by that.
25493    new_path=`cmd //c echo $path`
25494  fi
25495
25496
25497  input_path="$new_path"
25498  # Check if we need to convert this using DOS-style short mode. If the path
25499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25500  # take no chances and rewrite it.
25501  # Note: m4 eats our [], so we need to use [ and ] instead.
25502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25503  if test "x$has_forbidden_chars" != x; then
25504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25506  fi
25507
25508
25509  windows_path="$new_path"
25510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511    unix_path=`$CYGPATH -u "$windows_path"`
25512    new_path="$unix_path"
25513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25515    new_path="$unix_path"
25516  fi
25517
25518  if test "x$path" != "x$new_path"; then
25519    BOOT_JDK="$new_path"
25520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25522  fi
25523
25524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25526
25527    else
25528      # We're on a unix platform. Hooray! :)
25529      path="$BOOT_JDK"
25530      has_space=`$ECHO "$path" | $GREP " "`
25531      if test "x$has_space" != x; then
25532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25535      fi
25536
25537      # Use eval to expand a potential ~
25538      eval path="$path"
25539      if test ! -f "$path" && test ! -d "$path"; then
25540        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25541      fi
25542
25543      if test -d "$path"; then
25544        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25545      else
25546        dir="`$DIRNAME "$path"`"
25547        base="`$BASENAME "$path"`"
25548        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25549      fi
25550    fi
25551  fi
25552
25553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25554$as_echo_n "checking for Boot JDK... " >&6; }
25555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25556$as_echo "$BOOT_JDK" >&6; }
25557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25558$as_echo_n "checking Boot JDK version... " >&6; }
25559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25561$as_echo "$BOOT_JDK_VERSION" >&6; }
25562          fi # end check jdk version
25563        fi # end check javac
25564      fi # end check java
25565    fi # end check boot jdk found
25566  fi
25567
25568  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25569    # Having specified an argument which is incorrect will produce an instant failure;
25570    # we should not go on looking
25571    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25572  fi
25573
25574  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25575
25576  if test "x$BOOT_JDK_FOUND" = xno; then
25577    # Now execute the test
25578
25579  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25580    # First check at user selected default
25581
25582  if test "x$BOOT_JDK_FOUND" = xno; then
25583    # Now execute the test
25584
25585  if test -x /usr/libexec/java_home; then
25586    BOOT_JDK=`/usr/libexec/java_home `
25587    BOOT_JDK_FOUND=maybe
25588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25589$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25590  fi
25591
25592
25593    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25594    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25595      # Do we have a bin/java?
25596      if test ! -x "$BOOT_JDK/bin/java"; then
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25599        BOOT_JDK_FOUND=no
25600      else
25601        # Do we have a bin/javac?
25602        if test ! -x "$BOOT_JDK/bin/javac"; then
25603          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25605          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25606$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25607          BOOT_JDK_FOUND=no
25608        else
25609          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25610          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25611
25612          # Extra M4 quote needed to protect [] in grep expression.
25613          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25614          if test "x$FOUND_CORRECT_VERSION" = x; then
25615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25618$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25619            BOOT_JDK_FOUND=no
25620          else
25621            # We're done! :-)
25622            BOOT_JDK_FOUND=yes
25623
25624  # Only process if variable expands to non-empty
25625
25626  if test "x$BOOT_JDK" != x; then
25627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25628
25629  # Input might be given as Windows format, start by converting to
25630  # unix format.
25631  path="$BOOT_JDK"
25632  new_path=`$CYGPATH -u "$path"`
25633
25634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25637  # "foo.exe" is OK but "foo" is an error.
25638  #
25639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25640  # It is also a way to make sure we got the proper file name for the real test later on.
25641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25642  if test "x$test_shortpath" = x; then
25643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25646  fi
25647
25648  # Call helper function which possibly converts this using DOS-style short mode.
25649  # If so, the updated path is stored in $new_path.
25650
25651  input_path="$new_path"
25652  # Check if we need to convert this using DOS-style short mode. If the path
25653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25654  # take no chances and rewrite it.
25655  # Note: m4 eats our [], so we need to use [ and ] instead.
25656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25657  if test "x$has_forbidden_chars" != x; then
25658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25662      # Going to short mode and back again did indeed matter. Since short mode is
25663      # case insensitive, let's make it lowercase to improve readability.
25664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25665      # Now convert it back to Unix-style (cygpath)
25666      input_path=`$CYGPATH -u "$shortmode_path"`
25667      new_path="$input_path"
25668    fi
25669  fi
25670
25671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25672  if test "x$test_cygdrive_prefix" = x; then
25673    # As a simple fix, exclude /usr/bin since it's not a real path.
25674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25676      # a path prefixed by /cygdrive for fixpath to work.
25677      new_path="$CYGWIN_ROOT_PATH$input_path"
25678    fi
25679  fi
25680
25681
25682  if test "x$path" != "x$new_path"; then
25683    BOOT_JDK="$new_path"
25684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25686  fi
25687
25688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689
25690  path="$BOOT_JDK"
25691  has_colon=`$ECHO $path | $GREP ^.:`
25692  new_path="$path"
25693  if test "x$has_colon" = x; then
25694    # Not in mixed or Windows style, start by that.
25695    new_path=`cmd //c echo $path`
25696  fi
25697
25698
25699  input_path="$new_path"
25700  # Check if we need to convert this using DOS-style short mode. If the path
25701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25702  # take no chances and rewrite it.
25703  # Note: m4 eats our [], so we need to use [ and ] instead.
25704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25705  if test "x$has_forbidden_chars" != x; then
25706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25708  fi
25709
25710
25711  windows_path="$new_path"
25712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25713    unix_path=`$CYGPATH -u "$windows_path"`
25714    new_path="$unix_path"
25715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25717    new_path="$unix_path"
25718  fi
25719
25720  if test "x$path" != "x$new_path"; then
25721    BOOT_JDK="$new_path"
25722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25724  fi
25725
25726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25728
25729    else
25730      # We're on a unix platform. Hooray! :)
25731      path="$BOOT_JDK"
25732      has_space=`$ECHO "$path" | $GREP " "`
25733      if test "x$has_space" != x; then
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25736        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25737      fi
25738
25739      # Use eval to expand a potential ~
25740      eval path="$path"
25741      if test ! -f "$path" && test ! -d "$path"; then
25742        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25743      fi
25744
25745      if test -d "$path"; then
25746        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25747      else
25748        dir="`$DIRNAME "$path"`"
25749        base="`$BASENAME "$path"`"
25750        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25751      fi
25752    fi
25753  fi
25754
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25756$as_echo_n "checking for Boot JDK... " >&6; }
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25758$as_echo "$BOOT_JDK" >&6; }
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25760$as_echo_n "checking Boot JDK version... " >&6; }
25761            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25763$as_echo "$BOOT_JDK_VERSION" >&6; }
25764          fi # end check jdk version
25765        fi # end check javac
25766      fi # end check java
25767    fi # end check boot jdk found
25768  fi
25769
25770    # If that did not work out (e.g. too old), try explicit versions instead
25771
25772  if test "x$BOOT_JDK_FOUND" = xno; then
25773    # Now execute the test
25774
25775  if test -x /usr/libexec/java_home; then
25776    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25777    BOOT_JDK_FOUND=maybe
25778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25779$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25780  fi
25781
25782
25783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25785      # Do we have a bin/java?
25786      if test ! -x "$BOOT_JDK/bin/java"; then
25787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25789        BOOT_JDK_FOUND=no
25790      else
25791        # Do we have a bin/javac?
25792        if test ! -x "$BOOT_JDK/bin/javac"; then
25793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25797          BOOT_JDK_FOUND=no
25798        else
25799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25801
25802          # Extra M4 quote needed to protect [] in grep expression.
25803          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25804          if test "x$FOUND_CORRECT_VERSION" = x; then
25805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25809            BOOT_JDK_FOUND=no
25810          else
25811            # We're done! :-)
25812            BOOT_JDK_FOUND=yes
25813
25814  # Only process if variable expands to non-empty
25815
25816  if test "x$BOOT_JDK" != x; then
25817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25818
25819  # Input might be given as Windows format, start by converting to
25820  # unix format.
25821  path="$BOOT_JDK"
25822  new_path=`$CYGPATH -u "$path"`
25823
25824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25827  # "foo.exe" is OK but "foo" is an error.
25828  #
25829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25830  # It is also a way to make sure we got the proper file name for the real test later on.
25831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25832  if test "x$test_shortpath" = x; then
25833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25836  fi
25837
25838  # Call helper function which possibly converts this using DOS-style short mode.
25839  # If so, the updated path is stored in $new_path.
25840
25841  input_path="$new_path"
25842  # Check if we need to convert this using DOS-style short mode. If the path
25843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25844  # take no chances and rewrite it.
25845  # Note: m4 eats our [], so we need to use [ and ] instead.
25846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25847  if test "x$has_forbidden_chars" != x; then
25848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25852      # Going to short mode and back again did indeed matter. Since short mode is
25853      # case insensitive, let's make it lowercase to improve readability.
25854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25855      # Now convert it back to Unix-style (cygpath)
25856      input_path=`$CYGPATH -u "$shortmode_path"`
25857      new_path="$input_path"
25858    fi
25859  fi
25860
25861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25862  if test "x$test_cygdrive_prefix" = x; then
25863    # As a simple fix, exclude /usr/bin since it's not a real path.
25864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25866      # a path prefixed by /cygdrive for fixpath to work.
25867      new_path="$CYGWIN_ROOT_PATH$input_path"
25868    fi
25869  fi
25870
25871
25872  if test "x$path" != "x$new_path"; then
25873    BOOT_JDK="$new_path"
25874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25876  fi
25877
25878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25879
25880  path="$BOOT_JDK"
25881  has_colon=`$ECHO $path | $GREP ^.:`
25882  new_path="$path"
25883  if test "x$has_colon" = x; then
25884    # Not in mixed or Windows style, start by that.
25885    new_path=`cmd //c echo $path`
25886  fi
25887
25888
25889  input_path="$new_path"
25890  # Check if we need to convert this using DOS-style short mode. If the path
25891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25892  # take no chances and rewrite it.
25893  # Note: m4 eats our [], so we need to use [ and ] instead.
25894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25895  if test "x$has_forbidden_chars" != x; then
25896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25898  fi
25899
25900
25901  windows_path="$new_path"
25902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25903    unix_path=`$CYGPATH -u "$windows_path"`
25904    new_path="$unix_path"
25905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25907    new_path="$unix_path"
25908  fi
25909
25910  if test "x$path" != "x$new_path"; then
25911    BOOT_JDK="$new_path"
25912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25914  fi
25915
25916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25918
25919    else
25920      # We're on a unix platform. Hooray! :)
25921      path="$BOOT_JDK"
25922      has_space=`$ECHO "$path" | $GREP " "`
25923      if test "x$has_space" != x; then
25924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25927      fi
25928
25929      # Use eval to expand a potential ~
25930      eval path="$path"
25931      if test ! -f "$path" && test ! -d "$path"; then
25932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25933      fi
25934
25935      if test -d "$path"; then
25936        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25937      else
25938        dir="`$DIRNAME "$path"`"
25939        base="`$BASENAME "$path"`"
25940        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25941      fi
25942    fi
25943  fi
25944
25945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25946$as_echo_n "checking for Boot JDK... " >&6; }
25947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25948$as_echo "$BOOT_JDK" >&6; }
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25950$as_echo_n "checking Boot JDK version... " >&6; }
25951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25953$as_echo "$BOOT_JDK_VERSION" >&6; }
25954          fi # end check jdk version
25955        fi # end check javac
25956      fi # end check java
25957    fi # end check boot jdk found
25958  fi
25959
25960
25961  if test "x$BOOT_JDK_FOUND" = xno; then
25962    # Now execute the test
25963
25964  if test -x /usr/libexec/java_home; then
25965    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25966    BOOT_JDK_FOUND=maybe
25967    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25968$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25969  fi
25970
25971
25972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25974      # Do we have a bin/java?
25975      if test ! -x "$BOOT_JDK/bin/java"; then
25976        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25978        BOOT_JDK_FOUND=no
25979      else
25980        # Do we have a bin/javac?
25981        if test ! -x "$BOOT_JDK/bin/javac"; then
25982          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25984          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25986          BOOT_JDK_FOUND=no
25987        else
25988          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25989          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25990
25991          # Extra M4 quote needed to protect [] in grep expression.
25992          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25993          if test "x$FOUND_CORRECT_VERSION" = x; then
25994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25996            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25997$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25998            BOOT_JDK_FOUND=no
25999          else
26000            # We're done! :-)
26001            BOOT_JDK_FOUND=yes
26002
26003  # Only process if variable expands to non-empty
26004
26005  if test "x$BOOT_JDK" != x; then
26006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007
26008  # Input might be given as Windows format, start by converting to
26009  # unix format.
26010  path="$BOOT_JDK"
26011  new_path=`$CYGPATH -u "$path"`
26012
26013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26016  # "foo.exe" is OK but "foo" is an error.
26017  #
26018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26019  # It is also a way to make sure we got the proper file name for the real test later on.
26020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26021  if test "x$test_shortpath" = x; then
26022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26025  fi
26026
26027  # Call helper function which possibly converts this using DOS-style short mode.
26028  # If so, the updated path is stored in $new_path.
26029
26030  input_path="$new_path"
26031  # Check if we need to convert this using DOS-style short mode. If the path
26032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26033  # take no chances and rewrite it.
26034  # Note: m4 eats our [], so we need to use [ and ] instead.
26035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26036  if test "x$has_forbidden_chars" != x; then
26037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26041      # Going to short mode and back again did indeed matter. Since short mode is
26042      # case insensitive, let's make it lowercase to improve readability.
26043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26044      # Now convert it back to Unix-style (cygpath)
26045      input_path=`$CYGPATH -u "$shortmode_path"`
26046      new_path="$input_path"
26047    fi
26048  fi
26049
26050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26051  if test "x$test_cygdrive_prefix" = x; then
26052    # As a simple fix, exclude /usr/bin since it's not a real path.
26053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26055      # a path prefixed by /cygdrive for fixpath to work.
26056      new_path="$CYGWIN_ROOT_PATH$input_path"
26057    fi
26058  fi
26059
26060
26061  if test "x$path" != "x$new_path"; then
26062    BOOT_JDK="$new_path"
26063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26065  fi
26066
26067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068
26069  path="$BOOT_JDK"
26070  has_colon=`$ECHO $path | $GREP ^.:`
26071  new_path="$path"
26072  if test "x$has_colon" = x; then
26073    # Not in mixed or Windows style, start by that.
26074    new_path=`cmd //c echo $path`
26075  fi
26076
26077
26078  input_path="$new_path"
26079  # Check if we need to convert this using DOS-style short mode. If the path
26080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26081  # take no chances and rewrite it.
26082  # Note: m4 eats our [], so we need to use [ and ] instead.
26083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26084  if test "x$has_forbidden_chars" != x; then
26085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26087  fi
26088
26089
26090  windows_path="$new_path"
26091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26092    unix_path=`$CYGPATH -u "$windows_path"`
26093    new_path="$unix_path"
26094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26096    new_path="$unix_path"
26097  fi
26098
26099  if test "x$path" != "x$new_path"; then
26100    BOOT_JDK="$new_path"
26101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26103  fi
26104
26105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26107
26108    else
26109      # We're on a unix platform. Hooray! :)
26110      path="$BOOT_JDK"
26111      has_space=`$ECHO "$path" | $GREP " "`
26112      if test "x$has_space" != x; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26116      fi
26117
26118      # Use eval to expand a potential ~
26119      eval path="$path"
26120      if test ! -f "$path" && test ! -d "$path"; then
26121        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26122      fi
26123
26124      if test -d "$path"; then
26125        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26126      else
26127        dir="`$DIRNAME "$path"`"
26128        base="`$BASENAME "$path"`"
26129        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26130      fi
26131    fi
26132  fi
26133
26134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26135$as_echo_n "checking for Boot JDK... " >&6; }
26136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26137$as_echo "$BOOT_JDK" >&6; }
26138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26139$as_echo_n "checking Boot JDK version... " >&6; }
26140            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26142$as_echo "$BOOT_JDK_VERSION" >&6; }
26143          fi # end check jdk version
26144        fi # end check javac
26145      fi # end check java
26146    fi # end check boot jdk found
26147  fi
26148
26149
26150  if test "x$BOOT_JDK_FOUND" = xno; then
26151    # Now execute the test
26152
26153  if test -x /usr/libexec/java_home; then
26154    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26155    BOOT_JDK_FOUND=maybe
26156    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26157$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26158  fi
26159
26160
26161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26163      # Do we have a bin/java?
26164      if test ! -x "$BOOT_JDK/bin/java"; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26167        BOOT_JDK_FOUND=no
26168      else
26169        # Do we have a bin/javac?
26170        if test ! -x "$BOOT_JDK/bin/javac"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26175          BOOT_JDK_FOUND=no
26176        else
26177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26179
26180          # Extra M4 quote needed to protect [] in grep expression.
26181          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26182          if test "x$FOUND_CORRECT_VERSION" = x; then
26183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26187            BOOT_JDK_FOUND=no
26188          else
26189            # We're done! :-)
26190            BOOT_JDK_FOUND=yes
26191
26192  # Only process if variable expands to non-empty
26193
26194  if test "x$BOOT_JDK" != x; then
26195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196
26197  # Input might be given as Windows format, start by converting to
26198  # unix format.
26199  path="$BOOT_JDK"
26200  new_path=`$CYGPATH -u "$path"`
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26214  fi
26215
26216  # Call helper function which possibly converts this using DOS-style short mode.
26217  # If so, the updated path is stored in $new_path.
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26230      # Going to short mode and back again did indeed matter. Since short mode is
26231      # case insensitive, let's make it lowercase to improve readability.
26232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233      # Now convert it back to Unix-style (cygpath)
26234      input_path=`$CYGPATH -u "$shortmode_path"`
26235      new_path="$input_path"
26236    fi
26237  fi
26238
26239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26240  if test "x$test_cygdrive_prefix" = x; then
26241    # As a simple fix, exclude /usr/bin since it's not a real path.
26242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26244      # a path prefixed by /cygdrive for fixpath to work.
26245      new_path="$CYGWIN_ROOT_PATH$input_path"
26246    fi
26247  fi
26248
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257
26258  path="$BOOT_JDK"
26259  has_colon=`$ECHO $path | $GREP ^.:`
26260  new_path="$path"
26261  if test "x$has_colon" = x; then
26262    # Not in mixed or Windows style, start by that.
26263    new_path=`cmd //c echo $path`
26264  fi
26265
26266
26267  input_path="$new_path"
26268  # Check if we need to convert this using DOS-style short mode. If the path
26269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26270  # take no chances and rewrite it.
26271  # Note: m4 eats our [], so we need to use [ and ] instead.
26272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26273  if test "x$has_forbidden_chars" != x; then
26274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26276  fi
26277
26278
26279  windows_path="$new_path"
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281    unix_path=`$CYGPATH -u "$windows_path"`
26282    new_path="$unix_path"
26283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26285    new_path="$unix_path"
26286  fi
26287
26288  if test "x$path" != "x$new_path"; then
26289    BOOT_JDK="$new_path"
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26292  fi
26293
26294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296
26297    else
26298      # We're on a unix platform. Hooray! :)
26299      path="$BOOT_JDK"
26300      has_space=`$ECHO "$path" | $GREP " "`
26301      if test "x$has_space" != x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26305      fi
26306
26307      # Use eval to expand a potential ~
26308      eval path="$path"
26309      if test ! -f "$path" && test ! -d "$path"; then
26310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26311      fi
26312
26313      if test -d "$path"; then
26314        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26315      else
26316        dir="`$DIRNAME "$path"`"
26317        base="`$BASENAME "$path"`"
26318        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26319      fi
26320    fi
26321  fi
26322
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26324$as_echo_n "checking for Boot JDK... " >&6; }
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26326$as_echo "$BOOT_JDK" >&6; }
26327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26328$as_echo_n "checking Boot JDK version... " >&6; }
26329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26331$as_echo "$BOOT_JDK_VERSION" >&6; }
26332          fi # end check jdk version
26333        fi # end check javac
26334      fi # end check java
26335    fi # end check boot jdk found
26336  fi
26337
26338  fi
26339
26340
26341    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26342    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26343      # Do we have a bin/java?
26344      if test ! -x "$BOOT_JDK/bin/java"; then
26345        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26347        BOOT_JDK_FOUND=no
26348      else
26349        # Do we have a bin/javac?
26350        if test ! -x "$BOOT_JDK/bin/javac"; then
26351          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26353          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26354$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26355          BOOT_JDK_FOUND=no
26356        else
26357          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26358          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26359
26360          # Extra M4 quote needed to protect [] in grep expression.
26361          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26362          if test "x$FOUND_CORRECT_VERSION" = x; then
26363            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26365            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26366$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26367            BOOT_JDK_FOUND=no
26368          else
26369            # We're done! :-)
26370            BOOT_JDK_FOUND=yes
26371
26372  # Only process if variable expands to non-empty
26373
26374  if test "x$BOOT_JDK" != x; then
26375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26376
26377  # Input might be given as Windows format, start by converting to
26378  # unix format.
26379  path="$BOOT_JDK"
26380  new_path=`$CYGPATH -u "$path"`
26381
26382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26385  # "foo.exe" is OK but "foo" is an error.
26386  #
26387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26388  # It is also a way to make sure we got the proper file name for the real test later on.
26389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26390  if test "x$test_shortpath" = x; then
26391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26393    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26394  fi
26395
26396  # Call helper function which possibly converts this using DOS-style short mode.
26397  # If so, the updated path is stored in $new_path.
26398
26399  input_path="$new_path"
26400  # Check if we need to convert this using DOS-style short mode. If the path
26401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26402  # take no chances and rewrite it.
26403  # Note: m4 eats our [], so we need to use [ and ] instead.
26404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26405  if test "x$has_forbidden_chars" != x; then
26406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26410      # Going to short mode and back again did indeed matter. Since short mode is
26411      # case insensitive, let's make it lowercase to improve readability.
26412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26413      # Now convert it back to Unix-style (cygpath)
26414      input_path=`$CYGPATH -u "$shortmode_path"`
26415      new_path="$input_path"
26416    fi
26417  fi
26418
26419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26420  if test "x$test_cygdrive_prefix" = x; then
26421    # As a simple fix, exclude /usr/bin since it's not a real path.
26422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26424      # a path prefixed by /cygdrive for fixpath to work.
26425      new_path="$CYGWIN_ROOT_PATH$input_path"
26426    fi
26427  fi
26428
26429
26430  if test "x$path" != "x$new_path"; then
26431    BOOT_JDK="$new_path"
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26434  fi
26435
26436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26437
26438  path="$BOOT_JDK"
26439  has_colon=`$ECHO $path | $GREP ^.:`
26440  new_path="$path"
26441  if test "x$has_colon" = x; then
26442    # Not in mixed or Windows style, start by that.
26443    new_path=`cmd //c echo $path`
26444  fi
26445
26446
26447  input_path="$new_path"
26448  # Check if we need to convert this using DOS-style short mode. If the path
26449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26450  # take no chances and rewrite it.
26451  # Note: m4 eats our [], so we need to use [ and ] instead.
26452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26453  if test "x$has_forbidden_chars" != x; then
26454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26456  fi
26457
26458
26459  windows_path="$new_path"
26460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26461    unix_path=`$CYGPATH -u "$windows_path"`
26462    new_path="$unix_path"
26463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26465    new_path="$unix_path"
26466  fi
26467
26468  if test "x$path" != "x$new_path"; then
26469    BOOT_JDK="$new_path"
26470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26472  fi
26473
26474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26476
26477    else
26478      # We're on a unix platform. Hooray! :)
26479      path="$BOOT_JDK"
26480      has_space=`$ECHO "$path" | $GREP " "`
26481      if test "x$has_space" != x; then
26482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26483$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26485      fi
26486
26487      # Use eval to expand a potential ~
26488      eval path="$path"
26489      if test ! -f "$path" && test ! -d "$path"; then
26490        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26491      fi
26492
26493      if test -d "$path"; then
26494        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26495      else
26496        dir="`$DIRNAME "$path"`"
26497        base="`$BASENAME "$path"`"
26498        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26499      fi
26500    fi
26501  fi
26502
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26504$as_echo_n "checking for Boot JDK... " >&6; }
26505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26506$as_echo "$BOOT_JDK" >&6; }
26507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26508$as_echo_n "checking Boot JDK version... " >&6; }
26509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26511$as_echo "$BOOT_JDK_VERSION" >&6; }
26512          fi # end check jdk version
26513        fi # end check javac
26514      fi # end check java
26515    fi # end check boot jdk found
26516  fi
26517
26518
26519  # Test: Is $JAVA_HOME set?
26520
26521  if test "x$BOOT_JDK_FOUND" = xno; then
26522    # Now execute the test
26523
26524  if test "x$JAVA_HOME" != x; then
26525    JAVA_HOME_PROCESSED="$JAVA_HOME"
26526
26527  # Only process if variable expands to non-empty
26528
26529  if test "x$JAVA_HOME_PROCESSED" != x; then
26530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26531
26532  # Input might be given as Windows format, start by converting to
26533  # unix format.
26534  path="$JAVA_HOME_PROCESSED"
26535  new_path=`$CYGPATH -u "$path"`
26536
26537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26540  # "foo.exe" is OK but "foo" is an error.
26541  #
26542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26543  # It is also a way to make sure we got the proper file name for the real test later on.
26544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26545  if test "x$test_shortpath" = x; then
26546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26547$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26548    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26549  fi
26550
26551  # Call helper function which possibly converts this using DOS-style short mode.
26552  # If so, the updated path is stored in $new_path.
26553
26554  input_path="$new_path"
26555  # Check if we need to convert this using DOS-style short mode. If the path
26556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26557  # take no chances and rewrite it.
26558  # Note: m4 eats our [], so we need to use [ and ] instead.
26559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26560  if test "x$has_forbidden_chars" != x; then
26561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26565      # Going to short mode and back again did indeed matter. Since short mode is
26566      # case insensitive, let's make it lowercase to improve readability.
26567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26568      # Now convert it back to Unix-style (cygpath)
26569      input_path=`$CYGPATH -u "$shortmode_path"`
26570      new_path="$input_path"
26571    fi
26572  fi
26573
26574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26575  if test "x$test_cygdrive_prefix" = x; then
26576    # As a simple fix, exclude /usr/bin since it's not a real path.
26577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26579      # a path prefixed by /cygdrive for fixpath to work.
26580      new_path="$CYGWIN_ROOT_PATH$input_path"
26581    fi
26582  fi
26583
26584
26585  if test "x$path" != "x$new_path"; then
26586    JAVA_HOME_PROCESSED="$new_path"
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26588$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26589  fi
26590
26591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26592
26593  path="$JAVA_HOME_PROCESSED"
26594  has_colon=`$ECHO $path | $GREP ^.:`
26595  new_path="$path"
26596  if test "x$has_colon" = x; then
26597    # Not in mixed or Windows style, start by that.
26598    new_path=`cmd //c echo $path`
26599  fi
26600
26601
26602  input_path="$new_path"
26603  # Check if we need to convert this using DOS-style short mode. If the path
26604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26605  # take no chances and rewrite it.
26606  # Note: m4 eats our [], so we need to use [ and ] instead.
26607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26608  if test "x$has_forbidden_chars" != x; then
26609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26611  fi
26612
26613
26614  windows_path="$new_path"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    new_path="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    new_path="$unix_path"
26621  fi
26622
26623  if test "x$path" != "x$new_path"; then
26624    JAVA_HOME_PROCESSED="$new_path"
26625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26626$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26627  fi
26628
26629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26631
26632    else
26633      # We're on a unix platform. Hooray! :)
26634      path="$JAVA_HOME_PROCESSED"
26635      has_space=`$ECHO "$path" | $GREP " "`
26636      if test "x$has_space" != x; then
26637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26638$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26639        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26640      fi
26641
26642      # Use eval to expand a potential ~
26643      eval path="$path"
26644      if test ! -f "$path" && test ! -d "$path"; then
26645        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26646      fi
26647
26648      if test -d "$path"; then
26649        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26650      else
26651        dir="`$DIRNAME "$path"`"
26652        base="`$BASENAME "$path"`"
26653        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26654      fi
26655    fi
26656  fi
26657
26658    if test ! -d "$JAVA_HOME_PROCESSED"; then
26659      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26660$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26661    else
26662      # Aha, the user has set a JAVA_HOME
26663      # let us use that as the Boot JDK.
26664      BOOT_JDK="$JAVA_HOME_PROCESSED"
26665      BOOT_JDK_FOUND=maybe
26666      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26667$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26668    fi
26669  fi
26670
26671
26672    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26673    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26674      # Do we have a bin/java?
26675      if test ! -x "$BOOT_JDK/bin/java"; then
26676        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26678        BOOT_JDK_FOUND=no
26679      else
26680        # Do we have a bin/javac?
26681        if test ! -x "$BOOT_JDK/bin/javac"; then
26682          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26684          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26685$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26686          BOOT_JDK_FOUND=no
26687        else
26688          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26689          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26690
26691          # Extra M4 quote needed to protect [] in grep expression.
26692          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26693          if test "x$FOUND_CORRECT_VERSION" = x; then
26694            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26696            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26697$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26698            BOOT_JDK_FOUND=no
26699          else
26700            # We're done! :-)
26701            BOOT_JDK_FOUND=yes
26702
26703  # Only process if variable expands to non-empty
26704
26705  if test "x$BOOT_JDK" != x; then
26706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707
26708  # Input might be given as Windows format, start by converting to
26709  # unix format.
26710  path="$BOOT_JDK"
26711  new_path=`$CYGPATH -u "$path"`
26712
26713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26716  # "foo.exe" is OK but "foo" is an error.
26717  #
26718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26719  # It is also a way to make sure we got the proper file name for the real test later on.
26720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26721  if test "x$test_shortpath" = x; then
26722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26725  fi
26726
26727  # Call helper function which possibly converts this using DOS-style short mode.
26728  # If so, the updated path is stored in $new_path.
26729
26730  input_path="$new_path"
26731  # Check if we need to convert this using DOS-style short mode. If the path
26732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26733  # take no chances and rewrite it.
26734  # Note: m4 eats our [], so we need to use [ and ] instead.
26735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26736  if test "x$has_forbidden_chars" != x; then
26737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26741      # Going to short mode and back again did indeed matter. Since short mode is
26742      # case insensitive, let's make it lowercase to improve readability.
26743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26744      # Now convert it back to Unix-style (cygpath)
26745      input_path=`$CYGPATH -u "$shortmode_path"`
26746      new_path="$input_path"
26747    fi
26748  fi
26749
26750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26751  if test "x$test_cygdrive_prefix" = x; then
26752    # As a simple fix, exclude /usr/bin since it's not a real path.
26753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26755      # a path prefixed by /cygdrive for fixpath to work.
26756      new_path="$CYGWIN_ROOT_PATH$input_path"
26757    fi
26758  fi
26759
26760
26761  if test "x$path" != "x$new_path"; then
26762    BOOT_JDK="$new_path"
26763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26765  fi
26766
26767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26768
26769  path="$BOOT_JDK"
26770  has_colon=`$ECHO $path | $GREP ^.:`
26771  new_path="$path"
26772  if test "x$has_colon" = x; then
26773    # Not in mixed or Windows style, start by that.
26774    new_path=`cmd //c echo $path`
26775  fi
26776
26777
26778  input_path="$new_path"
26779  # Check if we need to convert this using DOS-style short mode. If the path
26780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26781  # take no chances and rewrite it.
26782  # Note: m4 eats our [], so we need to use [ and ] instead.
26783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26784  if test "x$has_forbidden_chars" != x; then
26785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26787  fi
26788
26789
26790  windows_path="$new_path"
26791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26792    unix_path=`$CYGPATH -u "$windows_path"`
26793    new_path="$unix_path"
26794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26796    new_path="$unix_path"
26797  fi
26798
26799  if test "x$path" != "x$new_path"; then
26800    BOOT_JDK="$new_path"
26801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26803  fi
26804
26805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26807
26808    else
26809      # We're on a unix platform. Hooray! :)
26810      path="$BOOT_JDK"
26811      has_space=`$ECHO "$path" | $GREP " "`
26812      if test "x$has_space" != x; then
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26816      fi
26817
26818      # Use eval to expand a potential ~
26819      eval path="$path"
26820      if test ! -f "$path" && test ! -d "$path"; then
26821        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26822      fi
26823
26824      if test -d "$path"; then
26825        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26826      else
26827        dir="`$DIRNAME "$path"`"
26828        base="`$BASENAME "$path"`"
26829        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26830      fi
26831    fi
26832  fi
26833
26834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26835$as_echo_n "checking for Boot JDK... " >&6; }
26836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26837$as_echo "$BOOT_JDK" >&6; }
26838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26839$as_echo_n "checking Boot JDK version... " >&6; }
26840            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26842$as_echo "$BOOT_JDK_VERSION" >&6; }
26843          fi # end check jdk version
26844        fi # end check javac
26845      fi # end check java
26846    fi # end check boot jdk found
26847  fi
26848
26849
26850  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26851
26852  if test "x$BOOT_JDK_FOUND" = xno; then
26853    # Now execute the test
26854
26855  # Extract the first word of "javac", so it can be a program name with args.
26856set dummy javac; ac_word=$2
26857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26858$as_echo_n "checking for $ac_word... " >&6; }
26859if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26860  $as_echo_n "(cached) " >&6
26861else
26862  case $JAVAC_CHECK in
26863  [\\/]* | ?:[\\/]*)
26864  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26865  ;;
26866  *)
26867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26868for as_dir in $PATH
26869do
26870  IFS=$as_save_IFS
26871  test -z "$as_dir" && as_dir=.
26872    for ac_exec_ext in '' $ac_executable_extensions; do
26873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26874    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26876    break 2
26877  fi
26878done
26879  done
26880IFS=$as_save_IFS
26881
26882  ;;
26883esac
26884fi
26885JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26886if test -n "$JAVAC_CHECK"; then
26887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26888$as_echo "$JAVAC_CHECK" >&6; }
26889else
26890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26891$as_echo "no" >&6; }
26892fi
26893
26894
26895  # Extract the first word of "java", so it can be a program name with args.
26896set dummy java; ac_word=$2
26897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26898$as_echo_n "checking for $ac_word... " >&6; }
26899if ${ac_cv_path_JAVA_CHECK+:} false; then :
26900  $as_echo_n "(cached) " >&6
26901else
26902  case $JAVA_CHECK in
26903  [\\/]* | ?:[\\/]*)
26904  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26905  ;;
26906  *)
26907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26908for as_dir in $PATH
26909do
26910  IFS=$as_save_IFS
26911  test -z "$as_dir" && as_dir=.
26912    for ac_exec_ext in '' $ac_executable_extensions; do
26913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26914    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26916    break 2
26917  fi
26918done
26919  done
26920IFS=$as_save_IFS
26921
26922  ;;
26923esac
26924fi
26925JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26926if test -n "$JAVA_CHECK"; then
26927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26928$as_echo "$JAVA_CHECK" >&6; }
26929else
26930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26931$as_echo "no" >&6; }
26932fi
26933
26934
26935  BINARY="$JAVAC_CHECK"
26936  if test "x$JAVAC_CHECK" = x; then
26937    BINARY="$JAVA_CHECK"
26938  fi
26939  if test "x$BINARY" != x; then
26940    # So there is a java(c) binary, it might be part of a JDK.
26941    # Lets find the JDK/JRE directory by following symbolic links.
26942    # Linux/GNU systems often have links from /usr/bin/java to
26943    # /etc/alternatives/java to the real JDK binary.
26944
26945  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26946    # Follow a chain of symbolic links. Use readlink
26947    # where it exists, else fall back to horribly
26948    # complicated shell code.
26949    if test "x$READLINK_TESTED" != yes; then
26950      # On MacOSX there is a readlink tool with a different
26951      # purpose than the GNU readlink tool. Check the found readlink.
26952      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26953      if test "x$ISGNU" = x; then
26954        # A readlink that we do not know how to use.
26955        # Are there other non-GNU readlinks out there?
26956        READLINK_TESTED=yes
26957        READLINK=
26958      fi
26959    fi
26960
26961    if test "x$READLINK" != x; then
26962      BINARY=`$READLINK -f $BINARY`
26963    else
26964      # Save the current directory for restoring afterwards
26965      STARTDIR=$PWD
26966      COUNTER=0
26967      sym_link_dir=`$DIRNAME $BINARY`
26968      sym_link_file=`$BASENAME $BINARY`
26969      cd $sym_link_dir
26970      # Use -P flag to resolve symlinks in directories.
26971      cd `$THEPWDCMD -P`
26972      sym_link_dir=`$THEPWDCMD -P`
26973      # Resolve file symlinks
26974      while test $COUNTER -lt 20; do
26975        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26976        if test "x$ISLINK" == x; then
26977          # This is not a symbolic link! We are done!
26978          break
26979        fi
26980        # Again resolve directory symlinks since the target of the just found
26981        # link could be in a different directory
26982        cd `$DIRNAME $ISLINK`
26983        sym_link_dir=`$THEPWDCMD -P`
26984        sym_link_file=`$BASENAME $ISLINK`
26985        let COUNTER=COUNTER+1
26986      done
26987      cd $STARTDIR
26988      BINARY=$sym_link_dir/$sym_link_file
26989    fi
26990  fi
26991
26992    BOOT_JDK=`dirname "$BINARY"`
26993    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26994    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26995      # Looks like we found ourselves an JDK
26996      BOOT_JDK_FOUND=maybe
26997      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26998$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26999    fi
27000  fi
27001
27002
27003    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27004    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27005      # Do we have a bin/java?
27006      if test ! -x "$BOOT_JDK/bin/java"; then
27007        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27009        BOOT_JDK_FOUND=no
27010      else
27011        # Do we have a bin/javac?
27012        if test ! -x "$BOOT_JDK/bin/javac"; then
27013          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27015          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27016$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27017          BOOT_JDK_FOUND=no
27018        else
27019          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27020          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27021
27022          # Extra M4 quote needed to protect [] in grep expression.
27023          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27024          if test "x$FOUND_CORRECT_VERSION" = x; then
27025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27027            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27028$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27029            BOOT_JDK_FOUND=no
27030          else
27031            # We're done! :-)
27032            BOOT_JDK_FOUND=yes
27033
27034  # Only process if variable expands to non-empty
27035
27036  if test "x$BOOT_JDK" != x; then
27037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27038
27039  # Input might be given as Windows format, start by converting to
27040  # unix format.
27041  path="$BOOT_JDK"
27042  new_path=`$CYGPATH -u "$path"`
27043
27044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27047  # "foo.exe" is OK but "foo" is an error.
27048  #
27049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27050  # It is also a way to make sure we got the proper file name for the real test later on.
27051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27052  if test "x$test_shortpath" = x; then
27053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27056  fi
27057
27058  # Call helper function which possibly converts this using DOS-style short mode.
27059  # If so, the updated path is stored in $new_path.
27060
27061  input_path="$new_path"
27062  # Check if we need to convert this using DOS-style short mode. If the path
27063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27064  # take no chances and rewrite it.
27065  # Note: m4 eats our [], so we need to use [ and ] instead.
27066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27067  if test "x$has_forbidden_chars" != x; then
27068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27072      # Going to short mode and back again did indeed matter. Since short mode is
27073      # case insensitive, let's make it lowercase to improve readability.
27074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27075      # Now convert it back to Unix-style (cygpath)
27076      input_path=`$CYGPATH -u "$shortmode_path"`
27077      new_path="$input_path"
27078    fi
27079  fi
27080
27081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27082  if test "x$test_cygdrive_prefix" = x; then
27083    # As a simple fix, exclude /usr/bin since it's not a real path.
27084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27086      # a path prefixed by /cygdrive for fixpath to work.
27087      new_path="$CYGWIN_ROOT_PATH$input_path"
27088    fi
27089  fi
27090
27091
27092  if test "x$path" != "x$new_path"; then
27093    BOOT_JDK="$new_path"
27094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27096  fi
27097
27098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099
27100  path="$BOOT_JDK"
27101  has_colon=`$ECHO $path | $GREP ^.:`
27102  new_path="$path"
27103  if test "x$has_colon" = x; then
27104    # Not in mixed or Windows style, start by that.
27105    new_path=`cmd //c echo $path`
27106  fi
27107
27108
27109  input_path="$new_path"
27110  # Check if we need to convert this using DOS-style short mode. If the path
27111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27112  # take no chances and rewrite it.
27113  # Note: m4 eats our [], so we need to use [ and ] instead.
27114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27115  if test "x$has_forbidden_chars" != x; then
27116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27118  fi
27119
27120
27121  windows_path="$new_path"
27122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27123    unix_path=`$CYGPATH -u "$windows_path"`
27124    new_path="$unix_path"
27125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27127    new_path="$unix_path"
27128  fi
27129
27130  if test "x$path" != "x$new_path"; then
27131    BOOT_JDK="$new_path"
27132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27134  fi
27135
27136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27138
27139    else
27140      # We're on a unix platform. Hooray! :)
27141      path="$BOOT_JDK"
27142      has_space=`$ECHO "$path" | $GREP " "`
27143      if test "x$has_space" != x; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27147      fi
27148
27149      # Use eval to expand a potential ~
27150      eval path="$path"
27151      if test ! -f "$path" && test ! -d "$path"; then
27152        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27153      fi
27154
27155      if test -d "$path"; then
27156        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27157      else
27158        dir="`$DIRNAME "$path"`"
27159        base="`$BASENAME "$path"`"
27160        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27161      fi
27162    fi
27163  fi
27164
27165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27166$as_echo_n "checking for Boot JDK... " >&6; }
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27168$as_echo "$BOOT_JDK" >&6; }
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27170$as_echo_n "checking Boot JDK version... " >&6; }
27171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27173$as_echo "$BOOT_JDK_VERSION" >&6; }
27174          fi # end check jdk version
27175        fi # end check javac
27176      fi # end check java
27177    fi # end check boot jdk found
27178  fi
27179
27180
27181  # Test: Is there a JDK installed in default, well-known locations?
27182
27183  if test "x$BOOT_JDK_FOUND" = xno; then
27184    # Now execute the test
27185
27186  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27187
27188  if test "x$BOOT_JDK_FOUND" = xno; then
27189    # Now execute the test
27190
27191  if test "x$ProgramW6432" != x; then
27192    VIRTUAL_DIR="$ProgramW6432/Java"
27193
27194  windows_path="$VIRTUAL_DIR"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    VIRTUAL_DIR="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    VIRTUAL_DIR="$unix_path"
27201  fi
27202
27203
27204  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27205  BOOT_JDK_SUFFIX=""
27206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27207  if test "x$ALL_JDKS_FOUND" != x; then
27208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27209
27210  if test "x$BOOT_JDK_FOUND" = xno; then
27211    # Now execute the test
27212
27213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27214        if test -d "$BOOT_JDK"; then
27215          BOOT_JDK_FOUND=maybe
27216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27218        fi
27219
27220
27221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27223      # Do we have a bin/java?
27224      if test ! -x "$BOOT_JDK/bin/java"; then
27225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27227        BOOT_JDK_FOUND=no
27228      else
27229        # Do we have a bin/javac?
27230        if test ! -x "$BOOT_JDK/bin/javac"; then
27231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27235          BOOT_JDK_FOUND=no
27236        else
27237          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27238          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27239
27240          # Extra M4 quote needed to protect [] in grep expression.
27241          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27242          if test "x$FOUND_CORRECT_VERSION" = x; then
27243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27245            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27246$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27247            BOOT_JDK_FOUND=no
27248          else
27249            # We're done! :-)
27250            BOOT_JDK_FOUND=yes
27251
27252  # Only process if variable expands to non-empty
27253
27254  if test "x$BOOT_JDK" != x; then
27255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27256
27257  # Input might be given as Windows format, start by converting to
27258  # unix format.
27259  path="$BOOT_JDK"
27260  new_path=`$CYGPATH -u "$path"`
27261
27262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27265  # "foo.exe" is OK but "foo" is an error.
27266  #
27267  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27268  # It is also a way to make sure we got the proper file name for the real test later on.
27269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27270  if test "x$test_shortpath" = x; then
27271    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27273    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27274  fi
27275
27276  # Call helper function which possibly converts this using DOS-style short mode.
27277  # If so, the updated path is stored in $new_path.
27278
27279  input_path="$new_path"
27280  # Check if we need to convert this using DOS-style short mode. If the path
27281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27282  # take no chances and rewrite it.
27283  # Note: m4 eats our [], so we need to use [ and ] instead.
27284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27285  if test "x$has_forbidden_chars" != x; then
27286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27290      # Going to short mode and back again did indeed matter. Since short mode is
27291      # case insensitive, let's make it lowercase to improve readability.
27292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27293      # Now convert it back to Unix-style (cygpath)
27294      input_path=`$CYGPATH -u "$shortmode_path"`
27295      new_path="$input_path"
27296    fi
27297  fi
27298
27299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27300  if test "x$test_cygdrive_prefix" = x; then
27301    # As a simple fix, exclude /usr/bin since it's not a real path.
27302    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27304      # a path prefixed by /cygdrive for fixpath to work.
27305      new_path="$CYGWIN_ROOT_PATH$input_path"
27306    fi
27307  fi
27308
27309
27310  if test "x$path" != "x$new_path"; then
27311    BOOT_JDK="$new_path"
27312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27314  fi
27315
27316    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317
27318  path="$BOOT_JDK"
27319  has_colon=`$ECHO $path | $GREP ^.:`
27320  new_path="$path"
27321  if test "x$has_colon" = x; then
27322    # Not in mixed or Windows style, start by that.
27323    new_path=`cmd //c echo $path`
27324  fi
27325
27326
27327  input_path="$new_path"
27328  # Check if we need to convert this using DOS-style short mode. If the path
27329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27330  # take no chances and rewrite it.
27331  # Note: m4 eats our [], so we need to use [ and ] instead.
27332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27333  if test "x$has_forbidden_chars" != x; then
27334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27336  fi
27337
27338
27339  windows_path="$new_path"
27340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27341    unix_path=`$CYGPATH -u "$windows_path"`
27342    new_path="$unix_path"
27343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27345    new_path="$unix_path"
27346  fi
27347
27348  if test "x$path" != "x$new_path"; then
27349    BOOT_JDK="$new_path"
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27352  fi
27353
27354  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27355  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27356
27357    else
27358      # We're on a unix platform. Hooray! :)
27359      path="$BOOT_JDK"
27360      has_space=`$ECHO "$path" | $GREP " "`
27361      if test "x$has_space" != x; then
27362        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27364        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27365      fi
27366
27367      # Use eval to expand a potential ~
27368      eval path="$path"
27369      if test ! -f "$path" && test ! -d "$path"; then
27370        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27371      fi
27372
27373      if test -d "$path"; then
27374        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27375      else
27376        dir="`$DIRNAME "$path"`"
27377        base="`$BASENAME "$path"`"
27378        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27379      fi
27380    fi
27381  fi
27382
27383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27384$as_echo_n "checking for Boot JDK... " >&6; }
27385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27386$as_echo "$BOOT_JDK" >&6; }
27387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27388$as_echo_n "checking Boot JDK version... " >&6; }
27389            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27391$as_echo "$BOOT_JDK_VERSION" >&6; }
27392          fi # end check jdk version
27393        fi # end check javac
27394      fi # end check java
27395    fi # end check boot jdk found
27396  fi
27397
27398    done
27399  fi
27400
27401  fi
27402
27403
27404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27406      # Do we have a bin/java?
27407      if test ! -x "$BOOT_JDK/bin/java"; then
27408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27410        BOOT_JDK_FOUND=no
27411      else
27412        # Do we have a bin/javac?
27413        if test ! -x "$BOOT_JDK/bin/javac"; then
27414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27418          BOOT_JDK_FOUND=no
27419        else
27420          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27421          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27422
27423          # Extra M4 quote needed to protect [] in grep expression.
27424          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27425          if test "x$FOUND_CORRECT_VERSION" = x; then
27426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27429$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27430            BOOT_JDK_FOUND=no
27431          else
27432            # We're done! :-)
27433            BOOT_JDK_FOUND=yes
27434
27435  # Only process if variable expands to non-empty
27436
27437  if test "x$BOOT_JDK" != x; then
27438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27439
27440  # Input might be given as Windows format, start by converting to
27441  # unix format.
27442  path="$BOOT_JDK"
27443  new_path=`$CYGPATH -u "$path"`
27444
27445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27448  # "foo.exe" is OK but "foo" is an error.
27449  #
27450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27451  # It is also a way to make sure we got the proper file name for the real test later on.
27452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27453  if test "x$test_shortpath" = x; then
27454    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27456    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27457  fi
27458
27459  # Call helper function which possibly converts this using DOS-style short mode.
27460  # If so, the updated path is stored in $new_path.
27461
27462  input_path="$new_path"
27463  # Check if we need to convert this using DOS-style short mode. If the path
27464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27465  # take no chances and rewrite it.
27466  # Note: m4 eats our [], so we need to use [ and ] instead.
27467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27468  if test "x$has_forbidden_chars" != x; then
27469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27473      # Going to short mode and back again did indeed matter. Since short mode is
27474      # case insensitive, let's make it lowercase to improve readability.
27475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27476      # Now convert it back to Unix-style (cygpath)
27477      input_path=`$CYGPATH -u "$shortmode_path"`
27478      new_path="$input_path"
27479    fi
27480  fi
27481
27482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27483  if test "x$test_cygdrive_prefix" = x; then
27484    # As a simple fix, exclude /usr/bin since it's not a real path.
27485    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27487      # a path prefixed by /cygdrive for fixpath to work.
27488      new_path="$CYGWIN_ROOT_PATH$input_path"
27489    fi
27490  fi
27491
27492
27493  if test "x$path" != "x$new_path"; then
27494    BOOT_JDK="$new_path"
27495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27497  fi
27498
27499    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500
27501  path="$BOOT_JDK"
27502  has_colon=`$ECHO $path | $GREP ^.:`
27503  new_path="$path"
27504  if test "x$has_colon" = x; then
27505    # Not in mixed or Windows style, start by that.
27506    new_path=`cmd //c echo $path`
27507  fi
27508
27509
27510  input_path="$new_path"
27511  # Check if we need to convert this using DOS-style short mode. If the path
27512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27513  # take no chances and rewrite it.
27514  # Note: m4 eats our [], so we need to use [ and ] instead.
27515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27516  if test "x$has_forbidden_chars" != x; then
27517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27519  fi
27520
27521
27522  windows_path="$new_path"
27523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27524    unix_path=`$CYGPATH -u "$windows_path"`
27525    new_path="$unix_path"
27526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27528    new_path="$unix_path"
27529  fi
27530
27531  if test "x$path" != "x$new_path"; then
27532    BOOT_JDK="$new_path"
27533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27535  fi
27536
27537  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27538  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27539
27540    else
27541      # We're on a unix platform. Hooray! :)
27542      path="$BOOT_JDK"
27543      has_space=`$ECHO "$path" | $GREP " "`
27544      if test "x$has_space" != x; then
27545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27547        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27548      fi
27549
27550      # Use eval to expand a potential ~
27551      eval path="$path"
27552      if test ! -f "$path" && test ! -d "$path"; then
27553        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27554      fi
27555
27556      if test -d "$path"; then
27557        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27558      else
27559        dir="`$DIRNAME "$path"`"
27560        base="`$BASENAME "$path"`"
27561        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27562      fi
27563    fi
27564  fi
27565
27566            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27567$as_echo_n "checking for Boot JDK... " >&6; }
27568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27569$as_echo "$BOOT_JDK" >&6; }
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27571$as_echo_n "checking Boot JDK version... " >&6; }
27572            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27574$as_echo "$BOOT_JDK_VERSION" >&6; }
27575          fi # end check jdk version
27576        fi # end check javac
27577      fi # end check java
27578    fi # end check boot jdk found
27579  fi
27580
27581
27582  if test "x$BOOT_JDK_FOUND" = xno; then
27583    # Now execute the test
27584
27585  if test "x$PROGRAMW6432" != x; then
27586    VIRTUAL_DIR="$PROGRAMW6432/Java"
27587
27588  windows_path="$VIRTUAL_DIR"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    unix_path=`$CYGPATH -u "$windows_path"`
27591    VIRTUAL_DIR="$unix_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27594    VIRTUAL_DIR="$unix_path"
27595  fi
27596
27597
27598  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27599  BOOT_JDK_SUFFIX=""
27600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27601  if test "x$ALL_JDKS_FOUND" != x; then
27602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27603
27604  if test "x$BOOT_JDK_FOUND" = xno; then
27605    # Now execute the test
27606
27607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27608        if test -d "$BOOT_JDK"; then
27609          BOOT_JDK_FOUND=maybe
27610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27612        fi
27613
27614
27615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27617      # Do we have a bin/java?
27618      if test ! -x "$BOOT_JDK/bin/java"; then
27619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27621        BOOT_JDK_FOUND=no
27622      else
27623        # Do we have a bin/javac?
27624        if test ! -x "$BOOT_JDK/bin/javac"; then
27625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27629          BOOT_JDK_FOUND=no
27630        else
27631          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27632          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27633
27634          # Extra M4 quote needed to protect [] in grep expression.
27635          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27636          if test "x$FOUND_CORRECT_VERSION" = x; then
27637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27639            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27640$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27641            BOOT_JDK_FOUND=no
27642          else
27643            # We're done! :-)
27644            BOOT_JDK_FOUND=yes
27645
27646  # Only process if variable expands to non-empty
27647
27648  if test "x$BOOT_JDK" != x; then
27649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27650
27651  # Input might be given as Windows format, start by converting to
27652  # unix format.
27653  path="$BOOT_JDK"
27654  new_path=`$CYGPATH -u "$path"`
27655
27656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27659  # "foo.exe" is OK but "foo" is an error.
27660  #
27661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27662  # It is also a way to make sure we got the proper file name for the real test later on.
27663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27664  if test "x$test_shortpath" = x; then
27665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27668  fi
27669
27670  # Call helper function which possibly converts this using DOS-style short mode.
27671  # If so, the updated path is stored in $new_path.
27672
27673  input_path="$new_path"
27674  # Check if we need to convert this using DOS-style short mode. If the path
27675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27676  # take no chances and rewrite it.
27677  # Note: m4 eats our [], so we need to use [ and ] instead.
27678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27679  if test "x$has_forbidden_chars" != x; then
27680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27684      # Going to short mode and back again did indeed matter. Since short mode is
27685      # case insensitive, let's make it lowercase to improve readability.
27686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27687      # Now convert it back to Unix-style (cygpath)
27688      input_path=`$CYGPATH -u "$shortmode_path"`
27689      new_path="$input_path"
27690    fi
27691  fi
27692
27693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27694  if test "x$test_cygdrive_prefix" = x; then
27695    # As a simple fix, exclude /usr/bin since it's not a real path.
27696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27698      # a path prefixed by /cygdrive for fixpath to work.
27699      new_path="$CYGWIN_ROOT_PATH$input_path"
27700    fi
27701  fi
27702
27703
27704  if test "x$path" != "x$new_path"; then
27705    BOOT_JDK="$new_path"
27706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27708  fi
27709
27710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711
27712  path="$BOOT_JDK"
27713  has_colon=`$ECHO $path | $GREP ^.:`
27714  new_path="$path"
27715  if test "x$has_colon" = x; then
27716    # Not in mixed or Windows style, start by that.
27717    new_path=`cmd //c echo $path`
27718  fi
27719
27720
27721  input_path="$new_path"
27722  # Check if we need to convert this using DOS-style short mode. If the path
27723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27724  # take no chances and rewrite it.
27725  # Note: m4 eats our [], so we need to use [ and ] instead.
27726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27727  if test "x$has_forbidden_chars" != x; then
27728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27730  fi
27731
27732
27733  windows_path="$new_path"
27734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27735    unix_path=`$CYGPATH -u "$windows_path"`
27736    new_path="$unix_path"
27737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27739    new_path="$unix_path"
27740  fi
27741
27742  if test "x$path" != "x$new_path"; then
27743    BOOT_JDK="$new_path"
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27746  fi
27747
27748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27750
27751    else
27752      # We're on a unix platform. Hooray! :)
27753      path="$BOOT_JDK"
27754      has_space=`$ECHO "$path" | $GREP " "`
27755      if test "x$has_space" != x; then
27756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27759      fi
27760
27761      # Use eval to expand a potential ~
27762      eval path="$path"
27763      if test ! -f "$path" && test ! -d "$path"; then
27764        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27765      fi
27766
27767      if test -d "$path"; then
27768        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27769      else
27770        dir="`$DIRNAME "$path"`"
27771        base="`$BASENAME "$path"`"
27772        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27773      fi
27774    fi
27775  fi
27776
27777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27778$as_echo_n "checking for Boot JDK... " >&6; }
27779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27780$as_echo "$BOOT_JDK" >&6; }
27781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27782$as_echo_n "checking Boot JDK version... " >&6; }
27783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27785$as_echo "$BOOT_JDK_VERSION" >&6; }
27786          fi # end check jdk version
27787        fi # end check javac
27788      fi # end check java
27789    fi # end check boot jdk found
27790  fi
27791
27792    done
27793  fi
27794
27795  fi
27796
27797
27798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27800      # Do we have a bin/java?
27801      if test ! -x "$BOOT_JDK/bin/java"; then
27802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27804        BOOT_JDK_FOUND=no
27805      else
27806        # Do we have a bin/javac?
27807        if test ! -x "$BOOT_JDK/bin/javac"; then
27808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27812          BOOT_JDK_FOUND=no
27813        else
27814          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27815          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27816
27817          # Extra M4 quote needed to protect [] in grep expression.
27818          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27819          if test "x$FOUND_CORRECT_VERSION" = x; then
27820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27822            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27823$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27824            BOOT_JDK_FOUND=no
27825          else
27826            # We're done! :-)
27827            BOOT_JDK_FOUND=yes
27828
27829  # Only process if variable expands to non-empty
27830
27831  if test "x$BOOT_JDK" != x; then
27832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27833
27834  # Input might be given as Windows format, start by converting to
27835  # unix format.
27836  path="$BOOT_JDK"
27837  new_path=`$CYGPATH -u "$path"`
27838
27839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27842  # "foo.exe" is OK but "foo" is an error.
27843  #
27844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27845  # It is also a way to make sure we got the proper file name for the real test later on.
27846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27847  if test "x$test_shortpath" = x; then
27848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27851  fi
27852
27853  # Call helper function which possibly converts this using DOS-style short mode.
27854  # If so, the updated path is stored in $new_path.
27855
27856  input_path="$new_path"
27857  # Check if we need to convert this using DOS-style short mode. If the path
27858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27859  # take no chances and rewrite it.
27860  # Note: m4 eats our [], so we need to use [ and ] instead.
27861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27862  if test "x$has_forbidden_chars" != x; then
27863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27867      # Going to short mode and back again did indeed matter. Since short mode is
27868      # case insensitive, let's make it lowercase to improve readability.
27869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27870      # Now convert it back to Unix-style (cygpath)
27871      input_path=`$CYGPATH -u "$shortmode_path"`
27872      new_path="$input_path"
27873    fi
27874  fi
27875
27876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27877  if test "x$test_cygdrive_prefix" = x; then
27878    # As a simple fix, exclude /usr/bin since it's not a real path.
27879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27881      # a path prefixed by /cygdrive for fixpath to work.
27882      new_path="$CYGWIN_ROOT_PATH$input_path"
27883    fi
27884  fi
27885
27886
27887  if test "x$path" != "x$new_path"; then
27888    BOOT_JDK="$new_path"
27889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27891  fi
27892
27893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27894
27895  path="$BOOT_JDK"
27896  has_colon=`$ECHO $path | $GREP ^.:`
27897  new_path="$path"
27898  if test "x$has_colon" = x; then
27899    # Not in mixed or Windows style, start by that.
27900    new_path=`cmd //c echo $path`
27901  fi
27902
27903
27904  input_path="$new_path"
27905  # Check if we need to convert this using DOS-style short mode. If the path
27906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27907  # take no chances and rewrite it.
27908  # Note: m4 eats our [], so we need to use [ and ] instead.
27909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27910  if test "x$has_forbidden_chars" != x; then
27911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27913  fi
27914
27915
27916  windows_path="$new_path"
27917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27918    unix_path=`$CYGPATH -u "$windows_path"`
27919    new_path="$unix_path"
27920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27922    new_path="$unix_path"
27923  fi
27924
27925  if test "x$path" != "x$new_path"; then
27926    BOOT_JDK="$new_path"
27927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27929  fi
27930
27931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27933
27934    else
27935      # We're on a unix platform. Hooray! :)
27936      path="$BOOT_JDK"
27937      has_space=`$ECHO "$path" | $GREP " "`
27938      if test "x$has_space" != x; then
27939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27942      fi
27943
27944      # Use eval to expand a potential ~
27945      eval path="$path"
27946      if test ! -f "$path" && test ! -d "$path"; then
27947        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27948      fi
27949
27950      if test -d "$path"; then
27951        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27952      else
27953        dir="`$DIRNAME "$path"`"
27954        base="`$BASENAME "$path"`"
27955        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27956      fi
27957    fi
27958  fi
27959
27960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27961$as_echo_n "checking for Boot JDK... " >&6; }
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27963$as_echo "$BOOT_JDK" >&6; }
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27965$as_echo_n "checking Boot JDK version... " >&6; }
27966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27968$as_echo "$BOOT_JDK_VERSION" >&6; }
27969          fi # end check jdk version
27970        fi # end check javac
27971      fi # end check java
27972    fi # end check boot jdk found
27973  fi
27974
27975
27976  if test "x$BOOT_JDK_FOUND" = xno; then
27977    # Now execute the test
27978
27979  if test "x$PROGRAMFILES" != x; then
27980    VIRTUAL_DIR="$PROGRAMFILES/Java"
27981
27982  windows_path="$VIRTUAL_DIR"
27983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27984    unix_path=`$CYGPATH -u "$windows_path"`
27985    VIRTUAL_DIR="$unix_path"
27986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27988    VIRTUAL_DIR="$unix_path"
27989  fi
27990
27991
27992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27993  BOOT_JDK_SUFFIX=""
27994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27995  if test "x$ALL_JDKS_FOUND" != x; then
27996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27997
27998  if test "x$BOOT_JDK_FOUND" = xno; then
27999    # Now execute the test
28000
28001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28002        if test -d "$BOOT_JDK"; then
28003          BOOT_JDK_FOUND=maybe
28004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28006        fi
28007
28008
28009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28011      # Do we have a bin/java?
28012      if test ! -x "$BOOT_JDK/bin/java"; then
28013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28015        BOOT_JDK_FOUND=no
28016      else
28017        # Do we have a bin/javac?
28018        if test ! -x "$BOOT_JDK/bin/javac"; then
28019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28023          BOOT_JDK_FOUND=no
28024        else
28025          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28026          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28027
28028          # Extra M4 quote needed to protect [] in grep expression.
28029          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28030          if test "x$FOUND_CORRECT_VERSION" = x; then
28031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28033            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28034$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28035            BOOT_JDK_FOUND=no
28036          else
28037            # We're done! :-)
28038            BOOT_JDK_FOUND=yes
28039
28040  # Only process if variable expands to non-empty
28041
28042  if test "x$BOOT_JDK" != x; then
28043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28044
28045  # Input might be given as Windows format, start by converting to
28046  # unix format.
28047  path="$BOOT_JDK"
28048  new_path=`$CYGPATH -u "$path"`
28049
28050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28053  # "foo.exe" is OK but "foo" is an error.
28054  #
28055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28056  # It is also a way to make sure we got the proper file name for the real test later on.
28057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28058  if test "x$test_shortpath" = x; then
28059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28062  fi
28063
28064  # Call helper function which possibly converts this using DOS-style short mode.
28065  # If so, the updated path is stored in $new_path.
28066
28067  input_path="$new_path"
28068  # Check if we need to convert this using DOS-style short mode. If the path
28069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28070  # take no chances and rewrite it.
28071  # Note: m4 eats our [], so we need to use [ and ] instead.
28072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28073  if test "x$has_forbidden_chars" != x; then
28074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28078      # Going to short mode and back again did indeed matter. Since short mode is
28079      # case insensitive, let's make it lowercase to improve readability.
28080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28081      # Now convert it back to Unix-style (cygpath)
28082      input_path=`$CYGPATH -u "$shortmode_path"`
28083      new_path="$input_path"
28084    fi
28085  fi
28086
28087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28088  if test "x$test_cygdrive_prefix" = x; then
28089    # As a simple fix, exclude /usr/bin since it's not a real path.
28090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28092      # a path prefixed by /cygdrive for fixpath to work.
28093      new_path="$CYGWIN_ROOT_PATH$input_path"
28094    fi
28095  fi
28096
28097
28098  if test "x$path" != "x$new_path"; then
28099    BOOT_JDK="$new_path"
28100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28102  fi
28103
28104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105
28106  path="$BOOT_JDK"
28107  has_colon=`$ECHO $path | $GREP ^.:`
28108  new_path="$path"
28109  if test "x$has_colon" = x; then
28110    # Not in mixed or Windows style, start by that.
28111    new_path=`cmd //c echo $path`
28112  fi
28113
28114
28115  input_path="$new_path"
28116  # Check if we need to convert this using DOS-style short mode. If the path
28117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28118  # take no chances and rewrite it.
28119  # Note: m4 eats our [], so we need to use [ and ] instead.
28120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28121  if test "x$has_forbidden_chars" != x; then
28122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28124  fi
28125
28126
28127  windows_path="$new_path"
28128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28129    unix_path=`$CYGPATH -u "$windows_path"`
28130    new_path="$unix_path"
28131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28133    new_path="$unix_path"
28134  fi
28135
28136  if test "x$path" != "x$new_path"; then
28137    BOOT_JDK="$new_path"
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28140  fi
28141
28142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28144
28145    else
28146      # We're on a unix platform. Hooray! :)
28147      path="$BOOT_JDK"
28148      has_space=`$ECHO "$path" | $GREP " "`
28149      if test "x$has_space" != x; then
28150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28153      fi
28154
28155      # Use eval to expand a potential ~
28156      eval path="$path"
28157      if test ! -f "$path" && test ! -d "$path"; then
28158        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28159      fi
28160
28161      if test -d "$path"; then
28162        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28163      else
28164        dir="`$DIRNAME "$path"`"
28165        base="`$BASENAME "$path"`"
28166        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28167      fi
28168    fi
28169  fi
28170
28171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28172$as_echo_n "checking for Boot JDK... " >&6; }
28173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28174$as_echo "$BOOT_JDK" >&6; }
28175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28176$as_echo_n "checking Boot JDK version... " >&6; }
28177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28179$as_echo "$BOOT_JDK_VERSION" >&6; }
28180          fi # end check jdk version
28181        fi # end check javac
28182      fi # end check java
28183    fi # end check boot jdk found
28184  fi
28185
28186    done
28187  fi
28188
28189  fi
28190
28191
28192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28194      # Do we have a bin/java?
28195      if test ! -x "$BOOT_JDK/bin/java"; then
28196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28198        BOOT_JDK_FOUND=no
28199      else
28200        # Do we have a bin/javac?
28201        if test ! -x "$BOOT_JDK/bin/javac"; then
28202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28206          BOOT_JDK_FOUND=no
28207        else
28208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28210
28211          # Extra M4 quote needed to protect [] in grep expression.
28212          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28213          if test "x$FOUND_CORRECT_VERSION" = x; then
28214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28218            BOOT_JDK_FOUND=no
28219          else
28220            # We're done! :-)
28221            BOOT_JDK_FOUND=yes
28222
28223  # Only process if variable expands to non-empty
28224
28225  if test "x$BOOT_JDK" != x; then
28226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28227
28228  # Input might be given as Windows format, start by converting to
28229  # unix format.
28230  path="$BOOT_JDK"
28231  new_path=`$CYGPATH -u "$path"`
28232
28233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28236  # "foo.exe" is OK but "foo" is an error.
28237  #
28238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28239  # It is also a way to make sure we got the proper file name for the real test later on.
28240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28241  if test "x$test_shortpath" = x; then
28242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28245  fi
28246
28247  # Call helper function which possibly converts this using DOS-style short mode.
28248  # If so, the updated path is stored in $new_path.
28249
28250  input_path="$new_path"
28251  # Check if we need to convert this using DOS-style short mode. If the path
28252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28253  # take no chances and rewrite it.
28254  # Note: m4 eats our [], so we need to use [ and ] instead.
28255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28256  if test "x$has_forbidden_chars" != x; then
28257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28261      # Going to short mode and back again did indeed matter. Since short mode is
28262      # case insensitive, let's make it lowercase to improve readability.
28263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28264      # Now convert it back to Unix-style (cygpath)
28265      input_path=`$CYGPATH -u "$shortmode_path"`
28266      new_path="$input_path"
28267    fi
28268  fi
28269
28270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28271  if test "x$test_cygdrive_prefix" = x; then
28272    # As a simple fix, exclude /usr/bin since it's not a real path.
28273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28275      # a path prefixed by /cygdrive for fixpath to work.
28276      new_path="$CYGWIN_ROOT_PATH$input_path"
28277    fi
28278  fi
28279
28280
28281  if test "x$path" != "x$new_path"; then
28282    BOOT_JDK="$new_path"
28283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28285  fi
28286
28287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28288
28289  path="$BOOT_JDK"
28290  has_colon=`$ECHO $path | $GREP ^.:`
28291  new_path="$path"
28292  if test "x$has_colon" = x; then
28293    # Not in mixed or Windows style, start by that.
28294    new_path=`cmd //c echo $path`
28295  fi
28296
28297
28298  input_path="$new_path"
28299  # Check if we need to convert this using DOS-style short mode. If the path
28300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28301  # take no chances and rewrite it.
28302  # Note: m4 eats our [], so we need to use [ and ] instead.
28303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28304  if test "x$has_forbidden_chars" != x; then
28305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28307  fi
28308
28309
28310  windows_path="$new_path"
28311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312    unix_path=`$CYGPATH -u "$windows_path"`
28313    new_path="$unix_path"
28314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316    new_path="$unix_path"
28317  fi
28318
28319  if test "x$path" != "x$new_path"; then
28320    BOOT_JDK="$new_path"
28321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28323  fi
28324
28325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28327
28328    else
28329      # We're on a unix platform. Hooray! :)
28330      path="$BOOT_JDK"
28331      has_space=`$ECHO "$path" | $GREP " "`
28332      if test "x$has_space" != x; then
28333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28336      fi
28337
28338      # Use eval to expand a potential ~
28339      eval path="$path"
28340      if test ! -f "$path" && test ! -d "$path"; then
28341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28342      fi
28343
28344      if test -d "$path"; then
28345        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28346      else
28347        dir="`$DIRNAME "$path"`"
28348        base="`$BASENAME "$path"`"
28349        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28350      fi
28351    fi
28352  fi
28353
28354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28355$as_echo_n "checking for Boot JDK... " >&6; }
28356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28357$as_echo "$BOOT_JDK" >&6; }
28358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28359$as_echo_n "checking Boot JDK version... " >&6; }
28360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28362$as_echo "$BOOT_JDK_VERSION" >&6; }
28363          fi # end check jdk version
28364        fi # end check javac
28365      fi # end check java
28366    fi # end check boot jdk found
28367  fi
28368
28369
28370  if test "x$BOOT_JDK_FOUND" = xno; then
28371    # Now execute the test
28372
28373  if test "x$ProgramFiles" != x; then
28374    VIRTUAL_DIR="$ProgramFiles/Java"
28375
28376  windows_path="$VIRTUAL_DIR"
28377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28378    unix_path=`$CYGPATH -u "$windows_path"`
28379    VIRTUAL_DIR="$unix_path"
28380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28382    VIRTUAL_DIR="$unix_path"
28383  fi
28384
28385
28386  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28387  BOOT_JDK_SUFFIX=""
28388  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28389  if test "x$ALL_JDKS_FOUND" != x; then
28390    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28391
28392  if test "x$BOOT_JDK_FOUND" = xno; then
28393    # Now execute the test
28394
28395        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28396        if test -d "$BOOT_JDK"; then
28397          BOOT_JDK_FOUND=maybe
28398          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28399$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28400        fi
28401
28402
28403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28405      # Do we have a bin/java?
28406      if test ! -x "$BOOT_JDK/bin/java"; then
28407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28409        BOOT_JDK_FOUND=no
28410      else
28411        # Do we have a bin/javac?
28412        if test ! -x "$BOOT_JDK/bin/javac"; then
28413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28417          BOOT_JDK_FOUND=no
28418        else
28419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28421
28422          # Extra M4 quote needed to protect [] in grep expression.
28423          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28424          if test "x$FOUND_CORRECT_VERSION" = x; then
28425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28429            BOOT_JDK_FOUND=no
28430          else
28431            # We're done! :-)
28432            BOOT_JDK_FOUND=yes
28433
28434  # Only process if variable expands to non-empty
28435
28436  if test "x$BOOT_JDK" != x; then
28437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28438
28439  # Input might be given as Windows format, start by converting to
28440  # unix format.
28441  path="$BOOT_JDK"
28442  new_path=`$CYGPATH -u "$path"`
28443
28444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28447  # "foo.exe" is OK but "foo" is an error.
28448  #
28449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28450  # It is also a way to make sure we got the proper file name for the real test later on.
28451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28452  if test "x$test_shortpath" = x; then
28453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28456  fi
28457
28458  # Call helper function which possibly converts this using DOS-style short mode.
28459  # If so, the updated path is stored in $new_path.
28460
28461  input_path="$new_path"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28472      # Going to short mode and back again did indeed matter. Since short mode is
28473      # case insensitive, let's make it lowercase to improve readability.
28474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28475      # Now convert it back to Unix-style (cygpath)
28476      input_path=`$CYGPATH -u "$shortmode_path"`
28477      new_path="$input_path"
28478    fi
28479  fi
28480
28481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28482  if test "x$test_cygdrive_prefix" = x; then
28483    # As a simple fix, exclude /usr/bin since it's not a real path.
28484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28486      # a path prefixed by /cygdrive for fixpath to work.
28487      new_path="$CYGWIN_ROOT_PATH$input_path"
28488    fi
28489  fi
28490
28491
28492  if test "x$path" != "x$new_path"; then
28493    BOOT_JDK="$new_path"
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28496  fi
28497
28498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28499
28500  path="$BOOT_JDK"
28501  has_colon=`$ECHO $path | $GREP ^.:`
28502  new_path="$path"
28503  if test "x$has_colon" = x; then
28504    # Not in mixed or Windows style, start by that.
28505    new_path=`cmd //c echo $path`
28506  fi
28507
28508
28509  input_path="$new_path"
28510  # Check if we need to convert this using DOS-style short mode. If the path
28511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28512  # take no chances and rewrite it.
28513  # Note: m4 eats our [], so we need to use [ and ] instead.
28514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28515  if test "x$has_forbidden_chars" != x; then
28516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28518  fi
28519
28520
28521  windows_path="$new_path"
28522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28523    unix_path=`$CYGPATH -u "$windows_path"`
28524    new_path="$unix_path"
28525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28527    new_path="$unix_path"
28528  fi
28529
28530  if test "x$path" != "x$new_path"; then
28531    BOOT_JDK="$new_path"
28532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28534  fi
28535
28536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28538
28539    else
28540      # We're on a unix platform. Hooray! :)
28541      path="$BOOT_JDK"
28542      has_space=`$ECHO "$path" | $GREP " "`
28543      if test "x$has_space" != x; then
28544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28547      fi
28548
28549      # Use eval to expand a potential ~
28550      eval path="$path"
28551      if test ! -f "$path" && test ! -d "$path"; then
28552        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28553      fi
28554
28555      if test -d "$path"; then
28556        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28557      else
28558        dir="`$DIRNAME "$path"`"
28559        base="`$BASENAME "$path"`"
28560        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28561      fi
28562    fi
28563  fi
28564
28565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28566$as_echo_n "checking for Boot JDK... " >&6; }
28567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28568$as_echo "$BOOT_JDK" >&6; }
28569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28570$as_echo_n "checking Boot JDK version... " >&6; }
28571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28573$as_echo "$BOOT_JDK_VERSION" >&6; }
28574          fi # end check jdk version
28575        fi # end check javac
28576      fi # end check java
28577    fi # end check boot jdk found
28578  fi
28579
28580    done
28581  fi
28582
28583  fi
28584
28585
28586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28588      # Do we have a bin/java?
28589      if test ! -x "$BOOT_JDK/bin/java"; then
28590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28592        BOOT_JDK_FOUND=no
28593      else
28594        # Do we have a bin/javac?
28595        if test ! -x "$BOOT_JDK/bin/javac"; then
28596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28600          BOOT_JDK_FOUND=no
28601        else
28602          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28603          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28604
28605          # Extra M4 quote needed to protect [] in grep expression.
28606          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28607          if test "x$FOUND_CORRECT_VERSION" = x; then
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28612            BOOT_JDK_FOUND=no
28613          else
28614            # We're done! :-)
28615            BOOT_JDK_FOUND=yes
28616
28617  # Only process if variable expands to non-empty
28618
28619  if test "x$BOOT_JDK" != x; then
28620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28621
28622  # Input might be given as Windows format, start by converting to
28623  # unix format.
28624  path="$BOOT_JDK"
28625  new_path=`$CYGPATH -u "$path"`
28626
28627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28630  # "foo.exe" is OK but "foo" is an error.
28631  #
28632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28633  # It is also a way to make sure we got the proper file name for the real test later on.
28634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28635  if test "x$test_shortpath" = x; then
28636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28639  fi
28640
28641  # Call helper function which possibly converts this using DOS-style short mode.
28642  # If so, the updated path is stored in $new_path.
28643
28644  input_path="$new_path"
28645  # Check if we need to convert this using DOS-style short mode. If the path
28646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28647  # take no chances and rewrite it.
28648  # Note: m4 eats our [], so we need to use [ and ] instead.
28649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28650  if test "x$has_forbidden_chars" != x; then
28651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28655      # Going to short mode and back again did indeed matter. Since short mode is
28656      # case insensitive, let's make it lowercase to improve readability.
28657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28658      # Now convert it back to Unix-style (cygpath)
28659      input_path=`$CYGPATH -u "$shortmode_path"`
28660      new_path="$input_path"
28661    fi
28662  fi
28663
28664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28665  if test "x$test_cygdrive_prefix" = x; then
28666    # As a simple fix, exclude /usr/bin since it's not a real path.
28667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28669      # a path prefixed by /cygdrive for fixpath to work.
28670      new_path="$CYGWIN_ROOT_PATH$input_path"
28671    fi
28672  fi
28673
28674
28675  if test "x$path" != "x$new_path"; then
28676    BOOT_JDK="$new_path"
28677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28679  fi
28680
28681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28682
28683  path="$BOOT_JDK"
28684  has_colon=`$ECHO $path | $GREP ^.:`
28685  new_path="$path"
28686  if test "x$has_colon" = x; then
28687    # Not in mixed or Windows style, start by that.
28688    new_path=`cmd //c echo $path`
28689  fi
28690
28691
28692  input_path="$new_path"
28693  # Check if we need to convert this using DOS-style short mode. If the path
28694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28695  # take no chances and rewrite it.
28696  # Note: m4 eats our [], so we need to use [ and ] instead.
28697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28698  if test "x$has_forbidden_chars" != x; then
28699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28701  fi
28702
28703
28704  windows_path="$new_path"
28705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28706    unix_path=`$CYGPATH -u "$windows_path"`
28707    new_path="$unix_path"
28708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28710    new_path="$unix_path"
28711  fi
28712
28713  if test "x$path" != "x$new_path"; then
28714    BOOT_JDK="$new_path"
28715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28717  fi
28718
28719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28721
28722    else
28723      # We're on a unix platform. Hooray! :)
28724      path="$BOOT_JDK"
28725      has_space=`$ECHO "$path" | $GREP " "`
28726      if test "x$has_space" != x; then
28727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28730      fi
28731
28732      # Use eval to expand a potential ~
28733      eval path="$path"
28734      if test ! -f "$path" && test ! -d "$path"; then
28735        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28736      fi
28737
28738      if test -d "$path"; then
28739        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28740      else
28741        dir="`$DIRNAME "$path"`"
28742        base="`$BASENAME "$path"`"
28743        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28744      fi
28745    fi
28746  fi
28747
28748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28749$as_echo_n "checking for Boot JDK... " >&6; }
28750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28751$as_echo "$BOOT_JDK" >&6; }
28752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28753$as_echo_n "checking Boot JDK version... " >&6; }
28754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28756$as_echo "$BOOT_JDK_VERSION" >&6; }
28757          fi # end check jdk version
28758        fi # end check javac
28759      fi # end check java
28760    fi # end check boot jdk found
28761  fi
28762
28763
28764  if test "x$BOOT_JDK_FOUND" = xno; then
28765    # Now execute the test
28766
28767  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28768  BOOT_JDK_SUFFIX=""
28769  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28770  if test "x$ALL_JDKS_FOUND" != x; then
28771    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28772
28773  if test "x$BOOT_JDK_FOUND" = xno; then
28774    # Now execute the test
28775
28776        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28777        if test -d "$BOOT_JDK"; then
28778          BOOT_JDK_FOUND=maybe
28779          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28780$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28781        fi
28782
28783
28784    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28785    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28786      # Do we have a bin/java?
28787      if test ! -x "$BOOT_JDK/bin/java"; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28790        BOOT_JDK_FOUND=no
28791      else
28792        # Do we have a bin/javac?
28793        if test ! -x "$BOOT_JDK/bin/javac"; then
28794          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28796          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28797$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28798          BOOT_JDK_FOUND=no
28799        else
28800          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28801          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28802
28803          # Extra M4 quote needed to protect [] in grep expression.
28804          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28805          if test "x$FOUND_CORRECT_VERSION" = x; then
28806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28808            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28810            BOOT_JDK_FOUND=no
28811          else
28812            # We're done! :-)
28813            BOOT_JDK_FOUND=yes
28814
28815  # Only process if variable expands to non-empty
28816
28817  if test "x$BOOT_JDK" != x; then
28818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28819
28820  # Input might be given as Windows format, start by converting to
28821  # unix format.
28822  path="$BOOT_JDK"
28823  new_path=`$CYGPATH -u "$path"`
28824
28825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28828  # "foo.exe" is OK but "foo" is an error.
28829  #
28830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28831  # It is also a way to make sure we got the proper file name for the real test later on.
28832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28833  if test "x$test_shortpath" = x; then
28834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28835$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28836    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28837  fi
28838
28839  # Call helper function which possibly converts this using DOS-style short mode.
28840  # If so, the updated path is stored in $new_path.
28841
28842  input_path="$new_path"
28843  # Check if we need to convert this using DOS-style short mode. If the path
28844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28845  # take no chances and rewrite it.
28846  # Note: m4 eats our [], so we need to use [ and ] instead.
28847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28848  if test "x$has_forbidden_chars" != x; then
28849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28853      # Going to short mode and back again did indeed matter. Since short mode is
28854      # case insensitive, let's make it lowercase to improve readability.
28855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856      # Now convert it back to Unix-style (cygpath)
28857      input_path=`$CYGPATH -u "$shortmode_path"`
28858      new_path="$input_path"
28859    fi
28860  fi
28861
28862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28863  if test "x$test_cygdrive_prefix" = x; then
28864    # As a simple fix, exclude /usr/bin since it's not a real path.
28865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28867      # a path prefixed by /cygdrive for fixpath to work.
28868      new_path="$CYGWIN_ROOT_PATH$input_path"
28869    fi
28870  fi
28871
28872
28873  if test "x$path" != "x$new_path"; then
28874    BOOT_JDK="$new_path"
28875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28876$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28877  fi
28878
28879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28880
28881  path="$BOOT_JDK"
28882  has_colon=`$ECHO $path | $GREP ^.:`
28883  new_path="$path"
28884  if test "x$has_colon" = x; then
28885    # Not in mixed or Windows style, start by that.
28886    new_path=`cmd //c echo $path`
28887  fi
28888
28889
28890  input_path="$new_path"
28891  # Check if we need to convert this using DOS-style short mode. If the path
28892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28893  # take no chances and rewrite it.
28894  # Note: m4 eats our [], so we need to use [ and ] instead.
28895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28896  if test "x$has_forbidden_chars" != x; then
28897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28899  fi
28900
28901
28902  windows_path="$new_path"
28903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28904    unix_path=`$CYGPATH -u "$windows_path"`
28905    new_path="$unix_path"
28906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28908    new_path="$unix_path"
28909  fi
28910
28911  if test "x$path" != "x$new_path"; then
28912    BOOT_JDK="$new_path"
28913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28914$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28915  fi
28916
28917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28919
28920    else
28921      # We're on a unix platform. Hooray! :)
28922      path="$BOOT_JDK"
28923      has_space=`$ECHO "$path" | $GREP " "`
28924      if test "x$has_space" != x; then
28925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28928      fi
28929
28930      # Use eval to expand a potential ~
28931      eval path="$path"
28932      if test ! -f "$path" && test ! -d "$path"; then
28933        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28934      fi
28935
28936      if test -d "$path"; then
28937        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28938      else
28939        dir="`$DIRNAME "$path"`"
28940        base="`$BASENAME "$path"`"
28941        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28942      fi
28943    fi
28944  fi
28945
28946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28947$as_echo_n "checking for Boot JDK... " >&6; }
28948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28949$as_echo "$BOOT_JDK" >&6; }
28950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28951$as_echo_n "checking Boot JDK version... " >&6; }
28952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28954$as_echo "$BOOT_JDK_VERSION" >&6; }
28955          fi # end check jdk version
28956        fi # end check javac
28957      fi # end check java
28958    fi # end check boot jdk found
28959  fi
28960
28961    done
28962  fi
28963
28964
28965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28967      # Do we have a bin/java?
28968      if test ! -x "$BOOT_JDK/bin/java"; then
28969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28971        BOOT_JDK_FOUND=no
28972      else
28973        # Do we have a bin/javac?
28974        if test ! -x "$BOOT_JDK/bin/javac"; then
28975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28979          BOOT_JDK_FOUND=no
28980        else
28981          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28982          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28983
28984          # Extra M4 quote needed to protect [] in grep expression.
28985          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28986          if test "x$FOUND_CORRECT_VERSION" = x; then
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28989            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28990$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28991            BOOT_JDK_FOUND=no
28992          else
28993            # We're done! :-)
28994            BOOT_JDK_FOUND=yes
28995
28996  # Only process if variable expands to non-empty
28997
28998  if test "x$BOOT_JDK" != x; then
28999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29000
29001  # Input might be given as Windows format, start by converting to
29002  # unix format.
29003  path="$BOOT_JDK"
29004  new_path=`$CYGPATH -u "$path"`
29005
29006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29009  # "foo.exe" is OK but "foo" is an error.
29010  #
29011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29012  # It is also a way to make sure we got the proper file name for the real test later on.
29013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29014  if test "x$test_shortpath" = x; then
29015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29018  fi
29019
29020  # Call helper function which possibly converts this using DOS-style short mode.
29021  # If so, the updated path is stored in $new_path.
29022
29023  input_path="$new_path"
29024  # Check if we need to convert this using DOS-style short mode. If the path
29025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29026  # take no chances and rewrite it.
29027  # Note: m4 eats our [], so we need to use [ and ] instead.
29028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29029  if test "x$has_forbidden_chars" != x; then
29030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29034      # Going to short mode and back again did indeed matter. Since short mode is
29035      # case insensitive, let's make it lowercase to improve readability.
29036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29037      # Now convert it back to Unix-style (cygpath)
29038      input_path=`$CYGPATH -u "$shortmode_path"`
29039      new_path="$input_path"
29040    fi
29041  fi
29042
29043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29044  if test "x$test_cygdrive_prefix" = x; then
29045    # As a simple fix, exclude /usr/bin since it's not a real path.
29046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29048      # a path prefixed by /cygdrive for fixpath to work.
29049      new_path="$CYGWIN_ROOT_PATH$input_path"
29050    fi
29051  fi
29052
29053
29054  if test "x$path" != "x$new_path"; then
29055    BOOT_JDK="$new_path"
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29058  fi
29059
29060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29061
29062  path="$BOOT_JDK"
29063  has_colon=`$ECHO $path | $GREP ^.:`
29064  new_path="$path"
29065  if test "x$has_colon" = x; then
29066    # Not in mixed or Windows style, start by that.
29067    new_path=`cmd //c echo $path`
29068  fi
29069
29070
29071  input_path="$new_path"
29072  # Check if we need to convert this using DOS-style short mode. If the path
29073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29074  # take no chances and rewrite it.
29075  # Note: m4 eats our [], so we need to use [ and ] instead.
29076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29077  if test "x$has_forbidden_chars" != x; then
29078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29080  fi
29081
29082
29083  windows_path="$new_path"
29084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29085    unix_path=`$CYGPATH -u "$windows_path"`
29086    new_path="$unix_path"
29087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29089    new_path="$unix_path"
29090  fi
29091
29092  if test "x$path" != "x$new_path"; then
29093    BOOT_JDK="$new_path"
29094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29096  fi
29097
29098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29100
29101    else
29102      # We're on a unix platform. Hooray! :)
29103      path="$BOOT_JDK"
29104      has_space=`$ECHO "$path" | $GREP " "`
29105      if test "x$has_space" != x; then
29106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29109      fi
29110
29111      # Use eval to expand a potential ~
29112      eval path="$path"
29113      if test ! -f "$path" && test ! -d "$path"; then
29114        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29115      fi
29116
29117      if test -d "$path"; then
29118        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29119      else
29120        dir="`$DIRNAME "$path"`"
29121        base="`$BASENAME "$path"`"
29122        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29123      fi
29124    fi
29125  fi
29126
29127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29128$as_echo_n "checking for Boot JDK... " >&6; }
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29130$as_echo "$BOOT_JDK" >&6; }
29131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29132$as_echo_n "checking Boot JDK version... " >&6; }
29133            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29135$as_echo "$BOOT_JDK_VERSION" >&6; }
29136          fi # end check jdk version
29137        fi # end check javac
29138      fi # end check java
29139    fi # end check boot jdk found
29140  fi
29141
29142  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29143
29144  if test "x$BOOT_JDK_FOUND" = xno; then
29145    # Now execute the test
29146
29147  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29148  BOOT_JDK_SUFFIX="/Contents/Home"
29149  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29150  if test "x$ALL_JDKS_FOUND" != x; then
29151    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29152
29153  if test "x$BOOT_JDK_FOUND" = xno; then
29154    # Now execute the test
29155
29156        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29157        if test -d "$BOOT_JDK"; then
29158          BOOT_JDK_FOUND=maybe
29159          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29160$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29161        fi
29162
29163
29164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29166      # Do we have a bin/java?
29167      if test ! -x "$BOOT_JDK/bin/java"; then
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29170        BOOT_JDK_FOUND=no
29171      else
29172        # Do we have a bin/javac?
29173        if test ! -x "$BOOT_JDK/bin/javac"; then
29174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29178          BOOT_JDK_FOUND=no
29179        else
29180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29182
29183          # Extra M4 quote needed to protect [] in grep expression.
29184          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29185          if test "x$FOUND_CORRECT_VERSION" = x; then
29186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29190            BOOT_JDK_FOUND=no
29191          else
29192            # We're done! :-)
29193            BOOT_JDK_FOUND=yes
29194
29195  # Only process if variable expands to non-empty
29196
29197  if test "x$BOOT_JDK" != x; then
29198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29199
29200  # Input might be given as Windows format, start by converting to
29201  # unix format.
29202  path="$BOOT_JDK"
29203  new_path=`$CYGPATH -u "$path"`
29204
29205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29208  # "foo.exe" is OK but "foo" is an error.
29209  #
29210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29211  # It is also a way to make sure we got the proper file name for the real test later on.
29212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29213  if test "x$test_shortpath" = x; then
29214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29217  fi
29218
29219  # Call helper function which possibly converts this using DOS-style short mode.
29220  # If so, the updated path is stored in $new_path.
29221
29222  input_path="$new_path"
29223  # Check if we need to convert this using DOS-style short mode. If the path
29224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29225  # take no chances and rewrite it.
29226  # Note: m4 eats our [], so we need to use [ and ] instead.
29227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29228  if test "x$has_forbidden_chars" != x; then
29229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29233      # Going to short mode and back again did indeed matter. Since short mode is
29234      # case insensitive, let's make it lowercase to improve readability.
29235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29236      # Now convert it back to Unix-style (cygpath)
29237      input_path=`$CYGPATH -u "$shortmode_path"`
29238      new_path="$input_path"
29239    fi
29240  fi
29241
29242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29243  if test "x$test_cygdrive_prefix" = x; then
29244    # As a simple fix, exclude /usr/bin since it's not a real path.
29245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29247      # a path prefixed by /cygdrive for fixpath to work.
29248      new_path="$CYGWIN_ROOT_PATH$input_path"
29249    fi
29250  fi
29251
29252
29253  if test "x$path" != "x$new_path"; then
29254    BOOT_JDK="$new_path"
29255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29257  fi
29258
29259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29260
29261  path="$BOOT_JDK"
29262  has_colon=`$ECHO $path | $GREP ^.:`
29263  new_path="$path"
29264  if test "x$has_colon" = x; then
29265    # Not in mixed or Windows style, start by that.
29266    new_path=`cmd //c echo $path`
29267  fi
29268
29269
29270  input_path="$new_path"
29271  # Check if we need to convert this using DOS-style short mode. If the path
29272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29273  # take no chances and rewrite it.
29274  # Note: m4 eats our [], so we need to use [ and ] instead.
29275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29276  if test "x$has_forbidden_chars" != x; then
29277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29279  fi
29280
29281
29282  windows_path="$new_path"
29283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29284    unix_path=`$CYGPATH -u "$windows_path"`
29285    new_path="$unix_path"
29286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29288    new_path="$unix_path"
29289  fi
29290
29291  if test "x$path" != "x$new_path"; then
29292    BOOT_JDK="$new_path"
29293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29295  fi
29296
29297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29299
29300    else
29301      # We're on a unix platform. Hooray! :)
29302      path="$BOOT_JDK"
29303      has_space=`$ECHO "$path" | $GREP " "`
29304      if test "x$has_space" != x; then
29305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29308      fi
29309
29310      # Use eval to expand a potential ~
29311      eval path="$path"
29312      if test ! -f "$path" && test ! -d "$path"; then
29313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29314      fi
29315
29316      if test -d "$path"; then
29317        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29318      else
29319        dir="`$DIRNAME "$path"`"
29320        base="`$BASENAME "$path"`"
29321        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29322      fi
29323    fi
29324  fi
29325
29326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29327$as_echo_n "checking for Boot JDK... " >&6; }
29328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29329$as_echo "$BOOT_JDK" >&6; }
29330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29331$as_echo_n "checking Boot JDK version... " >&6; }
29332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29334$as_echo "$BOOT_JDK_VERSION" >&6; }
29335          fi # end check jdk version
29336        fi # end check javac
29337      fi # end check java
29338    fi # end check boot jdk found
29339  fi
29340
29341    done
29342  fi
29343
29344
29345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29347      # Do we have a bin/java?
29348      if test ! -x "$BOOT_JDK/bin/java"; then
29349        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29351        BOOT_JDK_FOUND=no
29352      else
29353        # Do we have a bin/javac?
29354        if test ! -x "$BOOT_JDK/bin/javac"; then
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29357          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29359          BOOT_JDK_FOUND=no
29360        else
29361          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29362          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29363
29364          # Extra M4 quote needed to protect [] in grep expression.
29365          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29366          if test "x$FOUND_CORRECT_VERSION" = x; then
29367            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29369            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29370$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29371            BOOT_JDK_FOUND=no
29372          else
29373            # We're done! :-)
29374            BOOT_JDK_FOUND=yes
29375
29376  # Only process if variable expands to non-empty
29377
29378  if test "x$BOOT_JDK" != x; then
29379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29380
29381  # Input might be given as Windows format, start by converting to
29382  # unix format.
29383  path="$BOOT_JDK"
29384  new_path=`$CYGPATH -u "$path"`
29385
29386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29389  # "foo.exe" is OK but "foo" is an error.
29390  #
29391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29392  # It is also a way to make sure we got the proper file name for the real test later on.
29393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29394  if test "x$test_shortpath" = x; then
29395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29397    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29398  fi
29399
29400  # Call helper function which possibly converts this using DOS-style short mode.
29401  # If so, the updated path is stored in $new_path.
29402
29403  input_path="$new_path"
29404  # Check if we need to convert this using DOS-style short mode. If the path
29405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29406  # take no chances and rewrite it.
29407  # Note: m4 eats our [], so we need to use [ and ] instead.
29408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29409  if test "x$has_forbidden_chars" != x; then
29410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29414      # Going to short mode and back again did indeed matter. Since short mode is
29415      # case insensitive, let's make it lowercase to improve readability.
29416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29417      # Now convert it back to Unix-style (cygpath)
29418      input_path=`$CYGPATH -u "$shortmode_path"`
29419      new_path="$input_path"
29420    fi
29421  fi
29422
29423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29424  if test "x$test_cygdrive_prefix" = x; then
29425    # As a simple fix, exclude /usr/bin since it's not a real path.
29426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29428      # a path prefixed by /cygdrive for fixpath to work.
29429      new_path="$CYGWIN_ROOT_PATH$input_path"
29430    fi
29431  fi
29432
29433
29434  if test "x$path" != "x$new_path"; then
29435    BOOT_JDK="$new_path"
29436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29438  fi
29439
29440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29441
29442  path="$BOOT_JDK"
29443  has_colon=`$ECHO $path | $GREP ^.:`
29444  new_path="$path"
29445  if test "x$has_colon" = x; then
29446    # Not in mixed or Windows style, start by that.
29447    new_path=`cmd //c echo $path`
29448  fi
29449
29450
29451  input_path="$new_path"
29452  # Check if we need to convert this using DOS-style short mode. If the path
29453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29454  # take no chances and rewrite it.
29455  # Note: m4 eats our [], so we need to use [ and ] instead.
29456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29457  if test "x$has_forbidden_chars" != x; then
29458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29460  fi
29461
29462
29463  windows_path="$new_path"
29464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29465    unix_path=`$CYGPATH -u "$windows_path"`
29466    new_path="$unix_path"
29467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29469    new_path="$unix_path"
29470  fi
29471
29472  if test "x$path" != "x$new_path"; then
29473    BOOT_JDK="$new_path"
29474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29476  fi
29477
29478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29480
29481    else
29482      # We're on a unix platform. Hooray! :)
29483      path="$BOOT_JDK"
29484      has_space=`$ECHO "$path" | $GREP " "`
29485      if test "x$has_space" != x; then
29486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29489      fi
29490
29491      # Use eval to expand a potential ~
29492      eval path="$path"
29493      if test ! -f "$path" && test ! -d "$path"; then
29494        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29495      fi
29496
29497      if test -d "$path"; then
29498        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29499      else
29500        dir="`$DIRNAME "$path"`"
29501        base="`$BASENAME "$path"`"
29502        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29503      fi
29504    fi
29505  fi
29506
29507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29508$as_echo_n "checking for Boot JDK... " >&6; }
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29510$as_echo "$BOOT_JDK" >&6; }
29511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29512$as_echo_n "checking Boot JDK version... " >&6; }
29513            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29515$as_echo "$BOOT_JDK_VERSION" >&6; }
29516          fi # end check jdk version
29517        fi # end check javac
29518      fi # end check java
29519    fi # end check boot jdk found
29520  fi
29521
29522
29523  if test "x$BOOT_JDK_FOUND" = xno; then
29524    # Now execute the test
29525
29526  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29527  BOOT_JDK_SUFFIX="/Contents/Home"
29528  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29529  if test "x$ALL_JDKS_FOUND" != x; then
29530    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29531
29532  if test "x$BOOT_JDK_FOUND" = xno; then
29533    # Now execute the test
29534
29535        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29536        if test -d "$BOOT_JDK"; then
29537          BOOT_JDK_FOUND=maybe
29538          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29539$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29540        fi
29541
29542
29543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29545      # Do we have a bin/java?
29546      if test ! -x "$BOOT_JDK/bin/java"; then
29547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29549        BOOT_JDK_FOUND=no
29550      else
29551        # Do we have a bin/javac?
29552        if test ! -x "$BOOT_JDK/bin/javac"; then
29553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29557          BOOT_JDK_FOUND=no
29558        else
29559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29561
29562          # Extra M4 quote needed to protect [] in grep expression.
29563          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29564          if test "x$FOUND_CORRECT_VERSION" = x; then
29565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29569            BOOT_JDK_FOUND=no
29570          else
29571            # We're done! :-)
29572            BOOT_JDK_FOUND=yes
29573
29574  # Only process if variable expands to non-empty
29575
29576  if test "x$BOOT_JDK" != x; then
29577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29578
29579  # Input might be given as Windows format, start by converting to
29580  # unix format.
29581  path="$BOOT_JDK"
29582  new_path=`$CYGPATH -u "$path"`
29583
29584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29587  # "foo.exe" is OK but "foo" is an error.
29588  #
29589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29590  # It is also a way to make sure we got the proper file name for the real test later on.
29591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29592  if test "x$test_shortpath" = x; then
29593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29596  fi
29597
29598  # Call helper function which possibly converts this using DOS-style short mode.
29599  # If so, the updated path is stored in $new_path.
29600
29601  input_path="$new_path"
29602  # Check if we need to convert this using DOS-style short mode. If the path
29603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29604  # take no chances and rewrite it.
29605  # Note: m4 eats our [], so we need to use [ and ] instead.
29606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29607  if test "x$has_forbidden_chars" != x; then
29608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29612      # Going to short mode and back again did indeed matter. Since short mode is
29613      # case insensitive, let's make it lowercase to improve readability.
29614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615      # Now convert it back to Unix-style (cygpath)
29616      input_path=`$CYGPATH -u "$shortmode_path"`
29617      new_path="$input_path"
29618    fi
29619  fi
29620
29621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29622  if test "x$test_cygdrive_prefix" = x; then
29623    # As a simple fix, exclude /usr/bin since it's not a real path.
29624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29626      # a path prefixed by /cygdrive for fixpath to work.
29627      new_path="$CYGWIN_ROOT_PATH$input_path"
29628    fi
29629  fi
29630
29631
29632  if test "x$path" != "x$new_path"; then
29633    BOOT_JDK="$new_path"
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29636  fi
29637
29638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29639
29640  path="$BOOT_JDK"
29641  has_colon=`$ECHO $path | $GREP ^.:`
29642  new_path="$path"
29643  if test "x$has_colon" = x; then
29644    # Not in mixed or Windows style, start by that.
29645    new_path=`cmd //c echo $path`
29646  fi
29647
29648
29649  input_path="$new_path"
29650  # Check if we need to convert this using DOS-style short mode. If the path
29651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29652  # take no chances and rewrite it.
29653  # Note: m4 eats our [], so we need to use [ and ] instead.
29654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29655  if test "x$has_forbidden_chars" != x; then
29656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29658  fi
29659
29660
29661  windows_path="$new_path"
29662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29663    unix_path=`$CYGPATH -u "$windows_path"`
29664    new_path="$unix_path"
29665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29667    new_path="$unix_path"
29668  fi
29669
29670  if test "x$path" != "x$new_path"; then
29671    BOOT_JDK="$new_path"
29672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29674  fi
29675
29676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29678
29679    else
29680      # We're on a unix platform. Hooray! :)
29681      path="$BOOT_JDK"
29682      has_space=`$ECHO "$path" | $GREP " "`
29683      if test "x$has_space" != x; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29687      fi
29688
29689      # Use eval to expand a potential ~
29690      eval path="$path"
29691      if test ! -f "$path" && test ! -d "$path"; then
29692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29693      fi
29694
29695      if test -d "$path"; then
29696        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29697      else
29698        dir="`$DIRNAME "$path"`"
29699        base="`$BASENAME "$path"`"
29700        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29701      fi
29702    fi
29703  fi
29704
29705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29706$as_echo_n "checking for Boot JDK... " >&6; }
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29708$as_echo "$BOOT_JDK" >&6; }
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29710$as_echo_n "checking Boot JDK version... " >&6; }
29711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29713$as_echo "$BOOT_JDK_VERSION" >&6; }
29714          fi # end check jdk version
29715        fi # end check javac
29716      fi # end check java
29717    fi # end check boot jdk found
29718  fi
29719
29720    done
29721  fi
29722
29723
29724    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29725    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29726      # Do we have a bin/java?
29727      if test ! -x "$BOOT_JDK/bin/java"; then
29728        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29730        BOOT_JDK_FOUND=no
29731      else
29732        # Do we have a bin/javac?
29733        if test ! -x "$BOOT_JDK/bin/javac"; then
29734          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29736          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29737$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29738          BOOT_JDK_FOUND=no
29739        else
29740          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29741          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29742
29743          # Extra M4 quote needed to protect [] in grep expression.
29744          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29745          if test "x$FOUND_CORRECT_VERSION" = x; then
29746            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29747$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29748            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29749$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29750            BOOT_JDK_FOUND=no
29751          else
29752            # We're done! :-)
29753            BOOT_JDK_FOUND=yes
29754
29755  # Only process if variable expands to non-empty
29756
29757  if test "x$BOOT_JDK" != x; then
29758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29759
29760  # Input might be given as Windows format, start by converting to
29761  # unix format.
29762  path="$BOOT_JDK"
29763  new_path=`$CYGPATH -u "$path"`
29764
29765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29768  # "foo.exe" is OK but "foo" is an error.
29769  #
29770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29771  # It is also a way to make sure we got the proper file name for the real test later on.
29772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29773  if test "x$test_shortpath" = x; then
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29777  fi
29778
29779  # Call helper function which possibly converts this using DOS-style short mode.
29780  # If so, the updated path is stored in $new_path.
29781
29782  input_path="$new_path"
29783  # Check if we need to convert this using DOS-style short mode. If the path
29784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29785  # take no chances and rewrite it.
29786  # Note: m4 eats our [], so we need to use [ and ] instead.
29787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29788  if test "x$has_forbidden_chars" != x; then
29789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29793      # Going to short mode and back again did indeed matter. Since short mode is
29794      # case insensitive, let's make it lowercase to improve readability.
29795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796      # Now convert it back to Unix-style (cygpath)
29797      input_path=`$CYGPATH -u "$shortmode_path"`
29798      new_path="$input_path"
29799    fi
29800  fi
29801
29802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29803  if test "x$test_cygdrive_prefix" = x; then
29804    # As a simple fix, exclude /usr/bin since it's not a real path.
29805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29807      # a path prefixed by /cygdrive for fixpath to work.
29808      new_path="$CYGWIN_ROOT_PATH$input_path"
29809    fi
29810  fi
29811
29812
29813  if test "x$path" != "x$new_path"; then
29814    BOOT_JDK="$new_path"
29815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29817  fi
29818
29819    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29820
29821  path="$BOOT_JDK"
29822  has_colon=`$ECHO $path | $GREP ^.:`
29823  new_path="$path"
29824  if test "x$has_colon" = x; then
29825    # Not in mixed or Windows style, start by that.
29826    new_path=`cmd //c echo $path`
29827  fi
29828
29829
29830  input_path="$new_path"
29831  # Check if we need to convert this using DOS-style short mode. If the path
29832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29833  # take no chances and rewrite it.
29834  # Note: m4 eats our [], so we need to use [ and ] instead.
29835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29836  if test "x$has_forbidden_chars" != x; then
29837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29839  fi
29840
29841
29842  windows_path="$new_path"
29843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29844    unix_path=`$CYGPATH -u "$windows_path"`
29845    new_path="$unix_path"
29846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29848    new_path="$unix_path"
29849  fi
29850
29851  if test "x$path" != "x$new_path"; then
29852    BOOT_JDK="$new_path"
29853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29855  fi
29856
29857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29859
29860    else
29861      # We're on a unix platform. Hooray! :)
29862      path="$BOOT_JDK"
29863      has_space=`$ECHO "$path" | $GREP " "`
29864      if test "x$has_space" != x; then
29865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29867        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29868      fi
29869
29870      # Use eval to expand a potential ~
29871      eval path="$path"
29872      if test ! -f "$path" && test ! -d "$path"; then
29873        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29874      fi
29875
29876      if test -d "$path"; then
29877        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29878      else
29879        dir="`$DIRNAME "$path"`"
29880        base="`$BASENAME "$path"`"
29881        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29882      fi
29883    fi
29884  fi
29885
29886            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29887$as_echo_n "checking for Boot JDK... " >&6; }
29888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29889$as_echo "$BOOT_JDK" >&6; }
29890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29891$as_echo_n "checking Boot JDK version... " >&6; }
29892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29894$as_echo "$BOOT_JDK_VERSION" >&6; }
29895          fi # end check jdk version
29896        fi # end check javac
29897      fi # end check java
29898    fi # end check boot jdk found
29899  fi
29900
29901  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29902
29903  if test "x$BOOT_JDK_FOUND" = xno; then
29904    # Now execute the test
29905
29906  BOOT_JDK_PREFIX="/usr/lib/jvm"
29907  BOOT_JDK_SUFFIX=""
29908  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29909  if test "x$ALL_JDKS_FOUND" != x; then
29910    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29911
29912  if test "x$BOOT_JDK_FOUND" = xno; then
29913    # Now execute the test
29914
29915        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29916        if test -d "$BOOT_JDK"; then
29917          BOOT_JDK_FOUND=maybe
29918          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29919$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29920        fi
29921
29922
29923    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29924    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29925      # Do we have a bin/java?
29926      if test ! -x "$BOOT_JDK/bin/java"; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29929        BOOT_JDK_FOUND=no
29930      else
29931        # Do we have a bin/javac?
29932        if test ! -x "$BOOT_JDK/bin/javac"; then
29933          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29935          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29936$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29937          BOOT_JDK_FOUND=no
29938        else
29939          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29940          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29941
29942          # Extra M4 quote needed to protect [] in grep expression.
29943          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29944          if test "x$FOUND_CORRECT_VERSION" = x; then
29945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29947            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29948$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29949            BOOT_JDK_FOUND=no
29950          else
29951            # We're done! :-)
29952            BOOT_JDK_FOUND=yes
29953
29954  # Only process if variable expands to non-empty
29955
29956  if test "x$BOOT_JDK" != x; then
29957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29958
29959  # Input might be given as Windows format, start by converting to
29960  # unix format.
29961  path="$BOOT_JDK"
29962  new_path=`$CYGPATH -u "$path"`
29963
29964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29967  # "foo.exe" is OK but "foo" is an error.
29968  #
29969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29970  # It is also a way to make sure we got the proper file name for the real test later on.
29971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29972  if test "x$test_shortpath" = x; then
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29975    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29976  fi
29977
29978  # Call helper function which possibly converts this using DOS-style short mode.
29979  # If so, the updated path is stored in $new_path.
29980
29981  input_path="$new_path"
29982  # Check if we need to convert this using DOS-style short mode. If the path
29983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29984  # take no chances and rewrite it.
29985  # Note: m4 eats our [], so we need to use [ and ] instead.
29986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29987  if test "x$has_forbidden_chars" != x; then
29988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29992      # Going to short mode and back again did indeed matter. Since short mode is
29993      # case insensitive, let's make it lowercase to improve readability.
29994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29995      # Now convert it back to Unix-style (cygpath)
29996      input_path=`$CYGPATH -u "$shortmode_path"`
29997      new_path="$input_path"
29998    fi
29999  fi
30000
30001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30002  if test "x$test_cygdrive_prefix" = x; then
30003    # As a simple fix, exclude /usr/bin since it's not a real path.
30004    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30006      # a path prefixed by /cygdrive for fixpath to work.
30007      new_path="$CYGWIN_ROOT_PATH$input_path"
30008    fi
30009  fi
30010
30011
30012  if test "x$path" != "x$new_path"; then
30013    BOOT_JDK="$new_path"
30014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30016  fi
30017
30018    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30019
30020  path="$BOOT_JDK"
30021  has_colon=`$ECHO $path | $GREP ^.:`
30022  new_path="$path"
30023  if test "x$has_colon" = x; then
30024    # Not in mixed or Windows style, start by that.
30025    new_path=`cmd //c echo $path`
30026  fi
30027
30028
30029  input_path="$new_path"
30030  # Check if we need to convert this using DOS-style short mode. If the path
30031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30032  # take no chances and rewrite it.
30033  # Note: m4 eats our [], so we need to use [ and ] instead.
30034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30035  if test "x$has_forbidden_chars" != x; then
30036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30037    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30038  fi
30039
30040
30041  windows_path="$new_path"
30042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30043    unix_path=`$CYGPATH -u "$windows_path"`
30044    new_path="$unix_path"
30045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30047    new_path="$unix_path"
30048  fi
30049
30050  if test "x$path" != "x$new_path"; then
30051    BOOT_JDK="$new_path"
30052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30054  fi
30055
30056  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30057  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30058
30059    else
30060      # We're on a unix platform. Hooray! :)
30061      path="$BOOT_JDK"
30062      has_space=`$ECHO "$path" | $GREP " "`
30063      if test "x$has_space" != x; then
30064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30065$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30066        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30067      fi
30068
30069      # Use eval to expand a potential ~
30070      eval path="$path"
30071      if test ! -f "$path" && test ! -d "$path"; then
30072        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30073      fi
30074
30075      if test -d "$path"; then
30076        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30077      else
30078        dir="`$DIRNAME "$path"`"
30079        base="`$BASENAME "$path"`"
30080        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30081      fi
30082    fi
30083  fi
30084
30085            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30086$as_echo_n "checking for Boot JDK... " >&6; }
30087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30088$as_echo "$BOOT_JDK" >&6; }
30089            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30090$as_echo_n "checking Boot JDK version... " >&6; }
30091            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30093$as_echo "$BOOT_JDK_VERSION" >&6; }
30094          fi # end check jdk version
30095        fi # end check javac
30096      fi # end check java
30097    fi # end check boot jdk found
30098  fi
30099
30100    done
30101  fi
30102
30103
30104    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30105    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30106      # Do we have a bin/java?
30107      if test ! -x "$BOOT_JDK/bin/java"; then
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30110        BOOT_JDK_FOUND=no
30111      else
30112        # Do we have a bin/javac?
30113        if test ! -x "$BOOT_JDK/bin/javac"; then
30114          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30117$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30118          BOOT_JDK_FOUND=no
30119        else
30120          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30121          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30122
30123          # Extra M4 quote needed to protect [] in grep expression.
30124          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30125          if test "x$FOUND_CORRECT_VERSION" = x; then
30126            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30128            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30130            BOOT_JDK_FOUND=no
30131          else
30132            # We're done! :-)
30133            BOOT_JDK_FOUND=yes
30134
30135  # Only process if variable expands to non-empty
30136
30137  if test "x$BOOT_JDK" != x; then
30138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30139
30140  # Input might be given as Windows format, start by converting to
30141  # unix format.
30142  path="$BOOT_JDK"
30143  new_path=`$CYGPATH -u "$path"`
30144
30145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30148  # "foo.exe" is OK but "foo" is an error.
30149  #
30150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30151  # It is also a way to make sure we got the proper file name for the real test later on.
30152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30153  if test "x$test_shortpath" = x; then
30154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30156    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30157  fi
30158
30159  # Call helper function which possibly converts this using DOS-style short mode.
30160  # If so, the updated path is stored in $new_path.
30161
30162  input_path="$new_path"
30163  # Check if we need to convert this using DOS-style short mode. If the path
30164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30165  # take no chances and rewrite it.
30166  # Note: m4 eats our [], so we need to use [ and ] instead.
30167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30168  if test "x$has_forbidden_chars" != x; then
30169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30173      # Going to short mode and back again did indeed matter. Since short mode is
30174      # case insensitive, let's make it lowercase to improve readability.
30175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30176      # Now convert it back to Unix-style (cygpath)
30177      input_path=`$CYGPATH -u "$shortmode_path"`
30178      new_path="$input_path"
30179    fi
30180  fi
30181
30182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30183  if test "x$test_cygdrive_prefix" = x; then
30184    # As a simple fix, exclude /usr/bin since it's not a real path.
30185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30187      # a path prefixed by /cygdrive for fixpath to work.
30188      new_path="$CYGWIN_ROOT_PATH$input_path"
30189    fi
30190  fi
30191
30192
30193  if test "x$path" != "x$new_path"; then
30194    BOOT_JDK="$new_path"
30195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30197  fi
30198
30199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30200
30201  path="$BOOT_JDK"
30202  has_colon=`$ECHO $path | $GREP ^.:`
30203  new_path="$path"
30204  if test "x$has_colon" = x; then
30205    # Not in mixed or Windows style, start by that.
30206    new_path=`cmd //c echo $path`
30207  fi
30208
30209
30210  input_path="$new_path"
30211  # Check if we need to convert this using DOS-style short mode. If the path
30212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30213  # take no chances and rewrite it.
30214  # Note: m4 eats our [], so we need to use [ and ] instead.
30215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30216  if test "x$has_forbidden_chars" != x; then
30217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30219  fi
30220
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231  if test "x$path" != "x$new_path"; then
30232    BOOT_JDK="$new_path"
30233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30235  fi
30236
30237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30239
30240    else
30241      # We're on a unix platform. Hooray! :)
30242      path="$BOOT_JDK"
30243      has_space=`$ECHO "$path" | $GREP " "`
30244      if test "x$has_space" != x; then
30245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30248      fi
30249
30250      # Use eval to expand a potential ~
30251      eval path="$path"
30252      if test ! -f "$path" && test ! -d "$path"; then
30253        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30254      fi
30255
30256      if test -d "$path"; then
30257        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30258      else
30259        dir="`$DIRNAME "$path"`"
30260        base="`$BASENAME "$path"`"
30261        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30262      fi
30263    fi
30264  fi
30265
30266            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30267$as_echo_n "checking for Boot JDK... " >&6; }
30268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30269$as_echo "$BOOT_JDK" >&6; }
30270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30271$as_echo_n "checking Boot JDK version... " >&6; }
30272            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30274$as_echo "$BOOT_JDK_VERSION" >&6; }
30275          fi # end check jdk version
30276        fi # end check javac
30277      fi # end check java
30278    fi # end check boot jdk found
30279  fi
30280
30281  fi
30282
30283
30284    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30285    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30286      # Do we have a bin/java?
30287      if test ! -x "$BOOT_JDK/bin/java"; then
30288        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30290        BOOT_JDK_FOUND=no
30291      else
30292        # Do we have a bin/javac?
30293        if test ! -x "$BOOT_JDK/bin/javac"; then
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30297$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30298          BOOT_JDK_FOUND=no
30299        else
30300          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30301          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30302
30303          # Extra M4 quote needed to protect [] in grep expression.
30304          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30305          if test "x$FOUND_CORRECT_VERSION" = x; then
30306            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30308            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30309$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30310            BOOT_JDK_FOUND=no
30311          else
30312            # We're done! :-)
30313            BOOT_JDK_FOUND=yes
30314
30315  # Only process if variable expands to non-empty
30316
30317  if test "x$BOOT_JDK" != x; then
30318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30319
30320  # Input might be given as Windows format, start by converting to
30321  # unix format.
30322  path="$BOOT_JDK"
30323  new_path=`$CYGPATH -u "$path"`
30324
30325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30328  # "foo.exe" is OK but "foo" is an error.
30329  #
30330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30331  # It is also a way to make sure we got the proper file name for the real test later on.
30332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30333  if test "x$test_shortpath" = x; then
30334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30336    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30337  fi
30338
30339  # Call helper function which possibly converts this using DOS-style short mode.
30340  # If so, the updated path is stored in $new_path.
30341
30342  input_path="$new_path"
30343  # Check if we need to convert this using DOS-style short mode. If the path
30344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30345  # take no chances and rewrite it.
30346  # Note: m4 eats our [], so we need to use [ and ] instead.
30347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30348  if test "x$has_forbidden_chars" != x; then
30349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30353      # Going to short mode and back again did indeed matter. Since short mode is
30354      # case insensitive, let's make it lowercase to improve readability.
30355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30356      # Now convert it back to Unix-style (cygpath)
30357      input_path=`$CYGPATH -u "$shortmode_path"`
30358      new_path="$input_path"
30359    fi
30360  fi
30361
30362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30363  if test "x$test_cygdrive_prefix" = x; then
30364    # As a simple fix, exclude /usr/bin since it's not a real path.
30365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30367      # a path prefixed by /cygdrive for fixpath to work.
30368      new_path="$CYGWIN_ROOT_PATH$input_path"
30369    fi
30370  fi
30371
30372
30373  if test "x$path" != "x$new_path"; then
30374    BOOT_JDK="$new_path"
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30377  fi
30378
30379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30380
30381  path="$BOOT_JDK"
30382  has_colon=`$ECHO $path | $GREP ^.:`
30383  new_path="$path"
30384  if test "x$has_colon" = x; then
30385    # Not in mixed or Windows style, start by that.
30386    new_path=`cmd //c echo $path`
30387  fi
30388
30389
30390  input_path="$new_path"
30391  # Check if we need to convert this using DOS-style short mode. If the path
30392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30393  # take no chances and rewrite it.
30394  # Note: m4 eats our [], so we need to use [ and ] instead.
30395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30396  if test "x$has_forbidden_chars" != x; then
30397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30399  fi
30400
30401
30402  windows_path="$new_path"
30403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30404    unix_path=`$CYGPATH -u "$windows_path"`
30405    new_path="$unix_path"
30406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30408    new_path="$unix_path"
30409  fi
30410
30411  if test "x$path" != "x$new_path"; then
30412    BOOT_JDK="$new_path"
30413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30414$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30415  fi
30416
30417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30419
30420    else
30421      # We're on a unix platform. Hooray! :)
30422      path="$BOOT_JDK"
30423      has_space=`$ECHO "$path" | $GREP " "`
30424      if test "x$has_space" != x; then
30425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30428      fi
30429
30430      # Use eval to expand a potential ~
30431      eval path="$path"
30432      if test ! -f "$path" && test ! -d "$path"; then
30433        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30434      fi
30435
30436      if test -d "$path"; then
30437        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30438      else
30439        dir="`$DIRNAME "$path"`"
30440        base="`$BASENAME "$path"`"
30441        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30442      fi
30443    fi
30444  fi
30445
30446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30447$as_echo_n "checking for Boot JDK... " >&6; }
30448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30449$as_echo "$BOOT_JDK" >&6; }
30450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30451$as_echo_n "checking Boot JDK version... " >&6; }
30452            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30454$as_echo "$BOOT_JDK_VERSION" >&6; }
30455          fi # end check jdk version
30456        fi # end check javac
30457      fi # end check java
30458    fi # end check boot jdk found
30459  fi
30460
30461
30462  # If we haven't found anything yet, we've truly lost. Give up.
30463  if test "x$BOOT_JDK_FOUND" = xno; then
30464
30465  # Print a helpful message on how to acquire the necessary build dependency.
30466  # openjdk is the help tag: freetype, cups, alsa etc
30467  MISSING_DEPENDENCY=openjdk
30468
30469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30470    cygwin_help $MISSING_DEPENDENCY
30471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30472    msys_help $MISSING_DEPENDENCY
30473  else
30474    PKGHANDLER_COMMAND=
30475
30476    case $PKGHANDLER in
30477      apt-get)
30478        apt_help     $MISSING_DEPENDENCY ;;
30479      yum)
30480        yum_help     $MISSING_DEPENDENCY ;;
30481      brew)
30482        brew_help    $MISSING_DEPENDENCY ;;
30483      port)
30484        port_help    $MISSING_DEPENDENCY ;;
30485      pkgutil)
30486        pkgutil_help $MISSING_DEPENDENCY ;;
30487      pkgadd)
30488        pkgadd_help  $MISSING_DEPENDENCY ;;
30489    esac
30490
30491    if test "x$PKGHANDLER_COMMAND" != x; then
30492      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30493    fi
30494  fi
30495
30496    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30497$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30498    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30499$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30500    as_fn_error $? "Cannot continue" "$LINENO" 5
30501  fi
30502
30503
30504
30505  # Setup tools from the Boot JDK.
30506
30507  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30508
30509  # Publish this variable in the help.
30510
30511
30512  if [ -z "${JAVA+x}" ]; then
30513    # The variable is not set by user, try to locate tool using the code snippet
30514
30515      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30516$as_echo_n "checking for java in Boot JDK... " >&6; }
30517      JAVA=$BOOT_JDK/bin/java
30518      if test ! -x $JAVA; then
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30520$as_echo "not found" >&6; }
30521        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30522$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30523        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30524      fi
30525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30526$as_echo "ok" >&6; }
30527
30528
30529  else
30530    # The variable is set, but is it from the command line or the environment?
30531
30532    # Try to remove the string !JAVA! from our list.
30533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30535      # If it failed, the variable was not from the command line. Ignore it,
30536      # but warn the user (except for BASH, which is always set by the calling BASH).
30537      if test "xJAVA" != xBASH; then
30538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30539$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30540      fi
30541      # Try to locate tool using the code snippet
30542
30543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30544$as_echo_n "checking for java in Boot JDK... " >&6; }
30545      JAVA=$BOOT_JDK/bin/java
30546      if test ! -x $JAVA; then
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548$as_echo "not found" >&6; }
30549        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30551        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30552      fi
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30554$as_echo "ok" >&6; }
30555
30556
30557    else
30558      # If it succeeded, then it was overridden by the user. We will use it
30559      # for the tool.
30560
30561      # First remove it from the list of overridden variables, so we can test
30562      # for unknown variables in the end.
30563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30564
30565      # Check if we try to supply an empty value
30566      if test "x$JAVA" = x; then
30567        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30568$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30570$as_echo_n "checking for JAVA... " >&6; }
30571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30572$as_echo "disabled" >&6; }
30573      else
30574        # Check if the provided tool contains a complete path.
30575        tool_specified="$JAVA"
30576        tool_basename="${tool_specified##*/}"
30577        if test "x$tool_basename" = "x$tool_specified"; then
30578          # A command without a complete path is provided, search $PATH.
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30580$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30581          # Extract the first word of "$tool_basename", so it can be a program name with args.
30582set dummy $tool_basename; ac_word=$2
30583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30584$as_echo_n "checking for $ac_word... " >&6; }
30585if ${ac_cv_path_JAVA+:} false; then :
30586  $as_echo_n "(cached) " >&6
30587else
30588  case $JAVA in
30589  [\\/]* | ?:[\\/]*)
30590  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30591  ;;
30592  *)
30593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30594for as_dir in $PATH
30595do
30596  IFS=$as_save_IFS
30597  test -z "$as_dir" && as_dir=.
30598    for ac_exec_ext in '' $ac_executable_extensions; do
30599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30600    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30602    break 2
30603  fi
30604done
30605  done
30606IFS=$as_save_IFS
30607
30608  ;;
30609esac
30610fi
30611JAVA=$ac_cv_path_JAVA
30612if test -n "$JAVA"; then
30613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30614$as_echo "$JAVA" >&6; }
30615else
30616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30617$as_echo "no" >&6; }
30618fi
30619
30620
30621          if test "x$JAVA" = x; then
30622            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30623          fi
30624        else
30625          # Otherwise we believe it is a complete path. Use it as it is.
30626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30627$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30628          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30629$as_echo_n "checking for JAVA... " >&6; }
30630          if test ! -x "$tool_specified"; then
30631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30632$as_echo "not found" >&6; }
30633            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30634          fi
30635          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30636$as_echo "$tool_specified" >&6; }
30637        fi
30638      fi
30639    fi
30640
30641  fi
30642
30643
30644
30645  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30646
30647  # Publish this variable in the help.
30648
30649
30650  if [ -z "${JAVAC+x}" ]; then
30651    # The variable is not set by user, try to locate tool using the code snippet
30652
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30654$as_echo_n "checking for javac in Boot JDK... " >&6; }
30655      JAVAC=$BOOT_JDK/bin/javac
30656      if test ! -x $JAVAC; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30658$as_echo "not found" >&6; }
30659        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30660$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30661        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30662      fi
30663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30664$as_echo "ok" >&6; }
30665
30666
30667  else
30668    # The variable is set, but is it from the command line or the environment?
30669
30670    # Try to remove the string !JAVAC! from our list.
30671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30673      # If it failed, the variable was not from the command line. Ignore it,
30674      # but warn the user (except for BASH, which is always set by the calling BASH).
30675      if test "xJAVAC" != xBASH; then
30676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30677$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30678      fi
30679      # Try to locate tool using the code snippet
30680
30681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30682$as_echo_n "checking for javac in Boot JDK... " >&6; }
30683      JAVAC=$BOOT_JDK/bin/javac
30684      if test ! -x $JAVAC; then
30685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30686$as_echo "not found" >&6; }
30687        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30688$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30689        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30690      fi
30691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30692$as_echo "ok" >&6; }
30693
30694
30695    else
30696      # If it succeeded, then it was overridden by the user. We will use it
30697      # for the tool.
30698
30699      # First remove it from the list of overridden variables, so we can test
30700      # for unknown variables in the end.
30701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30702
30703      # Check if we try to supply an empty value
30704      if test "x$JAVAC" = x; then
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30706$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30708$as_echo_n "checking for JAVAC... " >&6; }
30709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30710$as_echo "disabled" >&6; }
30711      else
30712        # Check if the provided tool contains a complete path.
30713        tool_specified="$JAVAC"
30714        tool_basename="${tool_specified##*/}"
30715        if test "x$tool_basename" = "x$tool_specified"; then
30716          # A command without a complete path is provided, search $PATH.
30717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30718$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30719          # Extract the first word of "$tool_basename", so it can be a program name with args.
30720set dummy $tool_basename; ac_word=$2
30721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30722$as_echo_n "checking for $ac_word... " >&6; }
30723if ${ac_cv_path_JAVAC+:} false; then :
30724  $as_echo_n "(cached) " >&6
30725else
30726  case $JAVAC in
30727  [\\/]* | ?:[\\/]*)
30728  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30729  ;;
30730  *)
30731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30732for as_dir in $PATH
30733do
30734  IFS=$as_save_IFS
30735  test -z "$as_dir" && as_dir=.
30736    for ac_exec_ext in '' $ac_executable_extensions; do
30737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30738    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30740    break 2
30741  fi
30742done
30743  done
30744IFS=$as_save_IFS
30745
30746  ;;
30747esac
30748fi
30749JAVAC=$ac_cv_path_JAVAC
30750if test -n "$JAVAC"; then
30751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30752$as_echo "$JAVAC" >&6; }
30753else
30754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30755$as_echo "no" >&6; }
30756fi
30757
30758
30759          if test "x$JAVAC" = x; then
30760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30761          fi
30762        else
30763          # Otherwise we believe it is a complete path. Use it as it is.
30764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30765$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30767$as_echo_n "checking for JAVAC... " >&6; }
30768          if test ! -x "$tool_specified"; then
30769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30770$as_echo "not found" >&6; }
30771            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30772          fi
30773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30774$as_echo "$tool_specified" >&6; }
30775        fi
30776      fi
30777    fi
30778
30779  fi
30780
30781
30782
30783  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30784
30785  # Publish this variable in the help.
30786
30787
30788  if [ -z "${JAVAH+x}" ]; then
30789    # The variable is not set by user, try to locate tool using the code snippet
30790
30791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30792$as_echo_n "checking for javah in Boot JDK... " >&6; }
30793      JAVAH=$BOOT_JDK/bin/javah
30794      if test ! -x $JAVAH; then
30795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30796$as_echo "not found" >&6; }
30797        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30798$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30799        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30800      fi
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30802$as_echo "ok" >&6; }
30803
30804
30805  else
30806    # The variable is set, but is it from the command line or the environment?
30807
30808    # Try to remove the string !JAVAH! from our list.
30809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30811      # If it failed, the variable was not from the command line. Ignore it,
30812      # but warn the user (except for BASH, which is always set by the calling BASH).
30813      if test "xJAVAH" != xBASH; then
30814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30815$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30816      fi
30817      # Try to locate tool using the code snippet
30818
30819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30820$as_echo_n "checking for javah in Boot JDK... " >&6; }
30821      JAVAH=$BOOT_JDK/bin/javah
30822      if test ! -x $JAVAH; then
30823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30824$as_echo "not found" >&6; }
30825        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30826$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30827        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30828      fi
30829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30830$as_echo "ok" >&6; }
30831
30832
30833    else
30834      # If it succeeded, then it was overridden by the user. We will use it
30835      # for the tool.
30836
30837      # First remove it from the list of overridden variables, so we can test
30838      # for unknown variables in the end.
30839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30840
30841      # Check if we try to supply an empty value
30842      if test "x$JAVAH" = x; then
30843        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30844$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30846$as_echo_n "checking for JAVAH... " >&6; }
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30848$as_echo "disabled" >&6; }
30849      else
30850        # Check if the provided tool contains a complete path.
30851        tool_specified="$JAVAH"
30852        tool_basename="${tool_specified##*/}"
30853        if test "x$tool_basename" = "x$tool_specified"; then
30854          # A command without a complete path is provided, search $PATH.
30855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30856$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30857          # Extract the first word of "$tool_basename", so it can be a program name with args.
30858set dummy $tool_basename; ac_word=$2
30859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30860$as_echo_n "checking for $ac_word... " >&6; }
30861if ${ac_cv_path_JAVAH+:} false; then :
30862  $as_echo_n "(cached) " >&6
30863else
30864  case $JAVAH in
30865  [\\/]* | ?:[\\/]*)
30866  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30867  ;;
30868  *)
30869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30870for as_dir in $PATH
30871do
30872  IFS=$as_save_IFS
30873  test -z "$as_dir" && as_dir=.
30874    for ac_exec_ext in '' $ac_executable_extensions; do
30875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30876    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30878    break 2
30879  fi
30880done
30881  done
30882IFS=$as_save_IFS
30883
30884  ;;
30885esac
30886fi
30887JAVAH=$ac_cv_path_JAVAH
30888if test -n "$JAVAH"; then
30889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30890$as_echo "$JAVAH" >&6; }
30891else
30892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30893$as_echo "no" >&6; }
30894fi
30895
30896
30897          if test "x$JAVAH" = x; then
30898            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30899          fi
30900        else
30901          # Otherwise we believe it is a complete path. Use it as it is.
30902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30903$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30904          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30905$as_echo_n "checking for JAVAH... " >&6; }
30906          if test ! -x "$tool_specified"; then
30907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30908$as_echo "not found" >&6; }
30909            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30910          fi
30911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30912$as_echo "$tool_specified" >&6; }
30913        fi
30914      fi
30915    fi
30916
30917  fi
30918
30919
30920
30921  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30922
30923  # Publish this variable in the help.
30924
30925
30926  if [ -z "${JAR+x}" ]; then
30927    # The variable is not set by user, try to locate tool using the code snippet
30928
30929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30930$as_echo_n "checking for jar in Boot JDK... " >&6; }
30931      JAR=$BOOT_JDK/bin/jar
30932      if test ! -x $JAR; then
30933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30934$as_echo "not found" >&6; }
30935        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30936$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30937        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30938      fi
30939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30940$as_echo "ok" >&6; }
30941
30942
30943  else
30944    # The variable is set, but is it from the command line or the environment?
30945
30946    # Try to remove the string !JAR! from our list.
30947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30949      # If it failed, the variable was not from the command line. Ignore it,
30950      # but warn the user (except for BASH, which is always set by the calling BASH).
30951      if test "xJAR" != xBASH; then
30952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30953$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30954      fi
30955      # Try to locate tool using the code snippet
30956
30957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30958$as_echo_n "checking for jar in Boot JDK... " >&6; }
30959      JAR=$BOOT_JDK/bin/jar
30960      if test ! -x $JAR; then
30961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30962$as_echo "not found" >&6; }
30963        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30964$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30965        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30966      fi
30967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30968$as_echo "ok" >&6; }
30969
30970
30971    else
30972      # If it succeeded, then it was overridden by the user. We will use it
30973      # for the tool.
30974
30975      # First remove it from the list of overridden variables, so we can test
30976      # for unknown variables in the end.
30977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30978
30979      # Check if we try to supply an empty value
30980      if test "x$JAR" = x; then
30981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30982$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30984$as_echo_n "checking for JAR... " >&6; }
30985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30986$as_echo "disabled" >&6; }
30987      else
30988        # Check if the provided tool contains a complete path.
30989        tool_specified="$JAR"
30990        tool_basename="${tool_specified##*/}"
30991        if test "x$tool_basename" = "x$tool_specified"; then
30992          # A command without a complete path is provided, search $PATH.
30993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30994$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30995          # Extract the first word of "$tool_basename", so it can be a program name with args.
30996set dummy $tool_basename; ac_word=$2
30997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30998$as_echo_n "checking for $ac_word... " >&6; }
30999if ${ac_cv_path_JAR+:} false; then :
31000  $as_echo_n "(cached) " >&6
31001else
31002  case $JAR in
31003  [\\/]* | ?:[\\/]*)
31004  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31005  ;;
31006  *)
31007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31008for as_dir in $PATH
31009do
31010  IFS=$as_save_IFS
31011  test -z "$as_dir" && as_dir=.
31012    for ac_exec_ext in '' $ac_executable_extensions; do
31013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31014    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31016    break 2
31017  fi
31018done
31019  done
31020IFS=$as_save_IFS
31021
31022  ;;
31023esac
31024fi
31025JAR=$ac_cv_path_JAR
31026if test -n "$JAR"; then
31027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31028$as_echo "$JAR" >&6; }
31029else
31030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31031$as_echo "no" >&6; }
31032fi
31033
31034
31035          if test "x$JAR" = x; then
31036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31037          fi
31038        else
31039          # Otherwise we believe it is a complete path. Use it as it is.
31040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31041$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31043$as_echo_n "checking for JAR... " >&6; }
31044          if test ! -x "$tool_specified"; then
31045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31046$as_echo "not found" >&6; }
31047            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31048          fi
31049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31050$as_echo "$tool_specified" >&6; }
31051        fi
31052      fi
31053    fi
31054
31055  fi
31056
31057
31058
31059  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31060
31061  # Publish this variable in the help.
31062
31063
31064  if [ -z "${JARSIGNER+x}" ]; then
31065    # The variable is not set by user, try to locate tool using the code snippet
31066
31067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31068$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31069      JARSIGNER=$BOOT_JDK/bin/jarsigner
31070      if test ! -x $JARSIGNER; then
31071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31072$as_echo "not found" >&6; }
31073        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31074$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31075        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31076      fi
31077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31078$as_echo "ok" >&6; }
31079
31080
31081  else
31082    # The variable is set, but is it from the command line or the environment?
31083
31084    # Try to remove the string !JARSIGNER! from our list.
31085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31087      # If it failed, the variable was not from the command line. Ignore it,
31088      # but warn the user (except for BASH, which is always set by the calling BASH).
31089      if test "xJARSIGNER" != xBASH; then
31090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31091$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31092      fi
31093      # Try to locate tool using the code snippet
31094
31095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31096$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31097      JARSIGNER=$BOOT_JDK/bin/jarsigner
31098      if test ! -x $JARSIGNER; then
31099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31100$as_echo "not found" >&6; }
31101        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31102$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31103        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31104      fi
31105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31106$as_echo "ok" >&6; }
31107
31108
31109    else
31110      # If it succeeded, then it was overridden by the user. We will use it
31111      # for the tool.
31112
31113      # First remove it from the list of overridden variables, so we can test
31114      # for unknown variables in the end.
31115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31116
31117      # Check if we try to supply an empty value
31118      if test "x$JARSIGNER" = x; then
31119        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31120$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31122$as_echo_n "checking for JARSIGNER... " >&6; }
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31124$as_echo "disabled" >&6; }
31125      else
31126        # Check if the provided tool contains a complete path.
31127        tool_specified="$JARSIGNER"
31128        tool_basename="${tool_specified##*/}"
31129        if test "x$tool_basename" = "x$tool_specified"; then
31130          # A command without a complete path is provided, search $PATH.
31131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31132$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31133          # Extract the first word of "$tool_basename", so it can be a program name with args.
31134set dummy $tool_basename; ac_word=$2
31135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31136$as_echo_n "checking for $ac_word... " >&6; }
31137if ${ac_cv_path_JARSIGNER+:} false; then :
31138  $as_echo_n "(cached) " >&6
31139else
31140  case $JARSIGNER in
31141  [\\/]* | ?:[\\/]*)
31142  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31143  ;;
31144  *)
31145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31146for as_dir in $PATH
31147do
31148  IFS=$as_save_IFS
31149  test -z "$as_dir" && as_dir=.
31150    for ac_exec_ext in '' $ac_executable_extensions; do
31151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31152    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31154    break 2
31155  fi
31156done
31157  done
31158IFS=$as_save_IFS
31159
31160  ;;
31161esac
31162fi
31163JARSIGNER=$ac_cv_path_JARSIGNER
31164if test -n "$JARSIGNER"; then
31165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31166$as_echo "$JARSIGNER" >&6; }
31167else
31168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31169$as_echo "no" >&6; }
31170fi
31171
31172
31173          if test "x$JARSIGNER" = x; then
31174            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31175          fi
31176        else
31177          # Otherwise we believe it is a complete path. Use it as it is.
31178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31179$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31180          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31181$as_echo_n "checking for JARSIGNER... " >&6; }
31182          if test ! -x "$tool_specified"; then
31183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31184$as_echo "not found" >&6; }
31185            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31186          fi
31187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31188$as_echo "$tool_specified" >&6; }
31189        fi
31190      fi
31191    fi
31192
31193  fi
31194
31195
31196
31197  # Finally, set some other options...
31198
31199  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31200  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31201
31202
31203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31204$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31205  if "$JAVA" --list-modules > /dev/null 2>&1; then
31206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31207$as_echo "yes" >&6; }
31208    BOOT_JDK_MODULAR="true"
31209  else
31210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31211$as_echo "no" >&6; }
31212    BOOT_JDK_MODULAR="false"
31213  fi
31214
31215
31216
31217
31218  # Check if the boot jdk is 32 or 64 bit
31219  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31220    BOOT_JDK_BITS="64"
31221  else
31222    BOOT_JDK_BITS="32"
31223  fi
31224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31225$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31227$as_echo "$BOOT_JDK_BITS" >&6; }
31228
31229
31230
31231# Check whether --with-build-jdk was given.
31232if test "${with_build_jdk+set}" = set; then :
31233  withval=$with_build_jdk;
31234fi
31235
31236
31237  CREATE_BUILDJDK=false
31238  EXTERNAL_BUILDJDK=false
31239  BUILD_JDK_FOUND="no"
31240  if test "x$with_build_jdk" != "x"; then
31241
31242  if test "x$BUILD_JDK_FOUND" = xno; then
31243    # Execute the test
31244
31245       if test "x$with_build_jdk" != x; then
31246         BUILD_JDK=$with_build_jdk
31247         BUILD_JDK_FOUND=maybe
31248         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31249$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31250       fi
31251
31252    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31253    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31254      # Do we have a bin/java?
31255      if test ! -x "$BUILD_JDK/bin/java"; then
31256        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31257$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31258        BUILD_JDK_FOUND=no
31259      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31261$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31262        BUILD_JDK_FOUND=no
31263      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31265$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31266        BUILD_JDK_FOUND=no
31267      elif test ! -x "$BUILD_JDK/bin/javac"; then
31268        # Do we have a bin/javac?
31269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31270$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31271        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31272$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31273        BUILD_JDK_FOUND=no
31274      else
31275        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31276        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31277
31278        # Extra M4 quote needed to protect [] in grep expression.
31279        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31280        if test "x$FOUND_CORRECT_VERSION" = x; then
31281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31282$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31283          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31284$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31285          BUILD_JDK_FOUND=no
31286        else
31287          # We're done!
31288          BUILD_JDK_FOUND=yes
31289
31290  # Only process if variable expands to non-empty
31291
31292  if test "x$BUILD_JDK" != x; then
31293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31294
31295  # Input might be given as Windows format, start by converting to
31296  # unix format.
31297  path="$BUILD_JDK"
31298  new_path=`$CYGPATH -u "$path"`
31299
31300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31303  # "foo.exe" is OK but "foo" is an error.
31304  #
31305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31306  # It is also a way to make sure we got the proper file name for the real test later on.
31307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31308  if test "x$test_shortpath" = x; then
31309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31310$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31311    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31312  fi
31313
31314  # Call helper function which possibly converts this using DOS-style short mode.
31315  # If so, the updated path is stored in $new_path.
31316
31317  input_path="$new_path"
31318  # Check if we need to convert this using DOS-style short mode. If the path
31319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31320  # take no chances and rewrite it.
31321  # Note: m4 eats our [], so we need to use [ and ] instead.
31322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31323  if test "x$has_forbidden_chars" != x; then
31324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31328      # Going to short mode and back again did indeed matter. Since short mode is
31329      # case insensitive, let's make it lowercase to improve readability.
31330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31331      # Now convert it back to Unix-style (cygpath)
31332      input_path=`$CYGPATH -u "$shortmode_path"`
31333      new_path="$input_path"
31334    fi
31335  fi
31336
31337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31338  if test "x$test_cygdrive_prefix" = x; then
31339    # As a simple fix, exclude /usr/bin since it's not a real path.
31340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31342      # a path prefixed by /cygdrive for fixpath to work.
31343      new_path="$CYGWIN_ROOT_PATH$input_path"
31344    fi
31345  fi
31346
31347
31348  if test "x$path" != "x$new_path"; then
31349    BUILD_JDK="$new_path"
31350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31351$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31352  fi
31353
31354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31355
31356  path="$BUILD_JDK"
31357  has_colon=`$ECHO $path | $GREP ^.:`
31358  new_path="$path"
31359  if test "x$has_colon" = x; then
31360    # Not in mixed or Windows style, start by that.
31361    new_path=`cmd //c echo $path`
31362  fi
31363
31364
31365  input_path="$new_path"
31366  # Check if we need to convert this using DOS-style short mode. If the path
31367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31368  # take no chances and rewrite it.
31369  # Note: m4 eats our [], so we need to use [ and ] instead.
31370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31371  if test "x$has_forbidden_chars" != x; then
31372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31374  fi
31375
31376
31377  windows_path="$new_path"
31378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31379    unix_path=`$CYGPATH -u "$windows_path"`
31380    new_path="$unix_path"
31381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31383    new_path="$unix_path"
31384  fi
31385
31386  if test "x$path" != "x$new_path"; then
31387    BUILD_JDK="$new_path"
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31389$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31390  fi
31391
31392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31394
31395    else
31396      # We're on a unix platform. Hooray! :)
31397      path="$BUILD_JDK"
31398      has_space=`$ECHO "$path" | $GREP " "`
31399      if test "x$has_space" != x; then
31400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31401$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31403      fi
31404
31405      # Use eval to expand a potential ~
31406      eval path="$path"
31407      if test ! -f "$path" && test ! -d "$path"; then
31408        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31409      fi
31410
31411      if test -d "$path"; then
31412        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31413      else
31414        dir="`$DIRNAME "$path"`"
31415        base="`$BASENAME "$path"`"
31416        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31417      fi
31418    fi
31419  fi
31420
31421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31422$as_echo_n "checking for Build JDK... " >&6; }
31423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31424$as_echo "$BUILD_JDK" >&6; }
31425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31426$as_echo_n "checking Build JDK version... " >&6; }
31427          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31429$as_echo "$BUILD_JDK_VERSION" >&6; }
31430        fi # end check jdk version
31431      fi # end check java
31432    fi # end check build jdk found
31433  fi
31434
31435    EXTERNAL_BUILDJDK=true
31436  else
31437    if test "x$COMPILE_TYPE" = "xcross"; then
31438      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31439      BUILD_JDK_FOUND=yes
31440      CREATE_BUILDJDK=true
31441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31442$as_echo_n "checking for Build JDK... " >&6; }
31443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31444$as_echo "yes, will build it for the host platform" >&6; }
31445    else
31446      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31447      BUILD_JDK_FOUND=yes
31448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31449$as_echo_n "checking for Build JDK... " >&6; }
31450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31451$as_echo "yes, will use output dir" >&6; }
31452    fi
31453  fi
31454
31455  JMOD="$BUILD_JDK/bin/jmod"
31456  JLINK="$BUILD_JDK/bin/jlink"
31457
31458
31459
31460  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31462$as_echo_n "checking for Build JDK... " >&6; }
31463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31464$as_echo "no" >&6; }
31465    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31466  fi
31467
31468
31469
31470
31471
31472
31473###############################################################################
31474#
31475# Configure the sources to use. We can add or override individual directories.
31476#
31477###############################################################################
31478
31479
31480  # Where are the sources.
31481  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31482  CORBA_TOPDIR="$SRC_ROOT/corba"
31483  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31484  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31485  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31486  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31487  JDK_TOPDIR="$SRC_ROOT/jdk"
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497  # This feature is no longer supported.
31498
31499
31500
31501# Check whether --with-add-source-root was given.
31502if test "${with_add_source_root+set}" = set; then :
31503  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
31504$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31505fi
31506
31507
31508
31509
31510# Check whether --with-override-source-root was given.
31511if test "${with_override_source_root+set}" = set; then :
31512  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
31513$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31514fi
31515
31516
31517
31518
31519# Check whether --with-adds-and-overrides was given.
31520if test "${with_adds_and_overrides+set}" = set; then :
31521  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
31522$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31523fi
31524
31525
31526
31527
31528# Check whether --with-override-langtools was given.
31529if test "${with_override_langtools+set}" = set; then :
31530  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31531$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31532fi
31533
31534
31535
31536
31537# Check whether --with-override-corba was given.
31538if test "${with_override_corba+set}" = set; then :
31539  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31540$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31541fi
31542
31543
31544
31545
31546# Check whether --with-override-jaxp was given.
31547if test "${with_override_jaxp+set}" = set; then :
31548  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31549$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31550fi
31551
31552
31553
31554
31555# Check whether --with-override-jaxws was given.
31556if test "${with_override_jaxws+set}" = set; then :
31557  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31558$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31559fi
31560
31561
31562
31563
31564# Check whether --with-override-hotspot was given.
31565if test "${with_override_hotspot+set}" = set; then :
31566  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31567$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31568fi
31569
31570
31571
31572
31573# Check whether --with-override-nashorn was given.
31574if test "${with_override_nashorn+set}" = set; then :
31575  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31576$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31577fi
31578
31579
31580
31581
31582# Check whether --with-override-jdk was given.
31583if test "${with_override_jdk+set}" = set; then :
31584  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31585$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31586fi
31587
31588
31589
31590
31591  BUILD_OUTPUT="$OUTPUT_ROOT"
31592
31593  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31594
31595
31596
31597# Check whether --with-import_hotspot was given.
31598if test "${with_import_hotspot+set}" = set; then :
31599  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31600$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31601fi
31602
31603
31604
31605
31606
31607
31608# Check whether --with-import-modules was given.
31609if test "${with_import_modules+set}" = set; then :
31610  withval=$with_import_modules;
31611fi
31612
31613
31614  if test "x$with_import_modules" != x \
31615      && test "x$with_import_modules" != "xno"; then
31616    if test -d "$with_import_modules"; then
31617      IMPORT_MODULES_TOPDIR="$with_import_modules"
31618
31619  # Only process if variable expands to non-empty
31620
31621  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31623
31624  # Input might be given as Windows format, start by converting to
31625  # unix format.
31626  path="$IMPORT_MODULES_TOPDIR"
31627  new_path=`$CYGPATH -u "$path"`
31628
31629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31632  # "foo.exe" is OK but "foo" is an error.
31633  #
31634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31635  # It is also a way to make sure we got the proper file name for the real test later on.
31636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31637  if test "x$test_shortpath" = x; then
31638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31639$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31640    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31641  fi
31642
31643  # Call helper function which possibly converts this using DOS-style short mode.
31644  # If so, the updated path is stored in $new_path.
31645
31646  input_path="$new_path"
31647  # Check if we need to convert this using DOS-style short mode. If the path
31648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31649  # take no chances and rewrite it.
31650  # Note: m4 eats our [], so we need to use [ and ] instead.
31651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31652  if test "x$has_forbidden_chars" != x; then
31653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31657      # Going to short mode and back again did indeed matter. Since short mode is
31658      # case insensitive, let's make it lowercase to improve readability.
31659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31660      # Now convert it back to Unix-style (cygpath)
31661      input_path=`$CYGPATH -u "$shortmode_path"`
31662      new_path="$input_path"
31663    fi
31664  fi
31665
31666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31667  if test "x$test_cygdrive_prefix" = x; then
31668    # As a simple fix, exclude /usr/bin since it's not a real path.
31669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31671      # a path prefixed by /cygdrive for fixpath to work.
31672      new_path="$CYGWIN_ROOT_PATH$input_path"
31673    fi
31674  fi
31675
31676
31677  if test "x$path" != "x$new_path"; then
31678    IMPORT_MODULES_TOPDIR="$new_path"
31679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31680$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31681  fi
31682
31683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31684
31685  path="$IMPORT_MODULES_TOPDIR"
31686  has_colon=`$ECHO $path | $GREP ^.:`
31687  new_path="$path"
31688  if test "x$has_colon" = x; then
31689    # Not in mixed or Windows style, start by that.
31690    new_path=`cmd //c echo $path`
31691  fi
31692
31693
31694  input_path="$new_path"
31695  # Check if we need to convert this using DOS-style short mode. If the path
31696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31697  # take no chances and rewrite it.
31698  # Note: m4 eats our [], so we need to use [ and ] instead.
31699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31700  if test "x$has_forbidden_chars" != x; then
31701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31703  fi
31704
31705
31706  windows_path="$new_path"
31707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31708    unix_path=`$CYGPATH -u "$windows_path"`
31709    new_path="$unix_path"
31710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31712    new_path="$unix_path"
31713  fi
31714
31715  if test "x$path" != "x$new_path"; then
31716    IMPORT_MODULES_TOPDIR="$new_path"
31717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31718$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31719  fi
31720
31721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31723
31724    else
31725      # We're on a unix platform. Hooray! :)
31726      path="$IMPORT_MODULES_TOPDIR"
31727      has_space=`$ECHO "$path" | $GREP " "`
31728      if test "x$has_space" != x; then
31729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31730$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31732      fi
31733
31734      # Use eval to expand a potential ~
31735      eval path="$path"
31736      if test ! -f "$path" && test ! -d "$path"; then
31737        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31738      fi
31739
31740      if test -d "$path"; then
31741        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31742      else
31743        dir="`$DIRNAME "$path"`"
31744        base="`$BASENAME "$path"`"
31745        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31746      fi
31747    fi
31748  fi
31749
31750    elif test -e "$with_import_modules"; then
31751      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31752      $RM -rf "$IMPORT_MODULES_TOPDIR"
31753      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31754      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31755        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31756      fi
31757    else
31758      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31759    fi
31760  fi
31761
31762  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31763    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31764  fi
31765  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31766    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31767  fi
31768  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31769    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31770  fi
31771  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31772    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31773  fi
31774  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31775    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31776  fi
31777  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31778    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31779  fi
31780  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31781    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31782  fi
31783  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31784    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31785  fi
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797###############################################################################
31798#
31799# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31800# native code.
31801#
31802###############################################################################
31803
31804# See if we are doing a complete static build or not
31805
31806  # Check whether --enable-static-build was given.
31807if test "${enable_static_build+set}" = set; then :
31808  enableval=$enable_static_build;
31809fi
31810
31811  STATIC_BUILD=false
31812  if test "x$enable_static_build" = "xyes"; then
31813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31814$as_echo_n "checking if static build is enabled... " >&6; }
31815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31816$as_echo "yes" >&6; }
31817    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31818      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31819    fi
31820    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31821    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31822    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31823    STATIC_BUILD=true
31824  elif test "x$enable_static_build" = "xno"; then
31825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31826$as_echo_n "checking if static build is enabled... " >&6; }
31827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31828$as_echo "no" >&6; }
31829  elif test "x$enable_static_build" != "x"; then
31830    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31831  fi
31832
31833
31834
31835
31836# First determine the toolchain type (compiler family)
31837
31838
31839# Check whether --with-toolchain-type was given.
31840if test "${with_toolchain_type+set}" = set; then :
31841  withval=$with_toolchain_type;
31842fi
31843
31844
31845  # Use indirect variable referencing
31846  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31847  VALID_TOOLCHAINS=${!toolchain_var_name}
31848
31849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31850    if test -n "$XCODEBUILD"; then
31851      # On Mac OS X, default toolchain to clang after Xcode 5
31852      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31853      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31854      if test $? -ne 0; then
31855        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31856      fi
31857      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31858          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31859          $CUT -f 1 -d .`
31860      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31861$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31862      if test $XCODE_MAJOR_VERSION -ge 5; then
31863          DEFAULT_TOOLCHAIN="clang"
31864      else
31865          DEFAULT_TOOLCHAIN="gcc"
31866      fi
31867    else
31868      # If Xcode is not installed, but the command line tools are
31869      # then we can't run xcodebuild. On these systems we should
31870      # default to clang
31871      DEFAULT_TOOLCHAIN="clang"
31872    fi
31873  else
31874    # First toolchain type in the list is the default
31875    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31876  fi
31877
31878  if test "x$with_toolchain_type" = xlist; then
31879    # List all toolchains
31880    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31881$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31882    for toolchain in $VALID_TOOLCHAINS; do
31883      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31884      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31885      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31886    done
31887
31888    exit 0
31889  elif test "x$with_toolchain_type" != x; then
31890    # User override; check that it is valid
31891    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31892      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31893$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31894      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31895$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31896      as_fn_error $? "Cannot continue." "$LINENO" 5
31897    fi
31898    TOOLCHAIN_TYPE=$with_toolchain_type
31899  else
31900    # No flag given, use default
31901    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31902  fi
31903
31904
31905  TOOLCHAIN_CC_BINARY_clang="clang"
31906  TOOLCHAIN_CC_BINARY_gcc="gcc"
31907  TOOLCHAIN_CC_BINARY_microsoft="cl"
31908  TOOLCHAIN_CC_BINARY_solstudio="cc"
31909  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31910
31911  TOOLCHAIN_CXX_BINARY_clang="clang++"
31912  TOOLCHAIN_CXX_BINARY_gcc="g++"
31913  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31914  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31915  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31916
31917  # Use indirect variable referencing
31918  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31919  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31920  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31921  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31922  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31923  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31924  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31925  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31926
31927
31928  # Define filename patterns
31929  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31930    LIBRARY_PREFIX=
31931    SHARED_LIBRARY_SUFFIX='.dll'
31932    STATIC_LIBRARY_SUFFIX='.lib'
31933    SHARED_LIBRARY='$1.dll'
31934    STATIC_LIBRARY='$1.lib'
31935    OBJ_SUFFIX='.obj'
31936    EXE_SUFFIX='.exe'
31937  else
31938    LIBRARY_PREFIX=lib
31939    SHARED_LIBRARY_SUFFIX='.so'
31940    STATIC_LIBRARY_SUFFIX='.a'
31941    SHARED_LIBRARY='lib$1.so'
31942    STATIC_LIBRARY='lib$1.a'
31943    OBJ_SUFFIX='.o'
31944    EXE_SUFFIX=''
31945    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31946      # For full static builds, we're overloading the SHARED_LIBRARY
31947      # variables in order to limit the amount of changes required.
31948      # It would be better to remove SHARED and just use LIBRARY and
31949      # LIBRARY_SUFFIX for libraries that can be built either
31950      # shared or static and use STATIC_* for libraries that are
31951      # always built statically.
31952      if test "x$STATIC_BUILD" = xtrue; then
31953        SHARED_LIBRARY='lib$1.a'
31954        SHARED_LIBRARY_SUFFIX='.a'
31955      else
31956        SHARED_LIBRARY='lib$1.dylib'
31957        SHARED_LIBRARY_SUFFIX='.dylib'
31958      fi
31959    fi
31960  fi
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31972    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31973$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31974  else
31975    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31976$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31977  fi
31978
31979
31980# User supplied flags should be used when configure detects compilers
31981
31982  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31983    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31984$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31985  fi
31986
31987  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31988    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31989$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31990  fi
31991
31992  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31993    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31994$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31995  fi
31996
31997
31998# Check whether --with-extra-cflags was given.
31999if test "${with_extra_cflags+set}" = set; then :
32000  withval=$with_extra_cflags;
32001fi
32002
32003
32004
32005# Check whether --with-extra-cxxflags was given.
32006if test "${with_extra_cxxflags+set}" = set; then :
32007  withval=$with_extra_cxxflags;
32008fi
32009
32010
32011
32012# Check whether --with-extra-ldflags was given.
32013if test "${with_extra_ldflags+set}" = set; then :
32014  withval=$with_extra_ldflags;
32015fi
32016
32017
32018  EXTRA_CFLAGS="$with_extra_cflags"
32019  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32020  EXTRA_LDFLAGS="$with_extra_ldflags"
32021
32022
32023
32024
32025
32026  # The global CFLAGS and LDLAGS variables are used by configure tests and
32027  # should include the extra parameters
32028  CFLAGS="$EXTRA_CFLAGS"
32029  CXXFLAGS="$EXTRA_CXXFLAGS"
32030  LDFLAGS="$EXTRA_LDFLAGS"
32031  CPPFLAGS=""
32032
32033# The sysroot cflags are needed for configure to be able to run the compilers
32034
32035  if test "x$SYSROOT" != "x"; then
32036    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32037      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32038        # Solaris Studio does not have a concept of sysroot. Instead we must
32039        # make sure the default include and lib dirs are appended to each
32040        # compile and link command line. Must also add -I-xbuiltin to enable
32041        # inlining of system functions and intrinsics.
32042        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32043        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32044            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32045      fi
32046    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32047      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32048      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32049    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32050      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32051      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32052    fi
32053    # The global CFLAGS and LDFLAGS variables need these for configure to function
32054    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32055    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32056    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32057    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32058  fi
32059
32060  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32061    # We also need -iframework<path>/System/Library/Frameworks
32062    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32063    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32064    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32065    # set this here so it doesn't have to be peppered throughout the forest
32066    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32067    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32068  fi
32069
32070
32071
32072
32073
32074# Then detect the actual binaries needed
32075
32076  # FIXME: Is this needed?
32077  ac_ext=cpp
32078ac_cpp='$CXXCPP $CPPFLAGS'
32079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32082
32083
32084  # Store the CFLAGS etc passed to the configure script.
32085  ORG_CFLAGS="$CFLAGS"
32086  ORG_CXXFLAGS="$CXXFLAGS"
32087
32088  # autoconf magic only relies on PATH, so update it if tools dir is specified
32089  OLD_PATH="$PATH"
32090
32091  # On Windows, we need to detect the visual studio installation first.
32092  # This will change the PATH, but we need to keep that new PATH even
32093  # after toolchain detection is done, since the compiler (on x86) uses
32094  # it for DLL resolution in runtime.
32095  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32096      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32097
32098  # Store path to cygwin link.exe to help excluding it when searching for
32099  # VS linker. This must be done before changing the PATH when looking for VS.
32100  # Extract the first word of "link", so it can be a program name with args.
32101set dummy link; ac_word=$2
32102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32103$as_echo_n "checking for $ac_word... " >&6; }
32104if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32105  $as_echo_n "(cached) " >&6
32106else
32107  case $CYGWIN_LINK in
32108  [\\/]* | ?:[\\/]*)
32109  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32110  ;;
32111  *)
32112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32113for as_dir in $PATH
32114do
32115  IFS=$as_save_IFS
32116  test -z "$as_dir" && as_dir=.
32117    for ac_exec_ext in '' $ac_executable_extensions; do
32118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32119    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32121    break 2
32122  fi
32123done
32124  done
32125IFS=$as_save_IFS
32126
32127  ;;
32128esac
32129fi
32130CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32131if test -n "$CYGWIN_LINK"; then
32132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32133$as_echo "$CYGWIN_LINK" >&6; }
32134else
32135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32136$as_echo "no" >&6; }
32137fi
32138
32139
32140  if test "x$CYGWIN_LINK" != x; then
32141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32142$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32143    "$CYGWIN_LINK" --version > /dev/null
32144    if test $? -eq 0 ; then
32145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32146$as_echo "yes" >&6; }
32147    else
32148      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32149$as_echo "no" >&6; }
32150      # This might be the VS linker. Don't exclude it later on.
32151      CYGWIN_LINK=""
32152    fi
32153  fi
32154
32155  # First-hand choice is to locate and run the vsvars bat file.
32156
32157
32158# Check whether --with-toolchain-version was given.
32159if test "${with_toolchain_version+set}" = set; then :
32160  withval=$with_toolchain_version;
32161fi
32162
32163
32164  if test "x$with_toolchain_version" = xlist; then
32165    # List all toolchains
32166    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32167$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32168    for version in $VALID_VS_VERSIONS; do
32169      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32170      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32171    done
32172
32173    exit 0
32174  elif test "x$DEVKIT_VS_VERSION" != x; then
32175    VS_VERSION=$DEVKIT_VS_VERSION
32176    TOOLCHAIN_VERSION=$VS_VERSION
32177    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32178    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32179    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32180    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32181    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32182    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32183
32184    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32185    # can still be exported as INCLUDE for compiler invocations without
32186    # SYSROOT_CFLAGS
32187    OLDIFS="$IFS"
32188    IFS=";"
32189    for i in $DEVKIT_VS_INCLUDE; do
32190      ipath=$i
32191
32192  unix_path="$ipath"
32193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194    windows_path=`$CYGPATH -m "$unix_path"`
32195    ipath="$windows_path"
32196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32197    windows_path=`cmd //c echo $unix_path`
32198    ipath="$windows_path"
32199  fi
32200
32201      VS_INCLUDE="$VS_INCLUDE;$ipath"
32202    done
32203    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32204    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32205    for i in $DEVKIT_VS_LIB; do
32206      libpath=$i
32207
32208  unix_path="$libpath"
32209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32210    windows_path=`$CYGPATH -m "$unix_path"`
32211    libpath="$windows_path"
32212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32213    windows_path=`cmd //c echo $unix_path`
32214    libpath="$windows_path"
32215  fi
32216
32217      VS_LIB="$VS_LIB;$libpath"
32218    done
32219    IFS="$OLDIFS"
32220
32221    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32222$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32223
32224  elif test "x$with_toolchain_version" != x; then
32225    # User override; check that it is valid
32226    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32227      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32228$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32229      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32230$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32231      as_fn_error $? "Cannot continue." "$LINENO" 5
32232    fi
32233    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32234  else
32235    # No flag given, use default
32236    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32237  fi
32238
32239  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32240
32241  VS_VERSION="$VS_VERSION"
32242  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32243  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32244  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32245  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32246
32247  # When using --with-tools-dir, assume it points to the correct and default
32248  # version of Visual Studio or that --with-toolchain-version was also set.
32249  if test "x$with_tools_dir" != x; then
32250
32251  if test "x$VS_ENV_CMD" = x; then
32252    VS_VERSION="${VS_VERSION}"
32253    VS_BASE="$with_tools_dir/../.."
32254    METHOD="--with-tools-dir"
32255
32256    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32257      VCVARSFILE="vc/bin/vcvars32.bat"
32258    else
32259      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32260    fi
32261
32262
32263  windows_path="$VS_BASE"
32264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32265    unix_path=`$CYGPATH -u "$windows_path"`
32266    VS_BASE="$unix_path"
32267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32269    VS_BASE="$unix_path"
32270  fi
32271
32272    if test -d "$VS_BASE"; then
32273      if test -f "$VS_BASE/$VCVARSFILE"; then
32274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32275$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32276        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32277        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32278        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32279        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32280      else
32281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32282$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32284$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32285      fi
32286    fi
32287  fi
32288
32289
32290  if test "x$VS_ENV_CMD" = x; then
32291    VS_VERSION="${VS_VERSION}"
32292    VS_BASE="$with_tools_dir/../../.."
32293    METHOD="--with-tools-dir"
32294
32295    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32296      VCVARSFILE="vc/bin/vcvars32.bat"
32297    else
32298      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32299    fi
32300
32301
32302  windows_path="$VS_BASE"
32303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32304    unix_path=`$CYGPATH -u "$windows_path"`
32305    VS_BASE="$unix_path"
32306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32308    VS_BASE="$unix_path"
32309  fi
32310
32311    if test -d "$VS_BASE"; then
32312      if test -f "$VS_BASE/$VCVARSFILE"; then
32313        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32314$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32315        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32316        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32317        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32318        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32319      else
32320        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32321$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32322        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32323$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32324      fi
32325    fi
32326  fi
32327
32328    if test "x$VS_ENV_CMD" = x; then
32329      # Having specified an argument which is incorrect will produce an instant failure;
32330      # we should not go on looking
32331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32332$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32333      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32334$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32335      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32336$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32337      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32338    fi
32339  fi
32340
32341  VS_ENV_CMD=""
32342  VS_ENV_ARGS=""
32343
32344  if test "x$VS_COMNTOOLS" != x; then
32345
32346  if test "x$VS_ENV_CMD" = x; then
32347    VS_VERSION="${VS_VERSION}"
32348    VS_BASE="$VS_COMNTOOLS/../.."
32349    METHOD="$VS_COMNTOOLS_VAR variable"
32350
32351    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32352      VCVARSFILE="vc/bin/vcvars32.bat"
32353    else
32354      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32355    fi
32356
32357
32358  windows_path="$VS_BASE"
32359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32360    unix_path=`$CYGPATH -u "$windows_path"`
32361    VS_BASE="$unix_path"
32362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32364    VS_BASE="$unix_path"
32365  fi
32366
32367    if test -d "$VS_BASE"; then
32368      if test -f "$VS_BASE/$VCVARSFILE"; then
32369        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32370$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32371        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32372        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32373        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32374        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32375      else
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32377$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32378        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32379$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32380      fi
32381    fi
32382  fi
32383
32384  fi
32385  if test "x$PROGRAMFILES" != x; then
32386
32387  if test "x$VS_ENV_CMD" = x; then
32388    VS_VERSION="${VS_VERSION}"
32389    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32390    METHOD="well-known name"
32391
32392    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32393      VCVARSFILE="vc/bin/vcvars32.bat"
32394    else
32395      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32396    fi
32397
32398
32399  windows_path="$VS_BASE"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    VS_BASE="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    VS_BASE="$unix_path"
32406  fi
32407
32408    if test -d "$VS_BASE"; then
32409      if test -f "$VS_BASE/$VCVARSFILE"; then
32410        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32411$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32412        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32413        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32414        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32415        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32416      else
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32418$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32420$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32421      fi
32422    fi
32423  fi
32424
32425  fi
32426  # Work around the insanely named ProgramFiles(x86) env variable
32427  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32428  if test "x$PROGRAMFILES_X86" != x; then
32429
32430  if test "x$VS_ENV_CMD" = x; then
32431    VS_VERSION="${VS_VERSION}"
32432    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32433    METHOD="well-known name"
32434
32435    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32436      VCVARSFILE="vc/bin/vcvars32.bat"
32437    else
32438      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32439    fi
32440
32441
32442  windows_path="$VS_BASE"
32443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32444    unix_path=`$CYGPATH -u "$windows_path"`
32445    VS_BASE="$unix_path"
32446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32448    VS_BASE="$unix_path"
32449  fi
32450
32451    if test -d "$VS_BASE"; then
32452      if test -f "$VS_BASE/$VCVARSFILE"; then
32453        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32454$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32455        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32456        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32457        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32458        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32459      else
32460        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32461$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32462        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32463$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32464      fi
32465    fi
32466  fi
32467
32468  fi
32469
32470  if test "x$VS_ENV_CMD" = x; then
32471    VS_VERSION="${VS_VERSION}"
32472    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32473    METHOD="well-known name"
32474
32475    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32476      VCVARSFILE="vc/bin/vcvars32.bat"
32477    else
32478      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32479    fi
32480
32481
32482  windows_path="$VS_BASE"
32483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32484    unix_path=`$CYGPATH -u "$windows_path"`
32485    VS_BASE="$unix_path"
32486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32488    VS_BASE="$unix_path"
32489  fi
32490
32491    if test -d "$VS_BASE"; then
32492      if test -f "$VS_BASE/$VCVARSFILE"; then
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32494$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32495        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32496        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32497        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32498        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32499      else
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32501$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32503$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32504      fi
32505    fi
32506  fi
32507
32508
32509  if test "x$VS_ENV_CMD" = x; then
32510    VS_VERSION="${VS_VERSION}"
32511    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32512    METHOD="well-known name"
32513
32514    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32515      VCVARSFILE="vc/bin/vcvars32.bat"
32516    else
32517      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32518    fi
32519
32520
32521  windows_path="$VS_BASE"
32522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32523    unix_path=`$CYGPATH -u "$windows_path"`
32524    VS_BASE="$unix_path"
32525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32527    VS_BASE="$unix_path"
32528  fi
32529
32530    if test -d "$VS_BASE"; then
32531      if test -f "$VS_BASE/$VCVARSFILE"; then
32532        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32533$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32534        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32535        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32536        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32537        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32538      else
32539        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32540$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32542$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32543      fi
32544    fi
32545  fi
32546
32547
32548  if test "x$SDK_INSTALL_DIR" != x; then
32549    if test "x$ProgramW6432" != x; then
32550
32551  if test "x$VS_ENV_CMD" = x; then
32552    VS_VERSION="${VS_VERSION}"
32553    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32554    METHOD="well-known name"
32555
32556  windows_path="$WIN_SDK_BASE"
32557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32558    unix_path=`$CYGPATH -u "$windows_path"`
32559    WIN_SDK_BASE="$unix_path"
32560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32562    WIN_SDK_BASE="$unix_path"
32563  fi
32564
32565    if test -d "$WIN_SDK_BASE"; then
32566      # There have been cases of partial or broken SDK installations. A missing
32567      # lib dir is not going to work.
32568      if test ! -d "$WIN_SDK_BASE/lib"; then
32569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32571        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32572$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32573      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32575$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32576        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32577        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32578          VS_ENV_ARGS="/x86"
32579        else
32580          VS_ENV_ARGS="/x64"
32581        fi
32582        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32583        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32584        # TODO: improve detection for other versions of SDK
32585        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32586      else
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32588$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32590$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32591      fi
32592    fi
32593  fi
32594
32595    fi
32596    if test "x$PROGRAMW6432" != x; then
32597
32598  if test "x$VS_ENV_CMD" = x; then
32599    VS_VERSION="${VS_VERSION}"
32600    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32601    METHOD="well-known name"
32602
32603  windows_path="$WIN_SDK_BASE"
32604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32605    unix_path=`$CYGPATH -u "$windows_path"`
32606    WIN_SDK_BASE="$unix_path"
32607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32609    WIN_SDK_BASE="$unix_path"
32610  fi
32611
32612    if test -d "$WIN_SDK_BASE"; then
32613      # There have been cases of partial or broken SDK installations. A missing
32614      # lib dir is not going to work.
32615      if test ! -d "$WIN_SDK_BASE/lib"; then
32616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32617$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32619$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32620      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32623        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32624        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32625          VS_ENV_ARGS="/x86"
32626        else
32627          VS_ENV_ARGS="/x64"
32628        fi
32629        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32630        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32631        # TODO: improve detection for other versions of SDK
32632        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32633      else
32634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32635$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32636        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32637$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32638      fi
32639    fi
32640  fi
32641
32642    fi
32643    if test "x$PROGRAMFILES" != x; then
32644
32645  if test "x$VS_ENV_CMD" = x; then
32646    VS_VERSION="${VS_VERSION}"
32647    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32648    METHOD="well-known name"
32649
32650  windows_path="$WIN_SDK_BASE"
32651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32652    unix_path=`$CYGPATH -u "$windows_path"`
32653    WIN_SDK_BASE="$unix_path"
32654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32656    WIN_SDK_BASE="$unix_path"
32657  fi
32658
32659    if test -d "$WIN_SDK_BASE"; then
32660      # There have been cases of partial or broken SDK installations. A missing
32661      # lib dir is not going to work.
32662      if test ! -d "$WIN_SDK_BASE/lib"; then
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32666$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32667      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32669$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32670        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32671        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32672          VS_ENV_ARGS="/x86"
32673        else
32674          VS_ENV_ARGS="/x64"
32675        fi
32676        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32677        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32678        # TODO: improve detection for other versions of SDK
32679        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32680      else
32681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32682$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32684$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32685      fi
32686    fi
32687  fi
32688
32689    fi
32690
32691  if test "x$VS_ENV_CMD" = x; then
32692    VS_VERSION="${VS_VERSION}"
32693    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32694    METHOD="well-known name"
32695
32696  windows_path="$WIN_SDK_BASE"
32697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32698    unix_path=`$CYGPATH -u "$windows_path"`
32699    WIN_SDK_BASE="$unix_path"
32700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32702    WIN_SDK_BASE="$unix_path"
32703  fi
32704
32705    if test -d "$WIN_SDK_BASE"; then
32706      # There have been cases of partial or broken SDK installations. A missing
32707      # lib dir is not going to work.
32708      if test ! -d "$WIN_SDK_BASE/lib"; then
32709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32710$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32711        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32712$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32713      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32715$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32716        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32717        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32718          VS_ENV_ARGS="/x86"
32719        else
32720          VS_ENV_ARGS="/x64"
32721        fi
32722        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32723        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32724        # TODO: improve detection for other versions of SDK
32725        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32726      else
32727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32728$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32730$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32731      fi
32732    fi
32733  fi
32734
32735
32736  if test "x$VS_ENV_CMD" = x; then
32737    VS_VERSION="${VS_VERSION}"
32738    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32739    METHOD="well-known name"
32740
32741  windows_path="$WIN_SDK_BASE"
32742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32743    unix_path=`$CYGPATH -u "$windows_path"`
32744    WIN_SDK_BASE="$unix_path"
32745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32747    WIN_SDK_BASE="$unix_path"
32748  fi
32749
32750    if test -d "$WIN_SDK_BASE"; then
32751      # There have been cases of partial or broken SDK installations. A missing
32752      # lib dir is not going to work.
32753      if test ! -d "$WIN_SDK_BASE/lib"; then
32754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32755$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32757$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32758      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32760$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32761        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32762        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32763          VS_ENV_ARGS="/x86"
32764        else
32765          VS_ENV_ARGS="/x64"
32766        fi
32767        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32768        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32769        # TODO: improve detection for other versions of SDK
32770        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32771      else
32772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32773$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32775$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32776      fi
32777    fi
32778  fi
32779
32780  fi
32781
32782    if test "x$VS_ENV_CMD" != x; then
32783      TOOLCHAIN_VERSION=$VS_VERSION
32784      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32785      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32786      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32787      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32788      # The rest of the variables are already evaled while probing
32789      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32790$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32791      break
32792    fi
32793  done
32794
32795
32796  # If we have a devkit, skip all of the below.
32797  if test "x$DEVKIT_VS_VERSION" = x; then
32798    if test "x$VS_ENV_CMD" != x; then
32799      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32800
32801  # Only process if variable expands to non-empty
32802
32803  if test "x$VS_ENV_CMD" != x; then
32804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805
32806  # First separate the path from the arguments. This will split at the first
32807  # space.
32808  complete="$VS_ENV_CMD"
32809  path="${complete%% *}"
32810  tmp="$complete EOL"
32811  arguments="${tmp#* }"
32812
32813  # Input might be given as Windows format, start by converting to
32814  # unix format.
32815  new_path=`$CYGPATH -u "$path"`
32816
32817  # Now try to locate executable using which
32818  new_path=`$WHICH "$new_path" 2> /dev/null`
32819  # bat and cmd files are not always considered executable in cygwin causing which
32820  # to not find them
32821  if test "x$new_path" = x \
32822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32824    new_path=`$CYGPATH -u "$path"`
32825  fi
32826  if test "x$new_path" = x; then
32827    # Oops. Which didn't find the executable.
32828    # The splitting of arguments from the executable at a space might have been incorrect,
32829    # since paths with space are more likely in Windows. Give it another try with the whole
32830    # argument.
32831    path="$complete"
32832    arguments="EOL"
32833    new_path=`$CYGPATH -u "$path"`
32834    new_path=`$WHICH "$new_path" 2> /dev/null`
32835    # bat and cmd files are not always considered executable in cygwin causing which
32836    # to not find them
32837    if test "x$new_path" = x \
32838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32840      new_path=`$CYGPATH -u "$path"`
32841    fi
32842    if test "x$new_path" = x; then
32843      # It's still not found. Now this is an unrecoverable error.
32844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32845$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32846      has_space=`$ECHO "$complete" | $GREP " "`
32847      if test "x$has_space" != x; then
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32850      fi
32851      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32852    fi
32853  fi
32854
32855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32858  # "foo.exe" is OK but "foo" is an error.
32859  #
32860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32861  # It is also a way to make sure we got the proper file name for the real test later on.
32862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32863  if test "x$test_shortpath" = x; then
32864    # Short path failed, file does not exist as specified.
32865    # Try adding .exe or .cmd
32866    if test -f "${new_path}.exe"; then
32867      input_to_shortpath="${new_path}.exe"
32868    elif test -f "${new_path}.cmd"; then
32869      input_to_shortpath="${new_path}.cmd"
32870    else
32871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32872$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32875      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32876    fi
32877  else
32878    input_to_shortpath="$new_path"
32879  fi
32880
32881  # Call helper function which possibly converts this using DOS-style short mode.
32882  # If so, the updated path is stored in $new_path.
32883  new_path="$input_to_shortpath"
32884
32885  input_path="$input_to_shortpath"
32886  # Check if we need to convert this using DOS-style short mode. If the path
32887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32888  # take no chances and rewrite it.
32889  # Note: m4 eats our [], so we need to use [ and ] instead.
32890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32891  if test "x$has_forbidden_chars" != x; then
32892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32896      # Going to short mode and back again did indeed matter. Since short mode is
32897      # case insensitive, let's make it lowercase to improve readability.
32898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899      # Now convert it back to Unix-style (cygpath)
32900      input_path=`$CYGPATH -u "$shortmode_path"`
32901      new_path="$input_path"
32902    fi
32903  fi
32904
32905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32906  if test "x$test_cygdrive_prefix" = x; then
32907    # As a simple fix, exclude /usr/bin since it's not a real path.
32908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32910      # a path prefixed by /cygdrive for fixpath to work.
32911      new_path="$CYGWIN_ROOT_PATH$input_path"
32912    fi
32913  fi
32914
32915  # remove trailing .exe if any
32916  new_path="${new_path/%.exe/}"
32917
32918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32919
32920  # First separate the path from the arguments. This will split at the first
32921  # space.
32922  complete="$VS_ENV_CMD"
32923  path="${complete%% *}"
32924  tmp="$complete EOL"
32925  arguments="${tmp#* }"
32926
32927  # Input might be given as Windows format, start by converting to
32928  # unix format.
32929  new_path="$path"
32930
32931  windows_path="$new_path"
32932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32933    unix_path=`$CYGPATH -u "$windows_path"`
32934    new_path="$unix_path"
32935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32937    new_path="$unix_path"
32938  fi
32939
32940
32941  # Now try to locate executable using which
32942  new_path=`$WHICH "$new_path" 2> /dev/null`
32943
32944  if test "x$new_path" = x; then
32945    # Oops. Which didn't find the executable.
32946    # The splitting of arguments from the executable at a space might have been incorrect,
32947    # since paths with space are more likely in Windows. Give it another try with the whole
32948    # argument.
32949    path="$complete"
32950    arguments="EOL"
32951    new_path="$path"
32952
32953  windows_path="$new_path"
32954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32955    unix_path=`$CYGPATH -u "$windows_path"`
32956    new_path="$unix_path"
32957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32959    new_path="$unix_path"
32960  fi
32961
32962
32963    new_path=`$WHICH "$new_path" 2> /dev/null`
32964    # bat and cmd files are not always considered executable in MSYS causing which
32965    # to not find them
32966    if test "x$new_path" = x \
32967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32969      new_path="$path"
32970
32971  windows_path="$new_path"
32972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32973    unix_path=`$CYGPATH -u "$windows_path"`
32974    new_path="$unix_path"
32975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32977    new_path="$unix_path"
32978  fi
32979
32980    fi
32981
32982    if test "x$new_path" = x; then
32983      # It's still not found. Now this is an unrecoverable error.
32984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32985$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32986      has_space=`$ECHO "$complete" | $GREP " "`
32987      if test "x$has_space" != x; then
32988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32990      fi
32991      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32992    fi
32993  fi
32994
32995  # Now new_path has a complete unix path to the binary
32996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32997    # Keep paths in /bin as-is, but remove trailing .exe if any
32998    new_path="${new_path/%.exe/}"
32999    # Do not save /bin paths to all_fixpath_prefixes!
33000  else
33001    # Not in mixed or Windows style, start by that.
33002    new_path=`cmd //c echo $new_path`
33003
33004  input_path="$new_path"
33005  # Check if we need to convert this using DOS-style short mode. If the path
33006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33007  # take no chances and rewrite it.
33008  # Note: m4 eats our [], so we need to use [ and ] instead.
33009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33010  if test "x$has_forbidden_chars" != x; then
33011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33013  fi
33014
33015    # Output is in $new_path
33016
33017  windows_path="$new_path"
33018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33019    unix_path=`$CYGPATH -u "$windows_path"`
33020    new_path="$unix_path"
33021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33023    new_path="$unix_path"
33024  fi
33025
33026    # remove trailing .exe if any
33027    new_path="${new_path/%.exe/}"
33028
33029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33031  fi
33032
33033    else
33034      # We're on a unix platform. Hooray! :)
33035      # First separate the path from the arguments. This will split at the first
33036      # space.
33037      complete="$VS_ENV_CMD"
33038      path="${complete%% *}"
33039      tmp="$complete EOL"
33040      arguments="${tmp#* }"
33041
33042      # Cannot rely on the command "which" here since it doesn't always work.
33043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33044      if test -z "$is_absolute_path"; then
33045        # Path to executable is not absolute. Find it.
33046        IFS_save="$IFS"
33047        IFS=:
33048        for p in $PATH; do
33049          if test -f "$p/$path" && test -x "$p/$path"; then
33050            new_path="$p/$path"
33051            break
33052          fi
33053        done
33054        IFS="$IFS_save"
33055      else
33056        # This is an absolute path, we can use it without further modifications.
33057        new_path="$path"
33058      fi
33059
33060      if test "x$new_path" = x; then
33061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33062$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33063        has_space=`$ECHO "$complete" | $GREP " "`
33064        if test "x$has_space" != x; then
33065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33067        fi
33068        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33069      fi
33070    fi
33071
33072    # Now join together the path and the arguments once again
33073    if test "x$arguments" != xEOL; then
33074      new_complete="$new_path ${arguments% *}"
33075    else
33076      new_complete="$new_path"
33077    fi
33078
33079    if test "x$complete" != "x$new_complete"; then
33080      VS_ENV_CMD="$new_complete"
33081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33082$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33083    fi
33084  fi
33085
33086
33087      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33089$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33090
33091      # We need to create a couple of temporary files.
33092      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33093      $MKDIR -p $VS_ENV_TMP_DIR
33094
33095      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33096      # Instead create a shell script which will set the relevant variables when run.
33097      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33098
33099  unix_path="$WINPATH_VS_ENV_CMD"
33100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33101    windows_path=`$CYGPATH -m "$unix_path"`
33102    WINPATH_VS_ENV_CMD="$windows_path"
33103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33104    windows_path=`cmd //c echo $unix_path`
33105    WINPATH_VS_ENV_CMD="$windows_path"
33106  fi
33107
33108      WINPATH_BASH="$BASH"
33109
33110  unix_path="$WINPATH_BASH"
33111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33112    windows_path=`$CYGPATH -m "$unix_path"`
33113    WINPATH_BASH="$windows_path"
33114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33115    windows_path=`cmd //c echo $unix_path`
33116    WINPATH_BASH="$windows_path"
33117  fi
33118
33119
33120      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33121      # script (executable by bash) that will setup the important variables.
33122      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33123      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33124      # This will end up something like:
33125      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33126      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33127      # These will end up something like:
33128      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33129      # The trailing space for everyone except PATH is no typo, but is needed due
33130      # to trailing \ in the Windows paths. These will be stripped later.
33131      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33132          >> $EXTRACT_VC_ENV_BAT_FILE
33133      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33134          >> $EXTRACT_VC_ENV_BAT_FILE
33135      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33136          >> $EXTRACT_VC_ENV_BAT_FILE
33137      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33138          >> $EXTRACT_VC_ENV_BAT_FILE
33139      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33140          >> $EXTRACT_VC_ENV_BAT_FILE
33141      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33142          >> $EXTRACT_VC_ENV_BAT_FILE
33143
33144      # Now execute the newly created bat file.
33145      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33146      # Change directory so we don't need to mess with Windows paths in redirects.
33147      cd $VS_ENV_TMP_DIR
33148      cmd /c extract-vs-env.bat | $CAT
33149      cd $CURDIR
33150
33151      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33152        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33153$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33154        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33155$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33156        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33157$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33158        as_fn_error $? "Cannot continue" "$LINENO" 5
33159      fi
33160
33161      # Now set all paths and other env variables. This will allow the rest of
33162      # the configure script to find and run the compiler in the proper way.
33163      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33164$as_echo "$as_me: Setting extracted environment variables" >&6;}
33165      . $VS_ENV_TMP_DIR/set-vs-env.sh
33166      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33167      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33168    else
33169      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33170      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33171$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33172    fi
33173  fi
33174
33175  # At this point, we should have correct variables in the environment, or we can't continue.
33176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33177$as_echo_n "checking for Visual Studio variables... " >&6; }
33178
33179  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33180      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33181    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33183$as_echo "present but broken" >&6; }
33184      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33185    else
33186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33187$as_echo "ok" >&6; }
33188      # Remove any trailing "\" ";" and " " from the variables.
33189      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33190      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33191      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33192      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33193      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33194      # Remove any paths containing # (typically F#) as that messes up make. This
33195      # is needed if visual studio was installed with F# support.
33196      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33197
33198
33199
33200
33201
33202      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33203      OLDIFS="$IFS"
33204      IFS=";"
33205      for i in $VS_INCLUDE; do
33206        ipath=$i
33207        # Only process non-empty elements
33208        if test "x$ipath" != x; then
33209          IFS="$OLDIFS"
33210          # Check that directory exists before calling fixup_path
33211          testpath=$ipath
33212
33213  windows_path="$testpath"
33214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33215    unix_path=`$CYGPATH -u "$windows_path"`
33216    testpath="$unix_path"
33217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33219    testpath="$unix_path"
33220  fi
33221
33222          if test -d "$testpath"; then
33223
33224  # Only process if variable expands to non-empty
33225
33226  if test "x$ipath" != x; then
33227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33228
33229  # Input might be given as Windows format, start by converting to
33230  # unix format.
33231  path="$ipath"
33232  new_path=`$CYGPATH -u "$path"`
33233
33234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33237  # "foo.exe" is OK but "foo" is an error.
33238  #
33239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33240  # It is also a way to make sure we got the proper file name for the real test later on.
33241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33242  if test "x$test_shortpath" = x; then
33243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33244$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33245    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33246  fi
33247
33248  # Call helper function which possibly converts this using DOS-style short mode.
33249  # If so, the updated path is stored in $new_path.
33250
33251  input_path="$new_path"
33252  # Check if we need to convert this using DOS-style short mode. If the path
33253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33254  # take no chances and rewrite it.
33255  # Note: m4 eats our [], so we need to use [ and ] instead.
33256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33257  if test "x$has_forbidden_chars" != x; then
33258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33262      # Going to short mode and back again did indeed matter. Since short mode is
33263      # case insensitive, let's make it lowercase to improve readability.
33264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33265      # Now convert it back to Unix-style (cygpath)
33266      input_path=`$CYGPATH -u "$shortmode_path"`
33267      new_path="$input_path"
33268    fi
33269  fi
33270
33271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33272  if test "x$test_cygdrive_prefix" = x; then
33273    # As a simple fix, exclude /usr/bin since it's not a real path.
33274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33276      # a path prefixed by /cygdrive for fixpath to work.
33277      new_path="$CYGWIN_ROOT_PATH$input_path"
33278    fi
33279  fi
33280
33281
33282  if test "x$path" != "x$new_path"; then
33283    ipath="$new_path"
33284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33285$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33286  fi
33287
33288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33289
33290  path="$ipath"
33291  has_colon=`$ECHO $path | $GREP ^.:`
33292  new_path="$path"
33293  if test "x$has_colon" = x; then
33294    # Not in mixed or Windows style, start by that.
33295    new_path=`cmd //c echo $path`
33296  fi
33297
33298
33299  input_path="$new_path"
33300  # Check if we need to convert this using DOS-style short mode. If the path
33301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33302  # take no chances and rewrite it.
33303  # Note: m4 eats our [], so we need to use [ and ] instead.
33304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33305  if test "x$has_forbidden_chars" != x; then
33306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33308  fi
33309
33310
33311  windows_path="$new_path"
33312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33313    unix_path=`$CYGPATH -u "$windows_path"`
33314    new_path="$unix_path"
33315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33317    new_path="$unix_path"
33318  fi
33319
33320  if test "x$path" != "x$new_path"; then
33321    ipath="$new_path"
33322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33323$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33324  fi
33325
33326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33328
33329    else
33330      # We're on a unix platform. Hooray! :)
33331      path="$ipath"
33332      has_space=`$ECHO "$path" | $GREP " "`
33333      if test "x$has_space" != x; then
33334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33335$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33337      fi
33338
33339      # Use eval to expand a potential ~
33340      eval path="$path"
33341      if test ! -f "$path" && test ! -d "$path"; then
33342        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33343      fi
33344
33345      if test -d "$path"; then
33346        ipath="`cd "$path"; $THEPWDCMD -L`"
33347      else
33348        dir="`$DIRNAME "$path"`"
33349        base="`$BASENAME "$path"`"
33350        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33351      fi
33352    fi
33353  fi
33354
33355            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33356          fi
33357          IFS=";"
33358        fi
33359      done
33360      # Convert VS_LIB into SYSROOT_LDFLAGS
33361      for i in $VS_LIB; do
33362        libpath=$i
33363        # Only process non-empty elements
33364        if test "x$libpath" != x; then
33365          IFS="$OLDIFS"
33366          # Check that directory exists before calling fixup_path
33367          testpath=$libpath
33368
33369  windows_path="$testpath"
33370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33371    unix_path=`$CYGPATH -u "$windows_path"`
33372    testpath="$unix_path"
33373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33375    testpath="$unix_path"
33376  fi
33377
33378          if test -d "$testpath"; then
33379
33380  # Only process if variable expands to non-empty
33381
33382  if test "x$libpath" != x; then
33383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384
33385  # Input might be given as Windows format, start by converting to
33386  # unix format.
33387  path="$libpath"
33388  new_path=`$CYGPATH -u "$path"`
33389
33390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33393  # "foo.exe" is OK but "foo" is an error.
33394  #
33395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33396  # It is also a way to make sure we got the proper file name for the real test later on.
33397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33398  if test "x$test_shortpath" = x; then
33399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33400$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33401    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33402  fi
33403
33404  # Call helper function which possibly converts this using DOS-style short mode.
33405  # If so, the updated path is stored in $new_path.
33406
33407  input_path="$new_path"
33408  # Check if we need to convert this using DOS-style short mode. If the path
33409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33410  # take no chances and rewrite it.
33411  # Note: m4 eats our [], so we need to use [ and ] instead.
33412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33413  if test "x$has_forbidden_chars" != x; then
33414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33418      # Going to short mode and back again did indeed matter. Since short mode is
33419      # case insensitive, let's make it lowercase to improve readability.
33420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33421      # Now convert it back to Unix-style (cygpath)
33422      input_path=`$CYGPATH -u "$shortmode_path"`
33423      new_path="$input_path"
33424    fi
33425  fi
33426
33427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33428  if test "x$test_cygdrive_prefix" = x; then
33429    # As a simple fix, exclude /usr/bin since it's not a real path.
33430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33432      # a path prefixed by /cygdrive for fixpath to work.
33433      new_path="$CYGWIN_ROOT_PATH$input_path"
33434    fi
33435  fi
33436
33437
33438  if test "x$path" != "x$new_path"; then
33439    libpath="$new_path"
33440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33441$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33442  fi
33443
33444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33445
33446  path="$libpath"
33447  has_colon=`$ECHO $path | $GREP ^.:`
33448  new_path="$path"
33449  if test "x$has_colon" = x; then
33450    # Not in mixed or Windows style, start by that.
33451    new_path=`cmd //c echo $path`
33452  fi
33453
33454
33455  input_path="$new_path"
33456  # Check if we need to convert this using DOS-style short mode. If the path
33457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33458  # take no chances and rewrite it.
33459  # Note: m4 eats our [], so we need to use [ and ] instead.
33460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33461  if test "x$has_forbidden_chars" != x; then
33462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33464  fi
33465
33466
33467  windows_path="$new_path"
33468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33469    unix_path=`$CYGPATH -u "$windows_path"`
33470    new_path="$unix_path"
33471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33473    new_path="$unix_path"
33474  fi
33475
33476  if test "x$path" != "x$new_path"; then
33477    libpath="$new_path"
33478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33479$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33480  fi
33481
33482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33484
33485    else
33486      # We're on a unix platform. Hooray! :)
33487      path="$libpath"
33488      has_space=`$ECHO "$path" | $GREP " "`
33489      if test "x$has_space" != x; then
33490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33491$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33493      fi
33494
33495      # Use eval to expand a potential ~
33496      eval path="$path"
33497      if test ! -f "$path" && test ! -d "$path"; then
33498        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33499      fi
33500
33501      if test -d "$path"; then
33502        libpath="`cd "$path"; $THEPWDCMD -L`"
33503      else
33504        dir="`$DIRNAME "$path"`"
33505        base="`$BASENAME "$path"`"
33506        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33507      fi
33508    fi
33509  fi
33510
33511            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33512          fi
33513          IFS=";"
33514        fi
33515      done
33516      IFS="$OLDIFS"
33517    fi
33518  else
33519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33520$as_echo "not found" >&6; }
33521
33522    if test "x$VS_ENV_CMD" = x; then
33523      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33524$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33525      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33526$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33527    else
33528      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33529$as_echo "$as_me: Running the extraction script failed." >&6;}
33530    fi
33531    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33532$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33533    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33534$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33535    as_fn_error $? "Cannot continue" "$LINENO" 5
33536  fi
33537
33538    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33539    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33540    PATH="$VS_PATH"
33541    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33542    export INCLUDE="$VS_INCLUDE"
33543    export LIB="$VS_LIB"
33544  else
33545    if test "x$XCODE_VERSION_OUTPUT" != x; then
33546      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33547      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33548      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33549    else
33550      # Currently we do not define this for other toolchains. This might change as the need arise.
33551      TOOLCHAIN_VERSION=
33552    fi
33553  fi
33554
33555
33556  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33557  # override all other locations.
33558  if test "x$TOOLCHAIN_PATH" != x; then
33559    PATH=$TOOLCHAIN_PATH:$PATH
33560  fi
33561
33562
33563  #
33564  # Setup the compilers (CC and CXX)
33565  #
33566
33567  COMPILER_NAME=C
33568  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33569
33570  if test "x$CC" != x; then
33571    # User has supplied compiler name already, always let that override.
33572    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33573$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33574    if test "x`basename $CC`" = "x$CC"; then
33575      # A command without a complete path is provided, search $PATH.
33576
33577      for ac_prog in $CC
33578do
33579  # Extract the first word of "$ac_prog", so it can be a program name with args.
33580set dummy $ac_prog; ac_word=$2
33581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33582$as_echo_n "checking for $ac_word... " >&6; }
33583if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33584  $as_echo_n "(cached) " >&6
33585else
33586  case $POTENTIAL_CC in
33587  [\\/]* | ?:[\\/]*)
33588  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33589  ;;
33590  *)
33591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33592for as_dir in $PATH
33593do
33594  IFS=$as_save_IFS
33595  test -z "$as_dir" && as_dir=.
33596    for ac_exec_ext in '' $ac_executable_extensions; do
33597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33598    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33600    break 2
33601  fi
33602done
33603  done
33604IFS=$as_save_IFS
33605
33606  ;;
33607esac
33608fi
33609POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33610if test -n "$POTENTIAL_CC"; then
33611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33612$as_echo "$POTENTIAL_CC" >&6; }
33613else
33614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33615$as_echo "no" >&6; }
33616fi
33617
33618
33619  test -n "$POTENTIAL_CC" && break
33620done
33621
33622      if test "x$POTENTIAL_CC" != x; then
33623        CC=$POTENTIAL_CC
33624      else
33625        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33626      fi
33627    else
33628      # Otherwise it might already be a complete path
33629      if test ! -x "$CC"; then
33630        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33631      fi
33632    fi
33633  else
33634    # No user supplied value. Locate compiler ourselves.
33635
33636    # If we are cross compiling, assume cross compilation tools follows the
33637    # cross compilation standard where they are prefixed with the autoconf
33638    # standard name for the target. For example the binary
33639    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33640    # If we are not cross compiling, then the default compiler name will be
33641    # used.
33642
33643    CC=
33644    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33645    # before checking the rest of the PATH.
33646    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33647    # step, this should not be necessary.
33648    if test -n "$TOOLCHAIN_PATH"; then
33649      PATH_save="$PATH"
33650      PATH="$TOOLCHAIN_PATH"
33651      if test -n "$ac_tool_prefix"; then
33652  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33653set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33655$as_echo_n "checking for $ac_word... " >&6; }
33656if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33657  $as_echo_n "(cached) " >&6
33658else
33659  case $TOOLCHAIN_PATH_CC in
33660  [\\/]* | ?:[\\/]*)
33661  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33662  ;;
33663  *)
33664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33665for as_dir in $PATH
33666do
33667  IFS=$as_save_IFS
33668  test -z "$as_dir" && as_dir=.
33669    for ac_exec_ext in '' $ac_executable_extensions; do
33670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33671    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33673    break 2
33674  fi
33675done
33676  done
33677IFS=$as_save_IFS
33678
33679  ;;
33680esac
33681fi
33682TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33683if test -n "$TOOLCHAIN_PATH_CC"; then
33684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33685$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33686else
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33688$as_echo "no" >&6; }
33689fi
33690
33691
33692fi
33693if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33694  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33695  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33696set dummy $SEARCH_LIST; ac_word=$2
33697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33698$as_echo_n "checking for $ac_word... " >&6; }
33699if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33700  $as_echo_n "(cached) " >&6
33701else
33702  case $ac_pt_TOOLCHAIN_PATH_CC in
33703  [\\/]* | ?:[\\/]*)
33704  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33705  ;;
33706  *)
33707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33708for as_dir in $PATH
33709do
33710  IFS=$as_save_IFS
33711  test -z "$as_dir" && as_dir=.
33712    for ac_exec_ext in '' $ac_executable_extensions; do
33713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33714    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33716    break 2
33717  fi
33718done
33719  done
33720IFS=$as_save_IFS
33721
33722  ;;
33723esac
33724fi
33725ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33726if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33728$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33729else
33730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33731$as_echo "no" >&6; }
33732fi
33733
33734  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33735    TOOLCHAIN_PATH_CC=""
33736  else
33737    case $cross_compiling:$ac_tool_warned in
33738yes:)
33739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33741ac_tool_warned=yes ;;
33742esac
33743    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33744  fi
33745else
33746  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33747fi
33748
33749      CC=$TOOLCHAIN_PATH_CC
33750      PATH="$PATH_save"
33751    fi
33752
33753    # AC_PATH_TOOL can't be run multiple times with the same variable,
33754    # so create a new name for this run.
33755    if test "x$CC" = x; then
33756      if test -n "$ac_tool_prefix"; then
33757  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33758set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33760$as_echo_n "checking for $ac_word... " >&6; }
33761if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33762  $as_echo_n "(cached) " >&6
33763else
33764  case $POTENTIAL_CC in
33765  [\\/]* | ?:[\\/]*)
33766  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33767  ;;
33768  *)
33769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    for ac_exec_ext in '' $ac_executable_extensions; do
33775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33776    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33778    break 2
33779  fi
33780done
33781  done
33782IFS=$as_save_IFS
33783
33784  ;;
33785esac
33786fi
33787POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33788if test -n "$POTENTIAL_CC"; then
33789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33790$as_echo "$POTENTIAL_CC" >&6; }
33791else
33792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33793$as_echo "no" >&6; }
33794fi
33795
33796
33797fi
33798if test -z "$ac_cv_path_POTENTIAL_CC"; then
33799  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33800  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33801set dummy $SEARCH_LIST; ac_word=$2
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33803$as_echo_n "checking for $ac_word... " >&6; }
33804if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33805  $as_echo_n "(cached) " >&6
33806else
33807  case $ac_pt_POTENTIAL_CC in
33808  [\\/]* | ?:[\\/]*)
33809  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33810  ;;
33811  *)
33812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33813for as_dir in $PATH
33814do
33815  IFS=$as_save_IFS
33816  test -z "$as_dir" && as_dir=.
33817    for ac_exec_ext in '' $ac_executable_extensions; do
33818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33819    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33821    break 2
33822  fi
33823done
33824  done
33825IFS=$as_save_IFS
33826
33827  ;;
33828esac
33829fi
33830ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33831if test -n "$ac_pt_POTENTIAL_CC"; then
33832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33833$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33834else
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33836$as_echo "no" >&6; }
33837fi
33838
33839  if test "x$ac_pt_POTENTIAL_CC" = x; then
33840    POTENTIAL_CC=""
33841  else
33842    case $cross_compiling:$ac_tool_warned in
33843yes:)
33844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33846ac_tool_warned=yes ;;
33847esac
33848    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33849  fi
33850else
33851  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33852fi
33853
33854      CC=$POTENTIAL_CC
33855    fi
33856
33857    if test "x$CC" = x; then
33858
33859  # Print a helpful message on how to acquire the necessary build dependency.
33860  # devkit is the help tag: freetype, cups, alsa etc
33861  MISSING_DEPENDENCY=devkit
33862
33863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33864    cygwin_help $MISSING_DEPENDENCY
33865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33866    msys_help $MISSING_DEPENDENCY
33867  else
33868    PKGHANDLER_COMMAND=
33869
33870    case $PKGHANDLER in
33871      apt-get)
33872        apt_help     $MISSING_DEPENDENCY ;;
33873      yum)
33874        yum_help     $MISSING_DEPENDENCY ;;
33875      brew)
33876        brew_help    $MISSING_DEPENDENCY ;;
33877      port)
33878        port_help    $MISSING_DEPENDENCY ;;
33879      pkgutil)
33880        pkgutil_help $MISSING_DEPENDENCY ;;
33881      pkgadd)
33882        pkgadd_help  $MISSING_DEPENDENCY ;;
33883    esac
33884
33885    if test "x$PKGHANDLER_COMMAND" != x; then
33886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33887    fi
33888  fi
33889
33890      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33891    fi
33892  fi
33893
33894  # Now we have a compiler binary in CC. Make sure it's okay.
33895
33896  # Only process if variable expands to non-empty
33897
33898  if test "x$CC" != x; then
33899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33900
33901  # First separate the path from the arguments. This will split at the first
33902  # space.
33903  complete="$CC"
33904  path="${complete%% *}"
33905  tmp="$complete EOL"
33906  arguments="${tmp#* }"
33907
33908  # Input might be given as Windows format, start by converting to
33909  # unix format.
33910  new_path=`$CYGPATH -u "$path"`
33911
33912  # Now try to locate executable using which
33913  new_path=`$WHICH "$new_path" 2> /dev/null`
33914  # bat and cmd files are not always considered executable in cygwin causing which
33915  # to not find them
33916  if test "x$new_path" = x \
33917      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33918      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33919    new_path=`$CYGPATH -u "$path"`
33920  fi
33921  if test "x$new_path" = x; then
33922    # Oops. Which didn't find the executable.
33923    # The splitting of arguments from the executable at a space might have been incorrect,
33924    # since paths with space are more likely in Windows. Give it another try with the whole
33925    # argument.
33926    path="$complete"
33927    arguments="EOL"
33928    new_path=`$CYGPATH -u "$path"`
33929    new_path=`$WHICH "$new_path" 2> /dev/null`
33930    # bat and cmd files are not always considered executable in cygwin causing which
33931    # to not find them
33932    if test "x$new_path" = x \
33933        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33934        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33935      new_path=`$CYGPATH -u "$path"`
33936    fi
33937    if test "x$new_path" = x; then
33938      # It's still not found. Now this is an unrecoverable error.
33939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33940$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33941      has_space=`$ECHO "$complete" | $GREP " "`
33942      if test "x$has_space" != x; then
33943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33945      fi
33946      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33947    fi
33948  fi
33949
33950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33953  # "foo.exe" is OK but "foo" is an error.
33954  #
33955  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33956  # It is also a way to make sure we got the proper file name for the real test later on.
33957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33958  if test "x$test_shortpath" = x; then
33959    # Short path failed, file does not exist as specified.
33960    # Try adding .exe or .cmd
33961    if test -f "${new_path}.exe"; then
33962      input_to_shortpath="${new_path}.exe"
33963    elif test -f "${new_path}.cmd"; then
33964      input_to_shortpath="${new_path}.cmd"
33965    else
33966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33967$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33968      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33969$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33970      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33971    fi
33972  else
33973    input_to_shortpath="$new_path"
33974  fi
33975
33976  # Call helper function which possibly converts this using DOS-style short mode.
33977  # If so, the updated path is stored in $new_path.
33978  new_path="$input_to_shortpath"
33979
33980  input_path="$input_to_shortpath"
33981  # Check if we need to convert this using DOS-style short mode. If the path
33982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33983  # take no chances and rewrite it.
33984  # Note: m4 eats our [], so we need to use [ and ] instead.
33985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33986  if test "x$has_forbidden_chars" != x; then
33987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33991      # Going to short mode and back again did indeed matter. Since short mode is
33992      # case insensitive, let's make it lowercase to improve readability.
33993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33994      # Now convert it back to Unix-style (cygpath)
33995      input_path=`$CYGPATH -u "$shortmode_path"`
33996      new_path="$input_path"
33997    fi
33998  fi
33999
34000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34001  if test "x$test_cygdrive_prefix" = x; then
34002    # As a simple fix, exclude /usr/bin since it's not a real path.
34003    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34005      # a path prefixed by /cygdrive for fixpath to work.
34006      new_path="$CYGWIN_ROOT_PATH$input_path"
34007    fi
34008  fi
34009
34010  # remove trailing .exe if any
34011  new_path="${new_path/%.exe/}"
34012
34013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34014
34015  # First separate the path from the arguments. This will split at the first
34016  # space.
34017  complete="$CC"
34018  path="${complete%% *}"
34019  tmp="$complete EOL"
34020  arguments="${tmp#* }"
34021
34022  # Input might be given as Windows format, start by converting to
34023  # unix format.
34024  new_path="$path"
34025
34026  windows_path="$new_path"
34027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34028    unix_path=`$CYGPATH -u "$windows_path"`
34029    new_path="$unix_path"
34030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34032    new_path="$unix_path"
34033  fi
34034
34035
34036  # Now try to locate executable using which
34037  new_path=`$WHICH "$new_path" 2> /dev/null`
34038
34039  if test "x$new_path" = x; then
34040    # Oops. Which didn't find the executable.
34041    # The splitting of arguments from the executable at a space might have been incorrect,
34042    # since paths with space are more likely in Windows. Give it another try with the whole
34043    # argument.
34044    path="$complete"
34045    arguments="EOL"
34046    new_path="$path"
34047
34048  windows_path="$new_path"
34049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050    unix_path=`$CYGPATH -u "$windows_path"`
34051    new_path="$unix_path"
34052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34054    new_path="$unix_path"
34055  fi
34056
34057
34058    new_path=`$WHICH "$new_path" 2> /dev/null`
34059    # bat and cmd files are not always considered executable in MSYS causing which
34060    # to not find them
34061    if test "x$new_path" = x \
34062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34064      new_path="$path"
34065
34066  windows_path="$new_path"
34067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34068    unix_path=`$CYGPATH -u "$windows_path"`
34069    new_path="$unix_path"
34070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34072    new_path="$unix_path"
34073  fi
34074
34075    fi
34076
34077    if test "x$new_path" = x; then
34078      # It's still not found. Now this is an unrecoverable error.
34079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34080$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34081      has_space=`$ECHO "$complete" | $GREP " "`
34082      if test "x$has_space" != x; then
34083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34085      fi
34086      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34087    fi
34088  fi
34089
34090  # Now new_path has a complete unix path to the binary
34091  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34092    # Keep paths in /bin as-is, but remove trailing .exe if any
34093    new_path="${new_path/%.exe/}"
34094    # Do not save /bin paths to all_fixpath_prefixes!
34095  else
34096    # Not in mixed or Windows style, start by that.
34097    new_path=`cmd //c echo $new_path`
34098
34099  input_path="$new_path"
34100  # Check if we need to convert this using DOS-style short mode. If the path
34101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34102  # take no chances and rewrite it.
34103  # Note: m4 eats our [], so we need to use [ and ] instead.
34104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34105  if test "x$has_forbidden_chars" != x; then
34106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34108  fi
34109
34110    # Output is in $new_path
34111
34112  windows_path="$new_path"
34113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34114    unix_path=`$CYGPATH -u "$windows_path"`
34115    new_path="$unix_path"
34116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34118    new_path="$unix_path"
34119  fi
34120
34121    # remove trailing .exe if any
34122    new_path="${new_path/%.exe/}"
34123
34124    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34125    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34126  fi
34127
34128    else
34129      # We're on a unix platform. Hooray! :)
34130      # First separate the path from the arguments. This will split at the first
34131      # space.
34132      complete="$CC"
34133      path="${complete%% *}"
34134      tmp="$complete EOL"
34135      arguments="${tmp#* }"
34136
34137      # Cannot rely on the command "which" here since it doesn't always work.
34138      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34139      if test -z "$is_absolute_path"; then
34140        # Path to executable is not absolute. Find it.
34141        IFS_save="$IFS"
34142        IFS=:
34143        for p in $PATH; do
34144          if test -f "$p/$path" && test -x "$p/$path"; then
34145            new_path="$p/$path"
34146            break
34147          fi
34148        done
34149        IFS="$IFS_save"
34150      else
34151        # This is an absolute path, we can use it without further modifications.
34152        new_path="$path"
34153      fi
34154
34155      if test "x$new_path" = x; then
34156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34157$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34158        has_space=`$ECHO "$complete" | $GREP " "`
34159        if test "x$has_space" != x; then
34160          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34161$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34162        fi
34163        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34164      fi
34165    fi
34166
34167    # Now join together the path and the arguments once again
34168    if test "x$arguments" != xEOL; then
34169      new_complete="$new_path ${arguments% *}"
34170    else
34171      new_complete="$new_path"
34172    fi
34173
34174    if test "x$complete" != "x$new_complete"; then
34175      CC="$new_complete"
34176      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34177$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34178    fi
34179  fi
34180
34181  TEST_COMPILER="$CC"
34182
34183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34184$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34185  SYMLINK_ORIGINAL="$TEST_COMPILER"
34186
34187  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34188    # Follow a chain of symbolic links. Use readlink
34189    # where it exists, else fall back to horribly
34190    # complicated shell code.
34191    if test "x$READLINK_TESTED" != yes; then
34192      # On MacOSX there is a readlink tool with a different
34193      # purpose than the GNU readlink tool. Check the found readlink.
34194      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34195      if test "x$ISGNU" = x; then
34196        # A readlink that we do not know how to use.
34197        # Are there other non-GNU readlinks out there?
34198        READLINK_TESTED=yes
34199        READLINK=
34200      fi
34201    fi
34202
34203    if test "x$READLINK" != x; then
34204      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34205    else
34206      # Save the current directory for restoring afterwards
34207      STARTDIR=$PWD
34208      COUNTER=0
34209      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34210      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34211      cd $sym_link_dir
34212      # Use -P flag to resolve symlinks in directories.
34213      cd `$THEPWDCMD -P`
34214      sym_link_dir=`$THEPWDCMD -P`
34215      # Resolve file symlinks
34216      while test $COUNTER -lt 20; do
34217        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34218        if test "x$ISLINK" == x; then
34219          # This is not a symbolic link! We are done!
34220          break
34221        fi
34222        # Again resolve directory symlinks since the target of the just found
34223        # link could be in a different directory
34224        cd `$DIRNAME $ISLINK`
34225        sym_link_dir=`$THEPWDCMD -P`
34226        sym_link_file=`$BASENAME $ISLINK`
34227        let COUNTER=COUNTER+1
34228      done
34229      cd $STARTDIR
34230      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34231    fi
34232  fi
34233
34234  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34236$as_echo "no symlink" >&6; }
34237  else
34238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34239$as_echo "$SYMLINK_ORIGINAL" >&6; }
34240
34241    # We can't handle ccache by gcc wrappers, since we need to know if we're
34242    # using ccache. Instead ccache usage must be controlled by a configure option.
34243    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34244    if test "x$COMPILER_BASENAME" = "xccache"; then
34245      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34246$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34247      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34248    fi
34249  fi
34250
34251
34252  COMPILER=$CC
34253  COMPILER_NAME=$COMPILER_NAME
34254
34255  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34256    # cc -V output typically looks like
34257    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34258    # or
34259    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34260    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34261    # Check that this is likely to be the Solaris Studio cc.
34262    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34263    if test $? -ne 0; then
34264      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34265      { $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
34266$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34268$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34269      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34270$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34271      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34272    fi
34273    # Remove usage instructions (if present), and
34274    # collapse compiler output into a single line
34275    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34276        $SED -e 's/ *[Uu]sage:.*//'`
34277    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34278        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34279  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34280    # xlc -qversion output typically looks like
34281    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34282    #     Version: 11.01.0000.0015
34283    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34284    # Check that this is likely to be the IBM XL C compiler.
34285    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34286    if test $? -ne 0; then
34287      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34288      { $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
34289$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34290      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34291$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34292      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34293$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34294      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34295    fi
34296    # Collapse compiler output into a single line
34297    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34298    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34299        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34300  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34301    # There is no specific version flag, but all output starts with a version string.
34302    # First line typically looks something like:
34303    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34304    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34305    # Check that this is likely to be Microsoft CL.EXE.
34306    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34307    if test $? -ne 0; then
34308      { $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
34309$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34310      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34311$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34312      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34313    fi
34314    # Collapse compiler output into a single line
34315    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34316    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34317        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34318  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34319    # gcc --version output typically looks like
34320    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34321    #     Copyright (C) 2013 Free Software Foundation, Inc.
34322    #     This is free software; see the source for copying conditions.  There is NO
34323    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34324    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34325    # Check that this is likely to be GCC.
34326    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /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\"" >&5
34331$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34332      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34333    fi
34334    # Remove Copyright and legalese from version string, and
34335    # collapse into a single line
34336    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34337        $SED -e 's/ *Copyright .*//'`
34338    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34339        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34340  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34341    # clang --version output typically looks like
34342    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34343    #    clang version 3.3 (tags/RELEASE_33/final)
34344    # or
34345    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34346    #    Target: x86_64-pc-linux-gnu
34347    #    Thread model: posix
34348    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34349    # Check that this is likely to be clang
34350    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34351    if test $? -ne 0; then
34352      { $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
34353$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34354      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34355$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34356      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34357    fi
34358    # Collapse compiler output into a single line
34359    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34360    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34361        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34362  else
34363      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34364  fi
34365  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34366  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34367  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34368  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34369
34370  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34371$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34372
34373
34374  # Now that we have resolved CC ourself, let autoconf have its go at it
34375  ac_ext=c
34376ac_cpp='$CPP $CPPFLAGS'
34377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34379ac_compiler_gnu=$ac_cv_c_compiler_gnu
34380if test -n "$ac_tool_prefix"; then
34381  for ac_prog in $CC
34382  do
34383    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34384set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34386$as_echo_n "checking for $ac_word... " >&6; }
34387if ${ac_cv_prog_CC+:} false; then :
34388  $as_echo_n "(cached) " >&6
34389else
34390  if test -n "$CC"; then
34391  ac_cv_prog_CC="$CC" # Let the user override the test.
34392else
34393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34394for as_dir in $PATH
34395do
34396  IFS=$as_save_IFS
34397  test -z "$as_dir" && as_dir=.
34398    for ac_exec_ext in '' $ac_executable_extensions; do
34399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34400    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34402    break 2
34403  fi
34404done
34405  done
34406IFS=$as_save_IFS
34407
34408fi
34409fi
34410CC=$ac_cv_prog_CC
34411if test -n "$CC"; then
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34413$as_echo "$CC" >&6; }
34414else
34415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34416$as_echo "no" >&6; }
34417fi
34418
34419
34420    test -n "$CC" && break
34421  done
34422fi
34423if test -z "$CC"; then
34424  ac_ct_CC=$CC
34425  for ac_prog in $CC
34426do
34427  # Extract the first word of "$ac_prog", so it can be a program name with args.
34428set dummy $ac_prog; ac_word=$2
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34430$as_echo_n "checking for $ac_word... " >&6; }
34431if ${ac_cv_prog_ac_ct_CC+:} false; then :
34432  $as_echo_n "(cached) " >&6
34433else
34434  if test -n "$ac_ct_CC"; then
34435  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34436else
34437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34438for as_dir in $PATH
34439do
34440  IFS=$as_save_IFS
34441  test -z "$as_dir" && as_dir=.
34442    for ac_exec_ext in '' $ac_executable_extensions; do
34443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34444    ac_cv_prog_ac_ct_CC="$ac_prog"
34445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34446    break 2
34447  fi
34448done
34449  done
34450IFS=$as_save_IFS
34451
34452fi
34453fi
34454ac_ct_CC=$ac_cv_prog_ac_ct_CC
34455if test -n "$ac_ct_CC"; then
34456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34457$as_echo "$ac_ct_CC" >&6; }
34458else
34459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34460$as_echo "no" >&6; }
34461fi
34462
34463
34464  test -n "$ac_ct_CC" && break
34465done
34466
34467  if test "x$ac_ct_CC" = x; then
34468    CC=""
34469  else
34470    case $cross_compiling:$ac_tool_warned in
34471yes:)
34472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34474ac_tool_warned=yes ;;
34475esac
34476    CC=$ac_ct_CC
34477  fi
34478fi
34479
34480
34481test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34483as_fn_error $? "no acceptable C compiler found in \$PATH
34484See \`config.log' for more details" "$LINENO" 5; }
34485
34486# Provide some information about the compiler.
34487$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34488set X $ac_compile
34489ac_compiler=$2
34490for ac_option in --version -v -V -qversion; do
34491  { { ac_try="$ac_compiler $ac_option >&5"
34492case "(($ac_try" in
34493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34494  *) ac_try_echo=$ac_try;;
34495esac
34496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34497$as_echo "$ac_try_echo"; } >&5
34498  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34499  ac_status=$?
34500  if test -s conftest.err; then
34501    sed '10a\
34502... rest of stderr output deleted ...
34503         10q' conftest.err >conftest.er1
34504    cat conftest.er1 >&5
34505  fi
34506  rm -f conftest.er1 conftest.err
34507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34508  test $ac_status = 0; }
34509done
34510
34511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34512/* end confdefs.h.  */
34513
34514int
34515main ()
34516{
34517
34518  ;
34519  return 0;
34520}
34521_ACEOF
34522ac_clean_files_save=$ac_clean_files
34523ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34524# Try to create an executable without -o first, disregard a.out.
34525# It will help us diagnose broken compilers, and finding out an intuition
34526# of exeext.
34527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34528$as_echo_n "checking whether the C compiler works... " >&6; }
34529ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34530
34531# The possible output files:
34532ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34533
34534ac_rmfiles=
34535for ac_file in $ac_files
34536do
34537  case $ac_file in
34538    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34539    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34540  esac
34541done
34542rm -f $ac_rmfiles
34543
34544if { { ac_try="$ac_link_default"
34545case "(($ac_try" in
34546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34547  *) ac_try_echo=$ac_try;;
34548esac
34549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34550$as_echo "$ac_try_echo"; } >&5
34551  (eval "$ac_link_default") 2>&5
34552  ac_status=$?
34553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34554  test $ac_status = 0; }; then :
34555  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34556# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34557# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34558# so that the user can short-circuit this test for compilers unknown to
34559# Autoconf.
34560for ac_file in $ac_files ''
34561do
34562  test -f "$ac_file" || continue
34563  case $ac_file in
34564    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34565	;;
34566    [ab].out )
34567	# We found the default executable, but exeext='' is most
34568	# certainly right.
34569	break;;
34570    *.* )
34571	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34572	then :; else
34573	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34574	fi
34575	# We set ac_cv_exeext here because the later test for it is not
34576	# safe: cross compilers may not add the suffix if given an `-o'
34577	# argument, so we may need to know it at that point already.
34578	# Even if this section looks crufty: it has the advantage of
34579	# actually working.
34580	break;;
34581    * )
34582	break;;
34583  esac
34584done
34585test "$ac_cv_exeext" = no && ac_cv_exeext=
34586
34587else
34588  ac_file=''
34589fi
34590if test -z "$ac_file"; then :
34591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34592$as_echo "no" >&6; }
34593$as_echo "$as_me: failed program was:" >&5
34594sed 's/^/| /' conftest.$ac_ext >&5
34595
34596{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34598as_fn_error 77 "C compiler cannot create executables
34599See \`config.log' for more details" "$LINENO" 5; }
34600else
34601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34602$as_echo "yes" >&6; }
34603fi
34604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34605$as_echo_n "checking for C compiler default output file name... " >&6; }
34606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34607$as_echo "$ac_file" >&6; }
34608ac_exeext=$ac_cv_exeext
34609
34610rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34611ac_clean_files=$ac_clean_files_save
34612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34613$as_echo_n "checking for suffix of executables... " >&6; }
34614if { { ac_try="$ac_link"
34615case "(($ac_try" in
34616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34617  *) ac_try_echo=$ac_try;;
34618esac
34619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34620$as_echo "$ac_try_echo"; } >&5
34621  (eval "$ac_link") 2>&5
34622  ac_status=$?
34623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34624  test $ac_status = 0; }; then :
34625  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34626# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34627# work properly (i.e., refer to `conftest.exe'), while it won't with
34628# `rm'.
34629for ac_file in conftest.exe conftest conftest.*; do
34630  test -f "$ac_file" || continue
34631  case $ac_file in
34632    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34633    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34634	  break;;
34635    * ) break;;
34636  esac
34637done
34638else
34639  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34640$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34641as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34642See \`config.log' for more details" "$LINENO" 5; }
34643fi
34644rm -f conftest conftest$ac_cv_exeext
34645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34646$as_echo "$ac_cv_exeext" >&6; }
34647
34648rm -f conftest.$ac_ext
34649EXEEXT=$ac_cv_exeext
34650ac_exeext=$EXEEXT
34651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652/* end confdefs.h.  */
34653#include <stdio.h>
34654int
34655main ()
34656{
34657FILE *f = fopen ("conftest.out", "w");
34658 return ferror (f) || fclose (f) != 0;
34659
34660  ;
34661  return 0;
34662}
34663_ACEOF
34664ac_clean_files="$ac_clean_files conftest.out"
34665# Check that the compiler produces executables we can run.  If not, either
34666# the compiler is broken, or we cross compile.
34667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34668$as_echo_n "checking whether we are cross compiling... " >&6; }
34669if test "$cross_compiling" != yes; then
34670  { { ac_try="$ac_link"
34671case "(($ac_try" in
34672  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34673  *) ac_try_echo=$ac_try;;
34674esac
34675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34676$as_echo "$ac_try_echo"; } >&5
34677  (eval "$ac_link") 2>&5
34678  ac_status=$?
34679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34680  test $ac_status = 0; }
34681  if { ac_try='./conftest$ac_cv_exeext'
34682  { { case "(($ac_try" in
34683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34684  *) ac_try_echo=$ac_try;;
34685esac
34686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34687$as_echo "$ac_try_echo"; } >&5
34688  (eval "$ac_try") 2>&5
34689  ac_status=$?
34690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34691  test $ac_status = 0; }; }; then
34692    cross_compiling=no
34693  else
34694    if test "$cross_compiling" = maybe; then
34695	cross_compiling=yes
34696    else
34697	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34699as_fn_error $? "cannot run C compiled programs.
34700If you meant to cross compile, use \`--host'.
34701See \`config.log' for more details" "$LINENO" 5; }
34702    fi
34703  fi
34704fi
34705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34706$as_echo "$cross_compiling" >&6; }
34707
34708rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34709ac_clean_files=$ac_clean_files_save
34710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34711$as_echo_n "checking for suffix of object files... " >&6; }
34712if ${ac_cv_objext+:} false; then :
34713  $as_echo_n "(cached) " >&6
34714else
34715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34716/* end confdefs.h.  */
34717
34718int
34719main ()
34720{
34721
34722  ;
34723  return 0;
34724}
34725_ACEOF
34726rm -f conftest.o conftest.obj
34727if { { ac_try="$ac_compile"
34728case "(($ac_try" in
34729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34730  *) ac_try_echo=$ac_try;;
34731esac
34732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34733$as_echo "$ac_try_echo"; } >&5
34734  (eval "$ac_compile") 2>&5
34735  ac_status=$?
34736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34737  test $ac_status = 0; }; then :
34738  for ac_file in conftest.o conftest.obj conftest.*; do
34739  test -f "$ac_file" || continue;
34740  case $ac_file in
34741    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34742    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34743       break;;
34744  esac
34745done
34746else
34747  $as_echo "$as_me: failed program was:" >&5
34748sed 's/^/| /' conftest.$ac_ext >&5
34749
34750{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34752as_fn_error $? "cannot compute suffix of object files: cannot compile
34753See \`config.log' for more details" "$LINENO" 5; }
34754fi
34755rm -f conftest.$ac_cv_objext conftest.$ac_ext
34756fi
34757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34758$as_echo "$ac_cv_objext" >&6; }
34759OBJEXT=$ac_cv_objext
34760ac_objext=$OBJEXT
34761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34762$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34763if ${ac_cv_c_compiler_gnu+:} false; then :
34764  $as_echo_n "(cached) " >&6
34765else
34766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34767/* end confdefs.h.  */
34768
34769int
34770main ()
34771{
34772#ifndef __GNUC__
34773       choke me
34774#endif
34775
34776  ;
34777  return 0;
34778}
34779_ACEOF
34780if ac_fn_c_try_compile "$LINENO"; then :
34781  ac_compiler_gnu=yes
34782else
34783  ac_compiler_gnu=no
34784fi
34785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34786ac_cv_c_compiler_gnu=$ac_compiler_gnu
34787
34788fi
34789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34790$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34791if test $ac_compiler_gnu = yes; then
34792  GCC=yes
34793else
34794  GCC=
34795fi
34796ac_test_CFLAGS=${CFLAGS+set}
34797ac_save_CFLAGS=$CFLAGS
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34799$as_echo_n "checking whether $CC accepts -g... " >&6; }
34800if ${ac_cv_prog_cc_g+:} false; then :
34801  $as_echo_n "(cached) " >&6
34802else
34803  ac_save_c_werror_flag=$ac_c_werror_flag
34804   ac_c_werror_flag=yes
34805   ac_cv_prog_cc_g=no
34806   CFLAGS="-g"
34807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34808/* end confdefs.h.  */
34809
34810int
34811main ()
34812{
34813
34814  ;
34815  return 0;
34816}
34817_ACEOF
34818if ac_fn_c_try_compile "$LINENO"; then :
34819  ac_cv_prog_cc_g=yes
34820else
34821  CFLAGS=""
34822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34823/* end confdefs.h.  */
34824
34825int
34826main ()
34827{
34828
34829  ;
34830  return 0;
34831}
34832_ACEOF
34833if ac_fn_c_try_compile "$LINENO"; then :
34834
34835else
34836  ac_c_werror_flag=$ac_save_c_werror_flag
34837	 CFLAGS="-g"
34838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34839/* end confdefs.h.  */
34840
34841int
34842main ()
34843{
34844
34845  ;
34846  return 0;
34847}
34848_ACEOF
34849if ac_fn_c_try_compile "$LINENO"; then :
34850  ac_cv_prog_cc_g=yes
34851fi
34852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34853fi
34854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34855fi
34856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34857   ac_c_werror_flag=$ac_save_c_werror_flag
34858fi
34859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34860$as_echo "$ac_cv_prog_cc_g" >&6; }
34861if test "$ac_test_CFLAGS" = set; then
34862  CFLAGS=$ac_save_CFLAGS
34863elif test $ac_cv_prog_cc_g = yes; then
34864  if test "$GCC" = yes; then
34865    CFLAGS="-g -O2"
34866  else
34867    CFLAGS="-g"
34868  fi
34869else
34870  if test "$GCC" = yes; then
34871    CFLAGS="-O2"
34872  else
34873    CFLAGS=
34874  fi
34875fi
34876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34877$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34878if ${ac_cv_prog_cc_c89+:} false; then :
34879  $as_echo_n "(cached) " >&6
34880else
34881  ac_cv_prog_cc_c89=no
34882ac_save_CC=$CC
34883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34884/* end confdefs.h.  */
34885#include <stdarg.h>
34886#include <stdio.h>
34887struct stat;
34888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34889struct buf { int x; };
34890FILE * (*rcsopen) (struct buf *, struct stat *, int);
34891static char *e (p, i)
34892     char **p;
34893     int i;
34894{
34895  return p[i];
34896}
34897static char *f (char * (*g) (char **, int), char **p, ...)
34898{
34899  char *s;
34900  va_list v;
34901  va_start (v,p);
34902  s = g (p, va_arg (v,int));
34903  va_end (v);
34904  return s;
34905}
34906
34907/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34908   function prototypes and stuff, but not '\xHH' hex character constants.
34909   These don't provoke an error unfortunately, instead are silently treated
34910   as 'x'.  The following induces an error, until -std is added to get
34911   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34912   array size at least.  It's necessary to write '\x00'==0 to get something
34913   that's true only with -std.  */
34914int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34915
34916/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34917   inside strings and character constants.  */
34918#define FOO(x) 'x'
34919int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34920
34921int test (int i, double x);
34922struct s1 {int (*f) (int a);};
34923struct s2 {int (*f) (double a);};
34924int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34925int argc;
34926char **argv;
34927int
34928main ()
34929{
34930return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34931  ;
34932  return 0;
34933}
34934_ACEOF
34935for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34936	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34937do
34938  CC="$ac_save_CC $ac_arg"
34939  if ac_fn_c_try_compile "$LINENO"; then :
34940  ac_cv_prog_cc_c89=$ac_arg
34941fi
34942rm -f core conftest.err conftest.$ac_objext
34943  test "x$ac_cv_prog_cc_c89" != "xno" && break
34944done
34945rm -f conftest.$ac_ext
34946CC=$ac_save_CC
34947
34948fi
34949# AC_CACHE_VAL
34950case "x$ac_cv_prog_cc_c89" in
34951  x)
34952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34953$as_echo "none needed" >&6; } ;;
34954  xno)
34955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34956$as_echo "unsupported" >&6; } ;;
34957  *)
34958    CC="$CC $ac_cv_prog_cc_c89"
34959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34960$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34961esac
34962if test "x$ac_cv_prog_cc_c89" != xno; then :
34963
34964fi
34965
34966ac_ext=cpp
34967ac_cpp='$CXXCPP $CPPFLAGS'
34968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34971
34972
34973
34974  COMPILER_NAME=C++
34975  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34976
34977  if test "x$CXX" != x; then
34978    # User has supplied compiler name already, always let that override.
34979    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34980$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34981    if test "x`basename $CXX`" = "x$CXX"; then
34982      # A command without a complete path is provided, search $PATH.
34983
34984      for ac_prog in $CXX
34985do
34986  # Extract the first word of "$ac_prog", so it can be a program name with args.
34987set dummy $ac_prog; ac_word=$2
34988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34989$as_echo_n "checking for $ac_word... " >&6; }
34990if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34991  $as_echo_n "(cached) " >&6
34992else
34993  case $POTENTIAL_CXX in
34994  [\\/]* | ?:[\\/]*)
34995  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34996  ;;
34997  *)
34998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34999for as_dir in $PATH
35000do
35001  IFS=$as_save_IFS
35002  test -z "$as_dir" && as_dir=.
35003    for ac_exec_ext in '' $ac_executable_extensions; do
35004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35005    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35007    break 2
35008  fi
35009done
35010  done
35011IFS=$as_save_IFS
35012
35013  ;;
35014esac
35015fi
35016POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35017if test -n "$POTENTIAL_CXX"; then
35018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35019$as_echo "$POTENTIAL_CXX" >&6; }
35020else
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35022$as_echo "no" >&6; }
35023fi
35024
35025
35026  test -n "$POTENTIAL_CXX" && break
35027done
35028
35029      if test "x$POTENTIAL_CXX" != x; then
35030        CXX=$POTENTIAL_CXX
35031      else
35032        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35033      fi
35034    else
35035      # Otherwise it might already be a complete path
35036      if test ! -x "$CXX"; then
35037        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35038      fi
35039    fi
35040  else
35041    # No user supplied value. Locate compiler ourselves.
35042
35043    # If we are cross compiling, assume cross compilation tools follows the
35044    # cross compilation standard where they are prefixed with the autoconf
35045    # standard name for the target. For example the binary
35046    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35047    # If we are not cross compiling, then the default compiler name will be
35048    # used.
35049
35050    CXX=
35051    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35052    # before checking the rest of the PATH.
35053    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35054    # step, this should not be necessary.
35055    if test -n "$TOOLCHAIN_PATH"; then
35056      PATH_save="$PATH"
35057      PATH="$TOOLCHAIN_PATH"
35058      if test -n "$ac_tool_prefix"; then
35059  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35060set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35062$as_echo_n "checking for $ac_word... " >&6; }
35063if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35064  $as_echo_n "(cached) " >&6
35065else
35066  case $TOOLCHAIN_PATH_CXX in
35067  [\\/]* | ?:[\\/]*)
35068  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35069  ;;
35070  *)
35071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072for as_dir in $PATH
35073do
35074  IFS=$as_save_IFS
35075  test -z "$as_dir" && as_dir=.
35076    for ac_exec_ext in '' $ac_executable_extensions; do
35077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080    break 2
35081  fi
35082done
35083  done
35084IFS=$as_save_IFS
35085
35086  ;;
35087esac
35088fi
35089TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35090if test -n "$TOOLCHAIN_PATH_CXX"; then
35091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35092$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35093else
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35095$as_echo "no" >&6; }
35096fi
35097
35098
35099fi
35100if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35101  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35102  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35103set dummy $SEARCH_LIST; ac_word=$2
35104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35105$as_echo_n "checking for $ac_word... " >&6; }
35106if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35107  $as_echo_n "(cached) " >&6
35108else
35109  case $ac_pt_TOOLCHAIN_PATH_CXX in
35110  [\\/]* | ?:[\\/]*)
35111  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35112  ;;
35113  *)
35114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35115for as_dir in $PATH
35116do
35117  IFS=$as_save_IFS
35118  test -z "$as_dir" && as_dir=.
35119    for ac_exec_ext in '' $ac_executable_extensions; do
35120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35121    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35123    break 2
35124  fi
35125done
35126  done
35127IFS=$as_save_IFS
35128
35129  ;;
35130esac
35131fi
35132ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35133if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35135$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35136else
35137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35138$as_echo "no" >&6; }
35139fi
35140
35141  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35142    TOOLCHAIN_PATH_CXX=""
35143  else
35144    case $cross_compiling:$ac_tool_warned in
35145yes:)
35146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35148ac_tool_warned=yes ;;
35149esac
35150    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35151  fi
35152else
35153  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35154fi
35155
35156      CXX=$TOOLCHAIN_PATH_CXX
35157      PATH="$PATH_save"
35158    fi
35159
35160    # AC_PATH_TOOL can't be run multiple times with the same variable,
35161    # so create a new name for this run.
35162    if test "x$CXX" = x; then
35163      if test -n "$ac_tool_prefix"; then
35164  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35165set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35167$as_echo_n "checking for $ac_word... " >&6; }
35168if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  case $POTENTIAL_CXX in
35172  [\\/]* | ?:[\\/]*)
35173  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35174  ;;
35175  *)
35176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35177for as_dir in $PATH
35178do
35179  IFS=$as_save_IFS
35180  test -z "$as_dir" && as_dir=.
35181    for ac_exec_ext in '' $ac_executable_extensions; do
35182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35183    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35185    break 2
35186  fi
35187done
35188  done
35189IFS=$as_save_IFS
35190
35191  ;;
35192esac
35193fi
35194POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35195if test -n "$POTENTIAL_CXX"; then
35196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35197$as_echo "$POTENTIAL_CXX" >&6; }
35198else
35199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35200$as_echo "no" >&6; }
35201fi
35202
35203
35204fi
35205if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35206  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35207  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35208set dummy $SEARCH_LIST; ac_word=$2
35209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35210$as_echo_n "checking for $ac_word... " >&6; }
35211if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35212  $as_echo_n "(cached) " >&6
35213else
35214  case $ac_pt_POTENTIAL_CXX in
35215  [\\/]* | ?:[\\/]*)
35216  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35217  ;;
35218  *)
35219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35220for as_dir in $PATH
35221do
35222  IFS=$as_save_IFS
35223  test -z "$as_dir" && as_dir=.
35224    for ac_exec_ext in '' $ac_executable_extensions; do
35225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35226    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35228    break 2
35229  fi
35230done
35231  done
35232IFS=$as_save_IFS
35233
35234  ;;
35235esac
35236fi
35237ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35238if test -n "$ac_pt_POTENTIAL_CXX"; then
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35240$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35241else
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35243$as_echo "no" >&6; }
35244fi
35245
35246  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35247    POTENTIAL_CXX=""
35248  else
35249    case $cross_compiling:$ac_tool_warned in
35250yes:)
35251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35253ac_tool_warned=yes ;;
35254esac
35255    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35256  fi
35257else
35258  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35259fi
35260
35261      CXX=$POTENTIAL_CXX
35262    fi
35263
35264    if test "x$CXX" = x; then
35265
35266  # Print a helpful message on how to acquire the necessary build dependency.
35267  # devkit is the help tag: freetype, cups, alsa etc
35268  MISSING_DEPENDENCY=devkit
35269
35270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35271    cygwin_help $MISSING_DEPENDENCY
35272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35273    msys_help $MISSING_DEPENDENCY
35274  else
35275    PKGHANDLER_COMMAND=
35276
35277    case $PKGHANDLER in
35278      apt-get)
35279        apt_help     $MISSING_DEPENDENCY ;;
35280      yum)
35281        yum_help     $MISSING_DEPENDENCY ;;
35282      brew)
35283        brew_help    $MISSING_DEPENDENCY ;;
35284      port)
35285        port_help    $MISSING_DEPENDENCY ;;
35286      pkgutil)
35287        pkgutil_help $MISSING_DEPENDENCY ;;
35288      pkgadd)
35289        pkgadd_help  $MISSING_DEPENDENCY ;;
35290    esac
35291
35292    if test "x$PKGHANDLER_COMMAND" != x; then
35293      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35294    fi
35295  fi
35296
35297      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35298    fi
35299  fi
35300
35301  # Now we have a compiler binary in CXX. Make sure it's okay.
35302
35303  # Only process if variable expands to non-empty
35304
35305  if test "x$CXX" != x; then
35306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35307
35308  # First separate the path from the arguments. This will split at the first
35309  # space.
35310  complete="$CXX"
35311  path="${complete%% *}"
35312  tmp="$complete EOL"
35313  arguments="${tmp#* }"
35314
35315  # Input might be given as Windows format, start by converting to
35316  # unix format.
35317  new_path=`$CYGPATH -u "$path"`
35318
35319  # Now try to locate executable using which
35320  new_path=`$WHICH "$new_path" 2> /dev/null`
35321  # bat and cmd files are not always considered executable in cygwin causing which
35322  # to not find them
35323  if test "x$new_path" = x \
35324      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35325      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35326    new_path=`$CYGPATH -u "$path"`
35327  fi
35328  if test "x$new_path" = x; then
35329    # Oops. Which didn't find the executable.
35330    # The splitting of arguments from the executable at a space might have been incorrect,
35331    # since paths with space are more likely in Windows. Give it another try with the whole
35332    # argument.
35333    path="$complete"
35334    arguments="EOL"
35335    new_path=`$CYGPATH -u "$path"`
35336    new_path=`$WHICH "$new_path" 2> /dev/null`
35337    # bat and cmd files are not always considered executable in cygwin causing which
35338    # to not find them
35339    if test "x$new_path" = x \
35340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35342      new_path=`$CYGPATH -u "$path"`
35343    fi
35344    if test "x$new_path" = x; then
35345      # It's still not found. Now this is an unrecoverable error.
35346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35347$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35348      has_space=`$ECHO "$complete" | $GREP " "`
35349      if test "x$has_space" != x; then
35350        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35351$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35352      fi
35353      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35354    fi
35355  fi
35356
35357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35360  # "foo.exe" is OK but "foo" is an error.
35361  #
35362  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35363  # It is also a way to make sure we got the proper file name for the real test later on.
35364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35365  if test "x$test_shortpath" = x; then
35366    # Short path failed, file does not exist as specified.
35367    # Try adding .exe or .cmd
35368    if test -f "${new_path}.exe"; then
35369      input_to_shortpath="${new_path}.exe"
35370    elif test -f "${new_path}.cmd"; then
35371      input_to_shortpath="${new_path}.cmd"
35372    else
35373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35374$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35375      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35376$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35377      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35378    fi
35379  else
35380    input_to_shortpath="$new_path"
35381  fi
35382
35383  # Call helper function which possibly converts this using DOS-style short mode.
35384  # If so, the updated path is stored in $new_path.
35385  new_path="$input_to_shortpath"
35386
35387  input_path="$input_to_shortpath"
35388  # Check if we need to convert this using DOS-style short mode. If the path
35389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35390  # take no chances and rewrite it.
35391  # Note: m4 eats our [], so we need to use [ and ] instead.
35392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35393  if test "x$has_forbidden_chars" != x; then
35394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35398      # Going to short mode and back again did indeed matter. Since short mode is
35399      # case insensitive, let's make it lowercase to improve readability.
35400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35401      # Now convert it back to Unix-style (cygpath)
35402      input_path=`$CYGPATH -u "$shortmode_path"`
35403      new_path="$input_path"
35404    fi
35405  fi
35406
35407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35408  if test "x$test_cygdrive_prefix" = x; then
35409    # As a simple fix, exclude /usr/bin since it's not a real path.
35410    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35412      # a path prefixed by /cygdrive for fixpath to work.
35413      new_path="$CYGWIN_ROOT_PATH$input_path"
35414    fi
35415  fi
35416
35417  # remove trailing .exe if any
35418  new_path="${new_path/%.exe/}"
35419
35420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35421
35422  # First separate the path from the arguments. This will split at the first
35423  # space.
35424  complete="$CXX"
35425  path="${complete%% *}"
35426  tmp="$complete EOL"
35427  arguments="${tmp#* }"
35428
35429  # Input might be given as Windows format, start by converting to
35430  # unix format.
35431  new_path="$path"
35432
35433  windows_path="$new_path"
35434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35435    unix_path=`$CYGPATH -u "$windows_path"`
35436    new_path="$unix_path"
35437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35439    new_path="$unix_path"
35440  fi
35441
35442
35443  # Now try to locate executable using which
35444  new_path=`$WHICH "$new_path" 2> /dev/null`
35445
35446  if test "x$new_path" = x; then
35447    # Oops. Which didn't find the executable.
35448    # The splitting of arguments from the executable at a space might have been incorrect,
35449    # since paths with space are more likely in Windows. Give it another try with the whole
35450    # argument.
35451    path="$complete"
35452    arguments="EOL"
35453    new_path="$path"
35454
35455  windows_path="$new_path"
35456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457    unix_path=`$CYGPATH -u "$windows_path"`
35458    new_path="$unix_path"
35459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35461    new_path="$unix_path"
35462  fi
35463
35464
35465    new_path=`$WHICH "$new_path" 2> /dev/null`
35466    # bat and cmd files are not always considered executable in MSYS causing which
35467    # to not find them
35468    if test "x$new_path" = x \
35469        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35470        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35471      new_path="$path"
35472
35473  windows_path="$new_path"
35474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35475    unix_path=`$CYGPATH -u "$windows_path"`
35476    new_path="$unix_path"
35477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35479    new_path="$unix_path"
35480  fi
35481
35482    fi
35483
35484    if test "x$new_path" = x; then
35485      # It's still not found. Now this is an unrecoverable error.
35486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35487$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35488      has_space=`$ECHO "$complete" | $GREP " "`
35489      if test "x$has_space" != x; then
35490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35492      fi
35493      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35494    fi
35495  fi
35496
35497  # Now new_path has a complete unix path to the binary
35498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35499    # Keep paths in /bin as-is, but remove trailing .exe if any
35500    new_path="${new_path/%.exe/}"
35501    # Do not save /bin paths to all_fixpath_prefixes!
35502  else
35503    # Not in mixed or Windows style, start by that.
35504    new_path=`cmd //c echo $new_path`
35505
35506  input_path="$new_path"
35507  # Check if we need to convert this using DOS-style short mode. If the path
35508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35509  # take no chances and rewrite it.
35510  # Note: m4 eats our [], so we need to use [ and ] instead.
35511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35512  if test "x$has_forbidden_chars" != x; then
35513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35515  fi
35516
35517    # Output is in $new_path
35518
35519  windows_path="$new_path"
35520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35521    unix_path=`$CYGPATH -u "$windows_path"`
35522    new_path="$unix_path"
35523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35525    new_path="$unix_path"
35526  fi
35527
35528    # remove trailing .exe if any
35529    new_path="${new_path/%.exe/}"
35530
35531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35533  fi
35534
35535    else
35536      # We're on a unix platform. Hooray! :)
35537      # First separate the path from the arguments. This will split at the first
35538      # space.
35539      complete="$CXX"
35540      path="${complete%% *}"
35541      tmp="$complete EOL"
35542      arguments="${tmp#* }"
35543
35544      # Cannot rely on the command "which" here since it doesn't always work.
35545      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35546      if test -z "$is_absolute_path"; then
35547        # Path to executable is not absolute. Find it.
35548        IFS_save="$IFS"
35549        IFS=:
35550        for p in $PATH; do
35551          if test -f "$p/$path" && test -x "$p/$path"; then
35552            new_path="$p/$path"
35553            break
35554          fi
35555        done
35556        IFS="$IFS_save"
35557      else
35558        # This is an absolute path, we can use it without further modifications.
35559        new_path="$path"
35560      fi
35561
35562      if test "x$new_path" = x; then
35563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35564$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35565        has_space=`$ECHO "$complete" | $GREP " "`
35566        if test "x$has_space" != x; then
35567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35569        fi
35570        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35571      fi
35572    fi
35573
35574    # Now join together the path and the arguments once again
35575    if test "x$arguments" != xEOL; then
35576      new_complete="$new_path ${arguments% *}"
35577    else
35578      new_complete="$new_path"
35579    fi
35580
35581    if test "x$complete" != "x$new_complete"; then
35582      CXX="$new_complete"
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35584$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35585    fi
35586  fi
35587
35588  TEST_COMPILER="$CXX"
35589
35590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35591$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35592  SYMLINK_ORIGINAL="$TEST_COMPILER"
35593
35594  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35595    # Follow a chain of symbolic links. Use readlink
35596    # where it exists, else fall back to horribly
35597    # complicated shell code.
35598    if test "x$READLINK_TESTED" != yes; then
35599      # On MacOSX there is a readlink tool with a different
35600      # purpose than the GNU readlink tool. Check the found readlink.
35601      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35602      if test "x$ISGNU" = x; then
35603        # A readlink that we do not know how to use.
35604        # Are there other non-GNU readlinks out there?
35605        READLINK_TESTED=yes
35606        READLINK=
35607      fi
35608    fi
35609
35610    if test "x$READLINK" != x; then
35611      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35612    else
35613      # Save the current directory for restoring afterwards
35614      STARTDIR=$PWD
35615      COUNTER=0
35616      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35617      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35618      cd $sym_link_dir
35619      # Use -P flag to resolve symlinks in directories.
35620      cd `$THEPWDCMD -P`
35621      sym_link_dir=`$THEPWDCMD -P`
35622      # Resolve file symlinks
35623      while test $COUNTER -lt 20; do
35624        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35625        if test "x$ISLINK" == x; then
35626          # This is not a symbolic link! We are done!
35627          break
35628        fi
35629        # Again resolve directory symlinks since the target of the just found
35630        # link could be in a different directory
35631        cd `$DIRNAME $ISLINK`
35632        sym_link_dir=`$THEPWDCMD -P`
35633        sym_link_file=`$BASENAME $ISLINK`
35634        let COUNTER=COUNTER+1
35635      done
35636      cd $STARTDIR
35637      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35638    fi
35639  fi
35640
35641  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35643$as_echo "no symlink" >&6; }
35644  else
35645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35646$as_echo "$SYMLINK_ORIGINAL" >&6; }
35647
35648    # We can't handle ccache by gcc wrappers, since we need to know if we're
35649    # using ccache. Instead ccache usage must be controlled by a configure option.
35650    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35651    if test "x$COMPILER_BASENAME" = "xccache"; then
35652      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35653$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35654      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35655    fi
35656  fi
35657
35658
35659  COMPILER=$CXX
35660  COMPILER_NAME=$COMPILER_NAME
35661
35662  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35663    # cc -V output typically looks like
35664    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35665    # or
35666    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35667    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35668    # Check that this is likely to be the Solaris Studio cc.
35669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35670    if test $? -ne 0; then
35671      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35672      { $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
35673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35675$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35676      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35677$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35678      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35679    fi
35680    # Remove usage instructions (if present), and
35681    # collapse compiler output into a single line
35682    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35683        $SED -e 's/ *[Uu]sage:.*//'`
35684    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35685        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35686  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35687    # xlc -qversion output typically looks like
35688    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35689    #     Version: 11.01.0000.0015
35690    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35691    # Check that this is likely to be the IBM XL C compiler.
35692    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35693    if test $? -ne 0; then
35694      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35695      { $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
35696$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35697      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35698$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35699      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35700$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35701      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35702    fi
35703    # Collapse compiler output into a single line
35704    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35705    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35706        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35707  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35708    # There is no specific version flag, but all output starts with a version string.
35709    # First line typically looks something like:
35710    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35711    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35712    # Check that this is likely to be Microsoft CL.EXE.
35713    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35714    if test $? -ne 0; then
35715      { $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
35716$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35717      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35718$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35719      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35720    fi
35721    # Collapse compiler output into a single line
35722    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35723    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35724        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35725  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35726    # gcc --version output typically looks like
35727    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35728    #     Copyright (C) 2013 Free Software Foundation, Inc.
35729    #     This is free software; see the source for copying conditions.  There is NO
35730    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35731    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35732    # Check that this is likely to be GCC.
35733    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /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\"" >&5
35738$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35739      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35740    fi
35741    # Remove Copyright and legalese from version string, and
35742    # collapse into a single line
35743    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35744        $SED -e 's/ *Copyright .*//'`
35745    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35746        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35747  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35748    # clang --version output typically looks like
35749    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35750    #    clang version 3.3 (tags/RELEASE_33/final)
35751    # or
35752    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35753    #    Target: x86_64-pc-linux-gnu
35754    #    Thread model: posix
35755    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35756    # Check that this is likely to be clang
35757    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35758    if test $? -ne 0; then
35759      { $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
35760$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35761      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35762$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35763      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35764    fi
35765    # Collapse compiler output into a single line
35766    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35767    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35768        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35769  else
35770      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35771  fi
35772  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35773  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35774  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35775  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35776
35777  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35778$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35779
35780
35781  # Now that we have resolved CXX ourself, let autoconf have its go at it
35782  ac_ext=cpp
35783ac_cpp='$CXXCPP $CPPFLAGS'
35784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35787if test -z "$CXX"; then
35788  if test -n "$CCC"; then
35789    CXX=$CCC
35790  else
35791    if test -n "$ac_tool_prefix"; then
35792  for ac_prog in $CXX
35793  do
35794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35797$as_echo_n "checking for $ac_word... " >&6; }
35798if ${ac_cv_prog_CXX+:} false; then :
35799  $as_echo_n "(cached) " >&6
35800else
35801  if test -n "$CXX"; then
35802  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35803else
35804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35805for as_dir in $PATH
35806do
35807  IFS=$as_save_IFS
35808  test -z "$as_dir" && as_dir=.
35809    for ac_exec_ext in '' $ac_executable_extensions; do
35810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35811    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35813    break 2
35814  fi
35815done
35816  done
35817IFS=$as_save_IFS
35818
35819fi
35820fi
35821CXX=$ac_cv_prog_CXX
35822if test -n "$CXX"; then
35823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35824$as_echo "$CXX" >&6; }
35825else
35826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35827$as_echo "no" >&6; }
35828fi
35829
35830
35831    test -n "$CXX" && break
35832  done
35833fi
35834if test -z "$CXX"; then
35835  ac_ct_CXX=$CXX
35836  for ac_prog in $CXX
35837do
35838  # Extract the first word of "$ac_prog", so it can be a program name with args.
35839set dummy $ac_prog; ac_word=$2
35840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35841$as_echo_n "checking for $ac_word... " >&6; }
35842if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35843  $as_echo_n "(cached) " >&6
35844else
35845  if test -n "$ac_ct_CXX"; then
35846  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35847else
35848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35849for as_dir in $PATH
35850do
35851  IFS=$as_save_IFS
35852  test -z "$as_dir" && as_dir=.
35853    for ac_exec_ext in '' $ac_executable_extensions; do
35854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35855    ac_cv_prog_ac_ct_CXX="$ac_prog"
35856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35857    break 2
35858  fi
35859done
35860  done
35861IFS=$as_save_IFS
35862
35863fi
35864fi
35865ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35866if test -n "$ac_ct_CXX"; then
35867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35868$as_echo "$ac_ct_CXX" >&6; }
35869else
35870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35871$as_echo "no" >&6; }
35872fi
35873
35874
35875  test -n "$ac_ct_CXX" && break
35876done
35877
35878  if test "x$ac_ct_CXX" = x; then
35879    CXX="g++"
35880  else
35881    case $cross_compiling:$ac_tool_warned in
35882yes:)
35883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35885ac_tool_warned=yes ;;
35886esac
35887    CXX=$ac_ct_CXX
35888  fi
35889fi
35890
35891  fi
35892fi
35893# Provide some information about the compiler.
35894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35895set X $ac_compile
35896ac_compiler=$2
35897for ac_option in --version -v -V -qversion; do
35898  { { ac_try="$ac_compiler $ac_option >&5"
35899case "(($ac_try" in
35900  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35901  *) ac_try_echo=$ac_try;;
35902esac
35903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35904$as_echo "$ac_try_echo"; } >&5
35905  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35906  ac_status=$?
35907  if test -s conftest.err; then
35908    sed '10a\
35909... rest of stderr output deleted ...
35910         10q' conftest.err >conftest.er1
35911    cat conftest.er1 >&5
35912  fi
35913  rm -f conftest.er1 conftest.err
35914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35915  test $ac_status = 0; }
35916done
35917
35918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35919$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35920if ${ac_cv_cxx_compiler_gnu+:} false; then :
35921  $as_echo_n "(cached) " >&6
35922else
35923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35924/* end confdefs.h.  */
35925
35926int
35927main ()
35928{
35929#ifndef __GNUC__
35930       choke me
35931#endif
35932
35933  ;
35934  return 0;
35935}
35936_ACEOF
35937if ac_fn_cxx_try_compile "$LINENO"; then :
35938  ac_compiler_gnu=yes
35939else
35940  ac_compiler_gnu=no
35941fi
35942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35943ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35944
35945fi
35946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35947$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35948if test $ac_compiler_gnu = yes; then
35949  GXX=yes
35950else
35951  GXX=
35952fi
35953ac_test_CXXFLAGS=${CXXFLAGS+set}
35954ac_save_CXXFLAGS=$CXXFLAGS
35955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35956$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35957if ${ac_cv_prog_cxx_g+:} false; then :
35958  $as_echo_n "(cached) " >&6
35959else
35960  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35961   ac_cxx_werror_flag=yes
35962   ac_cv_prog_cxx_g=no
35963   CXXFLAGS="-g"
35964   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35965/* end confdefs.h.  */
35966
35967int
35968main ()
35969{
35970
35971  ;
35972  return 0;
35973}
35974_ACEOF
35975if ac_fn_cxx_try_compile "$LINENO"; then :
35976  ac_cv_prog_cxx_g=yes
35977else
35978  CXXFLAGS=""
35979      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35980/* end confdefs.h.  */
35981
35982int
35983main ()
35984{
35985
35986  ;
35987  return 0;
35988}
35989_ACEOF
35990if ac_fn_cxx_try_compile "$LINENO"; then :
35991
35992else
35993  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35994	 CXXFLAGS="-g"
35995	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35996/* end confdefs.h.  */
35997
35998int
35999main ()
36000{
36001
36002  ;
36003  return 0;
36004}
36005_ACEOF
36006if ac_fn_cxx_try_compile "$LINENO"; then :
36007  ac_cv_prog_cxx_g=yes
36008fi
36009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36010fi
36011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36012fi
36013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36014   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36015fi
36016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36017$as_echo "$ac_cv_prog_cxx_g" >&6; }
36018if test "$ac_test_CXXFLAGS" = set; then
36019  CXXFLAGS=$ac_save_CXXFLAGS
36020elif test $ac_cv_prog_cxx_g = yes; then
36021  if test "$GXX" = yes; then
36022    CXXFLAGS="-g -O2"
36023  else
36024    CXXFLAGS="-g"
36025  fi
36026else
36027  if test "$GXX" = yes; then
36028    CXXFLAGS="-O2"
36029  else
36030    CXXFLAGS=
36031  fi
36032fi
36033ac_ext=cpp
36034ac_cpp='$CXXCPP $CPPFLAGS'
36035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36038
36039
36040  # This is the compiler version number on the form X.Y[.Z]
36041
36042
36043
36044
36045  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36046    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36047$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36048    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36049$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36050  fi
36051
36052  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36053  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36054    { $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
36055$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;}
36056  fi
36057
36058  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36059    { $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
36060$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36061  fi
36062
36063  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36064
36065
36066  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116    # Execute function body
36117
36118  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36119  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36120
36121  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36122    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36123  fi
36124
36125  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36126    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36127  fi
36128
36129  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36130  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36131
36132  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36133    :
36134
36135  else
36136    :
36137
36138          { $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
36139$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36140
36141
36142  fi
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157  fi
36158
36159  #
36160  # Setup the preprocessor (CPP and CXXCPP)
36161  #
36162  ac_ext=c
36163ac_cpp='$CPP $CPPFLAGS'
36164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36166ac_compiler_gnu=$ac_cv_c_compiler_gnu
36167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36168$as_echo_n "checking how to run the C preprocessor... " >&6; }
36169# On Suns, sometimes $CPP names a directory.
36170if test -n "$CPP" && test -d "$CPP"; then
36171  CPP=
36172fi
36173if test -z "$CPP"; then
36174  if ${ac_cv_prog_CPP+:} false; then :
36175  $as_echo_n "(cached) " >&6
36176else
36177      # Double quotes because CPP needs to be expanded
36178    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36179    do
36180      ac_preproc_ok=false
36181for ac_c_preproc_warn_flag in '' yes
36182do
36183  # Use a header file that comes with gcc, so configuring glibc
36184  # with a fresh cross-compiler works.
36185  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36186  # <limits.h> exists even on freestanding compilers.
36187  # On the NeXT, cc -E runs the code through the compiler's parser,
36188  # not just through cpp. "Syntax error" is here to catch this case.
36189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190/* end confdefs.h.  */
36191#ifdef __STDC__
36192# include <limits.h>
36193#else
36194# include <assert.h>
36195#endif
36196		     Syntax error
36197_ACEOF
36198if ac_fn_c_try_cpp "$LINENO"; then :
36199
36200else
36201  # Broken: fails on valid input.
36202continue
36203fi
36204rm -f conftest.err conftest.i conftest.$ac_ext
36205
36206  # OK, works on sane cases.  Now check whether nonexistent headers
36207  # can be detected and how.
36208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36209/* end confdefs.h.  */
36210#include <ac_nonexistent.h>
36211_ACEOF
36212if ac_fn_c_try_cpp "$LINENO"; then :
36213  # Broken: success on invalid input.
36214continue
36215else
36216  # Passes both tests.
36217ac_preproc_ok=:
36218break
36219fi
36220rm -f conftest.err conftest.i conftest.$ac_ext
36221
36222done
36223# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36224rm -f conftest.i conftest.err conftest.$ac_ext
36225if $ac_preproc_ok; then :
36226  break
36227fi
36228
36229    done
36230    ac_cv_prog_CPP=$CPP
36231
36232fi
36233  CPP=$ac_cv_prog_CPP
36234else
36235  ac_cv_prog_CPP=$CPP
36236fi
36237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36238$as_echo "$CPP" >&6; }
36239ac_preproc_ok=false
36240for ac_c_preproc_warn_flag in '' yes
36241do
36242  # Use a header file that comes with gcc, so configuring glibc
36243  # with a fresh cross-compiler works.
36244  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36245  # <limits.h> exists even on freestanding compilers.
36246  # On the NeXT, cc -E runs the code through the compiler's parser,
36247  # not just through cpp. "Syntax error" is here to catch this case.
36248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36249/* end confdefs.h.  */
36250#ifdef __STDC__
36251# include <limits.h>
36252#else
36253# include <assert.h>
36254#endif
36255		     Syntax error
36256_ACEOF
36257if ac_fn_c_try_cpp "$LINENO"; then :
36258
36259else
36260  # Broken: fails on valid input.
36261continue
36262fi
36263rm -f conftest.err conftest.i conftest.$ac_ext
36264
36265  # OK, works on sane cases.  Now check whether nonexistent headers
36266  # can be detected and how.
36267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36268/* end confdefs.h.  */
36269#include <ac_nonexistent.h>
36270_ACEOF
36271if ac_fn_c_try_cpp "$LINENO"; then :
36272  # Broken: success on invalid input.
36273continue
36274else
36275  # Passes both tests.
36276ac_preproc_ok=:
36277break
36278fi
36279rm -f conftest.err conftest.i conftest.$ac_ext
36280
36281done
36282# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36283rm -f conftest.i conftest.err conftest.$ac_ext
36284if $ac_preproc_ok; then :
36285
36286else
36287  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36289as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36290See \`config.log' for more details" "$LINENO" 5; }
36291fi
36292
36293ac_ext=cpp
36294ac_cpp='$CXXCPP $CPPFLAGS'
36295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36298
36299
36300  # Only process if variable expands to non-empty
36301
36302  if test "x$CPP" != x; then
36303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36304
36305  # First separate the path from the arguments. This will split at the first
36306  # space.
36307  complete="$CPP"
36308  path="${complete%% *}"
36309  tmp="$complete EOL"
36310  arguments="${tmp#* }"
36311
36312  # Input might be given as Windows format, start by converting to
36313  # unix format.
36314  new_path=`$CYGPATH -u "$path"`
36315
36316  # Now try to locate executable using which
36317  new_path=`$WHICH "$new_path" 2> /dev/null`
36318  # bat and cmd files are not always considered executable in cygwin causing which
36319  # to not find them
36320  if test "x$new_path" = x \
36321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36323    new_path=`$CYGPATH -u "$path"`
36324  fi
36325  if test "x$new_path" = x; then
36326    # Oops. Which didn't find the executable.
36327    # The splitting of arguments from the executable at a space might have been incorrect,
36328    # since paths with space are more likely in Windows. Give it another try with the whole
36329    # argument.
36330    path="$complete"
36331    arguments="EOL"
36332    new_path=`$CYGPATH -u "$path"`
36333    new_path=`$WHICH "$new_path" 2> /dev/null`
36334    # bat and cmd files are not always considered executable in cygwin causing which
36335    # to not find them
36336    if test "x$new_path" = x \
36337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36339      new_path=`$CYGPATH -u "$path"`
36340    fi
36341    if test "x$new_path" = x; then
36342      # It's still not found. Now this is an unrecoverable error.
36343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36344$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36345      has_space=`$ECHO "$complete" | $GREP " "`
36346      if test "x$has_space" != x; then
36347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36349      fi
36350      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36351    fi
36352  fi
36353
36354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36357  # "foo.exe" is OK but "foo" is an error.
36358  #
36359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36360  # It is also a way to make sure we got the proper file name for the real test later on.
36361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36362  if test "x$test_shortpath" = x; then
36363    # Short path failed, file does not exist as specified.
36364    # Try adding .exe or .cmd
36365    if test -f "${new_path}.exe"; then
36366      input_to_shortpath="${new_path}.exe"
36367    elif test -f "${new_path}.cmd"; then
36368      input_to_shortpath="${new_path}.cmd"
36369    else
36370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36371$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36374      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36375    fi
36376  else
36377    input_to_shortpath="$new_path"
36378  fi
36379
36380  # Call helper function which possibly converts this using DOS-style short mode.
36381  # If so, the updated path is stored in $new_path.
36382  new_path="$input_to_shortpath"
36383
36384  input_path="$input_to_shortpath"
36385  # Check if we need to convert this using DOS-style short mode. If the path
36386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36387  # take no chances and rewrite it.
36388  # Note: m4 eats our [], so we need to use [ and ] instead.
36389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36390  if test "x$has_forbidden_chars" != x; then
36391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36395      # Going to short mode and back again did indeed matter. Since short mode is
36396      # case insensitive, let's make it lowercase to improve readability.
36397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36398      # Now convert it back to Unix-style (cygpath)
36399      input_path=`$CYGPATH -u "$shortmode_path"`
36400      new_path="$input_path"
36401    fi
36402  fi
36403
36404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36405  if test "x$test_cygdrive_prefix" = x; then
36406    # As a simple fix, exclude /usr/bin since it's not a real path.
36407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36409      # a path prefixed by /cygdrive for fixpath to work.
36410      new_path="$CYGWIN_ROOT_PATH$input_path"
36411    fi
36412  fi
36413
36414  # remove trailing .exe if any
36415  new_path="${new_path/%.exe/}"
36416
36417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36418
36419  # First separate the path from the arguments. This will split at the first
36420  # space.
36421  complete="$CPP"
36422  path="${complete%% *}"
36423  tmp="$complete EOL"
36424  arguments="${tmp#* }"
36425
36426  # Input might be given as Windows format, start by converting to
36427  # unix format.
36428  new_path="$path"
36429
36430  windows_path="$new_path"
36431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36432    unix_path=`$CYGPATH -u "$windows_path"`
36433    new_path="$unix_path"
36434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36436    new_path="$unix_path"
36437  fi
36438
36439
36440  # Now try to locate executable using which
36441  new_path=`$WHICH "$new_path" 2> /dev/null`
36442
36443  if test "x$new_path" = x; then
36444    # Oops. Which didn't find the executable.
36445    # The splitting of arguments from the executable at a space might have been incorrect,
36446    # since paths with space are more likely in Windows. Give it another try with the whole
36447    # argument.
36448    path="$complete"
36449    arguments="EOL"
36450    new_path="$path"
36451
36452  windows_path="$new_path"
36453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36454    unix_path=`$CYGPATH -u "$windows_path"`
36455    new_path="$unix_path"
36456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36458    new_path="$unix_path"
36459  fi
36460
36461
36462    new_path=`$WHICH "$new_path" 2> /dev/null`
36463    # bat and cmd files are not always considered executable in MSYS causing which
36464    # to not find them
36465    if test "x$new_path" = x \
36466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36468      new_path="$path"
36469
36470  windows_path="$new_path"
36471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36472    unix_path=`$CYGPATH -u "$windows_path"`
36473    new_path="$unix_path"
36474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36476    new_path="$unix_path"
36477  fi
36478
36479    fi
36480
36481    if test "x$new_path" = x; then
36482      # It's still not found. Now this is an unrecoverable error.
36483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36484$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36485      has_space=`$ECHO "$complete" | $GREP " "`
36486      if test "x$has_space" != x; then
36487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36489      fi
36490      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36491    fi
36492  fi
36493
36494  # Now new_path has a complete unix path to the binary
36495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36496    # Keep paths in /bin as-is, but remove trailing .exe if any
36497    new_path="${new_path/%.exe/}"
36498    # Do not save /bin paths to all_fixpath_prefixes!
36499  else
36500    # Not in mixed or Windows style, start by that.
36501    new_path=`cmd //c echo $new_path`
36502
36503  input_path="$new_path"
36504  # Check if we need to convert this using DOS-style short mode. If the path
36505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36506  # take no chances and rewrite it.
36507  # Note: m4 eats our [], so we need to use [ and ] instead.
36508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36509  if test "x$has_forbidden_chars" != x; then
36510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36512  fi
36513
36514    # Output is in $new_path
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525    # remove trailing .exe if any
36526    new_path="${new_path/%.exe/}"
36527
36528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36530  fi
36531
36532    else
36533      # We're on a unix platform. Hooray! :)
36534      # First separate the path from the arguments. This will split at the first
36535      # space.
36536      complete="$CPP"
36537      path="${complete%% *}"
36538      tmp="$complete EOL"
36539      arguments="${tmp#* }"
36540
36541      # Cannot rely on the command "which" here since it doesn't always work.
36542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36543      if test -z "$is_absolute_path"; then
36544        # Path to executable is not absolute. Find it.
36545        IFS_save="$IFS"
36546        IFS=:
36547        for p in $PATH; do
36548          if test -f "$p/$path" && test -x "$p/$path"; then
36549            new_path="$p/$path"
36550            break
36551          fi
36552        done
36553        IFS="$IFS_save"
36554      else
36555        # This is an absolute path, we can use it without further modifications.
36556        new_path="$path"
36557      fi
36558
36559      if test "x$new_path" = x; then
36560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36561$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36562        has_space=`$ECHO "$complete" | $GREP " "`
36563        if test "x$has_space" != x; then
36564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36566        fi
36567        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36568      fi
36569    fi
36570
36571    # Now join together the path and the arguments once again
36572    if test "x$arguments" != xEOL; then
36573      new_complete="$new_path ${arguments% *}"
36574    else
36575      new_complete="$new_path"
36576    fi
36577
36578    if test "x$complete" != "x$new_complete"; then
36579      CPP="$new_complete"
36580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36581$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36582    fi
36583  fi
36584
36585  ac_ext=cpp
36586ac_cpp='$CXXCPP $CPPFLAGS'
36587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36591$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36592if test -z "$CXXCPP"; then
36593  if ${ac_cv_prog_CXXCPP+:} false; then :
36594  $as_echo_n "(cached) " >&6
36595else
36596      # Double quotes because CXXCPP needs to be expanded
36597    for CXXCPP in "$CXX -E" "/lib/cpp"
36598    do
36599      ac_preproc_ok=false
36600for ac_cxx_preproc_warn_flag in '' yes
36601do
36602  # Use a header file that comes with gcc, so configuring glibc
36603  # with a fresh cross-compiler works.
36604  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36605  # <limits.h> exists even on freestanding compilers.
36606  # On the NeXT, cc -E runs the code through the compiler's parser,
36607  # not just through cpp. "Syntax error" is here to catch this case.
36608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36609/* end confdefs.h.  */
36610#ifdef __STDC__
36611# include <limits.h>
36612#else
36613# include <assert.h>
36614#endif
36615		     Syntax error
36616_ACEOF
36617if ac_fn_cxx_try_cpp "$LINENO"; then :
36618
36619else
36620  # Broken: fails on valid input.
36621continue
36622fi
36623rm -f conftest.err conftest.i conftest.$ac_ext
36624
36625  # OK, works on sane cases.  Now check whether nonexistent headers
36626  # can be detected and how.
36627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36628/* end confdefs.h.  */
36629#include <ac_nonexistent.h>
36630_ACEOF
36631if ac_fn_cxx_try_cpp "$LINENO"; then :
36632  # Broken: success on invalid input.
36633continue
36634else
36635  # Passes both tests.
36636ac_preproc_ok=:
36637break
36638fi
36639rm -f conftest.err conftest.i conftest.$ac_ext
36640
36641done
36642# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36643rm -f conftest.i conftest.err conftest.$ac_ext
36644if $ac_preproc_ok; then :
36645  break
36646fi
36647
36648    done
36649    ac_cv_prog_CXXCPP=$CXXCPP
36650
36651fi
36652  CXXCPP=$ac_cv_prog_CXXCPP
36653else
36654  ac_cv_prog_CXXCPP=$CXXCPP
36655fi
36656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36657$as_echo "$CXXCPP" >&6; }
36658ac_preproc_ok=false
36659for ac_cxx_preproc_warn_flag in '' yes
36660do
36661  # Use a header file that comes with gcc, so configuring glibc
36662  # with a fresh cross-compiler works.
36663  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36664  # <limits.h> exists even on freestanding compilers.
36665  # On the NeXT, cc -E runs the code through the compiler's parser,
36666  # not just through cpp. "Syntax error" is here to catch this case.
36667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36668/* end confdefs.h.  */
36669#ifdef __STDC__
36670# include <limits.h>
36671#else
36672# include <assert.h>
36673#endif
36674		     Syntax error
36675_ACEOF
36676if ac_fn_cxx_try_cpp "$LINENO"; then :
36677
36678else
36679  # Broken: fails on valid input.
36680continue
36681fi
36682rm -f conftest.err conftest.i conftest.$ac_ext
36683
36684  # OK, works on sane cases.  Now check whether nonexistent headers
36685  # can be detected and how.
36686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36687/* end confdefs.h.  */
36688#include <ac_nonexistent.h>
36689_ACEOF
36690if ac_fn_cxx_try_cpp "$LINENO"; then :
36691  # Broken: success on invalid input.
36692continue
36693else
36694  # Passes both tests.
36695ac_preproc_ok=:
36696break
36697fi
36698rm -f conftest.err conftest.i conftest.$ac_ext
36699
36700done
36701# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36702rm -f conftest.i conftest.err conftest.$ac_ext
36703if $ac_preproc_ok; then :
36704
36705else
36706  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36708as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36709See \`config.log' for more details" "$LINENO" 5; }
36710fi
36711
36712ac_ext=cpp
36713ac_cpp='$CXXCPP $CPPFLAGS'
36714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36717
36718
36719  # Only process if variable expands to non-empty
36720
36721  if test "x$CXXCPP" != x; then
36722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36723
36724  # First separate the path from the arguments. This will split at the first
36725  # space.
36726  complete="$CXXCPP"
36727  path="${complete%% *}"
36728  tmp="$complete EOL"
36729  arguments="${tmp#* }"
36730
36731  # Input might be given as Windows format, start by converting to
36732  # unix format.
36733  new_path=`$CYGPATH -u "$path"`
36734
36735  # Now try to locate executable using which
36736  new_path=`$WHICH "$new_path" 2> /dev/null`
36737  # bat and cmd files are not always considered executable in cygwin causing which
36738  # to not find them
36739  if test "x$new_path" = x \
36740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36742    new_path=`$CYGPATH -u "$path"`
36743  fi
36744  if test "x$new_path" = x; then
36745    # Oops. Which didn't find the executable.
36746    # The splitting of arguments from the executable at a space might have been incorrect,
36747    # since paths with space are more likely in Windows. Give it another try with the whole
36748    # argument.
36749    path="$complete"
36750    arguments="EOL"
36751    new_path=`$CYGPATH -u "$path"`
36752    new_path=`$WHICH "$new_path" 2> /dev/null`
36753    # bat and cmd files are not always considered executable in cygwin causing which
36754    # to not find them
36755    if test "x$new_path" = x \
36756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36758      new_path=`$CYGPATH -u "$path"`
36759    fi
36760    if test "x$new_path" = x; then
36761      # It's still not found. Now this is an unrecoverable error.
36762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36763$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36764      has_space=`$ECHO "$complete" | $GREP " "`
36765      if test "x$has_space" != x; then
36766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36768      fi
36769      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36770    fi
36771  fi
36772
36773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36776  # "foo.exe" is OK but "foo" is an error.
36777  #
36778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36779  # It is also a way to make sure we got the proper file name for the real test later on.
36780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36781  if test "x$test_shortpath" = x; then
36782    # Short path failed, file does not exist as specified.
36783    # Try adding .exe or .cmd
36784    if test -f "${new_path}.exe"; then
36785      input_to_shortpath="${new_path}.exe"
36786    elif test -f "${new_path}.cmd"; then
36787      input_to_shortpath="${new_path}.cmd"
36788    else
36789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36790$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36793      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36794    fi
36795  else
36796    input_to_shortpath="$new_path"
36797  fi
36798
36799  # Call helper function which possibly converts this using DOS-style short mode.
36800  # If so, the updated path is stored in $new_path.
36801  new_path="$input_to_shortpath"
36802
36803  input_path="$input_to_shortpath"
36804  # Check if we need to convert this using DOS-style short mode. If the path
36805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36806  # take no chances and rewrite it.
36807  # Note: m4 eats our [], so we need to use [ and ] instead.
36808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36809  if test "x$has_forbidden_chars" != x; then
36810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36814      # Going to short mode and back again did indeed matter. Since short mode is
36815      # case insensitive, let's make it lowercase to improve readability.
36816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36817      # Now convert it back to Unix-style (cygpath)
36818      input_path=`$CYGPATH -u "$shortmode_path"`
36819      new_path="$input_path"
36820    fi
36821  fi
36822
36823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36824  if test "x$test_cygdrive_prefix" = x; then
36825    # As a simple fix, exclude /usr/bin since it's not a real path.
36826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36828      # a path prefixed by /cygdrive for fixpath to work.
36829      new_path="$CYGWIN_ROOT_PATH$input_path"
36830    fi
36831  fi
36832
36833  # remove trailing .exe if any
36834  new_path="${new_path/%.exe/}"
36835
36836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36837
36838  # First separate the path from the arguments. This will split at the first
36839  # space.
36840  complete="$CXXCPP"
36841  path="${complete%% *}"
36842  tmp="$complete EOL"
36843  arguments="${tmp#* }"
36844
36845  # Input might be given as Windows format, start by converting to
36846  # unix format.
36847  new_path="$path"
36848
36849  windows_path="$new_path"
36850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36851    unix_path=`$CYGPATH -u "$windows_path"`
36852    new_path="$unix_path"
36853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36855    new_path="$unix_path"
36856  fi
36857
36858
36859  # Now try to locate executable using which
36860  new_path=`$WHICH "$new_path" 2> /dev/null`
36861
36862  if test "x$new_path" = x; then
36863    # Oops. Which didn't find the executable.
36864    # The splitting of arguments from the executable at a space might have been incorrect,
36865    # since paths with space are more likely in Windows. Give it another try with the whole
36866    # argument.
36867    path="$complete"
36868    arguments="EOL"
36869    new_path="$path"
36870
36871  windows_path="$new_path"
36872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36873    unix_path=`$CYGPATH -u "$windows_path"`
36874    new_path="$unix_path"
36875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36877    new_path="$unix_path"
36878  fi
36879
36880
36881    new_path=`$WHICH "$new_path" 2> /dev/null`
36882    # bat and cmd files are not always considered executable in MSYS causing which
36883    # to not find them
36884    if test "x$new_path" = x \
36885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36887      new_path="$path"
36888
36889  windows_path="$new_path"
36890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36891    unix_path=`$CYGPATH -u "$windows_path"`
36892    new_path="$unix_path"
36893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36895    new_path="$unix_path"
36896  fi
36897
36898    fi
36899
36900    if test "x$new_path" = x; then
36901      # It's still not found. Now this is an unrecoverable error.
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36903$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36904      has_space=`$ECHO "$complete" | $GREP " "`
36905      if test "x$has_space" != x; then
36906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36908      fi
36909      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36910    fi
36911  fi
36912
36913  # Now new_path has a complete unix path to the binary
36914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36915    # Keep paths in /bin as-is, but remove trailing .exe if any
36916    new_path="${new_path/%.exe/}"
36917    # Do not save /bin paths to all_fixpath_prefixes!
36918  else
36919    # Not in mixed or Windows style, start by that.
36920    new_path=`cmd //c echo $new_path`
36921
36922  input_path="$new_path"
36923  # Check if we need to convert this using DOS-style short mode. If the path
36924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36925  # take no chances and rewrite it.
36926  # Note: m4 eats our [], so we need to use [ and ] instead.
36927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36928  if test "x$has_forbidden_chars" != x; then
36929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36931  fi
36932
36933    # Output is in $new_path
36934
36935  windows_path="$new_path"
36936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36937    unix_path=`$CYGPATH -u "$windows_path"`
36938    new_path="$unix_path"
36939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36941    new_path="$unix_path"
36942  fi
36943
36944    # remove trailing .exe if any
36945    new_path="${new_path/%.exe/}"
36946
36947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36949  fi
36950
36951    else
36952      # We're on a unix platform. Hooray! :)
36953      # First separate the path from the arguments. This will split at the first
36954      # space.
36955      complete="$CXXCPP"
36956      path="${complete%% *}"
36957      tmp="$complete EOL"
36958      arguments="${tmp#* }"
36959
36960      # Cannot rely on the command "which" here since it doesn't always work.
36961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36962      if test -z "$is_absolute_path"; then
36963        # Path to executable is not absolute. Find it.
36964        IFS_save="$IFS"
36965        IFS=:
36966        for p in $PATH; do
36967          if test -f "$p/$path" && test -x "$p/$path"; then
36968            new_path="$p/$path"
36969            break
36970          fi
36971        done
36972        IFS="$IFS_save"
36973      else
36974        # This is an absolute path, we can use it without further modifications.
36975        new_path="$path"
36976      fi
36977
36978      if test "x$new_path" = x; then
36979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36980$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36981        has_space=`$ECHO "$complete" | $GREP " "`
36982        if test "x$has_space" != x; then
36983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36985        fi
36986        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36987      fi
36988    fi
36989
36990    # Now join together the path and the arguments once again
36991    if test "x$arguments" != xEOL; then
36992      new_complete="$new_path ${arguments% *}"
36993    else
36994      new_complete="$new_path"
36995    fi
36996
36997    if test "x$complete" != "x$new_complete"; then
36998      CXXCPP="$new_complete"
36999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37000$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37001    fi
37002  fi
37003
37004
37005  #
37006  # Setup the linker (LD)
37007  #
37008  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37009    # In the Microsoft toolchain we have a separate LD command "link".
37010    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37011    # a cygwin program for something completely different.
37012    # Extract the first word of "link", so it can be a program name with args.
37013set dummy link; ac_word=$2
37014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37015$as_echo_n "checking for $ac_word... " >&6; }
37016if ${ac_cv_prog_LD+:} false; then :
37017  $as_echo_n "(cached) " >&6
37018else
37019  if test -n "$LD"; then
37020  ac_cv_prog_LD="$LD" # Let the user override the test.
37021else
37022  ac_prog_rejected=no
37023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37024for as_dir in $PATH
37025do
37026  IFS=$as_save_IFS
37027  test -z "$as_dir" && as_dir=.
37028    for ac_exec_ext in '' $ac_executable_extensions; do
37029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37030    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37031       ac_prog_rejected=yes
37032       continue
37033     fi
37034    ac_cv_prog_LD="link"
37035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37036    break 2
37037  fi
37038done
37039  done
37040IFS=$as_save_IFS
37041
37042if test $ac_prog_rejected = yes; then
37043  # We found a bogon in the path, so make sure we never use it.
37044  set dummy $ac_cv_prog_LD
37045  shift
37046  if test $# != 0; then
37047    # We chose a different compiler from the bogus one.
37048    # However, it has the same basename, so the bogon will be chosen
37049    # first if we set LD to just the basename; use the full file name.
37050    shift
37051    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37052  fi
37053fi
37054fi
37055fi
37056LD=$ac_cv_prog_LD
37057if test -n "$LD"; then
37058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37059$as_echo "$LD" >&6; }
37060else
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37062$as_echo "no" >&6; }
37063fi
37064
37065
37066
37067  # Only process if variable expands to non-empty
37068
37069  if test "x$LD" != x; then
37070    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37071
37072  # First separate the path from the arguments. This will split at the first
37073  # space.
37074  complete="$LD"
37075  path="${complete%% *}"
37076  tmp="$complete EOL"
37077  arguments="${tmp#* }"
37078
37079  # Input might be given as Windows format, start by converting to
37080  # unix format.
37081  new_path=`$CYGPATH -u "$path"`
37082
37083  # Now try to locate executable using which
37084  new_path=`$WHICH "$new_path" 2> /dev/null`
37085  # bat and cmd files are not always considered executable in cygwin causing which
37086  # to not find them
37087  if test "x$new_path" = x \
37088      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37089      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37090    new_path=`$CYGPATH -u "$path"`
37091  fi
37092  if test "x$new_path" = x; then
37093    # Oops. Which didn't find the executable.
37094    # The splitting of arguments from the executable at a space might have been incorrect,
37095    # since paths with space are more likely in Windows. Give it another try with the whole
37096    # argument.
37097    path="$complete"
37098    arguments="EOL"
37099    new_path=`$CYGPATH -u "$path"`
37100    new_path=`$WHICH "$new_path" 2> /dev/null`
37101    # bat and cmd files are not always considered executable in cygwin causing which
37102    # to not find them
37103    if test "x$new_path" = x \
37104        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37105        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37106      new_path=`$CYGPATH -u "$path"`
37107    fi
37108    if test "x$new_path" = x; then
37109      # It's still not found. Now this is an unrecoverable error.
37110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37111$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37112      has_space=`$ECHO "$complete" | $GREP " "`
37113      if test "x$has_space" != x; then
37114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37116      fi
37117      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37118    fi
37119  fi
37120
37121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37124  # "foo.exe" is OK but "foo" is an error.
37125  #
37126  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37127  # It is also a way to make sure we got the proper file name for the real test later on.
37128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37129  if test "x$test_shortpath" = x; then
37130    # Short path failed, file does not exist as specified.
37131    # Try adding .exe or .cmd
37132    if test -f "${new_path}.exe"; then
37133      input_to_shortpath="${new_path}.exe"
37134    elif test -f "${new_path}.cmd"; then
37135      input_to_shortpath="${new_path}.cmd"
37136    else
37137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37138$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37139      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37140$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37141      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37142    fi
37143  else
37144    input_to_shortpath="$new_path"
37145  fi
37146
37147  # Call helper function which possibly converts this using DOS-style short mode.
37148  # If so, the updated path is stored in $new_path.
37149  new_path="$input_to_shortpath"
37150
37151  input_path="$input_to_shortpath"
37152  # Check if we need to convert this using DOS-style short mode. If the path
37153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37154  # take no chances and rewrite it.
37155  # Note: m4 eats our [], so we need to use [ and ] instead.
37156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37157  if test "x$has_forbidden_chars" != x; then
37158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37162      # Going to short mode and back again did indeed matter. Since short mode is
37163      # case insensitive, let's make it lowercase to improve readability.
37164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37165      # Now convert it back to Unix-style (cygpath)
37166      input_path=`$CYGPATH -u "$shortmode_path"`
37167      new_path="$input_path"
37168    fi
37169  fi
37170
37171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37172  if test "x$test_cygdrive_prefix" = x; then
37173    # As a simple fix, exclude /usr/bin since it's not a real path.
37174    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37176      # a path prefixed by /cygdrive for fixpath to work.
37177      new_path="$CYGWIN_ROOT_PATH$input_path"
37178    fi
37179  fi
37180
37181  # remove trailing .exe if any
37182  new_path="${new_path/%.exe/}"
37183
37184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37185
37186  # First separate the path from the arguments. This will split at the first
37187  # space.
37188  complete="$LD"
37189  path="${complete%% *}"
37190  tmp="$complete EOL"
37191  arguments="${tmp#* }"
37192
37193  # Input might be given as Windows format, start by converting to
37194  # unix format.
37195  new_path="$path"
37196
37197  windows_path="$new_path"
37198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37199    unix_path=`$CYGPATH -u "$windows_path"`
37200    new_path="$unix_path"
37201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37203    new_path="$unix_path"
37204  fi
37205
37206
37207  # Now try to locate executable using which
37208  new_path=`$WHICH "$new_path" 2> /dev/null`
37209
37210  if test "x$new_path" = x; then
37211    # Oops. Which didn't find the executable.
37212    # The splitting of arguments from the executable at a space might have been incorrect,
37213    # since paths with space are more likely in Windows. Give it another try with the whole
37214    # argument.
37215    path="$complete"
37216    arguments="EOL"
37217    new_path="$path"
37218
37219  windows_path="$new_path"
37220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37221    unix_path=`$CYGPATH -u "$windows_path"`
37222    new_path="$unix_path"
37223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37225    new_path="$unix_path"
37226  fi
37227
37228
37229    new_path=`$WHICH "$new_path" 2> /dev/null`
37230    # bat and cmd files are not always considered executable in MSYS causing which
37231    # to not find them
37232    if test "x$new_path" = x \
37233        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37234        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37235      new_path="$path"
37236
37237  windows_path="$new_path"
37238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37239    unix_path=`$CYGPATH -u "$windows_path"`
37240    new_path="$unix_path"
37241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37243    new_path="$unix_path"
37244  fi
37245
37246    fi
37247
37248    if test "x$new_path" = x; then
37249      # It's still not found. Now this is an unrecoverable error.
37250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37251$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37252      has_space=`$ECHO "$complete" | $GREP " "`
37253      if test "x$has_space" != x; then
37254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37256      fi
37257      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37258    fi
37259  fi
37260
37261  # Now new_path has a complete unix path to the binary
37262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37263    # Keep paths in /bin as-is, but remove trailing .exe if any
37264    new_path="${new_path/%.exe/}"
37265    # Do not save /bin paths to all_fixpath_prefixes!
37266  else
37267    # Not in mixed or Windows style, start by that.
37268    new_path=`cmd //c echo $new_path`
37269
37270  input_path="$new_path"
37271  # Check if we need to convert this using DOS-style short mode. If the path
37272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37273  # take no chances and rewrite it.
37274  # Note: m4 eats our [], so we need to use [ and ] instead.
37275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37276  if test "x$has_forbidden_chars" != x; then
37277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37279  fi
37280
37281    # Output is in $new_path
37282
37283  windows_path="$new_path"
37284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37285    unix_path=`$CYGPATH -u "$windows_path"`
37286    new_path="$unix_path"
37287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37289    new_path="$unix_path"
37290  fi
37291
37292    # remove trailing .exe if any
37293    new_path="${new_path/%.exe/}"
37294
37295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37297  fi
37298
37299    else
37300      # We're on a unix platform. Hooray! :)
37301      # First separate the path from the arguments. This will split at the first
37302      # space.
37303      complete="$LD"
37304      path="${complete%% *}"
37305      tmp="$complete EOL"
37306      arguments="${tmp#* }"
37307
37308      # Cannot rely on the command "which" here since it doesn't always work.
37309      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37310      if test -z "$is_absolute_path"; then
37311        # Path to executable is not absolute. Find it.
37312        IFS_save="$IFS"
37313        IFS=:
37314        for p in $PATH; do
37315          if test -f "$p/$path" && test -x "$p/$path"; then
37316            new_path="$p/$path"
37317            break
37318          fi
37319        done
37320        IFS="$IFS_save"
37321      else
37322        # This is an absolute path, we can use it without further modifications.
37323        new_path="$path"
37324      fi
37325
37326      if test "x$new_path" = x; then
37327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37328$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37329        has_space=`$ECHO "$complete" | $GREP " "`
37330        if test "x$has_space" != x; then
37331          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37332$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37333        fi
37334        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37335      fi
37336    fi
37337
37338    # Now join together the path and the arguments once again
37339    if test "x$arguments" != xEOL; then
37340      new_complete="$new_path ${arguments% *}"
37341    else
37342      new_complete="$new_path"
37343    fi
37344
37345    if test "x$complete" != "x$new_complete"; then
37346      LD="$new_complete"
37347      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37348$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37349    fi
37350  fi
37351
37352    # Verify that we indeed succeeded with this trick.
37353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37354$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37355    "$LD" --version > /dev/null
37356    if test $? -eq 0 ; then
37357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358$as_echo "no" >&6; }
37359      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37360    else
37361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37362$as_echo "yes" >&6; }
37363    fi
37364    LDCXX="$LD"
37365  else
37366    # All other toolchains use the compiler to link.
37367    LD="$CC"
37368    LDCXX="$CXX"
37369  fi
37370
37371  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37372
37373
37374  #
37375  # Setup the assembler (AS)
37376  #
37377  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37378
37379
37380  # Publish this variable in the help.
37381
37382
37383  if [ -z "${AS+x}" ]; then
37384    # The variable is not set by user, try to locate tool using the code snippet
37385    for ac_prog in as
37386do
37387  # Extract the first word of "$ac_prog", so it can be a program name with args.
37388set dummy $ac_prog; ac_word=$2
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37390$as_echo_n "checking for $ac_word... " >&6; }
37391if ${ac_cv_path_AS+:} false; then :
37392  $as_echo_n "(cached) " >&6
37393else
37394  case $AS in
37395  [\\/]* | ?:[\\/]*)
37396  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37397  ;;
37398  *)
37399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37400for as_dir in $PATH
37401do
37402  IFS=$as_save_IFS
37403  test -z "$as_dir" && as_dir=.
37404    for ac_exec_ext in '' $ac_executable_extensions; do
37405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37406    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37408    break 2
37409  fi
37410done
37411  done
37412IFS=$as_save_IFS
37413
37414  ;;
37415esac
37416fi
37417AS=$ac_cv_path_AS
37418if test -n "$AS"; then
37419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37420$as_echo "$AS" >&6; }
37421else
37422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37423$as_echo "no" >&6; }
37424fi
37425
37426
37427  test -n "$AS" && break
37428done
37429
37430  else
37431    # The variable is set, but is it from the command line or the environment?
37432
37433    # Try to remove the string !AS! from our list.
37434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37436      # If it failed, the variable was not from the command line. Ignore it,
37437      # but warn the user (except for BASH, which is always set by the calling BASH).
37438      if test "xAS" != xBASH; then
37439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37440$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37441      fi
37442      # Try to locate tool using the code snippet
37443      for ac_prog in as
37444do
37445  # Extract the first word of "$ac_prog", so it can be a program name with args.
37446set dummy $ac_prog; ac_word=$2
37447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37448$as_echo_n "checking for $ac_word... " >&6; }
37449if ${ac_cv_path_AS+:} false; then :
37450  $as_echo_n "(cached) " >&6
37451else
37452  case $AS in
37453  [\\/]* | ?:[\\/]*)
37454  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37455  ;;
37456  *)
37457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37458for as_dir in $PATH
37459do
37460  IFS=$as_save_IFS
37461  test -z "$as_dir" && as_dir=.
37462    for ac_exec_ext in '' $ac_executable_extensions; do
37463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37464    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37466    break 2
37467  fi
37468done
37469  done
37470IFS=$as_save_IFS
37471
37472  ;;
37473esac
37474fi
37475AS=$ac_cv_path_AS
37476if test -n "$AS"; then
37477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37478$as_echo "$AS" >&6; }
37479else
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37481$as_echo "no" >&6; }
37482fi
37483
37484
37485  test -n "$AS" && break
37486done
37487
37488    else
37489      # If it succeeded, then it was overridden by the user. We will use it
37490      # for the tool.
37491
37492      # First remove it from the list of overridden variables, so we can test
37493      # for unknown variables in the end.
37494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37495
37496      # Check if we try to supply an empty value
37497      if test "x$AS" = x; then
37498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37499$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37501$as_echo_n "checking for AS... " >&6; }
37502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37503$as_echo "disabled" >&6; }
37504      else
37505        # Check if the provided tool contains a complete path.
37506        tool_specified="$AS"
37507        tool_basename="${tool_specified##*/}"
37508        if test "x$tool_basename" = "x$tool_specified"; then
37509          # A command without a complete path is provided, search $PATH.
37510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37511$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37512          # Extract the first word of "$tool_basename", so it can be a program name with args.
37513set dummy $tool_basename; ac_word=$2
37514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37515$as_echo_n "checking for $ac_word... " >&6; }
37516if ${ac_cv_path_AS+:} false; then :
37517  $as_echo_n "(cached) " >&6
37518else
37519  case $AS in
37520  [\\/]* | ?:[\\/]*)
37521  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37522  ;;
37523  *)
37524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37525for as_dir in $PATH
37526do
37527  IFS=$as_save_IFS
37528  test -z "$as_dir" && as_dir=.
37529    for ac_exec_ext in '' $ac_executable_extensions; do
37530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37531    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37533    break 2
37534  fi
37535done
37536  done
37537IFS=$as_save_IFS
37538
37539  ;;
37540esac
37541fi
37542AS=$ac_cv_path_AS
37543if test -n "$AS"; then
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37545$as_echo "$AS" >&6; }
37546else
37547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37548$as_echo "no" >&6; }
37549fi
37550
37551
37552          if test "x$AS" = x; then
37553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37554          fi
37555        else
37556          # Otherwise we believe it is a complete path. Use it as it is.
37557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37558$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37560$as_echo_n "checking for AS... " >&6; }
37561          if test ! -x "$tool_specified"; then
37562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37563$as_echo "not found" >&6; }
37564            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37565          fi
37566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37567$as_echo "$tool_specified" >&6; }
37568        fi
37569      fi
37570    fi
37571
37572  fi
37573
37574
37575
37576  # Only process if variable expands to non-empty
37577
37578  if test "x$AS" != x; then
37579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37580
37581  # First separate the path from the arguments. This will split at the first
37582  # space.
37583  complete="$AS"
37584  path="${complete%% *}"
37585  tmp="$complete EOL"
37586  arguments="${tmp#* }"
37587
37588  # Input might be given as Windows format, start by converting to
37589  # unix format.
37590  new_path=`$CYGPATH -u "$path"`
37591
37592  # Now try to locate executable using which
37593  new_path=`$WHICH "$new_path" 2> /dev/null`
37594  # bat and cmd files are not always considered executable in cygwin causing which
37595  # to not find them
37596  if test "x$new_path" = x \
37597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37599    new_path=`$CYGPATH -u "$path"`
37600  fi
37601  if test "x$new_path" = x; then
37602    # Oops. Which didn't find the executable.
37603    # The splitting of arguments from the executable at a space might have been incorrect,
37604    # since paths with space are more likely in Windows. Give it another try with the whole
37605    # argument.
37606    path="$complete"
37607    arguments="EOL"
37608    new_path=`$CYGPATH -u "$path"`
37609    new_path=`$WHICH "$new_path" 2> /dev/null`
37610    # bat and cmd files are not always considered executable in cygwin causing which
37611    # to not find them
37612    if test "x$new_path" = x \
37613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37615      new_path=`$CYGPATH -u "$path"`
37616    fi
37617    if test "x$new_path" = x; then
37618      # It's still not found. Now this is an unrecoverable error.
37619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37620$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37621      has_space=`$ECHO "$complete" | $GREP " "`
37622      if test "x$has_space" != x; then
37623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37625      fi
37626      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37627    fi
37628  fi
37629
37630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37633  # "foo.exe" is OK but "foo" is an error.
37634  #
37635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37636  # It is also a way to make sure we got the proper file name for the real test later on.
37637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37638  if test "x$test_shortpath" = x; then
37639    # Short path failed, file does not exist as specified.
37640    # Try adding .exe or .cmd
37641    if test -f "${new_path}.exe"; then
37642      input_to_shortpath="${new_path}.exe"
37643    elif test -f "${new_path}.cmd"; then
37644      input_to_shortpath="${new_path}.cmd"
37645    else
37646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37647$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37650      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37651    fi
37652  else
37653    input_to_shortpath="$new_path"
37654  fi
37655
37656  # Call helper function which possibly converts this using DOS-style short mode.
37657  # If so, the updated path is stored in $new_path.
37658  new_path="$input_to_shortpath"
37659
37660  input_path="$input_to_shortpath"
37661  # Check if we need to convert this using DOS-style short mode. If the path
37662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37663  # take no chances and rewrite it.
37664  # Note: m4 eats our [], so we need to use [ and ] instead.
37665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37666  if test "x$has_forbidden_chars" != x; then
37667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37671      # Going to short mode and back again did indeed matter. Since short mode is
37672      # case insensitive, let's make it lowercase to improve readability.
37673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37674      # Now convert it back to Unix-style (cygpath)
37675      input_path=`$CYGPATH -u "$shortmode_path"`
37676      new_path="$input_path"
37677    fi
37678  fi
37679
37680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37681  if test "x$test_cygdrive_prefix" = x; then
37682    # As a simple fix, exclude /usr/bin since it's not a real path.
37683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37685      # a path prefixed by /cygdrive for fixpath to work.
37686      new_path="$CYGWIN_ROOT_PATH$input_path"
37687    fi
37688  fi
37689
37690  # remove trailing .exe if any
37691  new_path="${new_path/%.exe/}"
37692
37693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37694
37695  # First separate the path from the arguments. This will split at the first
37696  # space.
37697  complete="$AS"
37698  path="${complete%% *}"
37699  tmp="$complete EOL"
37700  arguments="${tmp#* }"
37701
37702  # Input might be given as Windows format, start by converting to
37703  # unix format.
37704  new_path="$path"
37705
37706  windows_path="$new_path"
37707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37708    unix_path=`$CYGPATH -u "$windows_path"`
37709    new_path="$unix_path"
37710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37712    new_path="$unix_path"
37713  fi
37714
37715
37716  # Now try to locate executable using which
37717  new_path=`$WHICH "$new_path" 2> /dev/null`
37718
37719  if test "x$new_path" = x; then
37720    # Oops. Which didn't find the executable.
37721    # The splitting of arguments from the executable at a space might have been incorrect,
37722    # since paths with space are more likely in Windows. Give it another try with the whole
37723    # argument.
37724    path="$complete"
37725    arguments="EOL"
37726    new_path="$path"
37727
37728  windows_path="$new_path"
37729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37730    unix_path=`$CYGPATH -u "$windows_path"`
37731    new_path="$unix_path"
37732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37734    new_path="$unix_path"
37735  fi
37736
37737
37738    new_path=`$WHICH "$new_path" 2> /dev/null`
37739    # bat and cmd files are not always considered executable in MSYS causing which
37740    # to not find them
37741    if test "x$new_path" = x \
37742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37744      new_path="$path"
37745
37746  windows_path="$new_path"
37747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37748    unix_path=`$CYGPATH -u "$windows_path"`
37749    new_path="$unix_path"
37750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37752    new_path="$unix_path"
37753  fi
37754
37755    fi
37756
37757    if test "x$new_path" = x; then
37758      # It's still not found. Now this is an unrecoverable error.
37759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37760$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37761      has_space=`$ECHO "$complete" | $GREP " "`
37762      if test "x$has_space" != x; then
37763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37765      fi
37766      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37767    fi
37768  fi
37769
37770  # Now new_path has a complete unix path to the binary
37771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37772    # Keep paths in /bin as-is, but remove trailing .exe if any
37773    new_path="${new_path/%.exe/}"
37774    # Do not save /bin paths to all_fixpath_prefixes!
37775  else
37776    # Not in mixed or Windows style, start by that.
37777    new_path=`cmd //c echo $new_path`
37778
37779  input_path="$new_path"
37780  # Check if we need to convert this using DOS-style short mode. If the path
37781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37782  # take no chances and rewrite it.
37783  # Note: m4 eats our [], so we need to use [ and ] instead.
37784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37785  if test "x$has_forbidden_chars" != x; then
37786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37788  fi
37789
37790    # Output is in $new_path
37791
37792  windows_path="$new_path"
37793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37794    unix_path=`$CYGPATH -u "$windows_path"`
37795    new_path="$unix_path"
37796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37798    new_path="$unix_path"
37799  fi
37800
37801    # remove trailing .exe if any
37802    new_path="${new_path/%.exe/}"
37803
37804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37806  fi
37807
37808    else
37809      # We're on a unix platform. Hooray! :)
37810      # First separate the path from the arguments. This will split at the first
37811      # space.
37812      complete="$AS"
37813      path="${complete%% *}"
37814      tmp="$complete EOL"
37815      arguments="${tmp#* }"
37816
37817      # Cannot rely on the command "which" here since it doesn't always work.
37818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37819      if test -z "$is_absolute_path"; then
37820        # Path to executable is not absolute. Find it.
37821        IFS_save="$IFS"
37822        IFS=:
37823        for p in $PATH; do
37824          if test -f "$p/$path" && test -x "$p/$path"; then
37825            new_path="$p/$path"
37826            break
37827          fi
37828        done
37829        IFS="$IFS_save"
37830      else
37831        # This is an absolute path, we can use it without further modifications.
37832        new_path="$path"
37833      fi
37834
37835      if test "x$new_path" = x; then
37836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37837$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37838        has_space=`$ECHO "$complete" | $GREP " "`
37839        if test "x$has_space" != x; then
37840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37842        fi
37843        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37844      fi
37845    fi
37846
37847    # Now join together the path and the arguments once again
37848    if test "x$arguments" != xEOL; then
37849      new_complete="$new_path ${arguments% *}"
37850    else
37851      new_complete="$new_path"
37852    fi
37853
37854    if test "x$complete" != "x$new_complete"; then
37855      AS="$new_complete"
37856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37857$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37858    fi
37859  fi
37860
37861    if test "x$AS" = x; then
37862      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37863    fi
37864  else
37865    # FIXME: is this correct for microsoft?
37866    AS="$CC -c"
37867  fi
37868
37869
37870  #
37871  # Setup the archiver (AR)
37872  #
37873  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37874    # The corresponding ar tool is lib.exe (used to create static libraries)
37875    # Extract the first word of "lib", so it can be a program name with args.
37876set dummy lib; ac_word=$2
37877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37878$as_echo_n "checking for $ac_word... " >&6; }
37879if ${ac_cv_prog_AR+:} false; then :
37880  $as_echo_n "(cached) " >&6
37881else
37882  if test -n "$AR"; then
37883  ac_cv_prog_AR="$AR" # Let the user override the test.
37884else
37885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37886for as_dir in $PATH
37887do
37888  IFS=$as_save_IFS
37889  test -z "$as_dir" && as_dir=.
37890    for ac_exec_ext in '' $ac_executable_extensions; do
37891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37892    ac_cv_prog_AR="lib"
37893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37894    break 2
37895  fi
37896done
37897  done
37898IFS=$as_save_IFS
37899
37900fi
37901fi
37902AR=$ac_cv_prog_AR
37903if test -n "$AR"; then
37904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37905$as_echo "$AR" >&6; }
37906else
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37908$as_echo "no" >&6; }
37909fi
37910
37911
37912  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37913
37914
37915  # Publish this variable in the help.
37916
37917
37918  if [ -z "${AR+x}" ]; then
37919    # The variable is not set by user, try to locate tool using the code snippet
37920    if test -n "$ac_tool_prefix"; then
37921  for ac_prog in ar gcc-ar
37922  do
37923    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37924set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37926$as_echo_n "checking for $ac_word... " >&6; }
37927if ${ac_cv_prog_AR+:} false; then :
37928  $as_echo_n "(cached) " >&6
37929else
37930  if test -n "$AR"; then
37931  ac_cv_prog_AR="$AR" # Let the user override the test.
37932else
37933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37934for as_dir in $PATH
37935do
37936  IFS=$as_save_IFS
37937  test -z "$as_dir" && as_dir=.
37938    for ac_exec_ext in '' $ac_executable_extensions; do
37939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37940    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37942    break 2
37943  fi
37944done
37945  done
37946IFS=$as_save_IFS
37947
37948fi
37949fi
37950AR=$ac_cv_prog_AR
37951if test -n "$AR"; then
37952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37953$as_echo "$AR" >&6; }
37954else
37955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37956$as_echo "no" >&6; }
37957fi
37958
37959
37960    test -n "$AR" && break
37961  done
37962fi
37963if test -z "$AR"; then
37964  ac_ct_AR=$AR
37965  for ac_prog in ar gcc-ar
37966do
37967  # Extract the first word of "$ac_prog", so it can be a program name with args.
37968set dummy $ac_prog; ac_word=$2
37969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37970$as_echo_n "checking for $ac_word... " >&6; }
37971if ${ac_cv_prog_ac_ct_AR+:} false; then :
37972  $as_echo_n "(cached) " >&6
37973else
37974  if test -n "$ac_ct_AR"; then
37975  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37976else
37977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37978for as_dir in $PATH
37979do
37980  IFS=$as_save_IFS
37981  test -z "$as_dir" && as_dir=.
37982    for ac_exec_ext in '' $ac_executable_extensions; do
37983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37984    ac_cv_prog_ac_ct_AR="$ac_prog"
37985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37986    break 2
37987  fi
37988done
37989  done
37990IFS=$as_save_IFS
37991
37992fi
37993fi
37994ac_ct_AR=$ac_cv_prog_ac_ct_AR
37995if test -n "$ac_ct_AR"; then
37996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37997$as_echo "$ac_ct_AR" >&6; }
37998else
37999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38000$as_echo "no" >&6; }
38001fi
38002
38003
38004  test -n "$ac_ct_AR" && break
38005done
38006
38007  if test "x$ac_ct_AR" = x; then
38008    AR=""
38009  else
38010    case $cross_compiling:$ac_tool_warned in
38011yes:)
38012{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38013$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38014ac_tool_warned=yes ;;
38015esac
38016    AR=$ac_ct_AR
38017  fi
38018fi
38019
38020  else
38021    # The variable is set, but is it from the command line or the environment?
38022
38023    # Try to remove the string !AR! from our list.
38024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38026      # If it failed, the variable was not from the command line. Ignore it,
38027      # but warn the user (except for BASH, which is always set by the calling BASH).
38028      if test "xAR" != xBASH; then
38029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38030$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38031      fi
38032      # Try to locate tool using the code snippet
38033      if test -n "$ac_tool_prefix"; then
38034  for ac_prog in ar gcc-ar
38035  do
38036    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039$as_echo_n "checking for $ac_word... " >&6; }
38040if ${ac_cv_prog_AR+:} false; then :
38041  $as_echo_n "(cached) " >&6
38042else
38043  if test -n "$AR"; then
38044  ac_cv_prog_AR="$AR" # Let the user override the test.
38045else
38046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38047for as_dir in $PATH
38048do
38049  IFS=$as_save_IFS
38050  test -z "$as_dir" && as_dir=.
38051    for ac_exec_ext in '' $ac_executable_extensions; do
38052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38053    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38055    break 2
38056  fi
38057done
38058  done
38059IFS=$as_save_IFS
38060
38061fi
38062fi
38063AR=$ac_cv_prog_AR
38064if test -n "$AR"; then
38065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38066$as_echo "$AR" >&6; }
38067else
38068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38069$as_echo "no" >&6; }
38070fi
38071
38072
38073    test -n "$AR" && break
38074  done
38075fi
38076if test -z "$AR"; then
38077  ac_ct_AR=$AR
38078  for ac_prog in ar gcc-ar
38079do
38080  # Extract the first word of "$ac_prog", so it can be a program name with args.
38081set dummy $ac_prog; ac_word=$2
38082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38083$as_echo_n "checking for $ac_word... " >&6; }
38084if ${ac_cv_prog_ac_ct_AR+:} false; then :
38085  $as_echo_n "(cached) " >&6
38086else
38087  if test -n "$ac_ct_AR"; then
38088  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38089else
38090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38091for as_dir in $PATH
38092do
38093  IFS=$as_save_IFS
38094  test -z "$as_dir" && as_dir=.
38095    for ac_exec_ext in '' $ac_executable_extensions; do
38096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38097    ac_cv_prog_ac_ct_AR="$ac_prog"
38098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38099    break 2
38100  fi
38101done
38102  done
38103IFS=$as_save_IFS
38104
38105fi
38106fi
38107ac_ct_AR=$ac_cv_prog_ac_ct_AR
38108if test -n "$ac_ct_AR"; then
38109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38110$as_echo "$ac_ct_AR" >&6; }
38111else
38112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38113$as_echo "no" >&6; }
38114fi
38115
38116
38117  test -n "$ac_ct_AR" && break
38118done
38119
38120  if test "x$ac_ct_AR" = x; then
38121    AR=""
38122  else
38123    case $cross_compiling:$ac_tool_warned in
38124yes:)
38125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38127ac_tool_warned=yes ;;
38128esac
38129    AR=$ac_ct_AR
38130  fi
38131fi
38132
38133    else
38134      # If it succeeded, then it was overridden by the user. We will use it
38135      # for the tool.
38136
38137      # First remove it from the list of overridden variables, so we can test
38138      # for unknown variables in the end.
38139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38140
38141      # Check if we try to supply an empty value
38142      if test "x$AR" = x; then
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38144$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38146$as_echo_n "checking for AR... " >&6; }
38147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38148$as_echo "disabled" >&6; }
38149      else
38150        # Check if the provided tool contains a complete path.
38151        tool_specified="$AR"
38152        tool_basename="${tool_specified##*/}"
38153        if test "x$tool_basename" = "x$tool_specified"; then
38154          # A command without a complete path is provided, search $PATH.
38155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38156$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38157          # Extract the first word of "$tool_basename", so it can be a program name with args.
38158set dummy $tool_basename; ac_word=$2
38159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38160$as_echo_n "checking for $ac_word... " >&6; }
38161if ${ac_cv_path_AR+:} false; then :
38162  $as_echo_n "(cached) " >&6
38163else
38164  case $AR in
38165  [\\/]* | ?:[\\/]*)
38166  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38167  ;;
38168  *)
38169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38170for as_dir in $PATH
38171do
38172  IFS=$as_save_IFS
38173  test -z "$as_dir" && as_dir=.
38174    for ac_exec_ext in '' $ac_executable_extensions; do
38175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38176    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38178    break 2
38179  fi
38180done
38181  done
38182IFS=$as_save_IFS
38183
38184  ;;
38185esac
38186fi
38187AR=$ac_cv_path_AR
38188if test -n "$AR"; then
38189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38190$as_echo "$AR" >&6; }
38191else
38192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38193$as_echo "no" >&6; }
38194fi
38195
38196
38197          if test "x$AR" = x; then
38198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38199          fi
38200        else
38201          # Otherwise we believe it is a complete path. Use it as it is.
38202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38203$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38205$as_echo_n "checking for AR... " >&6; }
38206          if test ! -x "$tool_specified"; then
38207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38208$as_echo "not found" >&6; }
38209            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38210          fi
38211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38212$as_echo "$tool_specified" >&6; }
38213        fi
38214      fi
38215    fi
38216
38217  fi
38218
38219
38220  else
38221
38222
38223  # Publish this variable in the help.
38224
38225
38226  if [ -z "${AR+x}" ]; then
38227    # The variable is not set by user, try to locate tool using the code snippet
38228    if test -n "$ac_tool_prefix"; then
38229  for ac_prog in ar
38230  do
38231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38234$as_echo_n "checking for $ac_word... " >&6; }
38235if ${ac_cv_prog_AR+:} false; then :
38236  $as_echo_n "(cached) " >&6
38237else
38238  if test -n "$AR"; then
38239  ac_cv_prog_AR="$AR" # Let the user override the test.
38240else
38241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38242for as_dir in $PATH
38243do
38244  IFS=$as_save_IFS
38245  test -z "$as_dir" && as_dir=.
38246    for ac_exec_ext in '' $ac_executable_extensions; do
38247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38248    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38250    break 2
38251  fi
38252done
38253  done
38254IFS=$as_save_IFS
38255
38256fi
38257fi
38258AR=$ac_cv_prog_AR
38259if test -n "$AR"; then
38260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38261$as_echo "$AR" >&6; }
38262else
38263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38264$as_echo "no" >&6; }
38265fi
38266
38267
38268    test -n "$AR" && break
38269  done
38270fi
38271if test -z "$AR"; then
38272  ac_ct_AR=$AR
38273  for ac_prog in ar
38274do
38275  # Extract the first word of "$ac_prog", so it can be a program name with args.
38276set dummy $ac_prog; ac_word=$2
38277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38278$as_echo_n "checking for $ac_word... " >&6; }
38279if ${ac_cv_prog_ac_ct_AR+:} false; then :
38280  $as_echo_n "(cached) " >&6
38281else
38282  if test -n "$ac_ct_AR"; then
38283  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38284else
38285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38286for as_dir in $PATH
38287do
38288  IFS=$as_save_IFS
38289  test -z "$as_dir" && as_dir=.
38290    for ac_exec_ext in '' $ac_executable_extensions; do
38291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38292    ac_cv_prog_ac_ct_AR="$ac_prog"
38293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38294    break 2
38295  fi
38296done
38297  done
38298IFS=$as_save_IFS
38299
38300fi
38301fi
38302ac_ct_AR=$ac_cv_prog_ac_ct_AR
38303if test -n "$ac_ct_AR"; then
38304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38305$as_echo "$ac_ct_AR" >&6; }
38306else
38307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38308$as_echo "no" >&6; }
38309fi
38310
38311
38312  test -n "$ac_ct_AR" && break
38313done
38314
38315  if test "x$ac_ct_AR" = x; then
38316    AR=""
38317  else
38318    case $cross_compiling:$ac_tool_warned in
38319yes:)
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38322ac_tool_warned=yes ;;
38323esac
38324    AR=$ac_ct_AR
38325  fi
38326fi
38327
38328  else
38329    # The variable is set, but is it from the command line or the environment?
38330
38331    # Try to remove the string !AR! from our list.
38332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38334      # If it failed, the variable was not from the command line. Ignore it,
38335      # but warn the user (except for BASH, which is always set by the calling BASH).
38336      if test "xAR" != xBASH; then
38337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38338$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38339      fi
38340      # Try to locate tool using the code snippet
38341      if test -n "$ac_tool_prefix"; then
38342  for ac_prog in ar
38343  do
38344    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38345set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38347$as_echo_n "checking for $ac_word... " >&6; }
38348if ${ac_cv_prog_AR+:} false; then :
38349  $as_echo_n "(cached) " >&6
38350else
38351  if test -n "$AR"; then
38352  ac_cv_prog_AR="$AR" # Let the user override the test.
38353else
38354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38355for as_dir in $PATH
38356do
38357  IFS=$as_save_IFS
38358  test -z "$as_dir" && as_dir=.
38359    for ac_exec_ext in '' $ac_executable_extensions; do
38360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38361    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38363    break 2
38364  fi
38365done
38366  done
38367IFS=$as_save_IFS
38368
38369fi
38370fi
38371AR=$ac_cv_prog_AR
38372if test -n "$AR"; then
38373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38374$as_echo "$AR" >&6; }
38375else
38376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38377$as_echo "no" >&6; }
38378fi
38379
38380
38381    test -n "$AR" && break
38382  done
38383fi
38384if test -z "$AR"; then
38385  ac_ct_AR=$AR
38386  for ac_prog in ar
38387do
38388  # Extract the first word of "$ac_prog", so it can be a program name with args.
38389set dummy $ac_prog; ac_word=$2
38390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38391$as_echo_n "checking for $ac_word... " >&6; }
38392if ${ac_cv_prog_ac_ct_AR+:} false; then :
38393  $as_echo_n "(cached) " >&6
38394else
38395  if test -n "$ac_ct_AR"; then
38396  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38397else
38398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38399for as_dir in $PATH
38400do
38401  IFS=$as_save_IFS
38402  test -z "$as_dir" && as_dir=.
38403    for ac_exec_ext in '' $ac_executable_extensions; do
38404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38405    ac_cv_prog_ac_ct_AR="$ac_prog"
38406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38407    break 2
38408  fi
38409done
38410  done
38411IFS=$as_save_IFS
38412
38413fi
38414fi
38415ac_ct_AR=$ac_cv_prog_ac_ct_AR
38416if test -n "$ac_ct_AR"; then
38417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38418$as_echo "$ac_ct_AR" >&6; }
38419else
38420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38421$as_echo "no" >&6; }
38422fi
38423
38424
38425  test -n "$ac_ct_AR" && break
38426done
38427
38428  if test "x$ac_ct_AR" = x; then
38429    AR=""
38430  else
38431    case $cross_compiling:$ac_tool_warned in
38432yes:)
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38435ac_tool_warned=yes ;;
38436esac
38437    AR=$ac_ct_AR
38438  fi
38439fi
38440
38441    else
38442      # If it succeeded, then it was overridden by the user. We will use it
38443      # for the tool.
38444
38445      # First remove it from the list of overridden variables, so we can test
38446      # for unknown variables in the end.
38447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38448
38449      # Check if we try to supply an empty value
38450      if test "x$AR" = x; then
38451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38452$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38454$as_echo_n "checking for AR... " >&6; }
38455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38456$as_echo "disabled" >&6; }
38457      else
38458        # Check if the provided tool contains a complete path.
38459        tool_specified="$AR"
38460        tool_basename="${tool_specified##*/}"
38461        if test "x$tool_basename" = "x$tool_specified"; then
38462          # A command without a complete path is provided, search $PATH.
38463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38464$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38465          # Extract the first word of "$tool_basename", so it can be a program name with args.
38466set dummy $tool_basename; ac_word=$2
38467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38468$as_echo_n "checking for $ac_word... " >&6; }
38469if ${ac_cv_path_AR+:} false; then :
38470  $as_echo_n "(cached) " >&6
38471else
38472  case $AR in
38473  [\\/]* | ?:[\\/]*)
38474  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38475  ;;
38476  *)
38477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38478for as_dir in $PATH
38479do
38480  IFS=$as_save_IFS
38481  test -z "$as_dir" && as_dir=.
38482    for ac_exec_ext in '' $ac_executable_extensions; do
38483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38484    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38486    break 2
38487  fi
38488done
38489  done
38490IFS=$as_save_IFS
38491
38492  ;;
38493esac
38494fi
38495AR=$ac_cv_path_AR
38496if test -n "$AR"; then
38497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38498$as_echo "$AR" >&6; }
38499else
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38501$as_echo "no" >&6; }
38502fi
38503
38504
38505          if test "x$AR" = x; then
38506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38507          fi
38508        else
38509          # Otherwise we believe it is a complete path. Use it as it is.
38510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38511$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38513$as_echo_n "checking for AR... " >&6; }
38514          if test ! -x "$tool_specified"; then
38515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38516$as_echo "not found" >&6; }
38517            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38518          fi
38519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38520$as_echo "$tool_specified" >&6; }
38521        fi
38522      fi
38523    fi
38524
38525  fi
38526
38527
38528  fi
38529
38530  # Only process if variable expands to non-empty
38531
38532  if test "x$AR" != x; then
38533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534
38535  # First separate the path from the arguments. This will split at the first
38536  # space.
38537  complete="$AR"
38538  path="${complete%% *}"
38539  tmp="$complete EOL"
38540  arguments="${tmp#* }"
38541
38542  # Input might be given as Windows format, start by converting to
38543  # unix format.
38544  new_path=`$CYGPATH -u "$path"`
38545
38546  # Now try to locate executable using which
38547  new_path=`$WHICH "$new_path" 2> /dev/null`
38548  # bat and cmd files are not always considered executable in cygwin causing which
38549  # to not find them
38550  if test "x$new_path" = x \
38551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553    new_path=`$CYGPATH -u "$path"`
38554  fi
38555  if test "x$new_path" = x; then
38556    # Oops. Which didn't find the executable.
38557    # The splitting of arguments from the executable at a space might have been incorrect,
38558    # since paths with space are more likely in Windows. Give it another try with the whole
38559    # argument.
38560    path="$complete"
38561    arguments="EOL"
38562    new_path=`$CYGPATH -u "$path"`
38563    new_path=`$WHICH "$new_path" 2> /dev/null`
38564    # bat and cmd files are not always considered executable in cygwin causing which
38565    # to not find them
38566    if test "x$new_path" = x \
38567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569      new_path=`$CYGPATH -u "$path"`
38570    fi
38571    if test "x$new_path" = x; then
38572      # It's still not found. Now this is an unrecoverable error.
38573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38574$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38575      has_space=`$ECHO "$complete" | $GREP " "`
38576      if test "x$has_space" != x; then
38577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38579      fi
38580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38581    fi
38582  fi
38583
38584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38587  # "foo.exe" is OK but "foo" is an error.
38588  #
38589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38590  # It is also a way to make sure we got the proper file name for the real test later on.
38591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38592  if test "x$test_shortpath" = x; then
38593    # Short path failed, file does not exist as specified.
38594    # Try adding .exe or .cmd
38595    if test -f "${new_path}.exe"; then
38596      input_to_shortpath="${new_path}.exe"
38597    elif test -f "${new_path}.cmd"; then
38598      input_to_shortpath="${new_path}.cmd"
38599    else
38600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38601$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38604      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38605    fi
38606  else
38607    input_to_shortpath="$new_path"
38608  fi
38609
38610  # Call helper function which possibly converts this using DOS-style short mode.
38611  # If so, the updated path is stored in $new_path.
38612  new_path="$input_to_shortpath"
38613
38614  input_path="$input_to_shortpath"
38615  # Check if we need to convert this using DOS-style short mode. If the path
38616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38617  # take no chances and rewrite it.
38618  # Note: m4 eats our [], so we need to use [ and ] instead.
38619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38620  if test "x$has_forbidden_chars" != x; then
38621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38625      # Going to short mode and back again did indeed matter. Since short mode is
38626      # case insensitive, let's make it lowercase to improve readability.
38627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628      # Now convert it back to Unix-style (cygpath)
38629      input_path=`$CYGPATH -u "$shortmode_path"`
38630      new_path="$input_path"
38631    fi
38632  fi
38633
38634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38635  if test "x$test_cygdrive_prefix" = x; then
38636    # As a simple fix, exclude /usr/bin since it's not a real path.
38637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38639      # a path prefixed by /cygdrive for fixpath to work.
38640      new_path="$CYGWIN_ROOT_PATH$input_path"
38641    fi
38642  fi
38643
38644  # remove trailing .exe if any
38645  new_path="${new_path/%.exe/}"
38646
38647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648
38649  # First separate the path from the arguments. This will split at the first
38650  # space.
38651  complete="$AR"
38652  path="${complete%% *}"
38653  tmp="$complete EOL"
38654  arguments="${tmp#* }"
38655
38656  # Input might be given as Windows format, start by converting to
38657  # unix format.
38658  new_path="$path"
38659
38660  windows_path="$new_path"
38661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38662    unix_path=`$CYGPATH -u "$windows_path"`
38663    new_path="$unix_path"
38664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38666    new_path="$unix_path"
38667  fi
38668
38669
38670  # Now try to locate executable using which
38671  new_path=`$WHICH "$new_path" 2> /dev/null`
38672
38673  if test "x$new_path" = x; then
38674    # Oops. Which didn't find the executable.
38675    # The splitting of arguments from the executable at a space might have been incorrect,
38676    # since paths with space are more likely in Windows. Give it another try with the whole
38677    # argument.
38678    path="$complete"
38679    arguments="EOL"
38680    new_path="$path"
38681
38682  windows_path="$new_path"
38683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684    unix_path=`$CYGPATH -u "$windows_path"`
38685    new_path="$unix_path"
38686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688    new_path="$unix_path"
38689  fi
38690
38691
38692    new_path=`$WHICH "$new_path" 2> /dev/null`
38693    # bat and cmd files are not always considered executable in MSYS causing which
38694    # to not find them
38695    if test "x$new_path" = x \
38696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38698      new_path="$path"
38699
38700  windows_path="$new_path"
38701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38702    unix_path=`$CYGPATH -u "$windows_path"`
38703    new_path="$unix_path"
38704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38706    new_path="$unix_path"
38707  fi
38708
38709    fi
38710
38711    if test "x$new_path" = x; then
38712      # It's still not found. Now this is an unrecoverable error.
38713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38714$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38715      has_space=`$ECHO "$complete" | $GREP " "`
38716      if test "x$has_space" != x; then
38717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38719      fi
38720      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38721    fi
38722  fi
38723
38724  # Now new_path has a complete unix path to the binary
38725  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38726    # Keep paths in /bin as-is, but remove trailing .exe if any
38727    new_path="${new_path/%.exe/}"
38728    # Do not save /bin paths to all_fixpath_prefixes!
38729  else
38730    # Not in mixed or Windows style, start by that.
38731    new_path=`cmd //c echo $new_path`
38732
38733  input_path="$new_path"
38734  # Check if we need to convert this using DOS-style short mode. If the path
38735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38736  # take no chances and rewrite it.
38737  # Note: m4 eats our [], so we need to use [ and ] instead.
38738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38739  if test "x$has_forbidden_chars" != x; then
38740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38742  fi
38743
38744    # Output is in $new_path
38745
38746  windows_path="$new_path"
38747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38748    unix_path=`$CYGPATH -u "$windows_path"`
38749    new_path="$unix_path"
38750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38752    new_path="$unix_path"
38753  fi
38754
38755    # remove trailing .exe if any
38756    new_path="${new_path/%.exe/}"
38757
38758    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38759    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38760  fi
38761
38762    else
38763      # We're on a unix platform. Hooray! :)
38764      # First separate the path from the arguments. This will split at the first
38765      # space.
38766      complete="$AR"
38767      path="${complete%% *}"
38768      tmp="$complete EOL"
38769      arguments="${tmp#* }"
38770
38771      # Cannot rely on the command "which" here since it doesn't always work.
38772      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38773      if test -z "$is_absolute_path"; then
38774        # Path to executable is not absolute. Find it.
38775        IFS_save="$IFS"
38776        IFS=:
38777        for p in $PATH; do
38778          if test -f "$p/$path" && test -x "$p/$path"; then
38779            new_path="$p/$path"
38780            break
38781          fi
38782        done
38783        IFS="$IFS_save"
38784      else
38785        # This is an absolute path, we can use it without further modifications.
38786        new_path="$path"
38787      fi
38788
38789      if test "x$new_path" = x; then
38790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38791$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38792        has_space=`$ECHO "$complete" | $GREP " "`
38793        if test "x$has_space" != x; then
38794          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38795$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38796        fi
38797        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38798      fi
38799    fi
38800
38801    # Now join together the path and the arguments once again
38802    if test "x$arguments" != xEOL; then
38803      new_complete="$new_path ${arguments% *}"
38804    else
38805      new_complete="$new_path"
38806    fi
38807
38808    if test "x$complete" != "x$new_complete"; then
38809      AR="$new_complete"
38810      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38811$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38812    fi
38813  fi
38814
38815
38816
38817  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38818
38819
38820  # Publish this variable in the help.
38821
38822
38823  if [ -z "${LIPO+x}" ]; then
38824    # The variable is not set by user, try to locate tool using the code snippet
38825    for ac_prog in lipo
38826do
38827  # Extract the first word of "$ac_prog", so it can be a program name with args.
38828set dummy $ac_prog; ac_word=$2
38829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38830$as_echo_n "checking for $ac_word... " >&6; }
38831if ${ac_cv_path_LIPO+:} false; then :
38832  $as_echo_n "(cached) " >&6
38833else
38834  case $LIPO in
38835  [\\/]* | ?:[\\/]*)
38836  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38837  ;;
38838  *)
38839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38840for as_dir in $PATH
38841do
38842  IFS=$as_save_IFS
38843  test -z "$as_dir" && as_dir=.
38844    for ac_exec_ext in '' $ac_executable_extensions; do
38845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38846    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38848    break 2
38849  fi
38850done
38851  done
38852IFS=$as_save_IFS
38853
38854  ;;
38855esac
38856fi
38857LIPO=$ac_cv_path_LIPO
38858if test -n "$LIPO"; then
38859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38860$as_echo "$LIPO" >&6; }
38861else
38862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38863$as_echo "no" >&6; }
38864fi
38865
38866
38867  test -n "$LIPO" && break
38868done
38869
38870  else
38871    # The variable is set, but is it from the command line or the environment?
38872
38873    # Try to remove the string !LIPO! from our list.
38874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38876      # If it failed, the variable was not from the command line. Ignore it,
38877      # but warn the user (except for BASH, which is always set by the calling BASH).
38878      if test "xLIPO" != xBASH; then
38879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38880$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38881      fi
38882      # Try to locate tool using the code snippet
38883      for ac_prog in lipo
38884do
38885  # Extract the first word of "$ac_prog", so it can be a program name with args.
38886set dummy $ac_prog; ac_word=$2
38887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38888$as_echo_n "checking for $ac_word... " >&6; }
38889if ${ac_cv_path_LIPO+:} false; then :
38890  $as_echo_n "(cached) " >&6
38891else
38892  case $LIPO in
38893  [\\/]* | ?:[\\/]*)
38894  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38895  ;;
38896  *)
38897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38898for as_dir in $PATH
38899do
38900  IFS=$as_save_IFS
38901  test -z "$as_dir" && as_dir=.
38902    for ac_exec_ext in '' $ac_executable_extensions; do
38903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38904    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38906    break 2
38907  fi
38908done
38909  done
38910IFS=$as_save_IFS
38911
38912  ;;
38913esac
38914fi
38915LIPO=$ac_cv_path_LIPO
38916if test -n "$LIPO"; then
38917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38918$as_echo "$LIPO" >&6; }
38919else
38920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38921$as_echo "no" >&6; }
38922fi
38923
38924
38925  test -n "$LIPO" && break
38926done
38927
38928    else
38929      # If it succeeded, then it was overridden by the user. We will use it
38930      # for the tool.
38931
38932      # First remove it from the list of overridden variables, so we can test
38933      # for unknown variables in the end.
38934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38935
38936      # Check if we try to supply an empty value
38937      if test "x$LIPO" = x; then
38938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38939$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38941$as_echo_n "checking for LIPO... " >&6; }
38942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38943$as_echo "disabled" >&6; }
38944      else
38945        # Check if the provided tool contains a complete path.
38946        tool_specified="$LIPO"
38947        tool_basename="${tool_specified##*/}"
38948        if test "x$tool_basename" = "x$tool_specified"; then
38949          # A command without a complete path is provided, search $PATH.
38950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38951$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38952          # Extract the first word of "$tool_basename", so it can be a program name with args.
38953set dummy $tool_basename; ac_word=$2
38954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38955$as_echo_n "checking for $ac_word... " >&6; }
38956if ${ac_cv_path_LIPO+:} false; then :
38957  $as_echo_n "(cached) " >&6
38958else
38959  case $LIPO in
38960  [\\/]* | ?:[\\/]*)
38961  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38962  ;;
38963  *)
38964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38965for as_dir in $PATH
38966do
38967  IFS=$as_save_IFS
38968  test -z "$as_dir" && as_dir=.
38969    for ac_exec_ext in '' $ac_executable_extensions; do
38970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38971    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38973    break 2
38974  fi
38975done
38976  done
38977IFS=$as_save_IFS
38978
38979  ;;
38980esac
38981fi
38982LIPO=$ac_cv_path_LIPO
38983if test -n "$LIPO"; then
38984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38985$as_echo "$LIPO" >&6; }
38986else
38987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38988$as_echo "no" >&6; }
38989fi
38990
38991
38992          if test "x$LIPO" = x; then
38993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38994          fi
38995        else
38996          # Otherwise we believe it is a complete path. Use it as it is.
38997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38998$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39000$as_echo_n "checking for LIPO... " >&6; }
39001          if test ! -x "$tool_specified"; then
39002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39003$as_echo "not found" >&6; }
39004            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39005          fi
39006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39007$as_echo "$tool_specified" >&6; }
39008        fi
39009      fi
39010    fi
39011
39012  fi
39013
39014
39015
39016  # Only process if variable expands to non-empty
39017
39018  if test "x$LIPO" != x; then
39019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39020
39021  # First separate the path from the arguments. This will split at the first
39022  # space.
39023  complete="$LIPO"
39024  path="${complete%% *}"
39025  tmp="$complete EOL"
39026  arguments="${tmp#* }"
39027
39028  # Input might be given as Windows format, start by converting to
39029  # unix format.
39030  new_path=`$CYGPATH -u "$path"`
39031
39032  # Now try to locate executable using which
39033  new_path=`$WHICH "$new_path" 2> /dev/null`
39034  # bat and cmd files are not always considered executable in cygwin causing which
39035  # to not find them
39036  if test "x$new_path" = x \
39037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39039    new_path=`$CYGPATH -u "$path"`
39040  fi
39041  if test "x$new_path" = x; then
39042    # Oops. Which didn't find the executable.
39043    # The splitting of arguments from the executable at a space might have been incorrect,
39044    # since paths with space are more likely in Windows. Give it another try with the whole
39045    # argument.
39046    path="$complete"
39047    arguments="EOL"
39048    new_path=`$CYGPATH -u "$path"`
39049    new_path=`$WHICH "$new_path" 2> /dev/null`
39050    # bat and cmd files are not always considered executable in cygwin causing which
39051    # to not find them
39052    if test "x$new_path" = x \
39053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39055      new_path=`$CYGPATH -u "$path"`
39056    fi
39057    if test "x$new_path" = x; then
39058      # It's still not found. Now this is an unrecoverable error.
39059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39060$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39061      has_space=`$ECHO "$complete" | $GREP " "`
39062      if test "x$has_space" != x; then
39063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39065      fi
39066      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39067    fi
39068  fi
39069
39070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39073  # "foo.exe" is OK but "foo" is an error.
39074  #
39075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39076  # It is also a way to make sure we got the proper file name for the real test later on.
39077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39078  if test "x$test_shortpath" = x; then
39079    # Short path failed, file does not exist as specified.
39080    # Try adding .exe or .cmd
39081    if test -f "${new_path}.exe"; then
39082      input_to_shortpath="${new_path}.exe"
39083    elif test -f "${new_path}.cmd"; then
39084      input_to_shortpath="${new_path}.cmd"
39085    else
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39087$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39090      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39091    fi
39092  else
39093    input_to_shortpath="$new_path"
39094  fi
39095
39096  # Call helper function which possibly converts this using DOS-style short mode.
39097  # If so, the updated path is stored in $new_path.
39098  new_path="$input_to_shortpath"
39099
39100  input_path="$input_to_shortpath"
39101  # Check if we need to convert this using DOS-style short mode. If the path
39102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39103  # take no chances and rewrite it.
39104  # Note: m4 eats our [], so we need to use [ and ] instead.
39105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39106  if test "x$has_forbidden_chars" != x; then
39107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39111      # Going to short mode and back again did indeed matter. Since short mode is
39112      # case insensitive, let's make it lowercase to improve readability.
39113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39114      # Now convert it back to Unix-style (cygpath)
39115      input_path=`$CYGPATH -u "$shortmode_path"`
39116      new_path="$input_path"
39117    fi
39118  fi
39119
39120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39121  if test "x$test_cygdrive_prefix" = x; then
39122    # As a simple fix, exclude /usr/bin since it's not a real path.
39123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39125      # a path prefixed by /cygdrive for fixpath to work.
39126      new_path="$CYGWIN_ROOT_PATH$input_path"
39127    fi
39128  fi
39129
39130  # remove trailing .exe if any
39131  new_path="${new_path/%.exe/}"
39132
39133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39134
39135  # First separate the path from the arguments. This will split at the first
39136  # space.
39137  complete="$LIPO"
39138  path="${complete%% *}"
39139  tmp="$complete EOL"
39140  arguments="${tmp#* }"
39141
39142  # Input might be given as Windows format, start by converting to
39143  # unix format.
39144  new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156  # Now try to locate executable using which
39157  new_path=`$WHICH "$new_path" 2> /dev/null`
39158
39159  if test "x$new_path" = x; then
39160    # Oops. Which didn't find the executable.
39161    # The splitting of arguments from the executable at a space might have been incorrect,
39162    # since paths with space are more likely in Windows. Give it another try with the whole
39163    # argument.
39164    path="$complete"
39165    arguments="EOL"
39166    new_path="$path"
39167
39168  windows_path="$new_path"
39169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170    unix_path=`$CYGPATH -u "$windows_path"`
39171    new_path="$unix_path"
39172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174    new_path="$unix_path"
39175  fi
39176
39177
39178    new_path=`$WHICH "$new_path" 2> /dev/null`
39179    # bat and cmd files are not always considered executable in MSYS causing which
39180    # to not find them
39181    if test "x$new_path" = x \
39182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39184      new_path="$path"
39185
39186  windows_path="$new_path"
39187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39188    unix_path=`$CYGPATH -u "$windows_path"`
39189    new_path="$unix_path"
39190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39192    new_path="$unix_path"
39193  fi
39194
39195    fi
39196
39197    if test "x$new_path" = x; then
39198      # It's still not found. Now this is an unrecoverable error.
39199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39200$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39201      has_space=`$ECHO "$complete" | $GREP " "`
39202      if test "x$has_space" != x; then
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39205      fi
39206      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39207    fi
39208  fi
39209
39210  # Now new_path has a complete unix path to the binary
39211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39212    # Keep paths in /bin as-is, but remove trailing .exe if any
39213    new_path="${new_path/%.exe/}"
39214    # Do not save /bin paths to all_fixpath_prefixes!
39215  else
39216    # Not in mixed or Windows style, start by that.
39217    new_path=`cmd //c echo $new_path`
39218
39219  input_path="$new_path"
39220  # Check if we need to convert this using DOS-style short mode. If the path
39221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39222  # take no chances and rewrite it.
39223  # Note: m4 eats our [], so we need to use [ and ] instead.
39224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39225  if test "x$has_forbidden_chars" != x; then
39226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39228  fi
39229
39230    # Output is in $new_path
39231
39232  windows_path="$new_path"
39233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39234    unix_path=`$CYGPATH -u "$windows_path"`
39235    new_path="$unix_path"
39236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39238    new_path="$unix_path"
39239  fi
39240
39241    # remove trailing .exe if any
39242    new_path="${new_path/%.exe/}"
39243
39244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39246  fi
39247
39248    else
39249      # We're on a unix platform. Hooray! :)
39250      # First separate the path from the arguments. This will split at the first
39251      # space.
39252      complete="$LIPO"
39253      path="${complete%% *}"
39254      tmp="$complete EOL"
39255      arguments="${tmp#* }"
39256
39257      # Cannot rely on the command "which" here since it doesn't always work.
39258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39259      if test -z "$is_absolute_path"; then
39260        # Path to executable is not absolute. Find it.
39261        IFS_save="$IFS"
39262        IFS=:
39263        for p in $PATH; do
39264          if test -f "$p/$path" && test -x "$p/$path"; then
39265            new_path="$p/$path"
39266            break
39267          fi
39268        done
39269        IFS="$IFS_save"
39270      else
39271        # This is an absolute path, we can use it without further modifications.
39272        new_path="$path"
39273      fi
39274
39275      if test "x$new_path" = x; then
39276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39277$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39278        has_space=`$ECHO "$complete" | $GREP " "`
39279        if test "x$has_space" != x; then
39280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39282        fi
39283        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39284      fi
39285    fi
39286
39287    # Now join together the path and the arguments once again
39288    if test "x$arguments" != xEOL; then
39289      new_complete="$new_path ${arguments% *}"
39290    else
39291      new_complete="$new_path"
39292    fi
39293
39294    if test "x$complete" != "x$new_complete"; then
39295      LIPO="$new_complete"
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39297$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39298    fi
39299  fi
39300
39301  fi
39302
39303  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39304    # Extract the first word of "mt", so it can be a program name with args.
39305set dummy mt; ac_word=$2
39306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39307$as_echo_n "checking for $ac_word... " >&6; }
39308if ${ac_cv_prog_MT+:} false; then :
39309  $as_echo_n "(cached) " >&6
39310else
39311  if test -n "$MT"; then
39312  ac_cv_prog_MT="$MT" # Let the user override the test.
39313else
39314  ac_prog_rejected=no
39315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39316for as_dir in $PATH
39317do
39318  IFS=$as_save_IFS
39319  test -z "$as_dir" && as_dir=.
39320    for ac_exec_ext in '' $ac_executable_extensions; do
39321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39322    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39323       ac_prog_rejected=yes
39324       continue
39325     fi
39326    ac_cv_prog_MT="mt"
39327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39328    break 2
39329  fi
39330done
39331  done
39332IFS=$as_save_IFS
39333
39334if test $ac_prog_rejected = yes; then
39335  # We found a bogon in the path, so make sure we never use it.
39336  set dummy $ac_cv_prog_MT
39337  shift
39338  if test $# != 0; then
39339    # We chose a different compiler from the bogus one.
39340    # However, it has the same basename, so the bogon will be chosen
39341    # first if we set MT to just the basename; use the full file name.
39342    shift
39343    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39344  fi
39345fi
39346fi
39347fi
39348MT=$ac_cv_prog_MT
39349if test -n "$MT"; then
39350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39351$as_echo "$MT" >&6; }
39352else
39353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39354$as_echo "no" >&6; }
39355fi
39356
39357
39358
39359  # Only process if variable expands to non-empty
39360
39361  if test "x$MT" != x; then
39362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39363
39364  # First separate the path from the arguments. This will split at the first
39365  # space.
39366  complete="$MT"
39367  path="${complete%% *}"
39368  tmp="$complete EOL"
39369  arguments="${tmp#* }"
39370
39371  # Input might be given as Windows format, start by converting to
39372  # unix format.
39373  new_path=`$CYGPATH -u "$path"`
39374
39375  # Now try to locate executable using which
39376  new_path=`$WHICH "$new_path" 2> /dev/null`
39377  # bat and cmd files are not always considered executable in cygwin causing which
39378  # to not find them
39379  if test "x$new_path" = x \
39380      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39381      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39382    new_path=`$CYGPATH -u "$path"`
39383  fi
39384  if test "x$new_path" = x; then
39385    # Oops. Which didn't find the executable.
39386    # The splitting of arguments from the executable at a space might have been incorrect,
39387    # since paths with space are more likely in Windows. Give it another try with the whole
39388    # argument.
39389    path="$complete"
39390    arguments="EOL"
39391    new_path=`$CYGPATH -u "$path"`
39392    new_path=`$WHICH "$new_path" 2> /dev/null`
39393    # bat and cmd files are not always considered executable in cygwin causing which
39394    # to not find them
39395    if test "x$new_path" = x \
39396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39398      new_path=`$CYGPATH -u "$path"`
39399    fi
39400    if test "x$new_path" = x; then
39401      # It's still not found. Now this is an unrecoverable error.
39402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39403$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39404      has_space=`$ECHO "$complete" | $GREP " "`
39405      if test "x$has_space" != x; then
39406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39408      fi
39409      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39410    fi
39411  fi
39412
39413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39416  # "foo.exe" is OK but "foo" is an error.
39417  #
39418  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39419  # It is also a way to make sure we got the proper file name for the real test later on.
39420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39421  if test "x$test_shortpath" = x; then
39422    # Short path failed, file does not exist as specified.
39423    # Try adding .exe or .cmd
39424    if test -f "${new_path}.exe"; then
39425      input_to_shortpath="${new_path}.exe"
39426    elif test -f "${new_path}.cmd"; then
39427      input_to_shortpath="${new_path}.cmd"
39428    else
39429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39430$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39431      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39432$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39433      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39434    fi
39435  else
39436    input_to_shortpath="$new_path"
39437  fi
39438
39439  # Call helper function which possibly converts this using DOS-style short mode.
39440  # If so, the updated path is stored in $new_path.
39441  new_path="$input_to_shortpath"
39442
39443  input_path="$input_to_shortpath"
39444  # Check if we need to convert this using DOS-style short mode. If the path
39445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39446  # take no chances and rewrite it.
39447  # Note: m4 eats our [], so we need to use [ and ] instead.
39448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39449  if test "x$has_forbidden_chars" != x; then
39450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39454      # Going to short mode and back again did indeed matter. Since short mode is
39455      # case insensitive, let's make it lowercase to improve readability.
39456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39457      # Now convert it back to Unix-style (cygpath)
39458      input_path=`$CYGPATH -u "$shortmode_path"`
39459      new_path="$input_path"
39460    fi
39461  fi
39462
39463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39464  if test "x$test_cygdrive_prefix" = x; then
39465    # As a simple fix, exclude /usr/bin since it's not a real path.
39466    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39468      # a path prefixed by /cygdrive for fixpath to work.
39469      new_path="$CYGWIN_ROOT_PATH$input_path"
39470    fi
39471  fi
39472
39473  # remove trailing .exe if any
39474  new_path="${new_path/%.exe/}"
39475
39476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39477
39478  # First separate the path from the arguments. This will split at the first
39479  # space.
39480  complete="$MT"
39481  path="${complete%% *}"
39482  tmp="$complete EOL"
39483  arguments="${tmp#* }"
39484
39485  # Input might be given as Windows format, start by converting to
39486  # unix format.
39487  new_path="$path"
39488
39489  windows_path="$new_path"
39490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39491    unix_path=`$CYGPATH -u "$windows_path"`
39492    new_path="$unix_path"
39493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39495    new_path="$unix_path"
39496  fi
39497
39498
39499  # Now try to locate executable using which
39500  new_path=`$WHICH "$new_path" 2> /dev/null`
39501
39502  if test "x$new_path" = x; then
39503    # Oops. Which didn't find the executable.
39504    # The splitting of arguments from the executable at a space might have been incorrect,
39505    # since paths with space are more likely in Windows. Give it another try with the whole
39506    # argument.
39507    path="$complete"
39508    arguments="EOL"
39509    new_path="$path"
39510
39511  windows_path="$new_path"
39512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39513    unix_path=`$CYGPATH -u "$windows_path"`
39514    new_path="$unix_path"
39515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39517    new_path="$unix_path"
39518  fi
39519
39520
39521    new_path=`$WHICH "$new_path" 2> /dev/null`
39522    # bat and cmd files are not always considered executable in MSYS causing which
39523    # to not find them
39524    if test "x$new_path" = x \
39525        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39526        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39527      new_path="$path"
39528
39529  windows_path="$new_path"
39530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39531    unix_path=`$CYGPATH -u "$windows_path"`
39532    new_path="$unix_path"
39533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39535    new_path="$unix_path"
39536  fi
39537
39538    fi
39539
39540    if test "x$new_path" = x; then
39541      # It's still not found. Now this is an unrecoverable error.
39542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39543$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39544      has_space=`$ECHO "$complete" | $GREP " "`
39545      if test "x$has_space" != x; then
39546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39548      fi
39549      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39550    fi
39551  fi
39552
39553  # Now new_path has a complete unix path to the binary
39554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39555    # Keep paths in /bin as-is, but remove trailing .exe if any
39556    new_path="${new_path/%.exe/}"
39557    # Do not save /bin paths to all_fixpath_prefixes!
39558  else
39559    # Not in mixed or Windows style, start by that.
39560    new_path=`cmd //c echo $new_path`
39561
39562  input_path="$new_path"
39563  # Check if we need to convert this using DOS-style short mode. If the path
39564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39565  # take no chances and rewrite it.
39566  # Note: m4 eats our [], so we need to use [ and ] instead.
39567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39568  if test "x$has_forbidden_chars" != x; then
39569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39571  fi
39572
39573    # Output is in $new_path
39574
39575  windows_path="$new_path"
39576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39577    unix_path=`$CYGPATH -u "$windows_path"`
39578    new_path="$unix_path"
39579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39581    new_path="$unix_path"
39582  fi
39583
39584    # remove trailing .exe if any
39585    new_path="${new_path/%.exe/}"
39586
39587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39589  fi
39590
39591    else
39592      # We're on a unix platform. Hooray! :)
39593      # First separate the path from the arguments. This will split at the first
39594      # space.
39595      complete="$MT"
39596      path="${complete%% *}"
39597      tmp="$complete EOL"
39598      arguments="${tmp#* }"
39599
39600      # Cannot rely on the command "which" here since it doesn't always work.
39601      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39602      if test -z "$is_absolute_path"; then
39603        # Path to executable is not absolute. Find it.
39604        IFS_save="$IFS"
39605        IFS=:
39606        for p in $PATH; do
39607          if test -f "$p/$path" && test -x "$p/$path"; then
39608            new_path="$p/$path"
39609            break
39610          fi
39611        done
39612        IFS="$IFS_save"
39613      else
39614        # This is an absolute path, we can use it without further modifications.
39615        new_path="$path"
39616      fi
39617
39618      if test "x$new_path" = x; then
39619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39620$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39621        has_space=`$ECHO "$complete" | $GREP " "`
39622        if test "x$has_space" != x; then
39623          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39624$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39625        fi
39626        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39627      fi
39628    fi
39629
39630    # Now join together the path and the arguments once again
39631    if test "x$arguments" != xEOL; then
39632      new_complete="$new_path ${arguments% *}"
39633    else
39634      new_complete="$new_path"
39635    fi
39636
39637    if test "x$complete" != "x$new_complete"; then
39638      MT="$new_complete"
39639      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39640$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39641    fi
39642  fi
39643
39644    # Setup the resource compiler (RC)
39645    # Extract the first word of "rc", so it can be a program name with args.
39646set dummy rc; ac_word=$2
39647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39648$as_echo_n "checking for $ac_word... " >&6; }
39649if ${ac_cv_prog_RC+:} false; then :
39650  $as_echo_n "(cached) " >&6
39651else
39652  if test -n "$RC"; then
39653  ac_cv_prog_RC="$RC" # Let the user override the test.
39654else
39655  ac_prog_rejected=no
39656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39657for as_dir in $PATH
39658do
39659  IFS=$as_save_IFS
39660  test -z "$as_dir" && as_dir=.
39661    for ac_exec_ext in '' $ac_executable_extensions; do
39662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39663    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39664       ac_prog_rejected=yes
39665       continue
39666     fi
39667    ac_cv_prog_RC="rc"
39668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39669    break 2
39670  fi
39671done
39672  done
39673IFS=$as_save_IFS
39674
39675if test $ac_prog_rejected = yes; then
39676  # We found a bogon in the path, so make sure we never use it.
39677  set dummy $ac_cv_prog_RC
39678  shift
39679  if test $# != 0; then
39680    # We chose a different compiler from the bogus one.
39681    # However, it has the same basename, so the bogon will be chosen
39682    # first if we set RC to just the basename; use the full file name.
39683    shift
39684    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39685  fi
39686fi
39687fi
39688fi
39689RC=$ac_cv_prog_RC
39690if test -n "$RC"; then
39691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39692$as_echo "$RC" >&6; }
39693else
39694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39695$as_echo "no" >&6; }
39696fi
39697
39698
39699
39700  # Only process if variable expands to non-empty
39701
39702  if test "x$RC" != x; then
39703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39704
39705  # First separate the path from the arguments. This will split at the first
39706  # space.
39707  complete="$RC"
39708  path="${complete%% *}"
39709  tmp="$complete EOL"
39710  arguments="${tmp#* }"
39711
39712  # Input might be given as Windows format, start by converting to
39713  # unix format.
39714  new_path=`$CYGPATH -u "$path"`
39715
39716  # Now try to locate executable using which
39717  new_path=`$WHICH "$new_path" 2> /dev/null`
39718  # bat and cmd files are not always considered executable in cygwin causing which
39719  # to not find them
39720  if test "x$new_path" = x \
39721      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39722      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39723    new_path=`$CYGPATH -u "$path"`
39724  fi
39725  if test "x$new_path" = x; then
39726    # Oops. Which didn't find the executable.
39727    # The splitting of arguments from the executable at a space might have been incorrect,
39728    # since paths with space are more likely in Windows. Give it another try with the whole
39729    # argument.
39730    path="$complete"
39731    arguments="EOL"
39732    new_path=`$CYGPATH -u "$path"`
39733    new_path=`$WHICH "$new_path" 2> /dev/null`
39734    # bat and cmd files are not always considered executable in cygwin causing which
39735    # to not find them
39736    if test "x$new_path" = x \
39737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39739      new_path=`$CYGPATH -u "$path"`
39740    fi
39741    if test "x$new_path" = x; then
39742      # It's still not found. Now this is an unrecoverable error.
39743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39744$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39745      has_space=`$ECHO "$complete" | $GREP " "`
39746      if test "x$has_space" != x; then
39747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39749      fi
39750      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39751    fi
39752  fi
39753
39754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39757  # "foo.exe" is OK but "foo" is an error.
39758  #
39759  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39760  # It is also a way to make sure we got the proper file name for the real test later on.
39761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39762  if test "x$test_shortpath" = x; then
39763    # Short path failed, file does not exist as specified.
39764    # Try adding .exe or .cmd
39765    if test -f "${new_path}.exe"; then
39766      input_to_shortpath="${new_path}.exe"
39767    elif test -f "${new_path}.cmd"; then
39768      input_to_shortpath="${new_path}.cmd"
39769    else
39770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39771$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39772      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39773$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39774      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39775    fi
39776  else
39777    input_to_shortpath="$new_path"
39778  fi
39779
39780  # Call helper function which possibly converts this using DOS-style short mode.
39781  # If so, the updated path is stored in $new_path.
39782  new_path="$input_to_shortpath"
39783
39784  input_path="$input_to_shortpath"
39785  # Check if we need to convert this using DOS-style short mode. If the path
39786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39787  # take no chances and rewrite it.
39788  # Note: m4 eats our [], so we need to use [ and ] instead.
39789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39790  if test "x$has_forbidden_chars" != x; then
39791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39795      # Going to short mode and back again did indeed matter. Since short mode is
39796      # case insensitive, let's make it lowercase to improve readability.
39797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39798      # Now convert it back to Unix-style (cygpath)
39799      input_path=`$CYGPATH -u "$shortmode_path"`
39800      new_path="$input_path"
39801    fi
39802  fi
39803
39804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39805  if test "x$test_cygdrive_prefix" = x; then
39806    # As a simple fix, exclude /usr/bin since it's not a real path.
39807    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39809      # a path prefixed by /cygdrive for fixpath to work.
39810      new_path="$CYGWIN_ROOT_PATH$input_path"
39811    fi
39812  fi
39813
39814  # remove trailing .exe if any
39815  new_path="${new_path/%.exe/}"
39816
39817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39818
39819  # First separate the path from the arguments. This will split at the first
39820  # space.
39821  complete="$RC"
39822  path="${complete%% *}"
39823  tmp="$complete EOL"
39824  arguments="${tmp#* }"
39825
39826  # Input might be given as Windows format, start by converting to
39827  # unix format.
39828  new_path="$path"
39829
39830  windows_path="$new_path"
39831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39832    unix_path=`$CYGPATH -u "$windows_path"`
39833    new_path="$unix_path"
39834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39836    new_path="$unix_path"
39837  fi
39838
39839
39840  # Now try to locate executable using which
39841  new_path=`$WHICH "$new_path" 2> /dev/null`
39842
39843  if test "x$new_path" = x; then
39844    # Oops. Which didn't find the executable.
39845    # The splitting of arguments from the executable at a space might have been incorrect,
39846    # since paths with space are more likely in Windows. Give it another try with the whole
39847    # argument.
39848    path="$complete"
39849    arguments="EOL"
39850    new_path="$path"
39851
39852  windows_path="$new_path"
39853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39854    unix_path=`$CYGPATH -u "$windows_path"`
39855    new_path="$unix_path"
39856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39858    new_path="$unix_path"
39859  fi
39860
39861
39862    new_path=`$WHICH "$new_path" 2> /dev/null`
39863    # bat and cmd files are not always considered executable in MSYS causing which
39864    # to not find them
39865    if test "x$new_path" = x \
39866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39868      new_path="$path"
39869
39870  windows_path="$new_path"
39871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39872    unix_path=`$CYGPATH -u "$windows_path"`
39873    new_path="$unix_path"
39874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39876    new_path="$unix_path"
39877  fi
39878
39879    fi
39880
39881    if test "x$new_path" = x; then
39882      # It's still not found. Now this is an unrecoverable error.
39883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39884$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39885      has_space=`$ECHO "$complete" | $GREP " "`
39886      if test "x$has_space" != x; then
39887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39889      fi
39890      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39891    fi
39892  fi
39893
39894  # Now new_path has a complete unix path to the binary
39895  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39896    # Keep paths in /bin as-is, but remove trailing .exe if any
39897    new_path="${new_path/%.exe/}"
39898    # Do not save /bin paths to all_fixpath_prefixes!
39899  else
39900    # Not in mixed or Windows style, start by that.
39901    new_path=`cmd //c echo $new_path`
39902
39903  input_path="$new_path"
39904  # Check if we need to convert this using DOS-style short mode. If the path
39905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39906  # take no chances and rewrite it.
39907  # Note: m4 eats our [], so we need to use [ and ] instead.
39908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39909  if test "x$has_forbidden_chars" != x; then
39910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39912  fi
39913
39914    # Output is in $new_path
39915
39916  windows_path="$new_path"
39917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39918    unix_path=`$CYGPATH -u "$windows_path"`
39919    new_path="$unix_path"
39920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39922    new_path="$unix_path"
39923  fi
39924
39925    # remove trailing .exe if any
39926    new_path="${new_path/%.exe/}"
39927
39928    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39929    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39930  fi
39931
39932    else
39933      # We're on a unix platform. Hooray! :)
39934      # First separate the path from the arguments. This will split at the first
39935      # space.
39936      complete="$RC"
39937      path="${complete%% *}"
39938      tmp="$complete EOL"
39939      arguments="${tmp#* }"
39940
39941      # Cannot rely on the command "which" here since it doesn't always work.
39942      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39943      if test -z "$is_absolute_path"; then
39944        # Path to executable is not absolute. Find it.
39945        IFS_save="$IFS"
39946        IFS=:
39947        for p in $PATH; do
39948          if test -f "$p/$path" && test -x "$p/$path"; then
39949            new_path="$p/$path"
39950            break
39951          fi
39952        done
39953        IFS="$IFS_save"
39954      else
39955        # This is an absolute path, we can use it without further modifications.
39956        new_path="$path"
39957      fi
39958
39959      if test "x$new_path" = x; then
39960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39961$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39962        has_space=`$ECHO "$complete" | $GREP " "`
39963        if test "x$has_space" != x; then
39964          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39965$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39966        fi
39967        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39968      fi
39969    fi
39970
39971    # Now join together the path and the arguments once again
39972    if test "x$arguments" != xEOL; then
39973      new_complete="$new_path ${arguments% *}"
39974    else
39975      new_complete="$new_path"
39976    fi
39977
39978    if test "x$complete" != "x$new_complete"; then
39979      RC="$new_complete"
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39981$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39982    fi
39983  fi
39984
39985    # Extract the first word of "dumpbin", so it can be a program name with args.
39986set dummy dumpbin; ac_word=$2
39987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39988$as_echo_n "checking for $ac_word... " >&6; }
39989if ${ac_cv_prog_DUMPBIN+:} false; then :
39990  $as_echo_n "(cached) " >&6
39991else
39992  if test -n "$DUMPBIN"; then
39993  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39994else
39995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39996for as_dir in $PATH
39997do
39998  IFS=$as_save_IFS
39999  test -z "$as_dir" && as_dir=.
40000    for ac_exec_ext in '' $ac_executable_extensions; do
40001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40002    ac_cv_prog_DUMPBIN="dumpbin"
40003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40004    break 2
40005  fi
40006done
40007  done
40008IFS=$as_save_IFS
40009
40010fi
40011fi
40012DUMPBIN=$ac_cv_prog_DUMPBIN
40013if test -n "$DUMPBIN"; then
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40015$as_echo "$DUMPBIN" >&6; }
40016else
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40018$as_echo "no" >&6; }
40019fi
40020
40021
40022
40023  # Only process if variable expands to non-empty
40024
40025  if test "x$DUMPBIN" != x; then
40026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40027
40028  # First separate the path from the arguments. This will split at the first
40029  # space.
40030  complete="$DUMPBIN"
40031  path="${complete%% *}"
40032  tmp="$complete EOL"
40033  arguments="${tmp#* }"
40034
40035  # Input might be given as Windows format, start by converting to
40036  # unix format.
40037  new_path=`$CYGPATH -u "$path"`
40038
40039  # Now try to locate executable using which
40040  new_path=`$WHICH "$new_path" 2> /dev/null`
40041  # bat and cmd files are not always considered executable in cygwin causing which
40042  # to not find them
40043  if test "x$new_path" = x \
40044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40046    new_path=`$CYGPATH -u "$path"`
40047  fi
40048  if test "x$new_path" = x; then
40049    # Oops. Which didn't find the executable.
40050    # The splitting of arguments from the executable at a space might have been incorrect,
40051    # since paths with space are more likely in Windows. Give it another try with the whole
40052    # argument.
40053    path="$complete"
40054    arguments="EOL"
40055    new_path=`$CYGPATH -u "$path"`
40056    new_path=`$WHICH "$new_path" 2> /dev/null`
40057    # bat and cmd files are not always considered executable in cygwin causing which
40058    # to not find them
40059    if test "x$new_path" = x \
40060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40062      new_path=`$CYGPATH -u "$path"`
40063    fi
40064    if test "x$new_path" = x; then
40065      # It's still not found. Now this is an unrecoverable error.
40066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40067$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40068      has_space=`$ECHO "$complete" | $GREP " "`
40069      if test "x$has_space" != x; then
40070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40072      fi
40073      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40074    fi
40075  fi
40076
40077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40080  # "foo.exe" is OK but "foo" is an error.
40081  #
40082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40083  # It is also a way to make sure we got the proper file name for the real test later on.
40084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40085  if test "x$test_shortpath" = x; then
40086    # Short path failed, file does not exist as specified.
40087    # Try adding .exe or .cmd
40088    if test -f "${new_path}.exe"; then
40089      input_to_shortpath="${new_path}.exe"
40090    elif test -f "${new_path}.cmd"; then
40091      input_to_shortpath="${new_path}.cmd"
40092    else
40093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40094$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40097      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40098    fi
40099  else
40100    input_to_shortpath="$new_path"
40101  fi
40102
40103  # Call helper function which possibly converts this using DOS-style short mode.
40104  # If so, the updated path is stored in $new_path.
40105  new_path="$input_to_shortpath"
40106
40107  input_path="$input_to_shortpath"
40108  # Check if we need to convert this using DOS-style short mode. If the path
40109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40110  # take no chances and rewrite it.
40111  # Note: m4 eats our [], so we need to use [ and ] instead.
40112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40113  if test "x$has_forbidden_chars" != x; then
40114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40118      # Going to short mode and back again did indeed matter. Since short mode is
40119      # case insensitive, let's make it lowercase to improve readability.
40120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40121      # Now convert it back to Unix-style (cygpath)
40122      input_path=`$CYGPATH -u "$shortmode_path"`
40123      new_path="$input_path"
40124    fi
40125  fi
40126
40127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40128  if test "x$test_cygdrive_prefix" = x; then
40129    # As a simple fix, exclude /usr/bin since it's not a real path.
40130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40132      # a path prefixed by /cygdrive for fixpath to work.
40133      new_path="$CYGWIN_ROOT_PATH$input_path"
40134    fi
40135  fi
40136
40137  # remove trailing .exe if any
40138  new_path="${new_path/%.exe/}"
40139
40140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40141
40142  # First separate the path from the arguments. This will split at the first
40143  # space.
40144  complete="$DUMPBIN"
40145  path="${complete%% *}"
40146  tmp="$complete EOL"
40147  arguments="${tmp#* }"
40148
40149  # Input might be given as Windows format, start by converting to
40150  # unix format.
40151  new_path="$path"
40152
40153  windows_path="$new_path"
40154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40155    unix_path=`$CYGPATH -u "$windows_path"`
40156    new_path="$unix_path"
40157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40159    new_path="$unix_path"
40160  fi
40161
40162
40163  # Now try to locate executable using which
40164  new_path=`$WHICH "$new_path" 2> /dev/null`
40165
40166  if test "x$new_path" = x; then
40167    # Oops. Which didn't find the executable.
40168    # The splitting of arguments from the executable at a space might have been incorrect,
40169    # since paths with space are more likely in Windows. Give it another try with the whole
40170    # argument.
40171    path="$complete"
40172    arguments="EOL"
40173    new_path="$path"
40174
40175  windows_path="$new_path"
40176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40177    unix_path=`$CYGPATH -u "$windows_path"`
40178    new_path="$unix_path"
40179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40181    new_path="$unix_path"
40182  fi
40183
40184
40185    new_path=`$WHICH "$new_path" 2> /dev/null`
40186    # bat and cmd files are not always considered executable in MSYS causing which
40187    # to not find them
40188    if test "x$new_path" = x \
40189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40191      new_path="$path"
40192
40193  windows_path="$new_path"
40194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40195    unix_path=`$CYGPATH -u "$windows_path"`
40196    new_path="$unix_path"
40197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40199    new_path="$unix_path"
40200  fi
40201
40202    fi
40203
40204    if test "x$new_path" = x; then
40205      # It's still not found. Now this is an unrecoverable error.
40206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40207$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40208      has_space=`$ECHO "$complete" | $GREP " "`
40209      if test "x$has_space" != x; then
40210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40212      fi
40213      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40214    fi
40215  fi
40216
40217  # Now new_path has a complete unix path to the binary
40218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40219    # Keep paths in /bin as-is, but remove trailing .exe if any
40220    new_path="${new_path/%.exe/}"
40221    # Do not save /bin paths to all_fixpath_prefixes!
40222  else
40223    # Not in mixed or Windows style, start by that.
40224    new_path=`cmd //c echo $new_path`
40225
40226  input_path="$new_path"
40227  # Check if we need to convert this using DOS-style short mode. If the path
40228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40229  # take no chances and rewrite it.
40230  # Note: m4 eats our [], so we need to use [ and ] instead.
40231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40232  if test "x$has_forbidden_chars" != x; then
40233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40235  fi
40236
40237    # Output is in $new_path
40238
40239  windows_path="$new_path"
40240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40241    unix_path=`$CYGPATH -u "$windows_path"`
40242    new_path="$unix_path"
40243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40245    new_path="$unix_path"
40246  fi
40247
40248    # remove trailing .exe if any
40249    new_path="${new_path/%.exe/}"
40250
40251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40253  fi
40254
40255    else
40256      # We're on a unix platform. Hooray! :)
40257      # First separate the path from the arguments. This will split at the first
40258      # space.
40259      complete="$DUMPBIN"
40260      path="${complete%% *}"
40261      tmp="$complete EOL"
40262      arguments="${tmp#* }"
40263
40264      # Cannot rely on the command "which" here since it doesn't always work.
40265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40266      if test -z "$is_absolute_path"; then
40267        # Path to executable is not absolute. Find it.
40268        IFS_save="$IFS"
40269        IFS=:
40270        for p in $PATH; do
40271          if test -f "$p/$path" && test -x "$p/$path"; then
40272            new_path="$p/$path"
40273            break
40274          fi
40275        done
40276        IFS="$IFS_save"
40277      else
40278        # This is an absolute path, we can use it without further modifications.
40279        new_path="$path"
40280      fi
40281
40282      if test "x$new_path" = x; then
40283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40284$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40285        has_space=`$ECHO "$complete" | $GREP " "`
40286        if test "x$has_space" != x; then
40287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40289        fi
40290        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40291      fi
40292    fi
40293
40294    # Now join together the path and the arguments once again
40295    if test "x$arguments" != xEOL; then
40296      new_complete="$new_path ${arguments% *}"
40297    else
40298      new_complete="$new_path"
40299    fi
40300
40301    if test "x$complete" != "x$new_complete"; then
40302      DUMPBIN="$new_complete"
40303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40304$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40305    fi
40306  fi
40307
40308    # We need to check for 'msbuild.exe' because at the place where we expect to
40309    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40310    # won't find the 'msbuild.exe' executable in that case (and the
40311    # 'ac_executable_extensions' is unusable due to performance reasons).
40312    # Notice that we intentionally don't fix up the path to MSBUILD because we
40313    # will call it in a DOS shell during freetype detection on Windows (see
40314    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40315    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40316set dummy msbuild.exe; ac_word=$2
40317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40318$as_echo_n "checking for $ac_word... " >&6; }
40319if ${ac_cv_prog_MSBUILD+:} false; then :
40320  $as_echo_n "(cached) " >&6
40321else
40322  if test -n "$MSBUILD"; then
40323  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40324else
40325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40326for as_dir in $PATH
40327do
40328  IFS=$as_save_IFS
40329  test -z "$as_dir" && as_dir=.
40330    for ac_exec_ext in '' $ac_executable_extensions; do
40331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40332    ac_cv_prog_MSBUILD="msbuild.exe"
40333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40334    break 2
40335  fi
40336done
40337  done
40338IFS=$as_save_IFS
40339
40340fi
40341fi
40342MSBUILD=$ac_cv_prog_MSBUILD
40343if test -n "$MSBUILD"; then
40344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40345$as_echo "$MSBUILD" >&6; }
40346else
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40348$as_echo "no" >&6; }
40349fi
40350
40351
40352  fi
40353
40354  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40355
40356
40357  # Publish this variable in the help.
40358
40359
40360  if [ -z "${STRIP+x}" ]; then
40361    # The variable is not set by user, try to locate tool using the code snippet
40362    for ac_prog in strip
40363do
40364  # Extract the first word of "$ac_prog", so it can be a program name with args.
40365set dummy $ac_prog; ac_word=$2
40366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40367$as_echo_n "checking for $ac_word... " >&6; }
40368if ${ac_cv_path_STRIP+:} false; then :
40369  $as_echo_n "(cached) " >&6
40370else
40371  case $STRIP in
40372  [\\/]* | ?:[\\/]*)
40373  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40374  ;;
40375  *)
40376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40377for as_dir in $PATH
40378do
40379  IFS=$as_save_IFS
40380  test -z "$as_dir" && as_dir=.
40381    for ac_exec_ext in '' $ac_executable_extensions; do
40382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40383    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40385    break 2
40386  fi
40387done
40388  done
40389IFS=$as_save_IFS
40390
40391  ;;
40392esac
40393fi
40394STRIP=$ac_cv_path_STRIP
40395if test -n "$STRIP"; then
40396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40397$as_echo "$STRIP" >&6; }
40398else
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40400$as_echo "no" >&6; }
40401fi
40402
40403
40404  test -n "$STRIP" && break
40405done
40406
40407  else
40408    # The variable is set, but is it from the command line or the environment?
40409
40410    # Try to remove the string !STRIP! from our list.
40411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40413      # If it failed, the variable was not from the command line. Ignore it,
40414      # but warn the user (except for BASH, which is always set by the calling BASH).
40415      if test "xSTRIP" != xBASH; then
40416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40417$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40418      fi
40419      # Try to locate tool using the code snippet
40420      for ac_prog in strip
40421do
40422  # Extract the first word of "$ac_prog", so it can be a program name with args.
40423set dummy $ac_prog; ac_word=$2
40424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40425$as_echo_n "checking for $ac_word... " >&6; }
40426if ${ac_cv_path_STRIP+:} false; then :
40427  $as_echo_n "(cached) " >&6
40428else
40429  case $STRIP in
40430  [\\/]* | ?:[\\/]*)
40431  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40432  ;;
40433  *)
40434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40435for as_dir in $PATH
40436do
40437  IFS=$as_save_IFS
40438  test -z "$as_dir" && as_dir=.
40439    for ac_exec_ext in '' $ac_executable_extensions; do
40440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40441    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40443    break 2
40444  fi
40445done
40446  done
40447IFS=$as_save_IFS
40448
40449  ;;
40450esac
40451fi
40452STRIP=$ac_cv_path_STRIP
40453if test -n "$STRIP"; then
40454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40455$as_echo "$STRIP" >&6; }
40456else
40457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40458$as_echo "no" >&6; }
40459fi
40460
40461
40462  test -n "$STRIP" && break
40463done
40464
40465    else
40466      # If it succeeded, then it was overridden by the user. We will use it
40467      # for the tool.
40468
40469      # First remove it from the list of overridden variables, so we can test
40470      # for unknown variables in the end.
40471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40472
40473      # Check if we try to supply an empty value
40474      if test "x$STRIP" = x; then
40475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40476$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40478$as_echo_n "checking for STRIP... " >&6; }
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40480$as_echo "disabled" >&6; }
40481      else
40482        # Check if the provided tool contains a complete path.
40483        tool_specified="$STRIP"
40484        tool_basename="${tool_specified##*/}"
40485        if test "x$tool_basename" = "x$tool_specified"; then
40486          # A command without a complete path is provided, search $PATH.
40487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40488$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40489          # Extract the first word of "$tool_basename", so it can be a program name with args.
40490set dummy $tool_basename; ac_word=$2
40491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40492$as_echo_n "checking for $ac_word... " >&6; }
40493if ${ac_cv_path_STRIP+:} false; then :
40494  $as_echo_n "(cached) " >&6
40495else
40496  case $STRIP in
40497  [\\/]* | ?:[\\/]*)
40498  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40499  ;;
40500  *)
40501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40502for as_dir in $PATH
40503do
40504  IFS=$as_save_IFS
40505  test -z "$as_dir" && as_dir=.
40506    for ac_exec_ext in '' $ac_executable_extensions; do
40507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40508    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40510    break 2
40511  fi
40512done
40513  done
40514IFS=$as_save_IFS
40515
40516  ;;
40517esac
40518fi
40519STRIP=$ac_cv_path_STRIP
40520if test -n "$STRIP"; then
40521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40522$as_echo "$STRIP" >&6; }
40523else
40524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40525$as_echo "no" >&6; }
40526fi
40527
40528
40529          if test "x$STRIP" = x; then
40530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40531          fi
40532        else
40533          # Otherwise we believe it is a complete path. Use it as it is.
40534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40535$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40537$as_echo_n "checking for STRIP... " >&6; }
40538          if test ! -x "$tool_specified"; then
40539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40540$as_echo "not found" >&6; }
40541            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40542          fi
40543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40544$as_echo "$tool_specified" >&6; }
40545        fi
40546      fi
40547    fi
40548
40549  fi
40550
40551
40552
40553  # Only process if variable expands to non-empty
40554
40555  if test "x$STRIP" != x; then
40556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40557
40558  # First separate the path from the arguments. This will split at the first
40559  # space.
40560  complete="$STRIP"
40561  path="${complete%% *}"
40562  tmp="$complete EOL"
40563  arguments="${tmp#* }"
40564
40565  # Input might be given as Windows format, start by converting to
40566  # unix format.
40567  new_path=`$CYGPATH -u "$path"`
40568
40569  # Now try to locate executable using which
40570  new_path=`$WHICH "$new_path" 2> /dev/null`
40571  # bat and cmd files are not always considered executable in cygwin causing which
40572  # to not find them
40573  if test "x$new_path" = x \
40574      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40575      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40576    new_path=`$CYGPATH -u "$path"`
40577  fi
40578  if test "x$new_path" = x; then
40579    # Oops. Which didn't find the executable.
40580    # The splitting of arguments from the executable at a space might have been incorrect,
40581    # since paths with space are more likely in Windows. Give it another try with the whole
40582    # argument.
40583    path="$complete"
40584    arguments="EOL"
40585    new_path=`$CYGPATH -u "$path"`
40586    new_path=`$WHICH "$new_path" 2> /dev/null`
40587    # bat and cmd files are not always considered executable in cygwin causing which
40588    # to not find them
40589    if test "x$new_path" = x \
40590        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40591        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40592      new_path=`$CYGPATH -u "$path"`
40593    fi
40594    if test "x$new_path" = x; then
40595      # It's still not found. Now this is an unrecoverable error.
40596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40598      has_space=`$ECHO "$complete" | $GREP " "`
40599      if test "x$has_space" != x; then
40600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40602      fi
40603      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40604    fi
40605  fi
40606
40607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40610  # "foo.exe" is OK but "foo" is an error.
40611  #
40612  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40613  # It is also a way to make sure we got the proper file name for the real test later on.
40614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40615  if test "x$test_shortpath" = x; then
40616    # Short path failed, file does not exist as specified.
40617    # Try adding .exe or .cmd
40618    if test -f "${new_path}.exe"; then
40619      input_to_shortpath="${new_path}.exe"
40620    elif test -f "${new_path}.cmd"; then
40621      input_to_shortpath="${new_path}.cmd"
40622    else
40623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40624$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40625      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40626$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40627      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40628    fi
40629  else
40630    input_to_shortpath="$new_path"
40631  fi
40632
40633  # Call helper function which possibly converts this using DOS-style short mode.
40634  # If so, the updated path is stored in $new_path.
40635  new_path="$input_to_shortpath"
40636
40637  input_path="$input_to_shortpath"
40638  # Check if we need to convert this using DOS-style short mode. If the path
40639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40640  # take no chances and rewrite it.
40641  # Note: m4 eats our [], so we need to use [ and ] instead.
40642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40643  if test "x$has_forbidden_chars" != x; then
40644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40648      # Going to short mode and back again did indeed matter. Since short mode is
40649      # case insensitive, let's make it lowercase to improve readability.
40650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40651      # Now convert it back to Unix-style (cygpath)
40652      input_path=`$CYGPATH -u "$shortmode_path"`
40653      new_path="$input_path"
40654    fi
40655  fi
40656
40657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40658  if test "x$test_cygdrive_prefix" = x; then
40659    # As a simple fix, exclude /usr/bin since it's not a real path.
40660    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40662      # a path prefixed by /cygdrive for fixpath to work.
40663      new_path="$CYGWIN_ROOT_PATH$input_path"
40664    fi
40665  fi
40666
40667  # remove trailing .exe if any
40668  new_path="${new_path/%.exe/}"
40669
40670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40671
40672  # First separate the path from the arguments. This will split at the first
40673  # space.
40674  complete="$STRIP"
40675  path="${complete%% *}"
40676  tmp="$complete EOL"
40677  arguments="${tmp#* }"
40678
40679  # Input might be given as Windows format, start by converting to
40680  # unix format.
40681  new_path="$path"
40682
40683  windows_path="$new_path"
40684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40685    unix_path=`$CYGPATH -u "$windows_path"`
40686    new_path="$unix_path"
40687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40689    new_path="$unix_path"
40690  fi
40691
40692
40693  # Now try to locate executable using which
40694  new_path=`$WHICH "$new_path" 2> /dev/null`
40695
40696  if test "x$new_path" = x; then
40697    # Oops. Which didn't find the executable.
40698    # The splitting of arguments from the executable at a space might have been incorrect,
40699    # since paths with space are more likely in Windows. Give it another try with the whole
40700    # argument.
40701    path="$complete"
40702    arguments="EOL"
40703    new_path="$path"
40704
40705  windows_path="$new_path"
40706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40707    unix_path=`$CYGPATH -u "$windows_path"`
40708    new_path="$unix_path"
40709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40711    new_path="$unix_path"
40712  fi
40713
40714
40715    new_path=`$WHICH "$new_path" 2> /dev/null`
40716    # bat and cmd files are not always considered executable in MSYS causing which
40717    # to not find them
40718    if test "x$new_path" = x \
40719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40721      new_path="$path"
40722
40723  windows_path="$new_path"
40724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40725    unix_path=`$CYGPATH -u "$windows_path"`
40726    new_path="$unix_path"
40727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40729    new_path="$unix_path"
40730  fi
40731
40732    fi
40733
40734    if test "x$new_path" = x; then
40735      # It's still not found. Now this is an unrecoverable error.
40736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40737$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40738      has_space=`$ECHO "$complete" | $GREP " "`
40739      if test "x$has_space" != x; then
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40742      fi
40743      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40744    fi
40745  fi
40746
40747  # Now new_path has a complete unix path to the binary
40748  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40749    # Keep paths in /bin as-is, but remove trailing .exe if any
40750    new_path="${new_path/%.exe/}"
40751    # Do not save /bin paths to all_fixpath_prefixes!
40752  else
40753    # Not in mixed or Windows style, start by that.
40754    new_path=`cmd //c echo $new_path`
40755
40756  input_path="$new_path"
40757  # Check if we need to convert this using DOS-style short mode. If the path
40758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40759  # take no chances and rewrite it.
40760  # Note: m4 eats our [], so we need to use [ and ] instead.
40761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40762  if test "x$has_forbidden_chars" != x; then
40763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40765  fi
40766
40767    # Output is in $new_path
40768
40769  windows_path="$new_path"
40770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40771    unix_path=`$CYGPATH -u "$windows_path"`
40772    new_path="$unix_path"
40773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40775    new_path="$unix_path"
40776  fi
40777
40778    # remove trailing .exe if any
40779    new_path="${new_path/%.exe/}"
40780
40781    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40782    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40783  fi
40784
40785    else
40786      # We're on a unix platform. Hooray! :)
40787      # First separate the path from the arguments. This will split at the first
40788      # space.
40789      complete="$STRIP"
40790      path="${complete%% *}"
40791      tmp="$complete EOL"
40792      arguments="${tmp#* }"
40793
40794      # Cannot rely on the command "which" here since it doesn't always work.
40795      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40796      if test -z "$is_absolute_path"; then
40797        # Path to executable is not absolute. Find it.
40798        IFS_save="$IFS"
40799        IFS=:
40800        for p in $PATH; do
40801          if test -f "$p/$path" && test -x "$p/$path"; then
40802            new_path="$p/$path"
40803            break
40804          fi
40805        done
40806        IFS="$IFS_save"
40807      else
40808        # This is an absolute path, we can use it without further modifications.
40809        new_path="$path"
40810      fi
40811
40812      if test "x$new_path" = x; then
40813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40814$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40815        has_space=`$ECHO "$complete" | $GREP " "`
40816        if test "x$has_space" != x; then
40817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40819        fi
40820        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40821      fi
40822    fi
40823
40824    # Now join together the path and the arguments once again
40825    if test "x$arguments" != xEOL; then
40826      new_complete="$new_path ${arguments% *}"
40827    else
40828      new_complete="$new_path"
40829    fi
40830
40831    if test "x$complete" != "x$new_complete"; then
40832      STRIP="$new_complete"
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40834$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40835    fi
40836  fi
40837
40838
40839
40840  # Publish this variable in the help.
40841
40842
40843  if [ -z "${NM+x}" ]; then
40844    # The variable is not set by user, try to locate tool using the code snippet
40845    for ac_prog in nm
40846do
40847  # Extract the first word of "$ac_prog", so it can be a program name with args.
40848set dummy $ac_prog; ac_word=$2
40849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40850$as_echo_n "checking for $ac_word... " >&6; }
40851if ${ac_cv_path_NM+:} false; then :
40852  $as_echo_n "(cached) " >&6
40853else
40854  case $NM in
40855  [\\/]* | ?:[\\/]*)
40856  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40857  ;;
40858  *)
40859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40860for as_dir in $PATH
40861do
40862  IFS=$as_save_IFS
40863  test -z "$as_dir" && as_dir=.
40864    for ac_exec_ext in '' $ac_executable_extensions; do
40865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40866    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40868    break 2
40869  fi
40870done
40871  done
40872IFS=$as_save_IFS
40873
40874  ;;
40875esac
40876fi
40877NM=$ac_cv_path_NM
40878if test -n "$NM"; then
40879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40880$as_echo "$NM" >&6; }
40881else
40882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40883$as_echo "no" >&6; }
40884fi
40885
40886
40887  test -n "$NM" && break
40888done
40889
40890  else
40891    # The variable is set, but is it from the command line or the environment?
40892
40893    # Try to remove the string !NM! from our list.
40894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40896      # If it failed, the variable was not from the command line. Ignore it,
40897      # but warn the user (except for BASH, which is always set by the calling BASH).
40898      if test "xNM" != xBASH; then
40899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40900$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40901      fi
40902      # Try to locate tool using the code snippet
40903      for ac_prog in nm
40904do
40905  # Extract the first word of "$ac_prog", so it can be a program name with args.
40906set dummy $ac_prog; ac_word=$2
40907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40908$as_echo_n "checking for $ac_word... " >&6; }
40909if ${ac_cv_path_NM+:} false; then :
40910  $as_echo_n "(cached) " >&6
40911else
40912  case $NM in
40913  [\\/]* | ?:[\\/]*)
40914  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40915  ;;
40916  *)
40917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40918for as_dir in $PATH
40919do
40920  IFS=$as_save_IFS
40921  test -z "$as_dir" && as_dir=.
40922    for ac_exec_ext in '' $ac_executable_extensions; do
40923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40924    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40926    break 2
40927  fi
40928done
40929  done
40930IFS=$as_save_IFS
40931
40932  ;;
40933esac
40934fi
40935NM=$ac_cv_path_NM
40936if test -n "$NM"; then
40937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40938$as_echo "$NM" >&6; }
40939else
40940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40941$as_echo "no" >&6; }
40942fi
40943
40944
40945  test -n "$NM" && break
40946done
40947
40948    else
40949      # If it succeeded, then it was overridden by the user. We will use it
40950      # for the tool.
40951
40952      # First remove it from the list of overridden variables, so we can test
40953      # for unknown variables in the end.
40954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40955
40956      # Check if we try to supply an empty value
40957      if test "x$NM" = x; then
40958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40959$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40961$as_echo_n "checking for NM... " >&6; }
40962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40963$as_echo "disabled" >&6; }
40964      else
40965        # Check if the provided tool contains a complete path.
40966        tool_specified="$NM"
40967        tool_basename="${tool_specified##*/}"
40968        if test "x$tool_basename" = "x$tool_specified"; then
40969          # A command without a complete path is provided, search $PATH.
40970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40971$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40972          # Extract the first word of "$tool_basename", so it can be a program name with args.
40973set dummy $tool_basename; ac_word=$2
40974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40975$as_echo_n "checking for $ac_word... " >&6; }
40976if ${ac_cv_path_NM+:} false; then :
40977  $as_echo_n "(cached) " >&6
40978else
40979  case $NM in
40980  [\\/]* | ?:[\\/]*)
40981  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40982  ;;
40983  *)
40984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40985for as_dir in $PATH
40986do
40987  IFS=$as_save_IFS
40988  test -z "$as_dir" && as_dir=.
40989    for ac_exec_ext in '' $ac_executable_extensions; do
40990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40991    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40993    break 2
40994  fi
40995done
40996  done
40997IFS=$as_save_IFS
40998
40999  ;;
41000esac
41001fi
41002NM=$ac_cv_path_NM
41003if test -n "$NM"; then
41004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41005$as_echo "$NM" >&6; }
41006else
41007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41008$as_echo "no" >&6; }
41009fi
41010
41011
41012          if test "x$NM" = x; then
41013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41014          fi
41015        else
41016          # Otherwise we believe it is a complete path. Use it as it is.
41017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41018$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41020$as_echo_n "checking for NM... " >&6; }
41021          if test ! -x "$tool_specified"; then
41022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41023$as_echo "not found" >&6; }
41024            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41025          fi
41026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41027$as_echo "$tool_specified" >&6; }
41028        fi
41029      fi
41030    fi
41031
41032  fi
41033
41034
41035
41036  # Only process if variable expands to non-empty
41037
41038  if test "x$NM" != x; then
41039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41040
41041  # First separate the path from the arguments. This will split at the first
41042  # space.
41043  complete="$NM"
41044  path="${complete%% *}"
41045  tmp="$complete EOL"
41046  arguments="${tmp#* }"
41047
41048  # Input might be given as Windows format, start by converting to
41049  # unix format.
41050  new_path=`$CYGPATH -u "$path"`
41051
41052  # Now try to locate executable using which
41053  new_path=`$WHICH "$new_path" 2> /dev/null`
41054  # bat and cmd files are not always considered executable in cygwin causing which
41055  # to not find them
41056  if test "x$new_path" = x \
41057      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41058      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41059    new_path=`$CYGPATH -u "$path"`
41060  fi
41061  if test "x$new_path" = x; then
41062    # Oops. Which didn't find the executable.
41063    # The splitting of arguments from the executable at a space might have been incorrect,
41064    # since paths with space are more likely in Windows. Give it another try with the whole
41065    # argument.
41066    path="$complete"
41067    arguments="EOL"
41068    new_path=`$CYGPATH -u "$path"`
41069    new_path=`$WHICH "$new_path" 2> /dev/null`
41070    # bat and cmd files are not always considered executable in cygwin causing which
41071    # to not find them
41072    if test "x$new_path" = x \
41073        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41074        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41075      new_path=`$CYGPATH -u "$path"`
41076    fi
41077    if test "x$new_path" = x; then
41078      # It's still not found. Now this is an unrecoverable error.
41079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41080$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41081      has_space=`$ECHO "$complete" | $GREP " "`
41082      if test "x$has_space" != x; then
41083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41085      fi
41086      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41087    fi
41088  fi
41089
41090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41093  # "foo.exe" is OK but "foo" is an error.
41094  #
41095  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41096  # It is also a way to make sure we got the proper file name for the real test later on.
41097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41098  if test "x$test_shortpath" = x; then
41099    # Short path failed, file does not exist as specified.
41100    # Try adding .exe or .cmd
41101    if test -f "${new_path}.exe"; then
41102      input_to_shortpath="${new_path}.exe"
41103    elif test -f "${new_path}.cmd"; then
41104      input_to_shortpath="${new_path}.cmd"
41105    else
41106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41107$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41110      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41111    fi
41112  else
41113    input_to_shortpath="$new_path"
41114  fi
41115
41116  # Call helper function which possibly converts this using DOS-style short mode.
41117  # If so, the updated path is stored in $new_path.
41118  new_path="$input_to_shortpath"
41119
41120  input_path="$input_to_shortpath"
41121  # Check if we need to convert this using DOS-style short mode. If the path
41122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41123  # take no chances and rewrite it.
41124  # Note: m4 eats our [], so we need to use [ and ] instead.
41125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41126  if test "x$has_forbidden_chars" != x; then
41127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41131      # Going to short mode and back again did indeed matter. Since short mode is
41132      # case insensitive, let's make it lowercase to improve readability.
41133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41134      # Now convert it back to Unix-style (cygpath)
41135      input_path=`$CYGPATH -u "$shortmode_path"`
41136      new_path="$input_path"
41137    fi
41138  fi
41139
41140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41141  if test "x$test_cygdrive_prefix" = x; then
41142    # As a simple fix, exclude /usr/bin since it's not a real path.
41143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41145      # a path prefixed by /cygdrive for fixpath to work.
41146      new_path="$CYGWIN_ROOT_PATH$input_path"
41147    fi
41148  fi
41149
41150  # remove trailing .exe if any
41151  new_path="${new_path/%.exe/}"
41152
41153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41154
41155  # First separate the path from the arguments. This will split at the first
41156  # space.
41157  complete="$NM"
41158  path="${complete%% *}"
41159  tmp="$complete EOL"
41160  arguments="${tmp#* }"
41161
41162  # Input might be given as Windows format, start by converting to
41163  # unix format.
41164  new_path="$path"
41165
41166  windows_path="$new_path"
41167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41168    unix_path=`$CYGPATH -u "$windows_path"`
41169    new_path="$unix_path"
41170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41172    new_path="$unix_path"
41173  fi
41174
41175
41176  # Now try to locate executable using which
41177  new_path=`$WHICH "$new_path" 2> /dev/null`
41178
41179  if test "x$new_path" = x; then
41180    # Oops. Which didn't find the executable.
41181    # The splitting of arguments from the executable at a space might have been incorrect,
41182    # since paths with space are more likely in Windows. Give it another try with the whole
41183    # argument.
41184    path="$complete"
41185    arguments="EOL"
41186    new_path="$path"
41187
41188  windows_path="$new_path"
41189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41190    unix_path=`$CYGPATH -u "$windows_path"`
41191    new_path="$unix_path"
41192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41194    new_path="$unix_path"
41195  fi
41196
41197
41198    new_path=`$WHICH "$new_path" 2> /dev/null`
41199    # bat and cmd files are not always considered executable in MSYS causing which
41200    # to not find them
41201    if test "x$new_path" = x \
41202        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41203        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41204      new_path="$path"
41205
41206  windows_path="$new_path"
41207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41208    unix_path=`$CYGPATH -u "$windows_path"`
41209    new_path="$unix_path"
41210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41212    new_path="$unix_path"
41213  fi
41214
41215    fi
41216
41217    if test "x$new_path" = x; then
41218      # It's still not found. Now this is an unrecoverable error.
41219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41220$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41221      has_space=`$ECHO "$complete" | $GREP " "`
41222      if test "x$has_space" != x; then
41223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41225      fi
41226      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41227    fi
41228  fi
41229
41230  # Now new_path has a complete unix path to the binary
41231  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41232    # Keep paths in /bin as-is, but remove trailing .exe if any
41233    new_path="${new_path/%.exe/}"
41234    # Do not save /bin paths to all_fixpath_prefixes!
41235  else
41236    # Not in mixed or Windows style, start by that.
41237    new_path=`cmd //c echo $new_path`
41238
41239  input_path="$new_path"
41240  # Check if we need to convert this using DOS-style short mode. If the path
41241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41242  # take no chances and rewrite it.
41243  # Note: m4 eats our [], so we need to use [ and ] instead.
41244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41245  if test "x$has_forbidden_chars" != x; then
41246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41247    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41248  fi
41249
41250    # Output is in $new_path
41251
41252  windows_path="$new_path"
41253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41254    unix_path=`$CYGPATH -u "$windows_path"`
41255    new_path="$unix_path"
41256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41258    new_path="$unix_path"
41259  fi
41260
41261    # remove trailing .exe if any
41262    new_path="${new_path/%.exe/}"
41263
41264    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41265    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41266  fi
41267
41268    else
41269      # We're on a unix platform. Hooray! :)
41270      # First separate the path from the arguments. This will split at the first
41271      # space.
41272      complete="$NM"
41273      path="${complete%% *}"
41274      tmp="$complete EOL"
41275      arguments="${tmp#* }"
41276
41277      # Cannot rely on the command "which" here since it doesn't always work.
41278      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41279      if test -z "$is_absolute_path"; then
41280        # Path to executable is not absolute. Find it.
41281        IFS_save="$IFS"
41282        IFS=:
41283        for p in $PATH; do
41284          if test -f "$p/$path" && test -x "$p/$path"; then
41285            new_path="$p/$path"
41286            break
41287          fi
41288        done
41289        IFS="$IFS_save"
41290      else
41291        # This is an absolute path, we can use it without further modifications.
41292        new_path="$path"
41293      fi
41294
41295      if test "x$new_path" = x; then
41296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41297$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41298        has_space=`$ECHO "$complete" | $GREP " "`
41299        if test "x$has_space" != x; then
41300          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41301$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41302        fi
41303        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41304      fi
41305    fi
41306
41307    # Now join together the path and the arguments once again
41308    if test "x$arguments" != xEOL; then
41309      new_complete="$new_path ${arguments% *}"
41310    else
41311      new_complete="$new_path"
41312    fi
41313
41314    if test "x$complete" != "x$new_complete"; then
41315      NM="$new_complete"
41316      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41317$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41318    fi
41319  fi
41320
41321
41322
41323  # Publish this variable in the help.
41324
41325
41326  if [ -z "${GNM+x}" ]; then
41327    # The variable is not set by user, try to locate tool using the code snippet
41328    for ac_prog in gnm
41329do
41330  # Extract the first word of "$ac_prog", so it can be a program name with args.
41331set dummy $ac_prog; ac_word=$2
41332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41333$as_echo_n "checking for $ac_word... " >&6; }
41334if ${ac_cv_path_GNM+:} false; then :
41335  $as_echo_n "(cached) " >&6
41336else
41337  case $GNM in
41338  [\\/]* | ?:[\\/]*)
41339  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41340  ;;
41341  *)
41342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41343for as_dir in $PATH
41344do
41345  IFS=$as_save_IFS
41346  test -z "$as_dir" && as_dir=.
41347    for ac_exec_ext in '' $ac_executable_extensions; do
41348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41349    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41351    break 2
41352  fi
41353done
41354  done
41355IFS=$as_save_IFS
41356
41357  ;;
41358esac
41359fi
41360GNM=$ac_cv_path_GNM
41361if test -n "$GNM"; then
41362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41363$as_echo "$GNM" >&6; }
41364else
41365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41366$as_echo "no" >&6; }
41367fi
41368
41369
41370  test -n "$GNM" && break
41371done
41372
41373  else
41374    # The variable is set, but is it from the command line or the environment?
41375
41376    # Try to remove the string !GNM! from our list.
41377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41379      # If it failed, the variable was not from the command line. Ignore it,
41380      # but warn the user (except for BASH, which is always set by the calling BASH).
41381      if test "xGNM" != xBASH; then
41382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41383$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41384      fi
41385      # Try to locate tool using the code snippet
41386      for ac_prog in gnm
41387do
41388  # Extract the first word of "$ac_prog", so it can be a program name with args.
41389set dummy $ac_prog; ac_word=$2
41390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41391$as_echo_n "checking for $ac_word... " >&6; }
41392if ${ac_cv_path_GNM+:} false; then :
41393  $as_echo_n "(cached) " >&6
41394else
41395  case $GNM in
41396  [\\/]* | ?:[\\/]*)
41397  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41398  ;;
41399  *)
41400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41401for as_dir in $PATH
41402do
41403  IFS=$as_save_IFS
41404  test -z "$as_dir" && as_dir=.
41405    for ac_exec_ext in '' $ac_executable_extensions; do
41406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41407    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41409    break 2
41410  fi
41411done
41412  done
41413IFS=$as_save_IFS
41414
41415  ;;
41416esac
41417fi
41418GNM=$ac_cv_path_GNM
41419if test -n "$GNM"; then
41420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41421$as_echo "$GNM" >&6; }
41422else
41423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41424$as_echo "no" >&6; }
41425fi
41426
41427
41428  test -n "$GNM" && break
41429done
41430
41431    else
41432      # If it succeeded, then it was overridden by the user. We will use it
41433      # for the tool.
41434
41435      # First remove it from the list of overridden variables, so we can test
41436      # for unknown variables in the end.
41437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41438
41439      # Check if we try to supply an empty value
41440      if test "x$GNM" = x; then
41441        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41442$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41444$as_echo_n "checking for GNM... " >&6; }
41445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41446$as_echo "disabled" >&6; }
41447      else
41448        # Check if the provided tool contains a complete path.
41449        tool_specified="$GNM"
41450        tool_basename="${tool_specified##*/}"
41451        if test "x$tool_basename" = "x$tool_specified"; then
41452          # A command without a complete path is provided, search $PATH.
41453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41454$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41455          # Extract the first word of "$tool_basename", so it can be a program name with args.
41456set dummy $tool_basename; ac_word=$2
41457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41458$as_echo_n "checking for $ac_word... " >&6; }
41459if ${ac_cv_path_GNM+:} false; then :
41460  $as_echo_n "(cached) " >&6
41461else
41462  case $GNM in
41463  [\\/]* | ?:[\\/]*)
41464  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41465  ;;
41466  *)
41467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41468for as_dir in $PATH
41469do
41470  IFS=$as_save_IFS
41471  test -z "$as_dir" && as_dir=.
41472    for ac_exec_ext in '' $ac_executable_extensions; do
41473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41474    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41476    break 2
41477  fi
41478done
41479  done
41480IFS=$as_save_IFS
41481
41482  ;;
41483esac
41484fi
41485GNM=$ac_cv_path_GNM
41486if test -n "$GNM"; then
41487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41488$as_echo "$GNM" >&6; }
41489else
41490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41491$as_echo "no" >&6; }
41492fi
41493
41494
41495          if test "x$GNM" = x; then
41496            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41497          fi
41498        else
41499          # Otherwise we believe it is a complete path. Use it as it is.
41500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41501$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41502          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41503$as_echo_n "checking for GNM... " >&6; }
41504          if test ! -x "$tool_specified"; then
41505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41506$as_echo "not found" >&6; }
41507            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41508          fi
41509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41510$as_echo "$tool_specified" >&6; }
41511        fi
41512      fi
41513    fi
41514
41515  fi
41516
41517
41518
41519  # Only process if variable expands to non-empty
41520
41521  if test "x$GNM" != x; then
41522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41523
41524  # First separate the path from the arguments. This will split at the first
41525  # space.
41526  complete="$GNM"
41527  path="${complete%% *}"
41528  tmp="$complete EOL"
41529  arguments="${tmp#* }"
41530
41531  # Input might be given as Windows format, start by converting to
41532  # unix format.
41533  new_path=`$CYGPATH -u "$path"`
41534
41535  # Now try to locate executable using which
41536  new_path=`$WHICH "$new_path" 2> /dev/null`
41537  # bat and cmd files are not always considered executable in cygwin causing which
41538  # to not find them
41539  if test "x$new_path" = x \
41540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41542    new_path=`$CYGPATH -u "$path"`
41543  fi
41544  if test "x$new_path" = x; then
41545    # Oops. Which didn't find the executable.
41546    # The splitting of arguments from the executable at a space might have been incorrect,
41547    # since paths with space are more likely in Windows. Give it another try with the whole
41548    # argument.
41549    path="$complete"
41550    arguments="EOL"
41551    new_path=`$CYGPATH -u "$path"`
41552    new_path=`$WHICH "$new_path" 2> /dev/null`
41553    # bat and cmd files are not always considered executable in cygwin causing which
41554    # to not find them
41555    if test "x$new_path" = x \
41556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41558      new_path=`$CYGPATH -u "$path"`
41559    fi
41560    if test "x$new_path" = x; then
41561      # It's still not found. Now this is an unrecoverable error.
41562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41563$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41564      has_space=`$ECHO "$complete" | $GREP " "`
41565      if test "x$has_space" != x; then
41566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41568      fi
41569      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41570    fi
41571  fi
41572
41573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41576  # "foo.exe" is OK but "foo" is an error.
41577  #
41578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41579  # It is also a way to make sure we got the proper file name for the real test later on.
41580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41581  if test "x$test_shortpath" = x; then
41582    # Short path failed, file does not exist as specified.
41583    # Try adding .exe or .cmd
41584    if test -f "${new_path}.exe"; then
41585      input_to_shortpath="${new_path}.exe"
41586    elif test -f "${new_path}.cmd"; then
41587      input_to_shortpath="${new_path}.cmd"
41588    else
41589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41590$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41593      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41594    fi
41595  else
41596    input_to_shortpath="$new_path"
41597  fi
41598
41599  # Call helper function which possibly converts this using DOS-style short mode.
41600  # If so, the updated path is stored in $new_path.
41601  new_path="$input_to_shortpath"
41602
41603  input_path="$input_to_shortpath"
41604  # Check if we need to convert this using DOS-style short mode. If the path
41605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41606  # take no chances and rewrite it.
41607  # Note: m4 eats our [], so we need to use [ and ] instead.
41608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41609  if test "x$has_forbidden_chars" != x; then
41610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41614      # Going to short mode and back again did indeed matter. Since short mode is
41615      # case insensitive, let's make it lowercase to improve readability.
41616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41617      # Now convert it back to Unix-style (cygpath)
41618      input_path=`$CYGPATH -u "$shortmode_path"`
41619      new_path="$input_path"
41620    fi
41621  fi
41622
41623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41624  if test "x$test_cygdrive_prefix" = x; then
41625    # As a simple fix, exclude /usr/bin since it's not a real path.
41626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41628      # a path prefixed by /cygdrive for fixpath to work.
41629      new_path="$CYGWIN_ROOT_PATH$input_path"
41630    fi
41631  fi
41632
41633  # remove trailing .exe if any
41634  new_path="${new_path/%.exe/}"
41635
41636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41637
41638  # First separate the path from the arguments. This will split at the first
41639  # space.
41640  complete="$GNM"
41641  path="${complete%% *}"
41642  tmp="$complete EOL"
41643  arguments="${tmp#* }"
41644
41645  # Input might be given as Windows format, start by converting to
41646  # unix format.
41647  new_path="$path"
41648
41649  windows_path="$new_path"
41650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41651    unix_path=`$CYGPATH -u "$windows_path"`
41652    new_path="$unix_path"
41653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41655    new_path="$unix_path"
41656  fi
41657
41658
41659  # Now try to locate executable using which
41660  new_path=`$WHICH "$new_path" 2> /dev/null`
41661
41662  if test "x$new_path" = x; then
41663    # Oops. Which didn't find the executable.
41664    # The splitting of arguments from the executable at a space might have been incorrect,
41665    # since paths with space are more likely in Windows. Give it another try with the whole
41666    # argument.
41667    path="$complete"
41668    arguments="EOL"
41669    new_path="$path"
41670
41671  windows_path="$new_path"
41672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41673    unix_path=`$CYGPATH -u "$windows_path"`
41674    new_path="$unix_path"
41675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41677    new_path="$unix_path"
41678  fi
41679
41680
41681    new_path=`$WHICH "$new_path" 2> /dev/null`
41682    # bat and cmd files are not always considered executable in MSYS causing which
41683    # to not find them
41684    if test "x$new_path" = x \
41685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41687      new_path="$path"
41688
41689  windows_path="$new_path"
41690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41691    unix_path=`$CYGPATH -u "$windows_path"`
41692    new_path="$unix_path"
41693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41695    new_path="$unix_path"
41696  fi
41697
41698    fi
41699
41700    if test "x$new_path" = x; then
41701      # It's still not found. Now this is an unrecoverable error.
41702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41703$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41704      has_space=`$ECHO "$complete" | $GREP " "`
41705      if test "x$has_space" != x; then
41706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41708      fi
41709      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41710    fi
41711  fi
41712
41713  # Now new_path has a complete unix path to the binary
41714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41715    # Keep paths in /bin as-is, but remove trailing .exe if any
41716    new_path="${new_path/%.exe/}"
41717    # Do not save /bin paths to all_fixpath_prefixes!
41718  else
41719    # Not in mixed or Windows style, start by that.
41720    new_path=`cmd //c echo $new_path`
41721
41722  input_path="$new_path"
41723  # Check if we need to convert this using DOS-style short mode. If the path
41724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41725  # take no chances and rewrite it.
41726  # Note: m4 eats our [], so we need to use [ and ] instead.
41727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41728  if test "x$has_forbidden_chars" != x; then
41729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41731  fi
41732
41733    # Output is in $new_path
41734
41735  windows_path="$new_path"
41736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41737    unix_path=`$CYGPATH -u "$windows_path"`
41738    new_path="$unix_path"
41739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41741    new_path="$unix_path"
41742  fi
41743
41744    # remove trailing .exe if any
41745    new_path="${new_path/%.exe/}"
41746
41747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41749  fi
41750
41751    else
41752      # We're on a unix platform. Hooray! :)
41753      # First separate the path from the arguments. This will split at the first
41754      # space.
41755      complete="$GNM"
41756      path="${complete%% *}"
41757      tmp="$complete EOL"
41758      arguments="${tmp#* }"
41759
41760      # Cannot rely on the command "which" here since it doesn't always work.
41761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41762      if test -z "$is_absolute_path"; then
41763        # Path to executable is not absolute. Find it.
41764        IFS_save="$IFS"
41765        IFS=:
41766        for p in $PATH; do
41767          if test -f "$p/$path" && test -x "$p/$path"; then
41768            new_path="$p/$path"
41769            break
41770          fi
41771        done
41772        IFS="$IFS_save"
41773      else
41774        # This is an absolute path, we can use it without further modifications.
41775        new_path="$path"
41776      fi
41777
41778      if test "x$new_path" = x; then
41779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41780$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41781        has_space=`$ECHO "$complete" | $GREP " "`
41782        if test "x$has_space" != x; then
41783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41785        fi
41786        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41787      fi
41788    fi
41789
41790    # Now join together the path and the arguments once again
41791    if test "x$arguments" != xEOL; then
41792      new_complete="$new_path ${arguments% *}"
41793    else
41794      new_complete="$new_path"
41795    fi
41796
41797    if test "x$complete" != "x$new_complete"; then
41798      GNM="$new_complete"
41799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41800$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41801    fi
41802  fi
41803
41804  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41805    # FIXME: we should unify this with the solaris case above.
41806
41807
41808  # Publish this variable in the help.
41809
41810
41811  if [ -z "${STRIP+x}" ]; then
41812    # The variable is not set by user, try to locate tool using the code snippet
41813    if test -n "$ac_tool_prefix"; then
41814  for ac_prog in strip
41815  do
41816    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41817set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41819$as_echo_n "checking for $ac_word... " >&6; }
41820if ${ac_cv_prog_STRIP+:} false; then :
41821  $as_echo_n "(cached) " >&6
41822else
41823  if test -n "$STRIP"; then
41824  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41825else
41826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41827for as_dir in $PATH
41828do
41829  IFS=$as_save_IFS
41830  test -z "$as_dir" && as_dir=.
41831    for ac_exec_ext in '' $ac_executable_extensions; do
41832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41833    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41835    break 2
41836  fi
41837done
41838  done
41839IFS=$as_save_IFS
41840
41841fi
41842fi
41843STRIP=$ac_cv_prog_STRIP
41844if test -n "$STRIP"; then
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41846$as_echo "$STRIP" >&6; }
41847else
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41849$as_echo "no" >&6; }
41850fi
41851
41852
41853    test -n "$STRIP" && break
41854  done
41855fi
41856if test -z "$STRIP"; then
41857  ac_ct_STRIP=$STRIP
41858  for ac_prog in strip
41859do
41860  # Extract the first word of "$ac_prog", so it can be a program name with args.
41861set dummy $ac_prog; ac_word=$2
41862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41863$as_echo_n "checking for $ac_word... " >&6; }
41864if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41865  $as_echo_n "(cached) " >&6
41866else
41867  if test -n "$ac_ct_STRIP"; then
41868  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41869else
41870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41871for as_dir in $PATH
41872do
41873  IFS=$as_save_IFS
41874  test -z "$as_dir" && as_dir=.
41875    for ac_exec_ext in '' $ac_executable_extensions; do
41876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41877    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41879    break 2
41880  fi
41881done
41882  done
41883IFS=$as_save_IFS
41884
41885fi
41886fi
41887ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41888if test -n "$ac_ct_STRIP"; then
41889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41890$as_echo "$ac_ct_STRIP" >&6; }
41891else
41892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41893$as_echo "no" >&6; }
41894fi
41895
41896
41897  test -n "$ac_ct_STRIP" && break
41898done
41899
41900  if test "x$ac_ct_STRIP" = x; then
41901    STRIP=""
41902  else
41903    case $cross_compiling:$ac_tool_warned in
41904yes:)
41905{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41906$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41907ac_tool_warned=yes ;;
41908esac
41909    STRIP=$ac_ct_STRIP
41910  fi
41911fi
41912
41913  else
41914    # The variable is set, but is it from the command line or the environment?
41915
41916    # Try to remove the string !STRIP! from our list.
41917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41919      # If it failed, the variable was not from the command line. Ignore it,
41920      # but warn the user (except for BASH, which is always set by the calling BASH).
41921      if test "xSTRIP" != xBASH; then
41922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41923$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41924      fi
41925      # Try to locate tool using the code snippet
41926      if test -n "$ac_tool_prefix"; then
41927  for ac_prog in strip
41928  do
41929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41932$as_echo_n "checking for $ac_word... " >&6; }
41933if ${ac_cv_prog_STRIP+:} false; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  if test -n "$STRIP"; then
41937  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41938else
41939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41940for as_dir in $PATH
41941do
41942  IFS=$as_save_IFS
41943  test -z "$as_dir" && as_dir=.
41944    for ac_exec_ext in '' $ac_executable_extensions; do
41945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41946    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41948    break 2
41949  fi
41950done
41951  done
41952IFS=$as_save_IFS
41953
41954fi
41955fi
41956STRIP=$ac_cv_prog_STRIP
41957if test -n "$STRIP"; then
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41959$as_echo "$STRIP" >&6; }
41960else
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41962$as_echo "no" >&6; }
41963fi
41964
41965
41966    test -n "$STRIP" && break
41967  done
41968fi
41969if test -z "$STRIP"; then
41970  ac_ct_STRIP=$STRIP
41971  for ac_prog in strip
41972do
41973  # Extract the first word of "$ac_prog", so it can be a program name with args.
41974set dummy $ac_prog; ac_word=$2
41975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41976$as_echo_n "checking for $ac_word... " >&6; }
41977if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41978  $as_echo_n "(cached) " >&6
41979else
41980  if test -n "$ac_ct_STRIP"; then
41981  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41982else
41983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41984for as_dir in $PATH
41985do
41986  IFS=$as_save_IFS
41987  test -z "$as_dir" && as_dir=.
41988    for ac_exec_ext in '' $ac_executable_extensions; do
41989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41990    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41992    break 2
41993  fi
41994done
41995  done
41996IFS=$as_save_IFS
41997
41998fi
41999fi
42000ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42001if test -n "$ac_ct_STRIP"; then
42002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42003$as_echo "$ac_ct_STRIP" >&6; }
42004else
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42006$as_echo "no" >&6; }
42007fi
42008
42009
42010  test -n "$ac_ct_STRIP" && break
42011done
42012
42013  if test "x$ac_ct_STRIP" = x; then
42014    STRIP=""
42015  else
42016    case $cross_compiling:$ac_tool_warned in
42017yes:)
42018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42020ac_tool_warned=yes ;;
42021esac
42022    STRIP=$ac_ct_STRIP
42023  fi
42024fi
42025
42026    else
42027      # If it succeeded, then it was overridden by the user. We will use it
42028      # for the tool.
42029
42030      # First remove it from the list of overridden variables, so we can test
42031      # for unknown variables in the end.
42032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42033
42034      # Check if we try to supply an empty value
42035      if test "x$STRIP" = x; then
42036        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42037$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42039$as_echo_n "checking for STRIP... " >&6; }
42040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42041$as_echo "disabled" >&6; }
42042      else
42043        # Check if the provided tool contains a complete path.
42044        tool_specified="$STRIP"
42045        tool_basename="${tool_specified##*/}"
42046        if test "x$tool_basename" = "x$tool_specified"; then
42047          # A command without a complete path is provided, search $PATH.
42048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42049$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42050          # Extract the first word of "$tool_basename", so it can be a program name with args.
42051set dummy $tool_basename; ac_word=$2
42052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42053$as_echo_n "checking for $ac_word... " >&6; }
42054if ${ac_cv_path_STRIP+:} false; then :
42055  $as_echo_n "(cached) " >&6
42056else
42057  case $STRIP in
42058  [\\/]* | ?:[\\/]*)
42059  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42060  ;;
42061  *)
42062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42063for as_dir in $PATH
42064do
42065  IFS=$as_save_IFS
42066  test -z "$as_dir" && as_dir=.
42067    for ac_exec_ext in '' $ac_executable_extensions; do
42068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42069    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42071    break 2
42072  fi
42073done
42074  done
42075IFS=$as_save_IFS
42076
42077  ;;
42078esac
42079fi
42080STRIP=$ac_cv_path_STRIP
42081if test -n "$STRIP"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42083$as_echo "$STRIP" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090          if test "x$STRIP" = x; then
42091            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42092          fi
42093        else
42094          # Otherwise we believe it is a complete path. Use it as it is.
42095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42096$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42097          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42098$as_echo_n "checking for STRIP... " >&6; }
42099          if test ! -x "$tool_specified"; then
42100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42101$as_echo "not found" >&6; }
42102            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42103          fi
42104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42105$as_echo "$tool_specified" >&6; }
42106        fi
42107      fi
42108    fi
42109
42110  fi
42111
42112
42113
42114  # Only process if variable expands to non-empty
42115
42116  if test "x$STRIP" != x; then
42117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42118
42119  # First separate the path from the arguments. This will split at the first
42120  # space.
42121  complete="$STRIP"
42122  path="${complete%% *}"
42123  tmp="$complete EOL"
42124  arguments="${tmp#* }"
42125
42126  # Input might be given as Windows format, start by converting to
42127  # unix format.
42128  new_path=`$CYGPATH -u "$path"`
42129
42130  # Now try to locate executable using which
42131  new_path=`$WHICH "$new_path" 2> /dev/null`
42132  # bat and cmd files are not always considered executable in cygwin causing which
42133  # to not find them
42134  if test "x$new_path" = x \
42135      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42136      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42137    new_path=`$CYGPATH -u "$path"`
42138  fi
42139  if test "x$new_path" = x; then
42140    # Oops. Which didn't find the executable.
42141    # The splitting of arguments from the executable at a space might have been incorrect,
42142    # since paths with space are more likely in Windows. Give it another try with the whole
42143    # argument.
42144    path="$complete"
42145    arguments="EOL"
42146    new_path=`$CYGPATH -u "$path"`
42147    new_path=`$WHICH "$new_path" 2> /dev/null`
42148    # bat and cmd files are not always considered executable in cygwin causing which
42149    # to not find them
42150    if test "x$new_path" = x \
42151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42153      new_path=`$CYGPATH -u "$path"`
42154    fi
42155    if test "x$new_path" = x; then
42156      # It's still not found. Now this is an unrecoverable error.
42157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42158$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42159      has_space=`$ECHO "$complete" | $GREP " "`
42160      if test "x$has_space" != x; then
42161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42163      fi
42164      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42165    fi
42166  fi
42167
42168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42171  # "foo.exe" is OK but "foo" is an error.
42172  #
42173  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42174  # It is also a way to make sure we got the proper file name for the real test later on.
42175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42176  if test "x$test_shortpath" = x; then
42177    # Short path failed, file does not exist as specified.
42178    # Try adding .exe or .cmd
42179    if test -f "${new_path}.exe"; then
42180      input_to_shortpath="${new_path}.exe"
42181    elif test -f "${new_path}.cmd"; then
42182      input_to_shortpath="${new_path}.cmd"
42183    else
42184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42185$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42186      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42187$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42188      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42189    fi
42190  else
42191    input_to_shortpath="$new_path"
42192  fi
42193
42194  # Call helper function which possibly converts this using DOS-style short mode.
42195  # If so, the updated path is stored in $new_path.
42196  new_path="$input_to_shortpath"
42197
42198  input_path="$input_to_shortpath"
42199  # Check if we need to convert this using DOS-style short mode. If the path
42200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42201  # take no chances and rewrite it.
42202  # Note: m4 eats our [], so we need to use [ and ] instead.
42203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42204  if test "x$has_forbidden_chars" != x; then
42205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42209      # Going to short mode and back again did indeed matter. Since short mode is
42210      # case insensitive, let's make it lowercase to improve readability.
42211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42212      # Now convert it back to Unix-style (cygpath)
42213      input_path=`$CYGPATH -u "$shortmode_path"`
42214      new_path="$input_path"
42215    fi
42216  fi
42217
42218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42219  if test "x$test_cygdrive_prefix" = x; then
42220    # As a simple fix, exclude /usr/bin since it's not a real path.
42221    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42223      # a path prefixed by /cygdrive for fixpath to work.
42224      new_path="$CYGWIN_ROOT_PATH$input_path"
42225    fi
42226  fi
42227
42228  # remove trailing .exe if any
42229  new_path="${new_path/%.exe/}"
42230
42231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42232
42233  # First separate the path from the arguments. This will split at the first
42234  # space.
42235  complete="$STRIP"
42236  path="${complete%% *}"
42237  tmp="$complete EOL"
42238  arguments="${tmp#* }"
42239
42240  # Input might be given as Windows format, start by converting to
42241  # unix format.
42242  new_path="$path"
42243
42244  windows_path="$new_path"
42245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42246    unix_path=`$CYGPATH -u "$windows_path"`
42247    new_path="$unix_path"
42248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42250    new_path="$unix_path"
42251  fi
42252
42253
42254  # Now try to locate executable using which
42255  new_path=`$WHICH "$new_path" 2> /dev/null`
42256
42257  if test "x$new_path" = x; then
42258    # Oops. Which didn't find the executable.
42259    # The splitting of arguments from the executable at a space might have been incorrect,
42260    # since paths with space are more likely in Windows. Give it another try with the whole
42261    # argument.
42262    path="$complete"
42263    arguments="EOL"
42264    new_path="$path"
42265
42266  windows_path="$new_path"
42267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42268    unix_path=`$CYGPATH -u "$windows_path"`
42269    new_path="$unix_path"
42270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42272    new_path="$unix_path"
42273  fi
42274
42275
42276    new_path=`$WHICH "$new_path" 2> /dev/null`
42277    # bat and cmd files are not always considered executable in MSYS causing which
42278    # to not find them
42279    if test "x$new_path" = x \
42280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42282      new_path="$path"
42283
42284  windows_path="$new_path"
42285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42286    unix_path=`$CYGPATH -u "$windows_path"`
42287    new_path="$unix_path"
42288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42290    new_path="$unix_path"
42291  fi
42292
42293    fi
42294
42295    if test "x$new_path" = x; then
42296      # It's still not found. Now this is an unrecoverable error.
42297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42298$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42299      has_space=`$ECHO "$complete" | $GREP " "`
42300      if test "x$has_space" != x; then
42301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42303      fi
42304      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42305    fi
42306  fi
42307
42308  # Now new_path has a complete unix path to the binary
42309  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42310    # Keep paths in /bin as-is, but remove trailing .exe if any
42311    new_path="${new_path/%.exe/}"
42312    # Do not save /bin paths to all_fixpath_prefixes!
42313  else
42314    # Not in mixed or Windows style, start by that.
42315    new_path=`cmd //c echo $new_path`
42316
42317  input_path="$new_path"
42318  # Check if we need to convert this using DOS-style short mode. If the path
42319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42320  # take no chances and rewrite it.
42321  # Note: m4 eats our [], so we need to use [ and ] instead.
42322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42323  if test "x$has_forbidden_chars" != x; then
42324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42326  fi
42327
42328    # Output is in $new_path
42329
42330  windows_path="$new_path"
42331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42332    unix_path=`$CYGPATH -u "$windows_path"`
42333    new_path="$unix_path"
42334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42336    new_path="$unix_path"
42337  fi
42338
42339    # remove trailing .exe if any
42340    new_path="${new_path/%.exe/}"
42341
42342    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42343    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42344  fi
42345
42346    else
42347      # We're on a unix platform. Hooray! :)
42348      # First separate the path from the arguments. This will split at the first
42349      # space.
42350      complete="$STRIP"
42351      path="${complete%% *}"
42352      tmp="$complete EOL"
42353      arguments="${tmp#* }"
42354
42355      # Cannot rely on the command "which" here since it doesn't always work.
42356      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42357      if test -z "$is_absolute_path"; then
42358        # Path to executable is not absolute. Find it.
42359        IFS_save="$IFS"
42360        IFS=:
42361        for p in $PATH; do
42362          if test -f "$p/$path" && test -x "$p/$path"; then
42363            new_path="$p/$path"
42364            break
42365          fi
42366        done
42367        IFS="$IFS_save"
42368      else
42369        # This is an absolute path, we can use it without further modifications.
42370        new_path="$path"
42371      fi
42372
42373      if test "x$new_path" = x; then
42374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42375$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42376        has_space=`$ECHO "$complete" | $GREP " "`
42377        if test "x$has_space" != x; then
42378          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42379$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42380        fi
42381        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42382      fi
42383    fi
42384
42385    # Now join together the path and the arguments once again
42386    if test "x$arguments" != xEOL; then
42387      new_complete="$new_path ${arguments% *}"
42388    else
42389      new_complete="$new_path"
42390    fi
42391
42392    if test "x$complete" != "x$new_complete"; then
42393      STRIP="$new_complete"
42394      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42395$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42396    fi
42397  fi
42398
42399    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42400
42401
42402  # Publish this variable in the help.
42403
42404
42405  if [ -z "${NM+x}" ]; then
42406    # The variable is not set by user, try to locate tool using the code snippet
42407    if test -n "$ac_tool_prefix"; then
42408  for ac_prog in nm gcc-nm
42409  do
42410    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42411set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42413$as_echo_n "checking for $ac_word... " >&6; }
42414if ${ac_cv_prog_NM+:} false; then :
42415  $as_echo_n "(cached) " >&6
42416else
42417  if test -n "$NM"; then
42418  ac_cv_prog_NM="$NM" # Let the user override the test.
42419else
42420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42421for as_dir in $PATH
42422do
42423  IFS=$as_save_IFS
42424  test -z "$as_dir" && as_dir=.
42425    for ac_exec_ext in '' $ac_executable_extensions; do
42426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42427    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42429    break 2
42430  fi
42431done
42432  done
42433IFS=$as_save_IFS
42434
42435fi
42436fi
42437NM=$ac_cv_prog_NM
42438if test -n "$NM"; then
42439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42440$as_echo "$NM" >&6; }
42441else
42442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42443$as_echo "no" >&6; }
42444fi
42445
42446
42447    test -n "$NM" && break
42448  done
42449fi
42450if test -z "$NM"; then
42451  ac_ct_NM=$NM
42452  for ac_prog in nm gcc-nm
42453do
42454  # Extract the first word of "$ac_prog", so it can be a program name with args.
42455set dummy $ac_prog; ac_word=$2
42456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42457$as_echo_n "checking for $ac_word... " >&6; }
42458if ${ac_cv_prog_ac_ct_NM+:} false; then :
42459  $as_echo_n "(cached) " >&6
42460else
42461  if test -n "$ac_ct_NM"; then
42462  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42463else
42464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42465for as_dir in $PATH
42466do
42467  IFS=$as_save_IFS
42468  test -z "$as_dir" && as_dir=.
42469    for ac_exec_ext in '' $ac_executable_extensions; do
42470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42471    ac_cv_prog_ac_ct_NM="$ac_prog"
42472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42473    break 2
42474  fi
42475done
42476  done
42477IFS=$as_save_IFS
42478
42479fi
42480fi
42481ac_ct_NM=$ac_cv_prog_ac_ct_NM
42482if test -n "$ac_ct_NM"; then
42483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42484$as_echo "$ac_ct_NM" >&6; }
42485else
42486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42487$as_echo "no" >&6; }
42488fi
42489
42490
42491  test -n "$ac_ct_NM" && break
42492done
42493
42494  if test "x$ac_ct_NM" = x; then
42495    NM=""
42496  else
42497    case $cross_compiling:$ac_tool_warned in
42498yes:)
42499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42501ac_tool_warned=yes ;;
42502esac
42503    NM=$ac_ct_NM
42504  fi
42505fi
42506
42507  else
42508    # The variable is set, but is it from the command line or the environment?
42509
42510    # Try to remove the string !NM! from our list.
42511    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42512    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42513      # If it failed, the variable was not from the command line. Ignore it,
42514      # but warn the user (except for BASH, which is always set by the calling BASH).
42515      if test "xNM" != xBASH; then
42516        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42517$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42518      fi
42519      # Try to locate tool using the code snippet
42520      if test -n "$ac_tool_prefix"; then
42521  for ac_prog in nm gcc-nm
42522  do
42523    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42524set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42526$as_echo_n "checking for $ac_word... " >&6; }
42527if ${ac_cv_prog_NM+:} false; then :
42528  $as_echo_n "(cached) " >&6
42529else
42530  if test -n "$NM"; then
42531  ac_cv_prog_NM="$NM" # Let the user override the test.
42532else
42533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42534for as_dir in $PATH
42535do
42536  IFS=$as_save_IFS
42537  test -z "$as_dir" && as_dir=.
42538    for ac_exec_ext in '' $ac_executable_extensions; do
42539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42540    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42542    break 2
42543  fi
42544done
42545  done
42546IFS=$as_save_IFS
42547
42548fi
42549fi
42550NM=$ac_cv_prog_NM
42551if test -n "$NM"; then
42552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42553$as_echo "$NM" >&6; }
42554else
42555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42556$as_echo "no" >&6; }
42557fi
42558
42559
42560    test -n "$NM" && break
42561  done
42562fi
42563if test -z "$NM"; then
42564  ac_ct_NM=$NM
42565  for ac_prog in nm gcc-nm
42566do
42567  # Extract the first word of "$ac_prog", so it can be a program name with args.
42568set dummy $ac_prog; ac_word=$2
42569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42570$as_echo_n "checking for $ac_word... " >&6; }
42571if ${ac_cv_prog_ac_ct_NM+:} false; then :
42572  $as_echo_n "(cached) " >&6
42573else
42574  if test -n "$ac_ct_NM"; then
42575  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42576else
42577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42578for as_dir in $PATH
42579do
42580  IFS=$as_save_IFS
42581  test -z "$as_dir" && as_dir=.
42582    for ac_exec_ext in '' $ac_executable_extensions; do
42583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42584    ac_cv_prog_ac_ct_NM="$ac_prog"
42585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42586    break 2
42587  fi
42588done
42589  done
42590IFS=$as_save_IFS
42591
42592fi
42593fi
42594ac_ct_NM=$ac_cv_prog_ac_ct_NM
42595if test -n "$ac_ct_NM"; then
42596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42597$as_echo "$ac_ct_NM" >&6; }
42598else
42599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42600$as_echo "no" >&6; }
42601fi
42602
42603
42604  test -n "$ac_ct_NM" && break
42605done
42606
42607  if test "x$ac_ct_NM" = x; then
42608    NM=""
42609  else
42610    case $cross_compiling:$ac_tool_warned in
42611yes:)
42612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42614ac_tool_warned=yes ;;
42615esac
42616    NM=$ac_ct_NM
42617  fi
42618fi
42619
42620    else
42621      # If it succeeded, then it was overridden by the user. We will use it
42622      # for the tool.
42623
42624      # First remove it from the list of overridden variables, so we can test
42625      # for unknown variables in the end.
42626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42627
42628      # Check if we try to supply an empty value
42629      if test "x$NM" = x; then
42630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42631$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42633$as_echo_n "checking for NM... " >&6; }
42634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42635$as_echo "disabled" >&6; }
42636      else
42637        # Check if the provided tool contains a complete path.
42638        tool_specified="$NM"
42639        tool_basename="${tool_specified##*/}"
42640        if test "x$tool_basename" = "x$tool_specified"; then
42641          # A command without a complete path is provided, search $PATH.
42642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42643$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42644          # Extract the first word of "$tool_basename", so it can be a program name with args.
42645set dummy $tool_basename; ac_word=$2
42646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42647$as_echo_n "checking for $ac_word... " >&6; }
42648if ${ac_cv_path_NM+:} false; then :
42649  $as_echo_n "(cached) " >&6
42650else
42651  case $NM in
42652  [\\/]* | ?:[\\/]*)
42653  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42654  ;;
42655  *)
42656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42657for as_dir in $PATH
42658do
42659  IFS=$as_save_IFS
42660  test -z "$as_dir" && as_dir=.
42661    for ac_exec_ext in '' $ac_executable_extensions; do
42662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42663    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42665    break 2
42666  fi
42667done
42668  done
42669IFS=$as_save_IFS
42670
42671  ;;
42672esac
42673fi
42674NM=$ac_cv_path_NM
42675if test -n "$NM"; then
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42677$as_echo "$NM" >&6; }
42678else
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680$as_echo "no" >&6; }
42681fi
42682
42683
42684          if test "x$NM" = x; then
42685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42686          fi
42687        else
42688          # Otherwise we believe it is a complete path. Use it as it is.
42689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42690$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42692$as_echo_n "checking for NM... " >&6; }
42693          if test ! -x "$tool_specified"; then
42694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42695$as_echo "not found" >&6; }
42696            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42697          fi
42698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42699$as_echo "$tool_specified" >&6; }
42700        fi
42701      fi
42702    fi
42703
42704  fi
42705
42706
42707    else
42708
42709
42710  # Publish this variable in the help.
42711
42712
42713  if [ -z "${NM+x}" ]; then
42714    # The variable is not set by user, try to locate tool using the code snippet
42715    if test -n "$ac_tool_prefix"; then
42716  for ac_prog in nm
42717  do
42718    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42719set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42721$as_echo_n "checking for $ac_word... " >&6; }
42722if ${ac_cv_prog_NM+:} false; then :
42723  $as_echo_n "(cached) " >&6
42724else
42725  if test -n "$NM"; then
42726  ac_cv_prog_NM="$NM" # Let the user override the test.
42727else
42728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42729for as_dir in $PATH
42730do
42731  IFS=$as_save_IFS
42732  test -z "$as_dir" && as_dir=.
42733    for ac_exec_ext in '' $ac_executable_extensions; do
42734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42735    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42737    break 2
42738  fi
42739done
42740  done
42741IFS=$as_save_IFS
42742
42743fi
42744fi
42745NM=$ac_cv_prog_NM
42746if test -n "$NM"; then
42747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42748$as_echo "$NM" >&6; }
42749else
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42751$as_echo "no" >&6; }
42752fi
42753
42754
42755    test -n "$NM" && break
42756  done
42757fi
42758if test -z "$NM"; then
42759  ac_ct_NM=$NM
42760  for ac_prog in nm
42761do
42762  # Extract the first word of "$ac_prog", so it can be a program name with args.
42763set dummy $ac_prog; ac_word=$2
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765$as_echo_n "checking for $ac_word... " >&6; }
42766if ${ac_cv_prog_ac_ct_NM+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  if test -n "$ac_ct_NM"; then
42770  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42771else
42772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42773for as_dir in $PATH
42774do
42775  IFS=$as_save_IFS
42776  test -z "$as_dir" && as_dir=.
42777    for ac_exec_ext in '' $ac_executable_extensions; do
42778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42779    ac_cv_prog_ac_ct_NM="$ac_prog"
42780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42781    break 2
42782  fi
42783done
42784  done
42785IFS=$as_save_IFS
42786
42787fi
42788fi
42789ac_ct_NM=$ac_cv_prog_ac_ct_NM
42790if test -n "$ac_ct_NM"; then
42791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42792$as_echo "$ac_ct_NM" >&6; }
42793else
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42795$as_echo "no" >&6; }
42796fi
42797
42798
42799  test -n "$ac_ct_NM" && break
42800done
42801
42802  if test "x$ac_ct_NM" = x; then
42803    NM=""
42804  else
42805    case $cross_compiling:$ac_tool_warned in
42806yes:)
42807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42809ac_tool_warned=yes ;;
42810esac
42811    NM=$ac_ct_NM
42812  fi
42813fi
42814
42815  else
42816    # The variable is set, but is it from the command line or the environment?
42817
42818    # Try to remove the string !NM! from our list.
42819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42821      # If it failed, the variable was not from the command line. Ignore it,
42822      # but warn the user (except for BASH, which is always set by the calling BASH).
42823      if test "xNM" != xBASH; then
42824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42825$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42826      fi
42827      # Try to locate tool using the code snippet
42828      if test -n "$ac_tool_prefix"; then
42829  for ac_prog in nm
42830  do
42831    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42832set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42834$as_echo_n "checking for $ac_word... " >&6; }
42835if ${ac_cv_prog_NM+:} false; then :
42836  $as_echo_n "(cached) " >&6
42837else
42838  if test -n "$NM"; then
42839  ac_cv_prog_NM="$NM" # Let the user override the test.
42840else
42841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42842for as_dir in $PATH
42843do
42844  IFS=$as_save_IFS
42845  test -z "$as_dir" && as_dir=.
42846    for ac_exec_ext in '' $ac_executable_extensions; do
42847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42848    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42850    break 2
42851  fi
42852done
42853  done
42854IFS=$as_save_IFS
42855
42856fi
42857fi
42858NM=$ac_cv_prog_NM
42859if test -n "$NM"; then
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42861$as_echo "$NM" >&6; }
42862else
42863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42864$as_echo "no" >&6; }
42865fi
42866
42867
42868    test -n "$NM" && break
42869  done
42870fi
42871if test -z "$NM"; then
42872  ac_ct_NM=$NM
42873  for ac_prog in nm
42874do
42875  # Extract the first word of "$ac_prog", so it can be a program name with args.
42876set dummy $ac_prog; ac_word=$2
42877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42878$as_echo_n "checking for $ac_word... " >&6; }
42879if ${ac_cv_prog_ac_ct_NM+:} false; then :
42880  $as_echo_n "(cached) " >&6
42881else
42882  if test -n "$ac_ct_NM"; then
42883  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42884else
42885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42886for as_dir in $PATH
42887do
42888  IFS=$as_save_IFS
42889  test -z "$as_dir" && as_dir=.
42890    for ac_exec_ext in '' $ac_executable_extensions; do
42891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42892    ac_cv_prog_ac_ct_NM="$ac_prog"
42893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42894    break 2
42895  fi
42896done
42897  done
42898IFS=$as_save_IFS
42899
42900fi
42901fi
42902ac_ct_NM=$ac_cv_prog_ac_ct_NM
42903if test -n "$ac_ct_NM"; then
42904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42905$as_echo "$ac_ct_NM" >&6; }
42906else
42907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42908$as_echo "no" >&6; }
42909fi
42910
42911
42912  test -n "$ac_ct_NM" && break
42913done
42914
42915  if test "x$ac_ct_NM" = x; then
42916    NM=""
42917  else
42918    case $cross_compiling:$ac_tool_warned in
42919yes:)
42920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42922ac_tool_warned=yes ;;
42923esac
42924    NM=$ac_ct_NM
42925  fi
42926fi
42927
42928    else
42929      # If it succeeded, then it was overridden by the user. We will use it
42930      # for the tool.
42931
42932      # First remove it from the list of overridden variables, so we can test
42933      # for unknown variables in the end.
42934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42935
42936      # Check if we try to supply an empty value
42937      if test "x$NM" = x; then
42938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42939$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42941$as_echo_n "checking for NM... " >&6; }
42942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42943$as_echo "disabled" >&6; }
42944      else
42945        # Check if the provided tool contains a complete path.
42946        tool_specified="$NM"
42947        tool_basename="${tool_specified##*/}"
42948        if test "x$tool_basename" = "x$tool_specified"; then
42949          # A command without a complete path is provided, search $PATH.
42950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42951$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42952          # Extract the first word of "$tool_basename", so it can be a program name with args.
42953set dummy $tool_basename; ac_word=$2
42954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42955$as_echo_n "checking for $ac_word... " >&6; }
42956if ${ac_cv_path_NM+:} false; then :
42957  $as_echo_n "(cached) " >&6
42958else
42959  case $NM in
42960  [\\/]* | ?:[\\/]*)
42961  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42962  ;;
42963  *)
42964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42965for as_dir in $PATH
42966do
42967  IFS=$as_save_IFS
42968  test -z "$as_dir" && as_dir=.
42969    for ac_exec_ext in '' $ac_executable_extensions; do
42970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42971    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42973    break 2
42974  fi
42975done
42976  done
42977IFS=$as_save_IFS
42978
42979  ;;
42980esac
42981fi
42982NM=$ac_cv_path_NM
42983if test -n "$NM"; then
42984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42985$as_echo "$NM" >&6; }
42986else
42987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42988$as_echo "no" >&6; }
42989fi
42990
42991
42992          if test "x$NM" = x; then
42993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42994          fi
42995        else
42996          # Otherwise we believe it is a complete path. Use it as it is.
42997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42998$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43000$as_echo_n "checking for NM... " >&6; }
43001          if test ! -x "$tool_specified"; then
43002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43003$as_echo "not found" >&6; }
43004            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43005          fi
43006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43007$as_echo "$tool_specified" >&6; }
43008        fi
43009      fi
43010    fi
43011
43012  fi
43013
43014
43015    fi
43016
43017  # Only process if variable expands to non-empty
43018
43019  if test "x$NM" != x; then
43020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43021
43022  # First separate the path from the arguments. This will split at the first
43023  # space.
43024  complete="$NM"
43025  path="${complete%% *}"
43026  tmp="$complete EOL"
43027  arguments="${tmp#* }"
43028
43029  # Input might be given as Windows format, start by converting to
43030  # unix format.
43031  new_path=`$CYGPATH -u "$path"`
43032
43033  # Now try to locate executable using which
43034  new_path=`$WHICH "$new_path" 2> /dev/null`
43035  # bat and cmd files are not always considered executable in cygwin causing which
43036  # to not find them
43037  if test "x$new_path" = x \
43038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43040    new_path=`$CYGPATH -u "$path"`
43041  fi
43042  if test "x$new_path" = x; then
43043    # Oops. Which didn't find the executable.
43044    # The splitting of arguments from the executable at a space might have been incorrect,
43045    # since paths with space are more likely in Windows. Give it another try with the whole
43046    # argument.
43047    path="$complete"
43048    arguments="EOL"
43049    new_path=`$CYGPATH -u "$path"`
43050    new_path=`$WHICH "$new_path" 2> /dev/null`
43051    # bat and cmd files are not always considered executable in cygwin causing which
43052    # to not find them
43053    if test "x$new_path" = x \
43054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43056      new_path=`$CYGPATH -u "$path"`
43057    fi
43058    if test "x$new_path" = x; then
43059      # It's still not found. Now this is an unrecoverable error.
43060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43061$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43062      has_space=`$ECHO "$complete" | $GREP " "`
43063      if test "x$has_space" != x; then
43064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43066      fi
43067      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43068    fi
43069  fi
43070
43071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43074  # "foo.exe" is OK but "foo" is an error.
43075  #
43076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43077  # It is also a way to make sure we got the proper file name for the real test later on.
43078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43079  if test "x$test_shortpath" = x; then
43080    # Short path failed, file does not exist as specified.
43081    # Try adding .exe or .cmd
43082    if test -f "${new_path}.exe"; then
43083      input_to_shortpath="${new_path}.exe"
43084    elif test -f "${new_path}.cmd"; then
43085      input_to_shortpath="${new_path}.cmd"
43086    else
43087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43088$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43091      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43092    fi
43093  else
43094    input_to_shortpath="$new_path"
43095  fi
43096
43097  # Call helper function which possibly converts this using DOS-style short mode.
43098  # If so, the updated path is stored in $new_path.
43099  new_path="$input_to_shortpath"
43100
43101  input_path="$input_to_shortpath"
43102  # Check if we need to convert this using DOS-style short mode. If the path
43103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43104  # take no chances and rewrite it.
43105  # Note: m4 eats our [], so we need to use [ and ] instead.
43106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43107  if test "x$has_forbidden_chars" != x; then
43108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43112      # Going to short mode and back again did indeed matter. Since short mode is
43113      # case insensitive, let's make it lowercase to improve readability.
43114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43115      # Now convert it back to Unix-style (cygpath)
43116      input_path=`$CYGPATH -u "$shortmode_path"`
43117      new_path="$input_path"
43118    fi
43119  fi
43120
43121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43122  if test "x$test_cygdrive_prefix" = x; then
43123    # As a simple fix, exclude /usr/bin since it's not a real path.
43124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43126      # a path prefixed by /cygdrive for fixpath to work.
43127      new_path="$CYGWIN_ROOT_PATH$input_path"
43128    fi
43129  fi
43130
43131  # remove trailing .exe if any
43132  new_path="${new_path/%.exe/}"
43133
43134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43135
43136  # First separate the path from the arguments. This will split at the first
43137  # space.
43138  complete="$NM"
43139  path="${complete%% *}"
43140  tmp="$complete EOL"
43141  arguments="${tmp#* }"
43142
43143  # Input might be given as Windows format, start by converting to
43144  # unix format.
43145  new_path="$path"
43146
43147  windows_path="$new_path"
43148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43149    unix_path=`$CYGPATH -u "$windows_path"`
43150    new_path="$unix_path"
43151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43153    new_path="$unix_path"
43154  fi
43155
43156
43157  # Now try to locate executable using which
43158  new_path=`$WHICH "$new_path" 2> /dev/null`
43159
43160  if test "x$new_path" = x; then
43161    # Oops. Which didn't find the executable.
43162    # The splitting of arguments from the executable at a space might have been incorrect,
43163    # since paths with space are more likely in Windows. Give it another try with the whole
43164    # argument.
43165    path="$complete"
43166    arguments="EOL"
43167    new_path="$path"
43168
43169  windows_path="$new_path"
43170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43171    unix_path=`$CYGPATH -u "$windows_path"`
43172    new_path="$unix_path"
43173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43175    new_path="$unix_path"
43176  fi
43177
43178
43179    new_path=`$WHICH "$new_path" 2> /dev/null`
43180    # bat and cmd files are not always considered executable in MSYS causing which
43181    # to not find them
43182    if test "x$new_path" = x \
43183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43185      new_path="$path"
43186
43187  windows_path="$new_path"
43188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43189    unix_path=`$CYGPATH -u "$windows_path"`
43190    new_path="$unix_path"
43191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43193    new_path="$unix_path"
43194  fi
43195
43196    fi
43197
43198    if test "x$new_path" = x; then
43199      # It's still not found. Now this is an unrecoverable error.
43200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43201$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43202      has_space=`$ECHO "$complete" | $GREP " "`
43203      if test "x$has_space" != x; then
43204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43206      fi
43207      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43208    fi
43209  fi
43210
43211  # Now new_path has a complete unix path to the binary
43212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43213    # Keep paths in /bin as-is, but remove trailing .exe if any
43214    new_path="${new_path/%.exe/}"
43215    # Do not save /bin paths to all_fixpath_prefixes!
43216  else
43217    # Not in mixed or Windows style, start by that.
43218    new_path=`cmd //c echo $new_path`
43219
43220  input_path="$new_path"
43221  # Check if we need to convert this using DOS-style short mode. If the path
43222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43223  # take no chances and rewrite it.
43224  # Note: m4 eats our [], so we need to use [ and ] instead.
43225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43226  if test "x$has_forbidden_chars" != x; then
43227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43229  fi
43230
43231    # Output is in $new_path
43232
43233  windows_path="$new_path"
43234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43235    unix_path=`$CYGPATH -u "$windows_path"`
43236    new_path="$unix_path"
43237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43239    new_path="$unix_path"
43240  fi
43241
43242    # remove trailing .exe if any
43243    new_path="${new_path/%.exe/}"
43244
43245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43247  fi
43248
43249    else
43250      # We're on a unix platform. Hooray! :)
43251      # First separate the path from the arguments. This will split at the first
43252      # space.
43253      complete="$NM"
43254      path="${complete%% *}"
43255      tmp="$complete EOL"
43256      arguments="${tmp#* }"
43257
43258      # Cannot rely on the command "which" here since it doesn't always work.
43259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43260      if test -z "$is_absolute_path"; then
43261        # Path to executable is not absolute. Find it.
43262        IFS_save="$IFS"
43263        IFS=:
43264        for p in $PATH; do
43265          if test -f "$p/$path" && test -x "$p/$path"; then
43266            new_path="$p/$path"
43267            break
43268          fi
43269        done
43270        IFS="$IFS_save"
43271      else
43272        # This is an absolute path, we can use it without further modifications.
43273        new_path="$path"
43274      fi
43275
43276      if test "x$new_path" = x; then
43277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43278$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43279        has_space=`$ECHO "$complete" | $GREP " "`
43280        if test "x$has_space" != x; then
43281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43283        fi
43284        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43285      fi
43286    fi
43287
43288    # Now join together the path and the arguments once again
43289    if test "x$arguments" != xEOL; then
43290      new_complete="$new_path ${arguments% *}"
43291    else
43292      new_complete="$new_path"
43293    fi
43294
43295    if test "x$complete" != "x$new_complete"; then
43296      NM="$new_complete"
43297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43298$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43299    fi
43300  fi
43301
43302    GNM="$NM"
43303
43304  fi
43305
43306  # objcopy is used for moving debug symbols to separate files when
43307  # full debug symbols are enabled.
43308  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43309
43310
43311  # Publish this variable in the help.
43312
43313
43314  if [ -z "${OBJCOPY+x}" ]; then
43315    # The variable is not set by user, try to locate tool using the code snippet
43316    if test -n "$ac_tool_prefix"; then
43317  for ac_prog in gobjcopy objcopy
43318  do
43319    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43320set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43322$as_echo_n "checking for $ac_word... " >&6; }
43323if ${ac_cv_prog_OBJCOPY+:} false; then :
43324  $as_echo_n "(cached) " >&6
43325else
43326  if test -n "$OBJCOPY"; then
43327  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43328else
43329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43330for as_dir in $PATH
43331do
43332  IFS=$as_save_IFS
43333  test -z "$as_dir" && as_dir=.
43334    for ac_exec_ext in '' $ac_executable_extensions; do
43335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43336    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43338    break 2
43339  fi
43340done
43341  done
43342IFS=$as_save_IFS
43343
43344fi
43345fi
43346OBJCOPY=$ac_cv_prog_OBJCOPY
43347if test -n "$OBJCOPY"; then
43348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43349$as_echo "$OBJCOPY" >&6; }
43350else
43351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43352$as_echo "no" >&6; }
43353fi
43354
43355
43356    test -n "$OBJCOPY" && break
43357  done
43358fi
43359if test -z "$OBJCOPY"; then
43360  ac_ct_OBJCOPY=$OBJCOPY
43361  for ac_prog in gobjcopy objcopy
43362do
43363  # Extract the first word of "$ac_prog", so it can be a program name with args.
43364set dummy $ac_prog; ac_word=$2
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43366$as_echo_n "checking for $ac_word... " >&6; }
43367if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43368  $as_echo_n "(cached) " >&6
43369else
43370  if test -n "$ac_ct_OBJCOPY"; then
43371  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43372else
43373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43374for as_dir in $PATH
43375do
43376  IFS=$as_save_IFS
43377  test -z "$as_dir" && as_dir=.
43378    for ac_exec_ext in '' $ac_executable_extensions; do
43379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43380    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43382    break 2
43383  fi
43384done
43385  done
43386IFS=$as_save_IFS
43387
43388fi
43389fi
43390ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43391if test -n "$ac_ct_OBJCOPY"; then
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43393$as_echo "$ac_ct_OBJCOPY" >&6; }
43394else
43395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43396$as_echo "no" >&6; }
43397fi
43398
43399
43400  test -n "$ac_ct_OBJCOPY" && break
43401done
43402
43403  if test "x$ac_ct_OBJCOPY" = x; then
43404    OBJCOPY=""
43405  else
43406    case $cross_compiling:$ac_tool_warned in
43407yes:)
43408{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43409$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43410ac_tool_warned=yes ;;
43411esac
43412    OBJCOPY=$ac_ct_OBJCOPY
43413  fi
43414fi
43415
43416  else
43417    # The variable is set, but is it from the command line or the environment?
43418
43419    # Try to remove the string !OBJCOPY! from our list.
43420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43422      # If it failed, the variable was not from the command line. Ignore it,
43423      # but warn the user (except for BASH, which is always set by the calling BASH).
43424      if test "xOBJCOPY" != xBASH; then
43425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43426$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43427      fi
43428      # Try to locate tool using the code snippet
43429      if test -n "$ac_tool_prefix"; then
43430  for ac_prog in gobjcopy objcopy
43431  do
43432    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43435$as_echo_n "checking for $ac_word... " >&6; }
43436if ${ac_cv_prog_OBJCOPY+:} false; then :
43437  $as_echo_n "(cached) " >&6
43438else
43439  if test -n "$OBJCOPY"; then
43440  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43441else
43442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43443for as_dir in $PATH
43444do
43445  IFS=$as_save_IFS
43446  test -z "$as_dir" && as_dir=.
43447    for ac_exec_ext in '' $ac_executable_extensions; do
43448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43449    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43451    break 2
43452  fi
43453done
43454  done
43455IFS=$as_save_IFS
43456
43457fi
43458fi
43459OBJCOPY=$ac_cv_prog_OBJCOPY
43460if test -n "$OBJCOPY"; then
43461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43462$as_echo "$OBJCOPY" >&6; }
43463else
43464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43465$as_echo "no" >&6; }
43466fi
43467
43468
43469    test -n "$OBJCOPY" && break
43470  done
43471fi
43472if test -z "$OBJCOPY"; then
43473  ac_ct_OBJCOPY=$OBJCOPY
43474  for ac_prog in gobjcopy objcopy
43475do
43476  # Extract the first word of "$ac_prog", so it can be a program name with args.
43477set dummy $ac_prog; ac_word=$2
43478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43479$as_echo_n "checking for $ac_word... " >&6; }
43480if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43481  $as_echo_n "(cached) " >&6
43482else
43483  if test -n "$ac_ct_OBJCOPY"; then
43484  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43485else
43486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43487for as_dir in $PATH
43488do
43489  IFS=$as_save_IFS
43490  test -z "$as_dir" && as_dir=.
43491    for ac_exec_ext in '' $ac_executable_extensions; do
43492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43493    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43495    break 2
43496  fi
43497done
43498  done
43499IFS=$as_save_IFS
43500
43501fi
43502fi
43503ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43504if test -n "$ac_ct_OBJCOPY"; then
43505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43506$as_echo "$ac_ct_OBJCOPY" >&6; }
43507else
43508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43509$as_echo "no" >&6; }
43510fi
43511
43512
43513  test -n "$ac_ct_OBJCOPY" && break
43514done
43515
43516  if test "x$ac_ct_OBJCOPY" = x; then
43517    OBJCOPY=""
43518  else
43519    case $cross_compiling:$ac_tool_warned in
43520yes:)
43521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43523ac_tool_warned=yes ;;
43524esac
43525    OBJCOPY=$ac_ct_OBJCOPY
43526  fi
43527fi
43528
43529    else
43530      # If it succeeded, then it was overridden by the user. We will use it
43531      # for the tool.
43532
43533      # First remove it from the list of overridden variables, so we can test
43534      # for unknown variables in the end.
43535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43536
43537      # Check if we try to supply an empty value
43538      if test "x$OBJCOPY" = x; then
43539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43540$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43542$as_echo_n "checking for OBJCOPY... " >&6; }
43543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43544$as_echo "disabled" >&6; }
43545      else
43546        # Check if the provided tool contains a complete path.
43547        tool_specified="$OBJCOPY"
43548        tool_basename="${tool_specified##*/}"
43549        if test "x$tool_basename" = "x$tool_specified"; then
43550          # A command without a complete path is provided, search $PATH.
43551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43552$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43553          # Extract the first word of "$tool_basename", so it can be a program name with args.
43554set dummy $tool_basename; ac_word=$2
43555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43556$as_echo_n "checking for $ac_word... " >&6; }
43557if ${ac_cv_path_OBJCOPY+:} false; then :
43558  $as_echo_n "(cached) " >&6
43559else
43560  case $OBJCOPY in
43561  [\\/]* | ?:[\\/]*)
43562  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43563  ;;
43564  *)
43565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43566for as_dir in $PATH
43567do
43568  IFS=$as_save_IFS
43569  test -z "$as_dir" && as_dir=.
43570    for ac_exec_ext in '' $ac_executable_extensions; do
43571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43572    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43574    break 2
43575  fi
43576done
43577  done
43578IFS=$as_save_IFS
43579
43580  ;;
43581esac
43582fi
43583OBJCOPY=$ac_cv_path_OBJCOPY
43584if test -n "$OBJCOPY"; then
43585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43586$as_echo "$OBJCOPY" >&6; }
43587else
43588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43589$as_echo "no" >&6; }
43590fi
43591
43592
43593          if test "x$OBJCOPY" = x; then
43594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43595          fi
43596        else
43597          # Otherwise we believe it is a complete path. Use it as it is.
43598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43599$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43601$as_echo_n "checking for OBJCOPY... " >&6; }
43602          if test ! -x "$tool_specified"; then
43603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43604$as_echo "not found" >&6; }
43605            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43606          fi
43607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43608$as_echo "$tool_specified" >&6; }
43609        fi
43610      fi
43611    fi
43612
43613  fi
43614
43615
43616    # Only call fixup if objcopy was found.
43617    if test -n "$OBJCOPY"; then
43618
43619  # Only process if variable expands to non-empty
43620
43621  if test "x$OBJCOPY" != x; then
43622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43623
43624  # First separate the path from the arguments. This will split at the first
43625  # space.
43626  complete="$OBJCOPY"
43627  path="${complete%% *}"
43628  tmp="$complete EOL"
43629  arguments="${tmp#* }"
43630
43631  # Input might be given as Windows format, start by converting to
43632  # unix format.
43633  new_path=`$CYGPATH -u "$path"`
43634
43635  # Now try to locate executable using which
43636  new_path=`$WHICH "$new_path" 2> /dev/null`
43637  # bat and cmd files are not always considered executable in cygwin causing which
43638  # to not find them
43639  if test "x$new_path" = x \
43640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43642    new_path=`$CYGPATH -u "$path"`
43643  fi
43644  if test "x$new_path" = x; then
43645    # Oops. Which didn't find the executable.
43646    # The splitting of arguments from the executable at a space might have been incorrect,
43647    # since paths with space are more likely in Windows. Give it another try with the whole
43648    # argument.
43649    path="$complete"
43650    arguments="EOL"
43651    new_path=`$CYGPATH -u "$path"`
43652    new_path=`$WHICH "$new_path" 2> /dev/null`
43653    # bat and cmd files are not always considered executable in cygwin causing which
43654    # to not find them
43655    if test "x$new_path" = x \
43656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43658      new_path=`$CYGPATH -u "$path"`
43659    fi
43660    if test "x$new_path" = x; then
43661      # It's still not found. Now this is an unrecoverable error.
43662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43663$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43664      has_space=`$ECHO "$complete" | $GREP " "`
43665      if test "x$has_space" != x; then
43666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43668      fi
43669      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43670    fi
43671  fi
43672
43673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43676  # "foo.exe" is OK but "foo" is an error.
43677  #
43678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43679  # It is also a way to make sure we got the proper file name for the real test later on.
43680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43681  if test "x$test_shortpath" = x; then
43682    # Short path failed, file does not exist as specified.
43683    # Try adding .exe or .cmd
43684    if test -f "${new_path}.exe"; then
43685      input_to_shortpath="${new_path}.exe"
43686    elif test -f "${new_path}.cmd"; then
43687      input_to_shortpath="${new_path}.cmd"
43688    else
43689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43690$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43693      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43694    fi
43695  else
43696    input_to_shortpath="$new_path"
43697  fi
43698
43699  # Call helper function which possibly converts this using DOS-style short mode.
43700  # If so, the updated path is stored in $new_path.
43701  new_path="$input_to_shortpath"
43702
43703  input_path="$input_to_shortpath"
43704  # Check if we need to convert this using DOS-style short mode. If the path
43705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43706  # take no chances and rewrite it.
43707  # Note: m4 eats our [], so we need to use [ and ] instead.
43708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43709  if test "x$has_forbidden_chars" != x; then
43710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43714      # Going to short mode and back again did indeed matter. Since short mode is
43715      # case insensitive, let's make it lowercase to improve readability.
43716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43717      # Now convert it back to Unix-style (cygpath)
43718      input_path=`$CYGPATH -u "$shortmode_path"`
43719      new_path="$input_path"
43720    fi
43721  fi
43722
43723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43724  if test "x$test_cygdrive_prefix" = x; then
43725    # As a simple fix, exclude /usr/bin since it's not a real path.
43726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43728      # a path prefixed by /cygdrive for fixpath to work.
43729      new_path="$CYGWIN_ROOT_PATH$input_path"
43730    fi
43731  fi
43732
43733  # remove trailing .exe if any
43734  new_path="${new_path/%.exe/}"
43735
43736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43737
43738  # First separate the path from the arguments. This will split at the first
43739  # space.
43740  complete="$OBJCOPY"
43741  path="${complete%% *}"
43742  tmp="$complete EOL"
43743  arguments="${tmp#* }"
43744
43745  # Input might be given as Windows format, start by converting to
43746  # unix format.
43747  new_path="$path"
43748
43749  windows_path="$new_path"
43750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43751    unix_path=`$CYGPATH -u "$windows_path"`
43752    new_path="$unix_path"
43753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43755    new_path="$unix_path"
43756  fi
43757
43758
43759  # Now try to locate executable using which
43760  new_path=`$WHICH "$new_path" 2> /dev/null`
43761
43762  if test "x$new_path" = x; then
43763    # Oops. Which didn't find the executable.
43764    # The splitting of arguments from the executable at a space might have been incorrect,
43765    # since paths with space are more likely in Windows. Give it another try with the whole
43766    # argument.
43767    path="$complete"
43768    arguments="EOL"
43769    new_path="$path"
43770
43771  windows_path="$new_path"
43772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43773    unix_path=`$CYGPATH -u "$windows_path"`
43774    new_path="$unix_path"
43775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43777    new_path="$unix_path"
43778  fi
43779
43780
43781    new_path=`$WHICH "$new_path" 2> /dev/null`
43782    # bat and cmd files are not always considered executable in MSYS causing which
43783    # to not find them
43784    if test "x$new_path" = x \
43785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43787      new_path="$path"
43788
43789  windows_path="$new_path"
43790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43791    unix_path=`$CYGPATH -u "$windows_path"`
43792    new_path="$unix_path"
43793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43795    new_path="$unix_path"
43796  fi
43797
43798    fi
43799
43800    if test "x$new_path" = x; then
43801      # It's still not found. Now this is an unrecoverable error.
43802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43803$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43804      has_space=`$ECHO "$complete" | $GREP " "`
43805      if test "x$has_space" != x; then
43806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43808      fi
43809      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43810    fi
43811  fi
43812
43813  # Now new_path has a complete unix path to the binary
43814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43815    # Keep paths in /bin as-is, but remove trailing .exe if any
43816    new_path="${new_path/%.exe/}"
43817    # Do not save /bin paths to all_fixpath_prefixes!
43818  else
43819    # Not in mixed or Windows style, start by that.
43820    new_path=`cmd //c echo $new_path`
43821
43822  input_path="$new_path"
43823  # Check if we need to convert this using DOS-style short mode. If the path
43824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43825  # take no chances and rewrite it.
43826  # Note: m4 eats our [], so we need to use [ and ] instead.
43827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43828  if test "x$has_forbidden_chars" != x; then
43829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43831  fi
43832
43833    # Output is in $new_path
43834
43835  windows_path="$new_path"
43836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43837    unix_path=`$CYGPATH -u "$windows_path"`
43838    new_path="$unix_path"
43839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43841    new_path="$unix_path"
43842  fi
43843
43844    # remove trailing .exe if any
43845    new_path="${new_path/%.exe/}"
43846
43847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43849  fi
43850
43851    else
43852      # We're on a unix platform. Hooray! :)
43853      # First separate the path from the arguments. This will split at the first
43854      # space.
43855      complete="$OBJCOPY"
43856      path="${complete%% *}"
43857      tmp="$complete EOL"
43858      arguments="${tmp#* }"
43859
43860      # Cannot rely on the command "which" here since it doesn't always work.
43861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43862      if test -z "$is_absolute_path"; then
43863        # Path to executable is not absolute. Find it.
43864        IFS_save="$IFS"
43865        IFS=:
43866        for p in $PATH; do
43867          if test -f "$p/$path" && test -x "$p/$path"; then
43868            new_path="$p/$path"
43869            break
43870          fi
43871        done
43872        IFS="$IFS_save"
43873      else
43874        # This is an absolute path, we can use it without further modifications.
43875        new_path="$path"
43876      fi
43877
43878      if test "x$new_path" = x; then
43879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43880$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43881        has_space=`$ECHO "$complete" | $GREP " "`
43882        if test "x$has_space" != x; then
43883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43885        fi
43886        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43887      fi
43888    fi
43889
43890    # Now join together the path and the arguments once again
43891    if test "x$arguments" != xEOL; then
43892      new_complete="$new_path ${arguments% *}"
43893    else
43894      new_complete="$new_path"
43895    fi
43896
43897    if test "x$complete" != "x$new_complete"; then
43898      OBJCOPY="$new_complete"
43899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43900$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43901    fi
43902  fi
43903
43904      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43905        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43906        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43907        # - version number is last blank separate word on first line
43908        # - version number formats that have been seen:
43909        #   - <major>.<minor>
43910        #   - <major>.<minor>.<micro>
43911        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43912        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43913         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43914              -e 's/.* //' \
43915              -e '/^[01]\./b bad' \
43916              -e '/^2\./{' \
43917              -e '  s/^2\.//' \
43918              -e '  /^[0-9]$/b bad' \
43919              -e '  /^[0-9]\./b bad' \
43920              -e '  /^1[0-9]$/b bad' \
43921              -e '  /^1[0-9]\./b bad' \
43922              -e '  /^20\./b bad' \
43923              -e '  /^21\.0$/b bad' \
43924              -e '  /^21\.0\./b bad' \
43925              -e '}' \
43926              -e ':good' \
43927              -e 's/.*/VALID_VERSION/p' \
43928              -e 'q' \
43929              -e ':bad' \
43930              -e 's/.*/BAD_VERSION/p' \
43931              -e 'q'`
43932        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43933          OBJCOPY=
43934          { $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
43935$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43936          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43937$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43938          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43939$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43940          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43941$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43942          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43943$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43944        fi
43945      fi
43946    fi
43947  fi
43948
43949
43950
43951  # Publish this variable in the help.
43952
43953
43954  if [ -z "${OBJDUMP+x}" ]; then
43955    # The variable is not set by user, try to locate tool using the code snippet
43956    if test -n "$ac_tool_prefix"; then
43957  for ac_prog in gobjdump objdump
43958  do
43959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43962$as_echo_n "checking for $ac_word... " >&6; }
43963if ${ac_cv_prog_OBJDUMP+:} false; then :
43964  $as_echo_n "(cached) " >&6
43965else
43966  if test -n "$OBJDUMP"; then
43967  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43968else
43969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43970for as_dir in $PATH
43971do
43972  IFS=$as_save_IFS
43973  test -z "$as_dir" && as_dir=.
43974    for ac_exec_ext in '' $ac_executable_extensions; do
43975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43976    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43978    break 2
43979  fi
43980done
43981  done
43982IFS=$as_save_IFS
43983
43984fi
43985fi
43986OBJDUMP=$ac_cv_prog_OBJDUMP
43987if test -n "$OBJDUMP"; then
43988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43989$as_echo "$OBJDUMP" >&6; }
43990else
43991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43992$as_echo "no" >&6; }
43993fi
43994
43995
43996    test -n "$OBJDUMP" && break
43997  done
43998fi
43999if test -z "$OBJDUMP"; then
44000  ac_ct_OBJDUMP=$OBJDUMP
44001  for ac_prog in gobjdump objdump
44002do
44003  # Extract the first word of "$ac_prog", so it can be a program name with args.
44004set dummy $ac_prog; ac_word=$2
44005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44006$as_echo_n "checking for $ac_word... " >&6; }
44007if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44008  $as_echo_n "(cached) " >&6
44009else
44010  if test -n "$ac_ct_OBJDUMP"; then
44011  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44012else
44013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44014for as_dir in $PATH
44015do
44016  IFS=$as_save_IFS
44017  test -z "$as_dir" && as_dir=.
44018    for ac_exec_ext in '' $ac_executable_extensions; do
44019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44020    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44022    break 2
44023  fi
44024done
44025  done
44026IFS=$as_save_IFS
44027
44028fi
44029fi
44030ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44031if test -n "$ac_ct_OBJDUMP"; then
44032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44033$as_echo "$ac_ct_OBJDUMP" >&6; }
44034else
44035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44036$as_echo "no" >&6; }
44037fi
44038
44039
44040  test -n "$ac_ct_OBJDUMP" && break
44041done
44042
44043  if test "x$ac_ct_OBJDUMP" = x; then
44044    OBJDUMP=""
44045  else
44046    case $cross_compiling:$ac_tool_warned in
44047yes:)
44048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44050ac_tool_warned=yes ;;
44051esac
44052    OBJDUMP=$ac_ct_OBJDUMP
44053  fi
44054fi
44055
44056  else
44057    # The variable is set, but is it from the command line or the environment?
44058
44059    # Try to remove the string !OBJDUMP! from our list.
44060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44062      # If it failed, the variable was not from the command line. Ignore it,
44063      # but warn the user (except for BASH, which is always set by the calling BASH).
44064      if test "xOBJDUMP" != xBASH; then
44065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44066$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44067      fi
44068      # Try to locate tool using the code snippet
44069      if test -n "$ac_tool_prefix"; then
44070  for ac_prog in gobjdump objdump
44071  do
44072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44075$as_echo_n "checking for $ac_word... " >&6; }
44076if ${ac_cv_prog_OBJDUMP+:} false; then :
44077  $as_echo_n "(cached) " >&6
44078else
44079  if test -n "$OBJDUMP"; then
44080  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44081else
44082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44083for as_dir in $PATH
44084do
44085  IFS=$as_save_IFS
44086  test -z "$as_dir" && as_dir=.
44087    for ac_exec_ext in '' $ac_executable_extensions; do
44088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44089    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44091    break 2
44092  fi
44093done
44094  done
44095IFS=$as_save_IFS
44096
44097fi
44098fi
44099OBJDUMP=$ac_cv_prog_OBJDUMP
44100if test -n "$OBJDUMP"; then
44101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44102$as_echo "$OBJDUMP" >&6; }
44103else
44104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44105$as_echo "no" >&6; }
44106fi
44107
44108
44109    test -n "$OBJDUMP" && break
44110  done
44111fi
44112if test -z "$OBJDUMP"; then
44113  ac_ct_OBJDUMP=$OBJDUMP
44114  for ac_prog in gobjdump objdump
44115do
44116  # Extract the first word of "$ac_prog", so it can be a program name with args.
44117set dummy $ac_prog; ac_word=$2
44118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44119$as_echo_n "checking for $ac_word... " >&6; }
44120if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44121  $as_echo_n "(cached) " >&6
44122else
44123  if test -n "$ac_ct_OBJDUMP"; then
44124  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44125else
44126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44127for as_dir in $PATH
44128do
44129  IFS=$as_save_IFS
44130  test -z "$as_dir" && as_dir=.
44131    for ac_exec_ext in '' $ac_executable_extensions; do
44132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44133    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44135    break 2
44136  fi
44137done
44138  done
44139IFS=$as_save_IFS
44140
44141fi
44142fi
44143ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44144if test -n "$ac_ct_OBJDUMP"; then
44145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44146$as_echo "$ac_ct_OBJDUMP" >&6; }
44147else
44148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44149$as_echo "no" >&6; }
44150fi
44151
44152
44153  test -n "$ac_ct_OBJDUMP" && break
44154done
44155
44156  if test "x$ac_ct_OBJDUMP" = x; then
44157    OBJDUMP=""
44158  else
44159    case $cross_compiling:$ac_tool_warned in
44160yes:)
44161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44163ac_tool_warned=yes ;;
44164esac
44165    OBJDUMP=$ac_ct_OBJDUMP
44166  fi
44167fi
44168
44169    else
44170      # If it succeeded, then it was overridden by the user. We will use it
44171      # for the tool.
44172
44173      # First remove it from the list of overridden variables, so we can test
44174      # for unknown variables in the end.
44175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44176
44177      # Check if we try to supply an empty value
44178      if test "x$OBJDUMP" = x; then
44179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44180$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44182$as_echo_n "checking for OBJDUMP... " >&6; }
44183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44184$as_echo "disabled" >&6; }
44185      else
44186        # Check if the provided tool contains a complete path.
44187        tool_specified="$OBJDUMP"
44188        tool_basename="${tool_specified##*/}"
44189        if test "x$tool_basename" = "x$tool_specified"; then
44190          # A command without a complete path is provided, search $PATH.
44191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44192$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44193          # Extract the first word of "$tool_basename", so it can be a program name with args.
44194set dummy $tool_basename; ac_word=$2
44195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44196$as_echo_n "checking for $ac_word... " >&6; }
44197if ${ac_cv_path_OBJDUMP+:} false; then :
44198  $as_echo_n "(cached) " >&6
44199else
44200  case $OBJDUMP in
44201  [\\/]* | ?:[\\/]*)
44202  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44203  ;;
44204  *)
44205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44206for as_dir in $PATH
44207do
44208  IFS=$as_save_IFS
44209  test -z "$as_dir" && as_dir=.
44210    for ac_exec_ext in '' $ac_executable_extensions; do
44211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44212    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44214    break 2
44215  fi
44216done
44217  done
44218IFS=$as_save_IFS
44219
44220  ;;
44221esac
44222fi
44223OBJDUMP=$ac_cv_path_OBJDUMP
44224if test -n "$OBJDUMP"; then
44225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44226$as_echo "$OBJDUMP" >&6; }
44227else
44228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44229$as_echo "no" >&6; }
44230fi
44231
44232
44233          if test "x$OBJDUMP" = x; then
44234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44235          fi
44236        else
44237          # Otherwise we believe it is a complete path. Use it as it is.
44238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44239$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44241$as_echo_n "checking for OBJDUMP... " >&6; }
44242          if test ! -x "$tool_specified"; then
44243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44244$as_echo "not found" >&6; }
44245            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44246          fi
44247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44248$as_echo "$tool_specified" >&6; }
44249        fi
44250      fi
44251    fi
44252
44253  fi
44254
44255
44256  if test "x$OBJDUMP" != x; then
44257    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44258    # bails if argument is missing.
44259
44260  # Only process if variable expands to non-empty
44261
44262  if test "x$OBJDUMP" != x; then
44263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44264
44265  # First separate the path from the arguments. This will split at the first
44266  # space.
44267  complete="$OBJDUMP"
44268  path="${complete%% *}"
44269  tmp="$complete EOL"
44270  arguments="${tmp#* }"
44271
44272  # Input might be given as Windows format, start by converting to
44273  # unix format.
44274  new_path=`$CYGPATH -u "$path"`
44275
44276  # Now try to locate executable using which
44277  new_path=`$WHICH "$new_path" 2> /dev/null`
44278  # bat and cmd files are not always considered executable in cygwin causing which
44279  # to not find them
44280  if test "x$new_path" = x \
44281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44283    new_path=`$CYGPATH -u "$path"`
44284  fi
44285  if test "x$new_path" = x; then
44286    # Oops. Which didn't find the executable.
44287    # The splitting of arguments from the executable at a space might have been incorrect,
44288    # since paths with space are more likely in Windows. Give it another try with the whole
44289    # argument.
44290    path="$complete"
44291    arguments="EOL"
44292    new_path=`$CYGPATH -u "$path"`
44293    new_path=`$WHICH "$new_path" 2> /dev/null`
44294    # bat and cmd files are not always considered executable in cygwin causing which
44295    # to not find them
44296    if test "x$new_path" = x \
44297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44299      new_path=`$CYGPATH -u "$path"`
44300    fi
44301    if test "x$new_path" = x; then
44302      # It's still not found. Now this is an unrecoverable error.
44303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44304$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44305      has_space=`$ECHO "$complete" | $GREP " "`
44306      if test "x$has_space" != x; then
44307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44309      fi
44310      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44311    fi
44312  fi
44313
44314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44317  # "foo.exe" is OK but "foo" is an error.
44318  #
44319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44320  # It is also a way to make sure we got the proper file name for the real test later on.
44321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44322  if test "x$test_shortpath" = x; then
44323    # Short path failed, file does not exist as specified.
44324    # Try adding .exe or .cmd
44325    if test -f "${new_path}.exe"; then
44326      input_to_shortpath="${new_path}.exe"
44327    elif test -f "${new_path}.cmd"; then
44328      input_to_shortpath="${new_path}.cmd"
44329    else
44330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44331$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44334      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44335    fi
44336  else
44337    input_to_shortpath="$new_path"
44338  fi
44339
44340  # Call helper function which possibly converts this using DOS-style short mode.
44341  # If so, the updated path is stored in $new_path.
44342  new_path="$input_to_shortpath"
44343
44344  input_path="$input_to_shortpath"
44345  # Check if we need to convert this using DOS-style short mode. If the path
44346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44347  # take no chances and rewrite it.
44348  # Note: m4 eats our [], so we need to use [ and ] instead.
44349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44350  if test "x$has_forbidden_chars" != x; then
44351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44355      # Going to short mode and back again did indeed matter. Since short mode is
44356      # case insensitive, let's make it lowercase to improve readability.
44357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44358      # Now convert it back to Unix-style (cygpath)
44359      input_path=`$CYGPATH -u "$shortmode_path"`
44360      new_path="$input_path"
44361    fi
44362  fi
44363
44364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44365  if test "x$test_cygdrive_prefix" = x; then
44366    # As a simple fix, exclude /usr/bin since it's not a real path.
44367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44369      # a path prefixed by /cygdrive for fixpath to work.
44370      new_path="$CYGWIN_ROOT_PATH$input_path"
44371    fi
44372  fi
44373
44374  # remove trailing .exe if any
44375  new_path="${new_path/%.exe/}"
44376
44377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378
44379  # First separate the path from the arguments. This will split at the first
44380  # space.
44381  complete="$OBJDUMP"
44382  path="${complete%% *}"
44383  tmp="$complete EOL"
44384  arguments="${tmp#* }"
44385
44386  # Input might be given as Windows format, start by converting to
44387  # unix format.
44388  new_path="$path"
44389
44390  windows_path="$new_path"
44391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44392    unix_path=`$CYGPATH -u "$windows_path"`
44393    new_path="$unix_path"
44394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44396    new_path="$unix_path"
44397  fi
44398
44399
44400  # Now try to locate executable using which
44401  new_path=`$WHICH "$new_path" 2> /dev/null`
44402
44403  if test "x$new_path" = x; then
44404    # Oops. Which didn't find the executable.
44405    # The splitting of arguments from the executable at a space might have been incorrect,
44406    # since paths with space are more likely in Windows. Give it another try with the whole
44407    # argument.
44408    path="$complete"
44409    arguments="EOL"
44410    new_path="$path"
44411
44412  windows_path="$new_path"
44413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44414    unix_path=`$CYGPATH -u "$windows_path"`
44415    new_path="$unix_path"
44416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44418    new_path="$unix_path"
44419  fi
44420
44421
44422    new_path=`$WHICH "$new_path" 2> /dev/null`
44423    # bat and cmd files are not always considered executable in MSYS causing which
44424    # to not find them
44425    if test "x$new_path" = x \
44426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44428      new_path="$path"
44429
44430  windows_path="$new_path"
44431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44432    unix_path=`$CYGPATH -u "$windows_path"`
44433    new_path="$unix_path"
44434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44436    new_path="$unix_path"
44437  fi
44438
44439    fi
44440
44441    if test "x$new_path" = x; then
44442      # It's still not found. Now this is an unrecoverable error.
44443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44444$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44445      has_space=`$ECHO "$complete" | $GREP " "`
44446      if test "x$has_space" != x; then
44447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44449      fi
44450      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44451    fi
44452  fi
44453
44454  # Now new_path has a complete unix path to the binary
44455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44456    # Keep paths in /bin as-is, but remove trailing .exe if any
44457    new_path="${new_path/%.exe/}"
44458    # Do not save /bin paths to all_fixpath_prefixes!
44459  else
44460    # Not in mixed or Windows style, start by that.
44461    new_path=`cmd //c echo $new_path`
44462
44463  input_path="$new_path"
44464  # Check if we need to convert this using DOS-style short mode. If the path
44465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44466  # take no chances and rewrite it.
44467  # Note: m4 eats our [], so we need to use [ and ] instead.
44468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44469  if test "x$has_forbidden_chars" != x; then
44470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44472  fi
44473
44474    # Output is in $new_path
44475
44476  windows_path="$new_path"
44477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44478    unix_path=`$CYGPATH -u "$windows_path"`
44479    new_path="$unix_path"
44480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44482    new_path="$unix_path"
44483  fi
44484
44485    # remove trailing .exe if any
44486    new_path="${new_path/%.exe/}"
44487
44488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44490  fi
44491
44492    else
44493      # We're on a unix platform. Hooray! :)
44494      # First separate the path from the arguments. This will split at the first
44495      # space.
44496      complete="$OBJDUMP"
44497      path="${complete%% *}"
44498      tmp="$complete EOL"
44499      arguments="${tmp#* }"
44500
44501      # Cannot rely on the command "which" here since it doesn't always work.
44502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44503      if test -z "$is_absolute_path"; then
44504        # Path to executable is not absolute. Find it.
44505        IFS_save="$IFS"
44506        IFS=:
44507        for p in $PATH; do
44508          if test -f "$p/$path" && test -x "$p/$path"; then
44509            new_path="$p/$path"
44510            break
44511          fi
44512        done
44513        IFS="$IFS_save"
44514      else
44515        # This is an absolute path, we can use it without further modifications.
44516        new_path="$path"
44517      fi
44518
44519      if test "x$new_path" = x; then
44520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44521$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44522        has_space=`$ECHO "$complete" | $GREP " "`
44523        if test "x$has_space" != x; then
44524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44526        fi
44527        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44528      fi
44529    fi
44530
44531    # Now join together the path and the arguments once again
44532    if test "x$arguments" != xEOL; then
44533      new_complete="$new_path ${arguments% *}"
44534    else
44535      new_complete="$new_path"
44536    fi
44537
44538    if test "x$complete" != "x$new_complete"; then
44539      OBJDUMP="$new_complete"
44540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44541$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44542    fi
44543  fi
44544
44545  fi
44546
44547
44548  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44549  # to remain in place. Otherwise the compiler will not work in some siutations
44550  # in later configure checks.
44551  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44552    PATH="$OLD_PATH"
44553  fi
44554
44555  # Restore the flags to the user specified values.
44556  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44557  CFLAGS="$ORG_CFLAGS"
44558  CXXFLAGS="$ORG_CXXFLAGS"
44559
44560
44561# Finally do some processing after the detection phase
44562
44563  if test "x$COMPILE_TYPE" = "xcross"; then
44564    # Now we need to find a C/C++ compiler that can build executables for the
44565    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44566    # used once. Also, we need to do this without adding a tools dir to the
44567    # path, otherwise we might pick up cross-compilers which don't use standard
44568    # naming.
44569
44570    OLDPATH="$PATH"
44571
44572
44573# Check whether --with-build-devkit was given.
44574if test "${with_build_devkit+set}" = set; then :
44575  withval=$with_build_devkit;
44576fi
44577
44578    if test "x$with_build_devkit" = "xyes"; then
44579      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44580    elif test -n "$with_build_devkit"; then
44581      if test ! -d "$with_build_devkit"; then
44582        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44583      else
44584
44585  # Only process if variable expands to non-empty
44586
44587  if test "x$with_build_devkit" != x; then
44588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44589
44590  # Input might be given as Windows format, start by converting to
44591  # unix format.
44592  path="$with_build_devkit"
44593  new_path=`$CYGPATH -u "$path"`
44594
44595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44598  # "foo.exe" is OK but "foo" is an error.
44599  #
44600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44601  # It is also a way to make sure we got the proper file name for the real test later on.
44602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44603  if test "x$test_shortpath" = x; then
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44605$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44606    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44607  fi
44608
44609  # Call helper function which possibly converts this using DOS-style short mode.
44610  # If so, the updated path is stored in $new_path.
44611
44612  input_path="$new_path"
44613  # Check if we need to convert this using DOS-style short mode. If the path
44614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44615  # take no chances and rewrite it.
44616  # Note: m4 eats our [], so we need to use [ and ] instead.
44617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44618  if test "x$has_forbidden_chars" != x; then
44619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44623      # Going to short mode and back again did indeed matter. Since short mode is
44624      # case insensitive, let's make it lowercase to improve readability.
44625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44626      # Now convert it back to Unix-style (cygpath)
44627      input_path=`$CYGPATH -u "$shortmode_path"`
44628      new_path="$input_path"
44629    fi
44630  fi
44631
44632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44633  if test "x$test_cygdrive_prefix" = x; then
44634    # As a simple fix, exclude /usr/bin since it's not a real path.
44635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44637      # a path prefixed by /cygdrive for fixpath to work.
44638      new_path="$CYGWIN_ROOT_PATH$input_path"
44639    fi
44640  fi
44641
44642
44643  if test "x$path" != "x$new_path"; then
44644    with_build_devkit="$new_path"
44645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44646$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44647  fi
44648
44649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650
44651  path="$with_build_devkit"
44652  has_colon=`$ECHO $path | $GREP ^.:`
44653  new_path="$path"
44654  if test "x$has_colon" = x; then
44655    # Not in mixed or Windows style, start by that.
44656    new_path=`cmd //c echo $path`
44657  fi
44658
44659
44660  input_path="$new_path"
44661  # Check if we need to convert this using DOS-style short mode. If the path
44662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44663  # take no chances and rewrite it.
44664  # Note: m4 eats our [], so we need to use [ and ] instead.
44665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44666  if test "x$has_forbidden_chars" != x; then
44667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44669  fi
44670
44671
44672  windows_path="$new_path"
44673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44674    unix_path=`$CYGPATH -u "$windows_path"`
44675    new_path="$unix_path"
44676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44678    new_path="$unix_path"
44679  fi
44680
44681  if test "x$path" != "x$new_path"; then
44682    with_build_devkit="$new_path"
44683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44684$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44685  fi
44686
44687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44689
44690    else
44691      # We're on a unix platform. Hooray! :)
44692      path="$with_build_devkit"
44693      has_space=`$ECHO "$path" | $GREP " "`
44694      if test "x$has_space" != x; then
44695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44696$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44698      fi
44699
44700      # Use eval to expand a potential ~
44701      eval path="$path"
44702      if test ! -f "$path" && test ! -d "$path"; then
44703        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44704      fi
44705
44706      if test -d "$path"; then
44707        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44708      else
44709        dir="`$DIRNAME "$path"`"
44710        base="`$BASENAME "$path"`"
44711        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44712      fi
44713    fi
44714  fi
44715
44716        BUILD_DEVKIT_ROOT="$with_build_devkit"
44717        # Check for a meta data info file in the root of the devkit
44718        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44719          # Process devkit.info so that existing devkit variables are not
44720          # modified by this
44721          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44722              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44723              -e "s/\$host/\$build/g" \
44724              $BUILD_DEVKIT_ROOT/devkit.info \
44725              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44726          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44727          # This potentially sets the following:
44728          # A descriptive name of the devkit
44729
44730  if test "x$BUILD_DEVKIT_NAME" = x; then
44731    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44732  fi
44733
44734          # Corresponds to --with-extra-path
44735
44736  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44737    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44738  fi
44739
44740          # Corresponds to --with-toolchain-path
44741
44742  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44743    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44744  fi
44745
44746          # Corresponds to --with-sysroot
44747
44748  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44749    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44750  fi
44751
44752          # Skip the Window specific parts
44753        fi
44754
44755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44756$as_echo_n "checking for build platform devkit... " >&6; }
44757        if test "x$BUILD_DEVKIT_NAME" != x; then
44758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44759$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44760        else
44761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44762$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44763        fi
44764
44765        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44766
44767  if test "x$BUILD_SYSROOT" != "x"; then
44768    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44769      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44770        # Solaris Studio does not have a concept of sysroot. Instead we must
44771        # make sure the default include and lib dirs are appended to each
44772        # compile and link command line. Must also add -I-xbuiltin to enable
44773        # inlining of system functions and intrinsics.
44774        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44775        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44776            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44777      fi
44778    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44779      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44780      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44781    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44782      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44783      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44784    fi
44785    # The global CFLAGS and LDFLAGS variables need these for configure to function
44786    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44787    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44788    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44789    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44790  fi
44791
44792  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44793    # We also need -iframework<path>/System/Library/Frameworks
44794    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44795    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44796    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44797    # set this here so it doesn't have to be peppered throughout the forest
44798    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44799    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44800  fi
44801
44802
44803
44804
44805
44806         # Fallback default of just /bin if DEVKIT_PATH is not defined
44807        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44808          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44809        fi
44810        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44811      fi
44812    fi
44813
44814    # FIXME: we should list the discovered compilers as an exclude pattern!
44815    # If we do that, we can do this detection before POST_DETECTION, and still
44816    # find the build compilers in the tools dir, if needed.
44817
44818
44819
44820  # Publish this variable in the help.
44821
44822
44823  if [ -z "${BUILD_CC+x}" ]; then
44824    # The variable is not set by user, try to locate tool using the code snippet
44825    for ac_prog in cl cc gcc
44826do
44827  # Extract the first word of "$ac_prog", so it can be a program name with args.
44828set dummy $ac_prog; ac_word=$2
44829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44830$as_echo_n "checking for $ac_word... " >&6; }
44831if ${ac_cv_path_BUILD_CC+:} false; then :
44832  $as_echo_n "(cached) " >&6
44833else
44834  case $BUILD_CC in
44835  [\\/]* | ?:[\\/]*)
44836  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44837  ;;
44838  *)
44839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44840for as_dir in $PATH
44841do
44842  IFS=$as_save_IFS
44843  test -z "$as_dir" && as_dir=.
44844    for ac_exec_ext in '' $ac_executable_extensions; do
44845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44846    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44848    break 2
44849  fi
44850done
44851  done
44852IFS=$as_save_IFS
44853
44854  ;;
44855esac
44856fi
44857BUILD_CC=$ac_cv_path_BUILD_CC
44858if test -n "$BUILD_CC"; then
44859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44860$as_echo "$BUILD_CC" >&6; }
44861else
44862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44863$as_echo "no" >&6; }
44864fi
44865
44866
44867  test -n "$BUILD_CC" && break
44868done
44869
44870  else
44871    # The variable is set, but is it from the command line or the environment?
44872
44873    # Try to remove the string !BUILD_CC! from our list.
44874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44876      # If it failed, the variable was not from the command line. Ignore it,
44877      # but warn the user (except for BASH, which is always set by the calling BASH).
44878      if test "xBUILD_CC" != xBASH; then
44879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44880$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44881      fi
44882      # Try to locate tool using the code snippet
44883      for ac_prog in cl cc gcc
44884do
44885  # Extract the first word of "$ac_prog", so it can be a program name with args.
44886set dummy $ac_prog; ac_word=$2
44887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44888$as_echo_n "checking for $ac_word... " >&6; }
44889if ${ac_cv_path_BUILD_CC+:} false; then :
44890  $as_echo_n "(cached) " >&6
44891else
44892  case $BUILD_CC in
44893  [\\/]* | ?:[\\/]*)
44894  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44895  ;;
44896  *)
44897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44898for as_dir in $PATH
44899do
44900  IFS=$as_save_IFS
44901  test -z "$as_dir" && as_dir=.
44902    for ac_exec_ext in '' $ac_executable_extensions; do
44903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44904    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44906    break 2
44907  fi
44908done
44909  done
44910IFS=$as_save_IFS
44911
44912  ;;
44913esac
44914fi
44915BUILD_CC=$ac_cv_path_BUILD_CC
44916if test -n "$BUILD_CC"; then
44917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44918$as_echo "$BUILD_CC" >&6; }
44919else
44920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44921$as_echo "no" >&6; }
44922fi
44923
44924
44925  test -n "$BUILD_CC" && break
44926done
44927
44928    else
44929      # If it succeeded, then it was overridden by the user. We will use it
44930      # for the tool.
44931
44932      # First remove it from the list of overridden variables, so we can test
44933      # for unknown variables in the end.
44934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44935
44936      # Check if we try to supply an empty value
44937      if test "x$BUILD_CC" = x; then
44938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44939$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44941$as_echo_n "checking for BUILD_CC... " >&6; }
44942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44943$as_echo "disabled" >&6; }
44944      else
44945        # Check if the provided tool contains a complete path.
44946        tool_specified="$BUILD_CC"
44947        tool_basename="${tool_specified##*/}"
44948        if test "x$tool_basename" = "x$tool_specified"; then
44949          # A command without a complete path is provided, search $PATH.
44950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44951$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44952          # Extract the first word of "$tool_basename", so it can be a program name with args.
44953set dummy $tool_basename; ac_word=$2
44954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44955$as_echo_n "checking for $ac_word... " >&6; }
44956if ${ac_cv_path_BUILD_CC+:} false; then :
44957  $as_echo_n "(cached) " >&6
44958else
44959  case $BUILD_CC in
44960  [\\/]* | ?:[\\/]*)
44961  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44962  ;;
44963  *)
44964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44965for as_dir in $PATH
44966do
44967  IFS=$as_save_IFS
44968  test -z "$as_dir" && as_dir=.
44969    for ac_exec_ext in '' $ac_executable_extensions; do
44970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44971    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44973    break 2
44974  fi
44975done
44976  done
44977IFS=$as_save_IFS
44978
44979  ;;
44980esac
44981fi
44982BUILD_CC=$ac_cv_path_BUILD_CC
44983if test -n "$BUILD_CC"; then
44984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44985$as_echo "$BUILD_CC" >&6; }
44986else
44987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44988$as_echo "no" >&6; }
44989fi
44990
44991
44992          if test "x$BUILD_CC" = x; then
44993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44994          fi
44995        else
44996          # Otherwise we believe it is a complete path. Use it as it is.
44997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44998$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45000$as_echo_n "checking for BUILD_CC... " >&6; }
45001          if test ! -x "$tool_specified"; then
45002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45003$as_echo "not found" >&6; }
45004            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45005          fi
45006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45007$as_echo "$tool_specified" >&6; }
45008        fi
45009      fi
45010    fi
45011
45012  fi
45013
45014
45015
45016  if test "x$BUILD_CC" = x; then
45017    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45018  fi
45019
45020
45021
45022  # Only process if variable expands to non-empty
45023
45024  if test "x$BUILD_CC" != x; then
45025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45026
45027  # First separate the path from the arguments. This will split at the first
45028  # space.
45029  complete="$BUILD_CC"
45030  path="${complete%% *}"
45031  tmp="$complete EOL"
45032  arguments="${tmp#* }"
45033
45034  # Input might be given as Windows format, start by converting to
45035  # unix format.
45036  new_path=`$CYGPATH -u "$path"`
45037
45038  # Now try to locate executable using which
45039  new_path=`$WHICH "$new_path" 2> /dev/null`
45040  # bat and cmd files are not always considered executable in cygwin causing which
45041  # to not find them
45042  if test "x$new_path" = x \
45043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45045    new_path=`$CYGPATH -u "$path"`
45046  fi
45047  if test "x$new_path" = x; then
45048    # Oops. Which didn't find the executable.
45049    # The splitting of arguments from the executable at a space might have been incorrect,
45050    # since paths with space are more likely in Windows. Give it another try with the whole
45051    # argument.
45052    path="$complete"
45053    arguments="EOL"
45054    new_path=`$CYGPATH -u "$path"`
45055    new_path=`$WHICH "$new_path" 2> /dev/null`
45056    # bat and cmd files are not always considered executable in cygwin causing which
45057    # to not find them
45058    if test "x$new_path" = x \
45059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45061      new_path=`$CYGPATH -u "$path"`
45062    fi
45063    if test "x$new_path" = x; then
45064      # It's still not found. Now this is an unrecoverable error.
45065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45066$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45067      has_space=`$ECHO "$complete" | $GREP " "`
45068      if test "x$has_space" != x; then
45069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45071      fi
45072      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45073    fi
45074  fi
45075
45076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45079  # "foo.exe" is OK but "foo" is an error.
45080  #
45081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45082  # It is also a way to make sure we got the proper file name for the real test later on.
45083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45084  if test "x$test_shortpath" = x; then
45085    # Short path failed, file does not exist as specified.
45086    # Try adding .exe or .cmd
45087    if test -f "${new_path}.exe"; then
45088      input_to_shortpath="${new_path}.exe"
45089    elif test -f "${new_path}.cmd"; then
45090      input_to_shortpath="${new_path}.cmd"
45091    else
45092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45093$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45096      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45097    fi
45098  else
45099    input_to_shortpath="$new_path"
45100  fi
45101
45102  # Call helper function which possibly converts this using DOS-style short mode.
45103  # If so, the updated path is stored in $new_path.
45104  new_path="$input_to_shortpath"
45105
45106  input_path="$input_to_shortpath"
45107  # Check if we need to convert this using DOS-style short mode. If the path
45108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45109  # take no chances and rewrite it.
45110  # Note: m4 eats our [], so we need to use [ and ] instead.
45111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45112  if test "x$has_forbidden_chars" != x; then
45113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45117      # Going to short mode and back again did indeed matter. Since short mode is
45118      # case insensitive, let's make it lowercase to improve readability.
45119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45120      # Now convert it back to Unix-style (cygpath)
45121      input_path=`$CYGPATH -u "$shortmode_path"`
45122      new_path="$input_path"
45123    fi
45124  fi
45125
45126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45127  if test "x$test_cygdrive_prefix" = x; then
45128    # As a simple fix, exclude /usr/bin since it's not a real path.
45129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45131      # a path prefixed by /cygdrive for fixpath to work.
45132      new_path="$CYGWIN_ROOT_PATH$input_path"
45133    fi
45134  fi
45135
45136  # remove trailing .exe if any
45137  new_path="${new_path/%.exe/}"
45138
45139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45140
45141  # First separate the path from the arguments. This will split at the first
45142  # space.
45143  complete="$BUILD_CC"
45144  path="${complete%% *}"
45145  tmp="$complete EOL"
45146  arguments="${tmp#* }"
45147
45148  # Input might be given as Windows format, start by converting to
45149  # unix format.
45150  new_path="$path"
45151
45152  windows_path="$new_path"
45153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45154    unix_path=`$CYGPATH -u "$windows_path"`
45155    new_path="$unix_path"
45156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45158    new_path="$unix_path"
45159  fi
45160
45161
45162  # Now try to locate executable using which
45163  new_path=`$WHICH "$new_path" 2> /dev/null`
45164
45165  if test "x$new_path" = x; then
45166    # Oops. Which didn't find the executable.
45167    # The splitting of arguments from the executable at a space might have been incorrect,
45168    # since paths with space are more likely in Windows. Give it another try with the whole
45169    # argument.
45170    path="$complete"
45171    arguments="EOL"
45172    new_path="$path"
45173
45174  windows_path="$new_path"
45175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45176    unix_path=`$CYGPATH -u "$windows_path"`
45177    new_path="$unix_path"
45178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45180    new_path="$unix_path"
45181  fi
45182
45183
45184    new_path=`$WHICH "$new_path" 2> /dev/null`
45185    # bat and cmd files are not always considered executable in MSYS causing which
45186    # to not find them
45187    if test "x$new_path" = x \
45188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45190      new_path="$path"
45191
45192  windows_path="$new_path"
45193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45194    unix_path=`$CYGPATH -u "$windows_path"`
45195    new_path="$unix_path"
45196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45198    new_path="$unix_path"
45199  fi
45200
45201    fi
45202
45203    if test "x$new_path" = x; then
45204      # It's still not found. Now this is an unrecoverable error.
45205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45206$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45207      has_space=`$ECHO "$complete" | $GREP " "`
45208      if test "x$has_space" != x; then
45209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45211      fi
45212      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45213    fi
45214  fi
45215
45216  # Now new_path has a complete unix path to the binary
45217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45218    # Keep paths in /bin as-is, but remove trailing .exe if any
45219    new_path="${new_path/%.exe/}"
45220    # Do not save /bin paths to all_fixpath_prefixes!
45221  else
45222    # Not in mixed or Windows style, start by that.
45223    new_path=`cmd //c echo $new_path`
45224
45225  input_path="$new_path"
45226  # Check if we need to convert this using DOS-style short mode. If the path
45227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45228  # take no chances and rewrite it.
45229  # Note: m4 eats our [], so we need to use [ and ] instead.
45230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45231  if test "x$has_forbidden_chars" != x; then
45232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45234  fi
45235
45236    # Output is in $new_path
45237
45238  windows_path="$new_path"
45239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45240    unix_path=`$CYGPATH -u "$windows_path"`
45241    new_path="$unix_path"
45242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45244    new_path="$unix_path"
45245  fi
45246
45247    # remove trailing .exe if any
45248    new_path="${new_path/%.exe/}"
45249
45250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45252  fi
45253
45254    else
45255      # We're on a unix platform. Hooray! :)
45256      # First separate the path from the arguments. This will split at the first
45257      # space.
45258      complete="$BUILD_CC"
45259      path="${complete%% *}"
45260      tmp="$complete EOL"
45261      arguments="${tmp#* }"
45262
45263      # Cannot rely on the command "which" here since it doesn't always work.
45264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45265      if test -z "$is_absolute_path"; then
45266        # Path to executable is not absolute. Find it.
45267        IFS_save="$IFS"
45268        IFS=:
45269        for p in $PATH; do
45270          if test -f "$p/$path" && test -x "$p/$path"; then
45271            new_path="$p/$path"
45272            break
45273          fi
45274        done
45275        IFS="$IFS_save"
45276      else
45277        # This is an absolute path, we can use it without further modifications.
45278        new_path="$path"
45279      fi
45280
45281      if test "x$new_path" = x; then
45282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45283$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45284        has_space=`$ECHO "$complete" | $GREP " "`
45285        if test "x$has_space" != x; then
45286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45288        fi
45289        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45290      fi
45291    fi
45292
45293    # Now join together the path and the arguments once again
45294    if test "x$arguments" != xEOL; then
45295      new_complete="$new_path ${arguments% *}"
45296    else
45297      new_complete="$new_path"
45298    fi
45299
45300    if test "x$complete" != "x$new_complete"; then
45301      BUILD_CC="$new_complete"
45302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45303$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45304    fi
45305  fi
45306
45307
45308
45309
45310  # Publish this variable in the help.
45311
45312
45313  if [ -z "${BUILD_CXX+x}" ]; then
45314    # The variable is not set by user, try to locate tool using the code snippet
45315    for ac_prog in cl CC g++
45316do
45317  # Extract the first word of "$ac_prog", so it can be a program name with args.
45318set dummy $ac_prog; ac_word=$2
45319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45320$as_echo_n "checking for $ac_word... " >&6; }
45321if ${ac_cv_path_BUILD_CXX+:} false; then :
45322  $as_echo_n "(cached) " >&6
45323else
45324  case $BUILD_CXX in
45325  [\\/]* | ?:[\\/]*)
45326  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45327  ;;
45328  *)
45329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45330for as_dir in $PATH
45331do
45332  IFS=$as_save_IFS
45333  test -z "$as_dir" && as_dir=.
45334    for ac_exec_ext in '' $ac_executable_extensions; do
45335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45336    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45338    break 2
45339  fi
45340done
45341  done
45342IFS=$as_save_IFS
45343
45344  ;;
45345esac
45346fi
45347BUILD_CXX=$ac_cv_path_BUILD_CXX
45348if test -n "$BUILD_CXX"; then
45349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45350$as_echo "$BUILD_CXX" >&6; }
45351else
45352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45353$as_echo "no" >&6; }
45354fi
45355
45356
45357  test -n "$BUILD_CXX" && break
45358done
45359
45360  else
45361    # The variable is set, but is it from the command line or the environment?
45362
45363    # Try to remove the string !BUILD_CXX! from our list.
45364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45366      # If it failed, the variable was not from the command line. Ignore it,
45367      # but warn the user (except for BASH, which is always set by the calling BASH).
45368      if test "xBUILD_CXX" != xBASH; then
45369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45370$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45371      fi
45372      # Try to locate tool using the code snippet
45373      for ac_prog in cl CC g++
45374do
45375  # Extract the first word of "$ac_prog", so it can be a program name with args.
45376set dummy $ac_prog; ac_word=$2
45377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45378$as_echo_n "checking for $ac_word... " >&6; }
45379if ${ac_cv_path_BUILD_CXX+:} false; then :
45380  $as_echo_n "(cached) " >&6
45381else
45382  case $BUILD_CXX in
45383  [\\/]* | ?:[\\/]*)
45384  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45385  ;;
45386  *)
45387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45388for as_dir in $PATH
45389do
45390  IFS=$as_save_IFS
45391  test -z "$as_dir" && as_dir=.
45392    for ac_exec_ext in '' $ac_executable_extensions; do
45393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45394    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45396    break 2
45397  fi
45398done
45399  done
45400IFS=$as_save_IFS
45401
45402  ;;
45403esac
45404fi
45405BUILD_CXX=$ac_cv_path_BUILD_CXX
45406if test -n "$BUILD_CXX"; then
45407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45408$as_echo "$BUILD_CXX" >&6; }
45409else
45410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45411$as_echo "no" >&6; }
45412fi
45413
45414
45415  test -n "$BUILD_CXX" && break
45416done
45417
45418    else
45419      # If it succeeded, then it was overridden by the user. We will use it
45420      # for the tool.
45421
45422      # First remove it from the list of overridden variables, so we can test
45423      # for unknown variables in the end.
45424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45425
45426      # Check if we try to supply an empty value
45427      if test "x$BUILD_CXX" = x; then
45428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45429$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45431$as_echo_n "checking for BUILD_CXX... " >&6; }
45432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45433$as_echo "disabled" >&6; }
45434      else
45435        # Check if the provided tool contains a complete path.
45436        tool_specified="$BUILD_CXX"
45437        tool_basename="${tool_specified##*/}"
45438        if test "x$tool_basename" = "x$tool_specified"; then
45439          # A command without a complete path is provided, search $PATH.
45440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45441$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45442          # Extract the first word of "$tool_basename", so it can be a program name with args.
45443set dummy $tool_basename; ac_word=$2
45444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45445$as_echo_n "checking for $ac_word... " >&6; }
45446if ${ac_cv_path_BUILD_CXX+:} false; then :
45447  $as_echo_n "(cached) " >&6
45448else
45449  case $BUILD_CXX in
45450  [\\/]* | ?:[\\/]*)
45451  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45452  ;;
45453  *)
45454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45455for as_dir in $PATH
45456do
45457  IFS=$as_save_IFS
45458  test -z "$as_dir" && as_dir=.
45459    for ac_exec_ext in '' $ac_executable_extensions; do
45460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45461    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45463    break 2
45464  fi
45465done
45466  done
45467IFS=$as_save_IFS
45468
45469  ;;
45470esac
45471fi
45472BUILD_CXX=$ac_cv_path_BUILD_CXX
45473if test -n "$BUILD_CXX"; then
45474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45475$as_echo "$BUILD_CXX" >&6; }
45476else
45477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45478$as_echo "no" >&6; }
45479fi
45480
45481
45482          if test "x$BUILD_CXX" = x; then
45483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45484          fi
45485        else
45486          # Otherwise we believe it is a complete path. Use it as it is.
45487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45488$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45490$as_echo_n "checking for BUILD_CXX... " >&6; }
45491          if test ! -x "$tool_specified"; then
45492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45493$as_echo "not found" >&6; }
45494            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45495          fi
45496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45497$as_echo "$tool_specified" >&6; }
45498        fi
45499      fi
45500    fi
45501
45502  fi
45503
45504
45505
45506  if test "x$BUILD_CXX" = x; then
45507    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45508  fi
45509
45510
45511
45512  # Only process if variable expands to non-empty
45513
45514  if test "x$BUILD_CXX" != x; then
45515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45516
45517  # First separate the path from the arguments. This will split at the first
45518  # space.
45519  complete="$BUILD_CXX"
45520  path="${complete%% *}"
45521  tmp="$complete EOL"
45522  arguments="${tmp#* }"
45523
45524  # Input might be given as Windows format, start by converting to
45525  # unix format.
45526  new_path=`$CYGPATH -u "$path"`
45527
45528  # Now try to locate executable using which
45529  new_path=`$WHICH "$new_path" 2> /dev/null`
45530  # bat and cmd files are not always considered executable in cygwin causing which
45531  # to not find them
45532  if test "x$new_path" = x \
45533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45535    new_path=`$CYGPATH -u "$path"`
45536  fi
45537  if test "x$new_path" = x; then
45538    # Oops. Which didn't find the executable.
45539    # The splitting of arguments from the executable at a space might have been incorrect,
45540    # since paths with space are more likely in Windows. Give it another try with the whole
45541    # argument.
45542    path="$complete"
45543    arguments="EOL"
45544    new_path=`$CYGPATH -u "$path"`
45545    new_path=`$WHICH "$new_path" 2> /dev/null`
45546    # bat and cmd files are not always considered executable in cygwin causing which
45547    # to not find them
45548    if test "x$new_path" = x \
45549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45551      new_path=`$CYGPATH -u "$path"`
45552    fi
45553    if test "x$new_path" = x; then
45554      # It's still not found. Now this is an unrecoverable error.
45555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45556$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45557      has_space=`$ECHO "$complete" | $GREP " "`
45558      if test "x$has_space" != x; then
45559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45561      fi
45562      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45563    fi
45564  fi
45565
45566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45569  # "foo.exe" is OK but "foo" is an error.
45570  #
45571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45572  # It is also a way to make sure we got the proper file name for the real test later on.
45573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45574  if test "x$test_shortpath" = x; then
45575    # Short path failed, file does not exist as specified.
45576    # Try adding .exe or .cmd
45577    if test -f "${new_path}.exe"; then
45578      input_to_shortpath="${new_path}.exe"
45579    elif test -f "${new_path}.cmd"; then
45580      input_to_shortpath="${new_path}.cmd"
45581    else
45582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45583$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45586      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45587    fi
45588  else
45589    input_to_shortpath="$new_path"
45590  fi
45591
45592  # Call helper function which possibly converts this using DOS-style short mode.
45593  # If so, the updated path is stored in $new_path.
45594  new_path="$input_to_shortpath"
45595
45596  input_path="$input_to_shortpath"
45597  # Check if we need to convert this using DOS-style short mode. If the path
45598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45599  # take no chances and rewrite it.
45600  # Note: m4 eats our [], so we need to use [ and ] instead.
45601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45602  if test "x$has_forbidden_chars" != x; then
45603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45607      # Going to short mode and back again did indeed matter. Since short mode is
45608      # case insensitive, let's make it lowercase to improve readability.
45609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45610      # Now convert it back to Unix-style (cygpath)
45611      input_path=`$CYGPATH -u "$shortmode_path"`
45612      new_path="$input_path"
45613    fi
45614  fi
45615
45616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45617  if test "x$test_cygdrive_prefix" = x; then
45618    # As a simple fix, exclude /usr/bin since it's not a real path.
45619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45621      # a path prefixed by /cygdrive for fixpath to work.
45622      new_path="$CYGWIN_ROOT_PATH$input_path"
45623    fi
45624  fi
45625
45626  # remove trailing .exe if any
45627  new_path="${new_path/%.exe/}"
45628
45629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45630
45631  # First separate the path from the arguments. This will split at the first
45632  # space.
45633  complete="$BUILD_CXX"
45634  path="${complete%% *}"
45635  tmp="$complete EOL"
45636  arguments="${tmp#* }"
45637
45638  # Input might be given as Windows format, start by converting to
45639  # unix format.
45640  new_path="$path"
45641
45642  windows_path="$new_path"
45643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45644    unix_path=`$CYGPATH -u "$windows_path"`
45645    new_path="$unix_path"
45646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45648    new_path="$unix_path"
45649  fi
45650
45651
45652  # Now try to locate executable using which
45653  new_path=`$WHICH "$new_path" 2> /dev/null`
45654
45655  if test "x$new_path" = x; then
45656    # Oops. Which didn't find the executable.
45657    # The splitting of arguments from the executable at a space might have been incorrect,
45658    # since paths with space are more likely in Windows. Give it another try with the whole
45659    # argument.
45660    path="$complete"
45661    arguments="EOL"
45662    new_path="$path"
45663
45664  windows_path="$new_path"
45665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45666    unix_path=`$CYGPATH -u "$windows_path"`
45667    new_path="$unix_path"
45668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45670    new_path="$unix_path"
45671  fi
45672
45673
45674    new_path=`$WHICH "$new_path" 2> /dev/null`
45675    # bat and cmd files are not always considered executable in MSYS causing which
45676    # to not find them
45677    if test "x$new_path" = x \
45678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45680      new_path="$path"
45681
45682  windows_path="$new_path"
45683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45684    unix_path=`$CYGPATH -u "$windows_path"`
45685    new_path="$unix_path"
45686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45688    new_path="$unix_path"
45689  fi
45690
45691    fi
45692
45693    if test "x$new_path" = x; then
45694      # It's still not found. Now this is an unrecoverable error.
45695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45696$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45697      has_space=`$ECHO "$complete" | $GREP " "`
45698      if test "x$has_space" != x; then
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45701      fi
45702      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45703    fi
45704  fi
45705
45706  # Now new_path has a complete unix path to the binary
45707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45708    # Keep paths in /bin as-is, but remove trailing .exe if any
45709    new_path="${new_path/%.exe/}"
45710    # Do not save /bin paths to all_fixpath_prefixes!
45711  else
45712    # Not in mixed or Windows style, start by that.
45713    new_path=`cmd //c echo $new_path`
45714
45715  input_path="$new_path"
45716  # Check if we need to convert this using DOS-style short mode. If the path
45717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45718  # take no chances and rewrite it.
45719  # Note: m4 eats our [], so we need to use [ and ] instead.
45720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45721  if test "x$has_forbidden_chars" != x; then
45722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45724  fi
45725
45726    # Output is in $new_path
45727
45728  windows_path="$new_path"
45729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45730    unix_path=`$CYGPATH -u "$windows_path"`
45731    new_path="$unix_path"
45732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45734    new_path="$unix_path"
45735  fi
45736
45737    # remove trailing .exe if any
45738    new_path="${new_path/%.exe/}"
45739
45740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45742  fi
45743
45744    else
45745      # We're on a unix platform. Hooray! :)
45746      # First separate the path from the arguments. This will split at the first
45747      # space.
45748      complete="$BUILD_CXX"
45749      path="${complete%% *}"
45750      tmp="$complete EOL"
45751      arguments="${tmp#* }"
45752
45753      # Cannot rely on the command "which" here since it doesn't always work.
45754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45755      if test -z "$is_absolute_path"; then
45756        # Path to executable is not absolute. Find it.
45757        IFS_save="$IFS"
45758        IFS=:
45759        for p in $PATH; do
45760          if test -f "$p/$path" && test -x "$p/$path"; then
45761            new_path="$p/$path"
45762            break
45763          fi
45764        done
45765        IFS="$IFS_save"
45766      else
45767        # This is an absolute path, we can use it without further modifications.
45768        new_path="$path"
45769      fi
45770
45771      if test "x$new_path" = x; then
45772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45773$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45774        has_space=`$ECHO "$complete" | $GREP " "`
45775        if test "x$has_space" != x; then
45776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45778        fi
45779        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45780      fi
45781    fi
45782
45783    # Now join together the path and the arguments once again
45784    if test "x$arguments" != xEOL; then
45785      new_complete="$new_path ${arguments% *}"
45786    else
45787      new_complete="$new_path"
45788    fi
45789
45790    if test "x$complete" != "x$new_complete"; then
45791      BUILD_CXX="$new_complete"
45792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45793$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45794    fi
45795  fi
45796
45797
45798
45799  # Publish this variable in the help.
45800
45801
45802  if [ -z "${BUILD_NM+x}" ]; then
45803    # The variable is not set by user, try to locate tool using the code snippet
45804    for ac_prog in nm gcc-nm
45805do
45806  # Extract the first word of "$ac_prog", so it can be a program name with args.
45807set dummy $ac_prog; ac_word=$2
45808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45809$as_echo_n "checking for $ac_word... " >&6; }
45810if ${ac_cv_path_BUILD_NM+:} false; then :
45811  $as_echo_n "(cached) " >&6
45812else
45813  case $BUILD_NM in
45814  [\\/]* | ?:[\\/]*)
45815  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45816  ;;
45817  *)
45818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45819for as_dir in $PATH
45820do
45821  IFS=$as_save_IFS
45822  test -z "$as_dir" && as_dir=.
45823    for ac_exec_ext in '' $ac_executable_extensions; do
45824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45825    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45827    break 2
45828  fi
45829done
45830  done
45831IFS=$as_save_IFS
45832
45833  ;;
45834esac
45835fi
45836BUILD_NM=$ac_cv_path_BUILD_NM
45837if test -n "$BUILD_NM"; then
45838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45839$as_echo "$BUILD_NM" >&6; }
45840else
45841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45842$as_echo "no" >&6; }
45843fi
45844
45845
45846  test -n "$BUILD_NM" && break
45847done
45848
45849  else
45850    # The variable is set, but is it from the command line or the environment?
45851
45852    # Try to remove the string !BUILD_NM! from our list.
45853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45855      # If it failed, the variable was not from the command line. Ignore it,
45856      # but warn the user (except for BASH, which is always set by the calling BASH).
45857      if test "xBUILD_NM" != xBASH; then
45858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45859$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45860      fi
45861      # Try to locate tool using the code snippet
45862      for ac_prog in nm gcc-nm
45863do
45864  # Extract the first word of "$ac_prog", so it can be a program name with args.
45865set dummy $ac_prog; ac_word=$2
45866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45867$as_echo_n "checking for $ac_word... " >&6; }
45868if ${ac_cv_path_BUILD_NM+:} false; then :
45869  $as_echo_n "(cached) " >&6
45870else
45871  case $BUILD_NM in
45872  [\\/]* | ?:[\\/]*)
45873  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45874  ;;
45875  *)
45876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45877for as_dir in $PATH
45878do
45879  IFS=$as_save_IFS
45880  test -z "$as_dir" && as_dir=.
45881    for ac_exec_ext in '' $ac_executable_extensions; do
45882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45883    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45885    break 2
45886  fi
45887done
45888  done
45889IFS=$as_save_IFS
45890
45891  ;;
45892esac
45893fi
45894BUILD_NM=$ac_cv_path_BUILD_NM
45895if test -n "$BUILD_NM"; then
45896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45897$as_echo "$BUILD_NM" >&6; }
45898else
45899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45900$as_echo "no" >&6; }
45901fi
45902
45903
45904  test -n "$BUILD_NM" && break
45905done
45906
45907    else
45908      # If it succeeded, then it was overridden by the user. We will use it
45909      # for the tool.
45910
45911      # First remove it from the list of overridden variables, so we can test
45912      # for unknown variables in the end.
45913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45914
45915      # Check if we try to supply an empty value
45916      if test "x$BUILD_NM" = x; then
45917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45918$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45920$as_echo_n "checking for BUILD_NM... " >&6; }
45921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45922$as_echo "disabled" >&6; }
45923      else
45924        # Check if the provided tool contains a complete path.
45925        tool_specified="$BUILD_NM"
45926        tool_basename="${tool_specified##*/}"
45927        if test "x$tool_basename" = "x$tool_specified"; then
45928          # A command without a complete path is provided, search $PATH.
45929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45930$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45931          # Extract the first word of "$tool_basename", so it can be a program name with args.
45932set dummy $tool_basename; ac_word=$2
45933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45934$as_echo_n "checking for $ac_word... " >&6; }
45935if ${ac_cv_path_BUILD_NM+:} false; then :
45936  $as_echo_n "(cached) " >&6
45937else
45938  case $BUILD_NM in
45939  [\\/]* | ?:[\\/]*)
45940  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45941  ;;
45942  *)
45943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45944for as_dir in $PATH
45945do
45946  IFS=$as_save_IFS
45947  test -z "$as_dir" && as_dir=.
45948    for ac_exec_ext in '' $ac_executable_extensions; do
45949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45950    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45952    break 2
45953  fi
45954done
45955  done
45956IFS=$as_save_IFS
45957
45958  ;;
45959esac
45960fi
45961BUILD_NM=$ac_cv_path_BUILD_NM
45962if test -n "$BUILD_NM"; then
45963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45964$as_echo "$BUILD_NM" >&6; }
45965else
45966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45967$as_echo "no" >&6; }
45968fi
45969
45970
45971          if test "x$BUILD_NM" = x; then
45972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45973          fi
45974        else
45975          # Otherwise we believe it is a complete path. Use it as it is.
45976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45977$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45979$as_echo_n "checking for BUILD_NM... " >&6; }
45980          if test ! -x "$tool_specified"; then
45981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45982$as_echo "not found" >&6; }
45983            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45984          fi
45985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45986$as_echo "$tool_specified" >&6; }
45987        fi
45988      fi
45989    fi
45990
45991  fi
45992
45993
45994
45995  # Only process if variable expands to non-empty
45996
45997  if test "x$BUILD_NM" != x; then
45998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45999
46000  # First separate the path from the arguments. This will split at the first
46001  # space.
46002  complete="$BUILD_NM"
46003  path="${complete%% *}"
46004  tmp="$complete EOL"
46005  arguments="${tmp#* }"
46006
46007  # Input might be given as Windows format, start by converting to
46008  # unix format.
46009  new_path=`$CYGPATH -u "$path"`
46010
46011  # Now try to locate executable using which
46012  new_path=`$WHICH "$new_path" 2> /dev/null`
46013  # bat and cmd files are not always considered executable in cygwin causing which
46014  # to not find them
46015  if test "x$new_path" = x \
46016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46018    new_path=`$CYGPATH -u "$path"`
46019  fi
46020  if test "x$new_path" = x; then
46021    # Oops. Which didn't find the executable.
46022    # The splitting of arguments from the executable at a space might have been incorrect,
46023    # since paths with space are more likely in Windows. Give it another try with the whole
46024    # argument.
46025    path="$complete"
46026    arguments="EOL"
46027    new_path=`$CYGPATH -u "$path"`
46028    new_path=`$WHICH "$new_path" 2> /dev/null`
46029    # bat and cmd files are not always considered executable in cygwin causing which
46030    # to not find them
46031    if test "x$new_path" = x \
46032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46034      new_path=`$CYGPATH -u "$path"`
46035    fi
46036    if test "x$new_path" = x; then
46037      # It's still not found. Now this is an unrecoverable error.
46038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46039$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46040      has_space=`$ECHO "$complete" | $GREP " "`
46041      if test "x$has_space" != x; then
46042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46044      fi
46045      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46046    fi
46047  fi
46048
46049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46052  # "foo.exe" is OK but "foo" is an error.
46053  #
46054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46055  # It is also a way to make sure we got the proper file name for the real test later on.
46056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46057  if test "x$test_shortpath" = x; then
46058    # Short path failed, file does not exist as specified.
46059    # Try adding .exe or .cmd
46060    if test -f "${new_path}.exe"; then
46061      input_to_shortpath="${new_path}.exe"
46062    elif test -f "${new_path}.cmd"; then
46063      input_to_shortpath="${new_path}.cmd"
46064    else
46065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46066$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46069      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46070    fi
46071  else
46072    input_to_shortpath="$new_path"
46073  fi
46074
46075  # Call helper function which possibly converts this using DOS-style short mode.
46076  # If so, the updated path is stored in $new_path.
46077  new_path="$input_to_shortpath"
46078
46079  input_path="$input_to_shortpath"
46080  # Check if we need to convert this using DOS-style short mode. If the path
46081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46082  # take no chances and rewrite it.
46083  # Note: m4 eats our [], so we need to use [ and ] instead.
46084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46085  if test "x$has_forbidden_chars" != x; then
46086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46090      # Going to short mode and back again did indeed matter. Since short mode is
46091      # case insensitive, let's make it lowercase to improve readability.
46092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46093      # Now convert it back to Unix-style (cygpath)
46094      input_path=`$CYGPATH -u "$shortmode_path"`
46095      new_path="$input_path"
46096    fi
46097  fi
46098
46099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46100  if test "x$test_cygdrive_prefix" = x; then
46101    # As a simple fix, exclude /usr/bin since it's not a real path.
46102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46104      # a path prefixed by /cygdrive for fixpath to work.
46105      new_path="$CYGWIN_ROOT_PATH$input_path"
46106    fi
46107  fi
46108
46109  # remove trailing .exe if any
46110  new_path="${new_path/%.exe/}"
46111
46112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46113
46114  # First separate the path from the arguments. This will split at the first
46115  # space.
46116  complete="$BUILD_NM"
46117  path="${complete%% *}"
46118  tmp="$complete EOL"
46119  arguments="${tmp#* }"
46120
46121  # Input might be given as Windows format, start by converting to
46122  # unix format.
46123  new_path="$path"
46124
46125  windows_path="$new_path"
46126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46127    unix_path=`$CYGPATH -u "$windows_path"`
46128    new_path="$unix_path"
46129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46131    new_path="$unix_path"
46132  fi
46133
46134
46135  # Now try to locate executable using which
46136  new_path=`$WHICH "$new_path" 2> /dev/null`
46137
46138  if test "x$new_path" = x; then
46139    # Oops. Which didn't find the executable.
46140    # The splitting of arguments from the executable at a space might have been incorrect,
46141    # since paths with space are more likely in Windows. Give it another try with the whole
46142    # argument.
46143    path="$complete"
46144    arguments="EOL"
46145    new_path="$path"
46146
46147  windows_path="$new_path"
46148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46149    unix_path=`$CYGPATH -u "$windows_path"`
46150    new_path="$unix_path"
46151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46153    new_path="$unix_path"
46154  fi
46155
46156
46157    new_path=`$WHICH "$new_path" 2> /dev/null`
46158    # bat and cmd files are not always considered executable in MSYS causing which
46159    # to not find them
46160    if test "x$new_path" = x \
46161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46163      new_path="$path"
46164
46165  windows_path="$new_path"
46166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46167    unix_path=`$CYGPATH -u "$windows_path"`
46168    new_path="$unix_path"
46169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46171    new_path="$unix_path"
46172  fi
46173
46174    fi
46175
46176    if test "x$new_path" = x; then
46177      # It's still not found. Now this is an unrecoverable error.
46178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46179$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46180      has_space=`$ECHO "$complete" | $GREP " "`
46181      if test "x$has_space" != x; then
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46184      fi
46185      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46186    fi
46187  fi
46188
46189  # Now new_path has a complete unix path to the binary
46190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46191    # Keep paths in /bin as-is, but remove trailing .exe if any
46192    new_path="${new_path/%.exe/}"
46193    # Do not save /bin paths to all_fixpath_prefixes!
46194  else
46195    # Not in mixed or Windows style, start by that.
46196    new_path=`cmd //c echo $new_path`
46197
46198  input_path="$new_path"
46199  # Check if we need to convert this using DOS-style short mode. If the path
46200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46201  # take no chances and rewrite it.
46202  # Note: m4 eats our [], so we need to use [ and ] instead.
46203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46204  if test "x$has_forbidden_chars" != x; then
46205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46207  fi
46208
46209    # Output is in $new_path
46210
46211  windows_path="$new_path"
46212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46213    unix_path=`$CYGPATH -u "$windows_path"`
46214    new_path="$unix_path"
46215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46217    new_path="$unix_path"
46218  fi
46219
46220    # remove trailing .exe if any
46221    new_path="${new_path/%.exe/}"
46222
46223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46225  fi
46226
46227    else
46228      # We're on a unix platform. Hooray! :)
46229      # First separate the path from the arguments. This will split at the first
46230      # space.
46231      complete="$BUILD_NM"
46232      path="${complete%% *}"
46233      tmp="$complete EOL"
46234      arguments="${tmp#* }"
46235
46236      # Cannot rely on the command "which" here since it doesn't always work.
46237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46238      if test -z "$is_absolute_path"; then
46239        # Path to executable is not absolute. Find it.
46240        IFS_save="$IFS"
46241        IFS=:
46242        for p in $PATH; do
46243          if test -f "$p/$path" && test -x "$p/$path"; then
46244            new_path="$p/$path"
46245            break
46246          fi
46247        done
46248        IFS="$IFS_save"
46249      else
46250        # This is an absolute path, we can use it without further modifications.
46251        new_path="$path"
46252      fi
46253
46254      if test "x$new_path" = x; then
46255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46256$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46257        has_space=`$ECHO "$complete" | $GREP " "`
46258        if test "x$has_space" != x; then
46259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46261        fi
46262        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46263      fi
46264    fi
46265
46266    # Now join together the path and the arguments once again
46267    if test "x$arguments" != xEOL; then
46268      new_complete="$new_path ${arguments% *}"
46269    else
46270      new_complete="$new_path"
46271    fi
46272
46273    if test "x$complete" != "x$new_complete"; then
46274      BUILD_NM="$new_complete"
46275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46276$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46277    fi
46278  fi
46279
46280
46281
46282  # Publish this variable in the help.
46283
46284
46285  if [ -z "${BUILD_AR+x}" ]; then
46286    # The variable is not set by user, try to locate tool using the code snippet
46287    for ac_prog in ar gcc-ar
46288do
46289  # Extract the first word of "$ac_prog", so it can be a program name with args.
46290set dummy $ac_prog; ac_word=$2
46291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46292$as_echo_n "checking for $ac_word... " >&6; }
46293if ${ac_cv_path_BUILD_AR+:} false; then :
46294  $as_echo_n "(cached) " >&6
46295else
46296  case $BUILD_AR in
46297  [\\/]* | ?:[\\/]*)
46298  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46299  ;;
46300  *)
46301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46302for as_dir in $PATH
46303do
46304  IFS=$as_save_IFS
46305  test -z "$as_dir" && as_dir=.
46306    for ac_exec_ext in '' $ac_executable_extensions; do
46307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46308    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46310    break 2
46311  fi
46312done
46313  done
46314IFS=$as_save_IFS
46315
46316  ;;
46317esac
46318fi
46319BUILD_AR=$ac_cv_path_BUILD_AR
46320if test -n "$BUILD_AR"; then
46321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46322$as_echo "$BUILD_AR" >&6; }
46323else
46324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46325$as_echo "no" >&6; }
46326fi
46327
46328
46329  test -n "$BUILD_AR" && break
46330done
46331
46332  else
46333    # The variable is set, but is it from the command line or the environment?
46334
46335    # Try to remove the string !BUILD_AR! from our list.
46336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46338      # If it failed, the variable was not from the command line. Ignore it,
46339      # but warn the user (except for BASH, which is always set by the calling BASH).
46340      if test "xBUILD_AR" != xBASH; then
46341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46342$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46343      fi
46344      # Try to locate tool using the code snippet
46345      for ac_prog in ar gcc-ar
46346do
46347  # Extract the first word of "$ac_prog", so it can be a program name with args.
46348set dummy $ac_prog; ac_word=$2
46349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46350$as_echo_n "checking for $ac_word... " >&6; }
46351if ${ac_cv_path_BUILD_AR+:} false; then :
46352  $as_echo_n "(cached) " >&6
46353else
46354  case $BUILD_AR in
46355  [\\/]* | ?:[\\/]*)
46356  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46357  ;;
46358  *)
46359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46360for as_dir in $PATH
46361do
46362  IFS=$as_save_IFS
46363  test -z "$as_dir" && as_dir=.
46364    for ac_exec_ext in '' $ac_executable_extensions; do
46365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46366    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46368    break 2
46369  fi
46370done
46371  done
46372IFS=$as_save_IFS
46373
46374  ;;
46375esac
46376fi
46377BUILD_AR=$ac_cv_path_BUILD_AR
46378if test -n "$BUILD_AR"; then
46379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46380$as_echo "$BUILD_AR" >&6; }
46381else
46382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46383$as_echo "no" >&6; }
46384fi
46385
46386
46387  test -n "$BUILD_AR" && break
46388done
46389
46390    else
46391      # If it succeeded, then it was overridden by the user. We will use it
46392      # for the tool.
46393
46394      # First remove it from the list of overridden variables, so we can test
46395      # for unknown variables in the end.
46396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46397
46398      # Check if we try to supply an empty value
46399      if test "x$BUILD_AR" = x; then
46400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46401$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46403$as_echo_n "checking for BUILD_AR... " >&6; }
46404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46405$as_echo "disabled" >&6; }
46406      else
46407        # Check if the provided tool contains a complete path.
46408        tool_specified="$BUILD_AR"
46409        tool_basename="${tool_specified##*/}"
46410        if test "x$tool_basename" = "x$tool_specified"; then
46411          # A command without a complete path is provided, search $PATH.
46412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46413$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46414          # Extract the first word of "$tool_basename", so it can be a program name with args.
46415set dummy $tool_basename; ac_word=$2
46416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46417$as_echo_n "checking for $ac_word... " >&6; }
46418if ${ac_cv_path_BUILD_AR+:} false; then :
46419  $as_echo_n "(cached) " >&6
46420else
46421  case $BUILD_AR in
46422  [\\/]* | ?:[\\/]*)
46423  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46424  ;;
46425  *)
46426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46427for as_dir in $PATH
46428do
46429  IFS=$as_save_IFS
46430  test -z "$as_dir" && as_dir=.
46431    for ac_exec_ext in '' $ac_executable_extensions; do
46432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46433    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46435    break 2
46436  fi
46437done
46438  done
46439IFS=$as_save_IFS
46440
46441  ;;
46442esac
46443fi
46444BUILD_AR=$ac_cv_path_BUILD_AR
46445if test -n "$BUILD_AR"; then
46446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46447$as_echo "$BUILD_AR" >&6; }
46448else
46449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46450$as_echo "no" >&6; }
46451fi
46452
46453
46454          if test "x$BUILD_AR" = x; then
46455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46456          fi
46457        else
46458          # Otherwise we believe it is a complete path. Use it as it is.
46459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46460$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46462$as_echo_n "checking for BUILD_AR... " >&6; }
46463          if test ! -x "$tool_specified"; then
46464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46465$as_echo "not found" >&6; }
46466            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46467          fi
46468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46469$as_echo "$tool_specified" >&6; }
46470        fi
46471      fi
46472    fi
46473
46474  fi
46475
46476
46477
46478  # Only process if variable expands to non-empty
46479
46480  if test "x$BUILD_AR" != x; then
46481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46482
46483  # First separate the path from the arguments. This will split at the first
46484  # space.
46485  complete="$BUILD_AR"
46486  path="${complete%% *}"
46487  tmp="$complete EOL"
46488  arguments="${tmp#* }"
46489
46490  # Input might be given as Windows format, start by converting to
46491  # unix format.
46492  new_path=`$CYGPATH -u "$path"`
46493
46494  # Now try to locate executable using which
46495  new_path=`$WHICH "$new_path" 2> /dev/null`
46496  # bat and cmd files are not always considered executable in cygwin causing which
46497  # to not find them
46498  if test "x$new_path" = x \
46499      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46500      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46501    new_path=`$CYGPATH -u "$path"`
46502  fi
46503  if test "x$new_path" = x; then
46504    # Oops. Which didn't find the executable.
46505    # The splitting of arguments from the executable at a space might have been incorrect,
46506    # since paths with space are more likely in Windows. Give it another try with the whole
46507    # argument.
46508    path="$complete"
46509    arguments="EOL"
46510    new_path=`$CYGPATH -u "$path"`
46511    new_path=`$WHICH "$new_path" 2> /dev/null`
46512    # bat and cmd files are not always considered executable in cygwin causing which
46513    # to not find them
46514    if test "x$new_path" = x \
46515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46517      new_path=`$CYGPATH -u "$path"`
46518    fi
46519    if test "x$new_path" = x; then
46520      # It's still not found. Now this is an unrecoverable error.
46521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46522$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46523      has_space=`$ECHO "$complete" | $GREP " "`
46524      if test "x$has_space" != x; then
46525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46527      fi
46528      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46529    fi
46530  fi
46531
46532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46535  # "foo.exe" is OK but "foo" is an error.
46536  #
46537  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46538  # It is also a way to make sure we got the proper file name for the real test later on.
46539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46540  if test "x$test_shortpath" = x; then
46541    # Short path failed, file does not exist as specified.
46542    # Try adding .exe or .cmd
46543    if test -f "${new_path}.exe"; then
46544      input_to_shortpath="${new_path}.exe"
46545    elif test -f "${new_path}.cmd"; then
46546      input_to_shortpath="${new_path}.cmd"
46547    else
46548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46549$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46550      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46551$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46552      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46553    fi
46554  else
46555    input_to_shortpath="$new_path"
46556  fi
46557
46558  # Call helper function which possibly converts this using DOS-style short mode.
46559  # If so, the updated path is stored in $new_path.
46560  new_path="$input_to_shortpath"
46561
46562  input_path="$input_to_shortpath"
46563  # Check if we need to convert this using DOS-style short mode. If the path
46564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46565  # take no chances and rewrite it.
46566  # Note: m4 eats our [], so we need to use [ and ] instead.
46567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46568  if test "x$has_forbidden_chars" != x; then
46569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46573      # Going to short mode and back again did indeed matter. Since short mode is
46574      # case insensitive, let's make it lowercase to improve readability.
46575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46576      # Now convert it back to Unix-style (cygpath)
46577      input_path=`$CYGPATH -u "$shortmode_path"`
46578      new_path="$input_path"
46579    fi
46580  fi
46581
46582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46583  if test "x$test_cygdrive_prefix" = x; then
46584    # As a simple fix, exclude /usr/bin since it's not a real path.
46585    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46587      # a path prefixed by /cygdrive for fixpath to work.
46588      new_path="$CYGWIN_ROOT_PATH$input_path"
46589    fi
46590  fi
46591
46592  # remove trailing .exe if any
46593  new_path="${new_path/%.exe/}"
46594
46595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46596
46597  # First separate the path from the arguments. This will split at the first
46598  # space.
46599  complete="$BUILD_AR"
46600  path="${complete%% *}"
46601  tmp="$complete EOL"
46602  arguments="${tmp#* }"
46603
46604  # Input might be given as Windows format, start by converting to
46605  # unix format.
46606  new_path="$path"
46607
46608  windows_path="$new_path"
46609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46610    unix_path=`$CYGPATH -u "$windows_path"`
46611    new_path="$unix_path"
46612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46614    new_path="$unix_path"
46615  fi
46616
46617
46618  # Now try to locate executable using which
46619  new_path=`$WHICH "$new_path" 2> /dev/null`
46620
46621  if test "x$new_path" = x; then
46622    # Oops. Which didn't find the executable.
46623    # The splitting of arguments from the executable at a space might have been incorrect,
46624    # since paths with space are more likely in Windows. Give it another try with the whole
46625    # argument.
46626    path="$complete"
46627    arguments="EOL"
46628    new_path="$path"
46629
46630  windows_path="$new_path"
46631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46632    unix_path=`$CYGPATH -u "$windows_path"`
46633    new_path="$unix_path"
46634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46636    new_path="$unix_path"
46637  fi
46638
46639
46640    new_path=`$WHICH "$new_path" 2> /dev/null`
46641    # bat and cmd files are not always considered executable in MSYS causing which
46642    # to not find them
46643    if test "x$new_path" = x \
46644        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46645        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46646      new_path="$path"
46647
46648  windows_path="$new_path"
46649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46650    unix_path=`$CYGPATH -u "$windows_path"`
46651    new_path="$unix_path"
46652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46654    new_path="$unix_path"
46655  fi
46656
46657    fi
46658
46659    if test "x$new_path" = x; then
46660      # It's still not found. Now this is an unrecoverable error.
46661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46662$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46663      has_space=`$ECHO "$complete" | $GREP " "`
46664      if test "x$has_space" != x; then
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46667      fi
46668      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46669    fi
46670  fi
46671
46672  # Now new_path has a complete unix path to the binary
46673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46674    # Keep paths in /bin as-is, but remove trailing .exe if any
46675    new_path="${new_path/%.exe/}"
46676    # Do not save /bin paths to all_fixpath_prefixes!
46677  else
46678    # Not in mixed or Windows style, start by that.
46679    new_path=`cmd //c echo $new_path`
46680
46681  input_path="$new_path"
46682  # Check if we need to convert this using DOS-style short mode. If the path
46683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46684  # take no chances and rewrite it.
46685  # Note: m4 eats our [], so we need to use [ and ] instead.
46686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46687  if test "x$has_forbidden_chars" != x; then
46688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46690  fi
46691
46692    # Output is in $new_path
46693
46694  windows_path="$new_path"
46695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46696    unix_path=`$CYGPATH -u "$windows_path"`
46697    new_path="$unix_path"
46698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46700    new_path="$unix_path"
46701  fi
46702
46703    # remove trailing .exe if any
46704    new_path="${new_path/%.exe/}"
46705
46706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46708  fi
46709
46710    else
46711      # We're on a unix platform. Hooray! :)
46712      # First separate the path from the arguments. This will split at the first
46713      # space.
46714      complete="$BUILD_AR"
46715      path="${complete%% *}"
46716      tmp="$complete EOL"
46717      arguments="${tmp#* }"
46718
46719      # Cannot rely on the command "which" here since it doesn't always work.
46720      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46721      if test -z "$is_absolute_path"; then
46722        # Path to executable is not absolute. Find it.
46723        IFS_save="$IFS"
46724        IFS=:
46725        for p in $PATH; do
46726          if test -f "$p/$path" && test -x "$p/$path"; then
46727            new_path="$p/$path"
46728            break
46729          fi
46730        done
46731        IFS="$IFS_save"
46732      else
46733        # This is an absolute path, we can use it without further modifications.
46734        new_path="$path"
46735      fi
46736
46737      if test "x$new_path" = x; then
46738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46739$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46740        has_space=`$ECHO "$complete" | $GREP " "`
46741        if test "x$has_space" != x; then
46742          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46743$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46744        fi
46745        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46746      fi
46747    fi
46748
46749    # Now join together the path and the arguments once again
46750    if test "x$arguments" != xEOL; then
46751      new_complete="$new_path ${arguments% *}"
46752    else
46753      new_complete="$new_path"
46754    fi
46755
46756    if test "x$complete" != "x$new_complete"; then
46757      BUILD_AR="$new_complete"
46758      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46759$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46760    fi
46761  fi
46762
46763
46764
46765  # Publish this variable in the help.
46766
46767
46768  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46769    # The variable is not set by user, try to locate tool using the code snippet
46770    for ac_prog in objcopy
46771do
46772  # Extract the first word of "$ac_prog", so it can be a program name with args.
46773set dummy $ac_prog; ac_word=$2
46774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46775$as_echo_n "checking for $ac_word... " >&6; }
46776if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46777  $as_echo_n "(cached) " >&6
46778else
46779  case $BUILD_OBJCOPY in
46780  [\\/]* | ?:[\\/]*)
46781  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46782  ;;
46783  *)
46784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46785for as_dir in $PATH
46786do
46787  IFS=$as_save_IFS
46788  test -z "$as_dir" && as_dir=.
46789    for ac_exec_ext in '' $ac_executable_extensions; do
46790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46791    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46793    break 2
46794  fi
46795done
46796  done
46797IFS=$as_save_IFS
46798
46799  ;;
46800esac
46801fi
46802BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46803if test -n "$BUILD_OBJCOPY"; then
46804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46805$as_echo "$BUILD_OBJCOPY" >&6; }
46806else
46807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46808$as_echo "no" >&6; }
46809fi
46810
46811
46812  test -n "$BUILD_OBJCOPY" && break
46813done
46814
46815  else
46816    # The variable is set, but is it from the command line or the environment?
46817
46818    # Try to remove the string !BUILD_OBJCOPY! from our list.
46819    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46820    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46821      # If it failed, the variable was not from the command line. Ignore it,
46822      # but warn the user (except for BASH, which is always set by the calling BASH).
46823      if test "xBUILD_OBJCOPY" != xBASH; then
46824        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46825$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46826      fi
46827      # Try to locate tool using the code snippet
46828      for ac_prog in objcopy
46829do
46830  # Extract the first word of "$ac_prog", so it can be a program name with args.
46831set dummy $ac_prog; ac_word=$2
46832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46833$as_echo_n "checking for $ac_word... " >&6; }
46834if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46835  $as_echo_n "(cached) " >&6
46836else
46837  case $BUILD_OBJCOPY in
46838  [\\/]* | ?:[\\/]*)
46839  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46840  ;;
46841  *)
46842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46843for as_dir in $PATH
46844do
46845  IFS=$as_save_IFS
46846  test -z "$as_dir" && as_dir=.
46847    for ac_exec_ext in '' $ac_executable_extensions; do
46848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46849    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46851    break 2
46852  fi
46853done
46854  done
46855IFS=$as_save_IFS
46856
46857  ;;
46858esac
46859fi
46860BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46861if test -n "$BUILD_OBJCOPY"; then
46862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46863$as_echo "$BUILD_OBJCOPY" >&6; }
46864else
46865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46866$as_echo "no" >&6; }
46867fi
46868
46869
46870  test -n "$BUILD_OBJCOPY" && break
46871done
46872
46873    else
46874      # If it succeeded, then it was overridden by the user. We will use it
46875      # for the tool.
46876
46877      # First remove it from the list of overridden variables, so we can test
46878      # for unknown variables in the end.
46879      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46880
46881      # Check if we try to supply an empty value
46882      if test "x$BUILD_OBJCOPY" = x; then
46883        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46884$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46886$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46888$as_echo "disabled" >&6; }
46889      else
46890        # Check if the provided tool contains a complete path.
46891        tool_specified="$BUILD_OBJCOPY"
46892        tool_basename="${tool_specified##*/}"
46893        if test "x$tool_basename" = "x$tool_specified"; then
46894          # A command without a complete path is provided, search $PATH.
46895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46896$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46897          # Extract the first word of "$tool_basename", so it can be a program name with args.
46898set dummy $tool_basename; ac_word=$2
46899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46900$as_echo_n "checking for $ac_word... " >&6; }
46901if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46902  $as_echo_n "(cached) " >&6
46903else
46904  case $BUILD_OBJCOPY in
46905  [\\/]* | ?:[\\/]*)
46906  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46907  ;;
46908  *)
46909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46910for as_dir in $PATH
46911do
46912  IFS=$as_save_IFS
46913  test -z "$as_dir" && as_dir=.
46914    for ac_exec_ext in '' $ac_executable_extensions; do
46915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46916    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46918    break 2
46919  fi
46920done
46921  done
46922IFS=$as_save_IFS
46923
46924  ;;
46925esac
46926fi
46927BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46928if test -n "$BUILD_OBJCOPY"; then
46929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46930$as_echo "$BUILD_OBJCOPY" >&6; }
46931else
46932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46933$as_echo "no" >&6; }
46934fi
46935
46936
46937          if test "x$BUILD_OBJCOPY" = x; then
46938            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46939          fi
46940        else
46941          # Otherwise we believe it is a complete path. Use it as it is.
46942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46943$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46944          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46945$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46946          if test ! -x "$tool_specified"; then
46947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46948$as_echo "not found" >&6; }
46949            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46950          fi
46951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46952$as_echo "$tool_specified" >&6; }
46953        fi
46954      fi
46955    fi
46956
46957  fi
46958
46959
46960
46961  # Only process if variable expands to non-empty
46962
46963  if test "x$BUILD_OBJCOPY" != x; then
46964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46965
46966  # First separate the path from the arguments. This will split at the first
46967  # space.
46968  complete="$BUILD_OBJCOPY"
46969  path="${complete%% *}"
46970  tmp="$complete EOL"
46971  arguments="${tmp#* }"
46972
46973  # Input might be given as Windows format, start by converting to
46974  # unix format.
46975  new_path=`$CYGPATH -u "$path"`
46976
46977  # Now try to locate executable using which
46978  new_path=`$WHICH "$new_path" 2> /dev/null`
46979  # bat and cmd files are not always considered executable in cygwin causing which
46980  # to not find them
46981  if test "x$new_path" = x \
46982      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46983      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46984    new_path=`$CYGPATH -u "$path"`
46985  fi
46986  if test "x$new_path" = x; then
46987    # Oops. Which didn't find the executable.
46988    # The splitting of arguments from the executable at a space might have been incorrect,
46989    # since paths with space are more likely in Windows. Give it another try with the whole
46990    # argument.
46991    path="$complete"
46992    arguments="EOL"
46993    new_path=`$CYGPATH -u "$path"`
46994    new_path=`$WHICH "$new_path" 2> /dev/null`
46995    # bat and cmd files are not always considered executable in cygwin causing which
46996    # to not find them
46997    if test "x$new_path" = x \
46998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47000      new_path=`$CYGPATH -u "$path"`
47001    fi
47002    if test "x$new_path" = x; then
47003      # It's still not found. Now this is an unrecoverable error.
47004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47005$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47006      has_space=`$ECHO "$complete" | $GREP " "`
47007      if test "x$has_space" != x; then
47008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47010      fi
47011      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47012    fi
47013  fi
47014
47015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47018  # "foo.exe" is OK but "foo" is an error.
47019  #
47020  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47021  # It is also a way to make sure we got the proper file name for the real test later on.
47022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47023  if test "x$test_shortpath" = x; then
47024    # Short path failed, file does not exist as specified.
47025    # Try adding .exe or .cmd
47026    if test -f "${new_path}.exe"; then
47027      input_to_shortpath="${new_path}.exe"
47028    elif test -f "${new_path}.cmd"; then
47029      input_to_shortpath="${new_path}.cmd"
47030    else
47031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47032$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47033      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47034$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47035      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47036    fi
47037  else
47038    input_to_shortpath="$new_path"
47039  fi
47040
47041  # Call helper function which possibly converts this using DOS-style short mode.
47042  # If so, the updated path is stored in $new_path.
47043  new_path="$input_to_shortpath"
47044
47045  input_path="$input_to_shortpath"
47046  # Check if we need to convert this using DOS-style short mode. If the path
47047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47048  # take no chances and rewrite it.
47049  # Note: m4 eats our [], so we need to use [ and ] instead.
47050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47051  if test "x$has_forbidden_chars" != x; then
47052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47056      # Going to short mode and back again did indeed matter. Since short mode is
47057      # case insensitive, let's make it lowercase to improve readability.
47058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47059      # Now convert it back to Unix-style (cygpath)
47060      input_path=`$CYGPATH -u "$shortmode_path"`
47061      new_path="$input_path"
47062    fi
47063  fi
47064
47065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47066  if test "x$test_cygdrive_prefix" = x; then
47067    # As a simple fix, exclude /usr/bin since it's not a real path.
47068    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47070      # a path prefixed by /cygdrive for fixpath to work.
47071      new_path="$CYGWIN_ROOT_PATH$input_path"
47072    fi
47073  fi
47074
47075  # remove trailing .exe if any
47076  new_path="${new_path/%.exe/}"
47077
47078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47079
47080  # First separate the path from the arguments. This will split at the first
47081  # space.
47082  complete="$BUILD_OBJCOPY"
47083  path="${complete%% *}"
47084  tmp="$complete EOL"
47085  arguments="${tmp#* }"
47086
47087  # Input might be given as Windows format, start by converting to
47088  # unix format.
47089  new_path="$path"
47090
47091  windows_path="$new_path"
47092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47093    unix_path=`$CYGPATH -u "$windows_path"`
47094    new_path="$unix_path"
47095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47097    new_path="$unix_path"
47098  fi
47099
47100
47101  # Now try to locate executable using which
47102  new_path=`$WHICH "$new_path" 2> /dev/null`
47103
47104  if test "x$new_path" = x; then
47105    # Oops. Which didn't find the executable.
47106    # The splitting of arguments from the executable at a space might have been incorrect,
47107    # since paths with space are more likely in Windows. Give it another try with the whole
47108    # argument.
47109    path="$complete"
47110    arguments="EOL"
47111    new_path="$path"
47112
47113  windows_path="$new_path"
47114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47115    unix_path=`$CYGPATH -u "$windows_path"`
47116    new_path="$unix_path"
47117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47119    new_path="$unix_path"
47120  fi
47121
47122
47123    new_path=`$WHICH "$new_path" 2> /dev/null`
47124    # bat and cmd files are not always considered executable in MSYS causing which
47125    # to not find them
47126    if test "x$new_path" = x \
47127        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47128        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47129      new_path="$path"
47130
47131  windows_path="$new_path"
47132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47133    unix_path=`$CYGPATH -u "$windows_path"`
47134    new_path="$unix_path"
47135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47137    new_path="$unix_path"
47138  fi
47139
47140    fi
47141
47142    if test "x$new_path" = x; then
47143      # It's still not found. Now this is an unrecoverable error.
47144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47145$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47146      has_space=`$ECHO "$complete" | $GREP " "`
47147      if test "x$has_space" != x; then
47148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47150      fi
47151      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47152    fi
47153  fi
47154
47155  # Now new_path has a complete unix path to the binary
47156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47157    # Keep paths in /bin as-is, but remove trailing .exe if any
47158    new_path="${new_path/%.exe/}"
47159    # Do not save /bin paths to all_fixpath_prefixes!
47160  else
47161    # Not in mixed or Windows style, start by that.
47162    new_path=`cmd //c echo $new_path`
47163
47164  input_path="$new_path"
47165  # Check if we need to convert this using DOS-style short mode. If the path
47166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47167  # take no chances and rewrite it.
47168  # Note: m4 eats our [], so we need to use [ and ] instead.
47169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47170  if test "x$has_forbidden_chars" != x; then
47171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47173  fi
47174
47175    # Output is in $new_path
47176
47177  windows_path="$new_path"
47178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47179    unix_path=`$CYGPATH -u "$windows_path"`
47180    new_path="$unix_path"
47181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47183    new_path="$unix_path"
47184  fi
47185
47186    # remove trailing .exe if any
47187    new_path="${new_path/%.exe/}"
47188
47189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47191  fi
47192
47193    else
47194      # We're on a unix platform. Hooray! :)
47195      # First separate the path from the arguments. This will split at the first
47196      # space.
47197      complete="$BUILD_OBJCOPY"
47198      path="${complete%% *}"
47199      tmp="$complete EOL"
47200      arguments="${tmp#* }"
47201
47202      # Cannot rely on the command "which" here since it doesn't always work.
47203      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47204      if test -z "$is_absolute_path"; then
47205        # Path to executable is not absolute. Find it.
47206        IFS_save="$IFS"
47207        IFS=:
47208        for p in $PATH; do
47209          if test -f "$p/$path" && test -x "$p/$path"; then
47210            new_path="$p/$path"
47211            break
47212          fi
47213        done
47214        IFS="$IFS_save"
47215      else
47216        # This is an absolute path, we can use it without further modifications.
47217        new_path="$path"
47218      fi
47219
47220      if test "x$new_path" = x; then
47221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47222$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47223        has_space=`$ECHO "$complete" | $GREP " "`
47224        if test "x$has_space" != x; then
47225          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47226$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47227        fi
47228        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47229      fi
47230    fi
47231
47232    # Now join together the path and the arguments once again
47233    if test "x$arguments" != xEOL; then
47234      new_complete="$new_path ${arguments% *}"
47235    else
47236      new_complete="$new_path"
47237    fi
47238
47239    if test "x$complete" != "x$new_complete"; then
47240      BUILD_OBJCOPY="$new_complete"
47241      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47242$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47243    fi
47244  fi
47245
47246
47247
47248  # Publish this variable in the help.
47249
47250
47251  if [ -z "${BUILD_STRIP+x}" ]; then
47252    # The variable is not set by user, try to locate tool using the code snippet
47253    for ac_prog in strip
47254do
47255  # Extract the first word of "$ac_prog", so it can be a program name with args.
47256set dummy $ac_prog; ac_word=$2
47257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47258$as_echo_n "checking for $ac_word... " >&6; }
47259if ${ac_cv_path_BUILD_STRIP+:} false; then :
47260  $as_echo_n "(cached) " >&6
47261else
47262  case $BUILD_STRIP in
47263  [\\/]* | ?:[\\/]*)
47264  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47265  ;;
47266  *)
47267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47268for as_dir in $PATH
47269do
47270  IFS=$as_save_IFS
47271  test -z "$as_dir" && as_dir=.
47272    for ac_exec_ext in '' $ac_executable_extensions; do
47273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47274    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47276    break 2
47277  fi
47278done
47279  done
47280IFS=$as_save_IFS
47281
47282  ;;
47283esac
47284fi
47285BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47286if test -n "$BUILD_STRIP"; then
47287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47288$as_echo "$BUILD_STRIP" >&6; }
47289else
47290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47291$as_echo "no" >&6; }
47292fi
47293
47294
47295  test -n "$BUILD_STRIP" && break
47296done
47297
47298  else
47299    # The variable is set, but is it from the command line or the environment?
47300
47301    # Try to remove the string !BUILD_STRIP! from our list.
47302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47304      # If it failed, the variable was not from the command line. Ignore it,
47305      # but warn the user (except for BASH, which is always set by the calling BASH).
47306      if test "xBUILD_STRIP" != xBASH; then
47307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47308$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47309      fi
47310      # Try to locate tool using the code snippet
47311      for ac_prog in strip
47312do
47313  # Extract the first word of "$ac_prog", so it can be a program name with args.
47314set dummy $ac_prog; ac_word=$2
47315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47316$as_echo_n "checking for $ac_word... " >&6; }
47317if ${ac_cv_path_BUILD_STRIP+:} false; then :
47318  $as_echo_n "(cached) " >&6
47319else
47320  case $BUILD_STRIP in
47321  [\\/]* | ?:[\\/]*)
47322  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47323  ;;
47324  *)
47325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47326for as_dir in $PATH
47327do
47328  IFS=$as_save_IFS
47329  test -z "$as_dir" && as_dir=.
47330    for ac_exec_ext in '' $ac_executable_extensions; do
47331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47332    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47334    break 2
47335  fi
47336done
47337  done
47338IFS=$as_save_IFS
47339
47340  ;;
47341esac
47342fi
47343BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47344if test -n "$BUILD_STRIP"; then
47345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47346$as_echo "$BUILD_STRIP" >&6; }
47347else
47348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47349$as_echo "no" >&6; }
47350fi
47351
47352
47353  test -n "$BUILD_STRIP" && break
47354done
47355
47356    else
47357      # If it succeeded, then it was overridden by the user. We will use it
47358      # for the tool.
47359
47360      # First remove it from the list of overridden variables, so we can test
47361      # for unknown variables in the end.
47362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47363
47364      # Check if we try to supply an empty value
47365      if test "x$BUILD_STRIP" = x; then
47366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47367$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47369$as_echo_n "checking for BUILD_STRIP... " >&6; }
47370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47371$as_echo "disabled" >&6; }
47372      else
47373        # Check if the provided tool contains a complete path.
47374        tool_specified="$BUILD_STRIP"
47375        tool_basename="${tool_specified##*/}"
47376        if test "x$tool_basename" = "x$tool_specified"; then
47377          # A command without a complete path is provided, search $PATH.
47378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47379$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47380          # Extract the first word of "$tool_basename", so it can be a program name with args.
47381set dummy $tool_basename; ac_word=$2
47382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47383$as_echo_n "checking for $ac_word... " >&6; }
47384if ${ac_cv_path_BUILD_STRIP+:} false; then :
47385  $as_echo_n "(cached) " >&6
47386else
47387  case $BUILD_STRIP in
47388  [\\/]* | ?:[\\/]*)
47389  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47390  ;;
47391  *)
47392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47393for as_dir in $PATH
47394do
47395  IFS=$as_save_IFS
47396  test -z "$as_dir" && as_dir=.
47397    for ac_exec_ext in '' $ac_executable_extensions; do
47398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47399    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47401    break 2
47402  fi
47403done
47404  done
47405IFS=$as_save_IFS
47406
47407  ;;
47408esac
47409fi
47410BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47411if test -n "$BUILD_STRIP"; then
47412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47413$as_echo "$BUILD_STRIP" >&6; }
47414else
47415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47416$as_echo "no" >&6; }
47417fi
47418
47419
47420          if test "x$BUILD_STRIP" = x; then
47421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47422          fi
47423        else
47424          # Otherwise we believe it is a complete path. Use it as it is.
47425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47426$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47428$as_echo_n "checking for BUILD_STRIP... " >&6; }
47429          if test ! -x "$tool_specified"; then
47430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47431$as_echo "not found" >&6; }
47432            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47433          fi
47434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47435$as_echo "$tool_specified" >&6; }
47436        fi
47437      fi
47438    fi
47439
47440  fi
47441
47442
47443
47444  # Only process if variable expands to non-empty
47445
47446  if test "x$BUILD_STRIP" != x; then
47447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47448
47449  # First separate the path from the arguments. This will split at the first
47450  # space.
47451  complete="$BUILD_STRIP"
47452  path="${complete%% *}"
47453  tmp="$complete EOL"
47454  arguments="${tmp#* }"
47455
47456  # Input might be given as Windows format, start by converting to
47457  # unix format.
47458  new_path=`$CYGPATH -u "$path"`
47459
47460  # Now try to locate executable using which
47461  new_path=`$WHICH "$new_path" 2> /dev/null`
47462  # bat and cmd files are not always considered executable in cygwin causing which
47463  # to not find them
47464  if test "x$new_path" = x \
47465      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47466      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47467    new_path=`$CYGPATH -u "$path"`
47468  fi
47469  if test "x$new_path" = x; then
47470    # Oops. Which didn't find the executable.
47471    # The splitting of arguments from the executable at a space might have been incorrect,
47472    # since paths with space are more likely in Windows. Give it another try with the whole
47473    # argument.
47474    path="$complete"
47475    arguments="EOL"
47476    new_path=`$CYGPATH -u "$path"`
47477    new_path=`$WHICH "$new_path" 2> /dev/null`
47478    # bat and cmd files are not always considered executable in cygwin causing which
47479    # to not find them
47480    if test "x$new_path" = x \
47481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47483      new_path=`$CYGPATH -u "$path"`
47484    fi
47485    if test "x$new_path" = x; then
47486      # It's still not found. Now this is an unrecoverable error.
47487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47488$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47489      has_space=`$ECHO "$complete" | $GREP " "`
47490      if test "x$has_space" != x; then
47491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47493      fi
47494      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47495    fi
47496  fi
47497
47498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47501  # "foo.exe" is OK but "foo" is an error.
47502  #
47503  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47504  # It is also a way to make sure we got the proper file name for the real test later on.
47505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47506  if test "x$test_shortpath" = x; then
47507    # Short path failed, file does not exist as specified.
47508    # Try adding .exe or .cmd
47509    if test -f "${new_path}.exe"; then
47510      input_to_shortpath="${new_path}.exe"
47511    elif test -f "${new_path}.cmd"; then
47512      input_to_shortpath="${new_path}.cmd"
47513    else
47514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47515$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47516      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47517$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47518      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47519    fi
47520  else
47521    input_to_shortpath="$new_path"
47522  fi
47523
47524  # Call helper function which possibly converts this using DOS-style short mode.
47525  # If so, the updated path is stored in $new_path.
47526  new_path="$input_to_shortpath"
47527
47528  input_path="$input_to_shortpath"
47529  # Check if we need to convert this using DOS-style short mode. If the path
47530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47531  # take no chances and rewrite it.
47532  # Note: m4 eats our [], so we need to use [ and ] instead.
47533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47534  if test "x$has_forbidden_chars" != x; then
47535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47539      # Going to short mode and back again did indeed matter. Since short mode is
47540      # case insensitive, let's make it lowercase to improve readability.
47541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47542      # Now convert it back to Unix-style (cygpath)
47543      input_path=`$CYGPATH -u "$shortmode_path"`
47544      new_path="$input_path"
47545    fi
47546  fi
47547
47548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47549  if test "x$test_cygdrive_prefix" = x; then
47550    # As a simple fix, exclude /usr/bin since it's not a real path.
47551    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47553      # a path prefixed by /cygdrive for fixpath to work.
47554      new_path="$CYGWIN_ROOT_PATH$input_path"
47555    fi
47556  fi
47557
47558  # remove trailing .exe if any
47559  new_path="${new_path/%.exe/}"
47560
47561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47562
47563  # First separate the path from the arguments. This will split at the first
47564  # space.
47565  complete="$BUILD_STRIP"
47566  path="${complete%% *}"
47567  tmp="$complete EOL"
47568  arguments="${tmp#* }"
47569
47570  # Input might be given as Windows format, start by converting to
47571  # unix format.
47572  new_path="$path"
47573
47574  windows_path="$new_path"
47575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47576    unix_path=`$CYGPATH -u "$windows_path"`
47577    new_path="$unix_path"
47578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47580    new_path="$unix_path"
47581  fi
47582
47583
47584  # Now try to locate executable using which
47585  new_path=`$WHICH "$new_path" 2> /dev/null`
47586
47587  if test "x$new_path" = x; then
47588    # Oops. Which didn't find the executable.
47589    # The splitting of arguments from the executable at a space might have been incorrect,
47590    # since paths with space are more likely in Windows. Give it another try with the whole
47591    # argument.
47592    path="$complete"
47593    arguments="EOL"
47594    new_path="$path"
47595
47596  windows_path="$new_path"
47597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47598    unix_path=`$CYGPATH -u "$windows_path"`
47599    new_path="$unix_path"
47600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47602    new_path="$unix_path"
47603  fi
47604
47605
47606    new_path=`$WHICH "$new_path" 2> /dev/null`
47607    # bat and cmd files are not always considered executable in MSYS causing which
47608    # to not find them
47609    if test "x$new_path" = x \
47610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47612      new_path="$path"
47613
47614  windows_path="$new_path"
47615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47616    unix_path=`$CYGPATH -u "$windows_path"`
47617    new_path="$unix_path"
47618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47620    new_path="$unix_path"
47621  fi
47622
47623    fi
47624
47625    if test "x$new_path" = x; then
47626      # It's still not found. Now this is an unrecoverable error.
47627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47628$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47629      has_space=`$ECHO "$complete" | $GREP " "`
47630      if test "x$has_space" != x; then
47631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47633      fi
47634      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47635    fi
47636  fi
47637
47638  # Now new_path has a complete unix path to the binary
47639  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47640    # Keep paths in /bin as-is, but remove trailing .exe if any
47641    new_path="${new_path/%.exe/}"
47642    # Do not save /bin paths to all_fixpath_prefixes!
47643  else
47644    # Not in mixed or Windows style, start by that.
47645    new_path=`cmd //c echo $new_path`
47646
47647  input_path="$new_path"
47648  # Check if we need to convert this using DOS-style short mode. If the path
47649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47650  # take no chances and rewrite it.
47651  # Note: m4 eats our [], so we need to use [ and ] instead.
47652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47653  if test "x$has_forbidden_chars" != x; then
47654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47656  fi
47657
47658    # Output is in $new_path
47659
47660  windows_path="$new_path"
47661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47662    unix_path=`$CYGPATH -u "$windows_path"`
47663    new_path="$unix_path"
47664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47666    new_path="$unix_path"
47667  fi
47668
47669    # remove trailing .exe if any
47670    new_path="${new_path/%.exe/}"
47671
47672    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47673    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47674  fi
47675
47676    else
47677      # We're on a unix platform. Hooray! :)
47678      # First separate the path from the arguments. This will split at the first
47679      # space.
47680      complete="$BUILD_STRIP"
47681      path="${complete%% *}"
47682      tmp="$complete EOL"
47683      arguments="${tmp#* }"
47684
47685      # Cannot rely on the command "which" here since it doesn't always work.
47686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47687      if test -z "$is_absolute_path"; then
47688        # Path to executable is not absolute. Find it.
47689        IFS_save="$IFS"
47690        IFS=:
47691        for p in $PATH; do
47692          if test -f "$p/$path" && test -x "$p/$path"; then
47693            new_path="$p/$path"
47694            break
47695          fi
47696        done
47697        IFS="$IFS_save"
47698      else
47699        # This is an absolute path, we can use it without further modifications.
47700        new_path="$path"
47701      fi
47702
47703      if test "x$new_path" = x; then
47704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47705$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47706        has_space=`$ECHO "$complete" | $GREP " "`
47707        if test "x$has_space" != x; then
47708          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47709$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47710        fi
47711        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47712      fi
47713    fi
47714
47715    # Now join together the path and the arguments once again
47716    if test "x$arguments" != xEOL; then
47717      new_complete="$new_path ${arguments% *}"
47718    else
47719      new_complete="$new_path"
47720    fi
47721
47722    if test "x$complete" != "x$new_complete"; then
47723      BUILD_STRIP="$new_complete"
47724      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47725$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47726    fi
47727  fi
47728
47729    # Assume the C compiler is the assembler
47730    BUILD_AS="$BUILD_CC -c"
47731    # Just like for the target compiler, use the compiler as linker
47732    BUILD_LD="$BUILD_CC"
47733    BUILD_LDCXX="$BUILD_CXX"
47734
47735    PATH="$OLDPATH"
47736
47737
47738  COMPILER=$BUILD_CC
47739  COMPILER_NAME=BuildC
47740
47741  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47742    # cc -V output typically looks like
47743    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47744    # or
47745    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47746    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47747    # Check that this is likely to be the Solaris Studio cc.
47748    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47749    if test $? -ne 0; then
47750      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47751      { $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
47752$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47753      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47754$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47755      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47756$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47757      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47758    fi
47759    # Remove usage instructions (if present), and
47760    # collapse compiler output into a single line
47761    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47762        $SED -e 's/ *[Uu]sage:.*//'`
47763    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47764        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47765  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47766    # xlc -qversion output typically looks like
47767    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47768    #     Version: 11.01.0000.0015
47769    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47770    # Check that this is likely to be the IBM XL C compiler.
47771    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47772    if test $? -ne 0; then
47773      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47774      { $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
47775$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47776      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47777$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47778      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47779$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47780      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47781    fi
47782    # Collapse compiler output into a single line
47783    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47784    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47785        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47786  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47787    # There is no specific version flag, but all output starts with a version string.
47788    # First line typically looks something like:
47789    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47790    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47791    # Check that this is likely to be Microsoft CL.EXE.
47792    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47793    if test $? -ne 0; then
47794      { $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
47795$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47796      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47797$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47798      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47799    fi
47800    # Collapse compiler output into a single line
47801    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47802    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47803        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47804  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47805    # gcc --version output typically looks like
47806    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47807    #     Copyright (C) 2013 Free Software Foundation, Inc.
47808    #     This is free software; see the source for copying conditions.  There is NO
47809    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47810    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47811    # Check that this is likely to be GCC.
47812    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /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\"" >&5
47817$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47818      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47819    fi
47820    # Remove Copyright and legalese from version string, and
47821    # collapse into a single line
47822    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47823        $SED -e 's/ *Copyright .*//'`
47824    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47825        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47826  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47827    # clang --version output typically looks like
47828    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47829    #    clang version 3.3 (tags/RELEASE_33/final)
47830    # or
47831    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47832    #    Target: x86_64-pc-linux-gnu
47833    #    Thread model: posix
47834    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47835    # Check that this is likely to be clang
47836    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47837    if test $? -ne 0; then
47838      { $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
47839$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47840      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47841$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47842      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47843    fi
47844    # Collapse compiler output into a single line
47845    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47847        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47848  else
47849      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47850  fi
47851  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47852  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47853  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47854  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47855
47856  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47857$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47858
47859
47860  COMPILER=$BUILD_CXX
47861  COMPILER_NAME=BuildC++
47862
47863  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47864    # cc -V output typically looks like
47865    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47866    # or
47867    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47868    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47869    # Check that this is likely to be the Solaris Studio cc.
47870    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47871    if test $? -ne 0; then
47872      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47873      { $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
47874$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47875      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47876$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47877      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47878$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47879      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47880    fi
47881    # Remove usage instructions (if present), and
47882    # collapse compiler output into a single line
47883    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47884        $SED -e 's/ *[Uu]sage:.*//'`
47885    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47886        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47887  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47888    # xlc -qversion output typically looks like
47889    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47890    #     Version: 11.01.0000.0015
47891    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47892    # Check that this is likely to be the IBM XL C compiler.
47893    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47894    if test $? -ne 0; then
47895      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47896      { $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
47897$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47898      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47899$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47900      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47901$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47902      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47903    fi
47904    # Collapse compiler output into a single line
47905    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47906    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47907        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47908  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47909    # There is no specific version flag, but all output starts with a version string.
47910    # First line typically looks something like:
47911    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47912    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47913    # Check that this is likely to be Microsoft CL.EXE.
47914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47915    if test $? -ne 0; then
47916      { $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
47917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47919$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47920      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47921    fi
47922    # Collapse compiler output into a single line
47923    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47924    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47925        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47926  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47927    # gcc --version output typically looks like
47928    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47929    #     Copyright (C) 2013 Free Software Foundation, Inc.
47930    #     This is free software; see the source for copying conditions.  There is NO
47931    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47932    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47933    # Check that this is likely to be GCC.
47934    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /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\"" >&5
47939$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47940      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47941    fi
47942    # Remove Copyright and legalese from version string, and
47943    # collapse into a single line
47944    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47945        $SED -e 's/ *Copyright .*//'`
47946    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47947        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47948  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47949    # clang --version output typically looks like
47950    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47951    #    clang version 3.3 (tags/RELEASE_33/final)
47952    # or
47953    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47954    #    Target: x86_64-pc-linux-gnu
47955    #    Thread model: posix
47956    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47957    # Check that this is likely to be clang
47958    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47959    if test $? -ne 0; then
47960      { $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
47961$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47962      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47963$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47964      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47965    fi
47966    # Collapse compiler output into a single line
47967    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47969        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47970  else
47971      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47972  fi
47973  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47974  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47975  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47976  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47977
47978  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47979$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47980
47981
47982  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47983    { $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
47984$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47985    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47986$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47987  fi
47988
47989  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47990  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47991    { $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
47992$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;}
47993  fi
47994
47995  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47996    { $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
47997$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47998  fi
47999
48000  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48001
48002  else
48003    # If we are not cross compiling, use the normal target compilers for
48004    # building the build platform executables.
48005    BUILD_CC="$CC"
48006    BUILD_CXX="$CXX"
48007    BUILD_LD="$LD"
48008    BUILD_LDCXX="$LDCXX"
48009    BUILD_NM="$NM"
48010    BUILD_AS="$AS"
48011    BUILD_OBJCOPY="$OBJCOPY"
48012    BUILD_STRIP="$STRIP"
48013    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48014    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48015    BUILD_AR="$AR"
48016
48017
48018  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48019    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48020$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48021    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48022$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48023  fi
48024
48025  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48026  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48027    { $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
48028$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;}
48029  fi
48030
48031  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48032    { $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
48033$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48034  fi
48035
48036  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48037
48038  fi
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053  # The package path is used only on macosx?
48054  # FIXME: clean this up, and/or move it elsewhere.
48055  PACKAGE_PATH=/opt/local
48056
48057
48058  # Check for extra potential brokenness.
48059  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48060    # On Windows, double-check that we got the right compiler.
48061    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48062    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48063    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48064      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48065        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
48066      fi
48067    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48068      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48069        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48070      fi
48071    fi
48072  fi
48073
48074  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48075    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48076    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48077    # This is later checked when setting flags.
48078
48079    # "-Og" suppported for GCC 4.8 and later
48080    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128    # Execute function body
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
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170
48171
48172
48173
48174
48175
48176
48177    # Execute function body
48178
48179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48180$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48181  supports=yes
48182
48183  saved_cflags="$CFLAGS"
48184  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48185  ac_ext=c
48186ac_cpp='$CPP $CPPFLAGS'
48187ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48188ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48189ac_compiler_gnu=$ac_cv_c_compiler_gnu
48190
48191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48192/* end confdefs.h.  */
48193int i;
48194_ACEOF
48195if ac_fn_c_try_compile "$LINENO"; then :
48196
48197else
48198  supports=no
48199fi
48200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48201  ac_ext=cpp
48202ac_cpp='$CXXCPP $CPPFLAGS'
48203ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48204ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48205ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48206
48207  CFLAGS="$saved_cflags"
48208
48209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48210$as_echo "$supports" >&6; }
48211  if test "x$supports" = "xyes" ; then
48212    :
48213    C_COMP_SUPPORTS="yes"
48214  else
48215    :
48216    C_COMP_SUPPORTS="no"
48217  fi
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
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277    # Execute function body
48278
48279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48280$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48281  supports=yes
48282
48283  saved_cxxflags="$CXXFLAGS"
48284  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48285  ac_ext=cpp
48286ac_cpp='$CXXCPP $CPPFLAGS'
48287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48290
48291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48292/* end confdefs.h.  */
48293int i;
48294_ACEOF
48295if ac_fn_cxx_try_compile "$LINENO"; then :
48296
48297else
48298  supports=no
48299fi
48300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48301  ac_ext=cpp
48302ac_cpp='$CXXCPP $CPPFLAGS'
48303ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48304ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48305ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48306
48307  CXXFLAGS="$saved_cxxflags"
48308
48309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48310$as_echo "$supports" >&6; }
48311  if test "x$supports" = "xyes" ; then
48312    :
48313    CXX_COMP_SUPPORTS="yes"
48314  else
48315    :
48316    CXX_COMP_SUPPORTS="no"
48317  fi
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48332$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48333  supports=no
48334  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48335
48336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48337$as_echo "$supports" >&6; }
48338  if test "x$supports" = "xyes" ; then
48339    :
48340    HAS_CFLAG_OPTIMIZE_DEBUG=true
48341  else
48342    :
48343    HAS_CFLAG_OPTIMIZE_DEBUG=false
48344  fi
48345
48346
48347
48348
48349
48350
48351
48352    # "-z relro" supported in GNU binutils 2.17 and later
48353    LINKER_RELRO_FLAG="-Wl,-z,relro"
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401    # Execute function body
48402
48403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48404$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48405  supports=yes
48406
48407  saved_ldflags="$LDFLAGS"
48408  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48409  ac_ext=c
48410ac_cpp='$CPP $CPPFLAGS'
48411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48413ac_compiler_gnu=$ac_cv_c_compiler_gnu
48414
48415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48416/* end confdefs.h.  */
48417
48418int
48419main ()
48420{
48421
48422  ;
48423  return 0;
48424}
48425_ACEOF
48426if ac_fn_c_try_link "$LINENO"; then :
48427
48428else
48429  supports=no
48430fi
48431rm -f core conftest.err conftest.$ac_objext \
48432    conftest$ac_exeext conftest.$ac_ext
48433  ac_ext=cpp
48434ac_cpp='$CXXCPP $CPPFLAGS'
48435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48438
48439  LDFLAGS="$saved_ldflags"
48440
48441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48442$as_echo "$supports" >&6; }
48443  if test "x$supports" = "xyes" ; then
48444    :
48445    HAS_LINKER_RELRO=true
48446  else
48447    :
48448    HAS_LINKER_RELRO=false
48449  fi
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463    # "-z now" supported in GNU binutils 2.11 and later
48464    LINKER_NOW_FLAG="-Wl,-z,now"
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512    # Execute function body
48513
48514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48515$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48516  supports=yes
48517
48518  saved_ldflags="$LDFLAGS"
48519  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48520  ac_ext=c
48521ac_cpp='$CPP $CPPFLAGS'
48522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48524ac_compiler_gnu=$ac_cv_c_compiler_gnu
48525
48526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48527/* end confdefs.h.  */
48528
48529int
48530main ()
48531{
48532
48533  ;
48534  return 0;
48535}
48536_ACEOF
48537if ac_fn_c_try_link "$LINENO"; then :
48538
48539else
48540  supports=no
48541fi
48542rm -f core conftest.err conftest.$ac_objext \
48543    conftest$ac_exeext conftest.$ac_ext
48544  ac_ext=cpp
48545ac_cpp='$CXXCPP $CPPFLAGS'
48546ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48547ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48548ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48549
48550  LDFLAGS="$saved_ldflags"
48551
48552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48553$as_echo "$supports" >&6; }
48554  if test "x$supports" = "xyes" ; then
48555    :
48556    HAS_LINKER_NOW=true
48557  else
48558    :
48559    HAS_LINKER_NOW=false
48560  fi
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573  fi
48574
48575  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48576  # in executable.'
48577  USING_BROKEN_SUSE_LD=no
48578  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48580$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48581    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48582    $ECHO "int main() { }" > main.c
48583    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48585$as_echo "no" >&6; }
48586      USING_BROKEN_SUSE_LD=no
48587    else
48588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48589$as_echo "yes" >&6; }
48590      USING_BROKEN_SUSE_LD=yes
48591    fi
48592    $RM version-script.map main.c a.out
48593  fi
48594
48595
48596  # Setup hotspot lecagy names for toolchains
48597  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48598  if test "x$TOOLCHAIN_TYPE" = xclang; then
48599    HOTSPOT_TOOLCHAIN_TYPE=gcc
48600  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48601    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48602  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48603    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48604  fi
48605
48606
48607
48608# Setup the JTReg Regression Test Harness.
48609
48610
48611# Check whether --with-jtreg was given.
48612if test "${with_jtreg+set}" = set; then :
48613  withval=$with_jtreg;
48614fi
48615
48616
48617  if test "x$with_jtreg" = xno; then
48618    # jtreg disabled
48619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48620$as_echo_n "checking for jtreg test harness... " >&6; }
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48622$as_echo "no, disabled" >&6; }
48623  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48624    # An explicit path is specified, use it.
48625    JT_HOME="$with_jtreg"
48626    if test ! -d "$JT_HOME"; then
48627      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48628    fi
48629
48630    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48631      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48632    fi
48633
48634    JTREGEXE="$JT_HOME/bin/jtreg"
48635    if test ! -x "$JTREGEXE"; then
48636      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48637    fi
48638
48639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48640$as_echo_n "checking for jtreg test harness... " >&6; }
48641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48642$as_echo "$JT_HOME" >&6; }
48643  else
48644    # Try to locate jtreg
48645    if test "x$JT_HOME" != x; then
48646      # JT_HOME set in environment, use it
48647      if test ! -d "$JT_HOME"; then
48648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48649$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48650        JT_HOME=
48651      else
48652        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48653          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48654$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48655          JT_HOME=
48656        elif test ! -x "$JT_HOME/bin/jtreg"; then
48657          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48658$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48659          JT_HOME=
48660        else
48661          JTREGEXE="$JT_HOME/bin/jtreg"
48662          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48663$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48664        fi
48665      fi
48666    fi
48667
48668    if test "x$JT_HOME" = x; then
48669      # JT_HOME is not set in environment, or was deemed invalid.
48670      # Try to find jtreg on path
48671
48672
48673  # Publish this variable in the help.
48674
48675
48676  if [ -z "${JTREGEXE+x}" ]; then
48677    # The variable is not set by user, try to locate tool using the code snippet
48678    for ac_prog in jtreg
48679do
48680  # Extract the first word of "$ac_prog", so it can be a program name with args.
48681set dummy $ac_prog; ac_word=$2
48682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48683$as_echo_n "checking for $ac_word... " >&6; }
48684if ${ac_cv_path_JTREGEXE+:} false; then :
48685  $as_echo_n "(cached) " >&6
48686else
48687  case $JTREGEXE in
48688  [\\/]* | ?:[\\/]*)
48689  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48690  ;;
48691  *)
48692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48693for as_dir in $PATH
48694do
48695  IFS=$as_save_IFS
48696  test -z "$as_dir" && as_dir=.
48697    for ac_exec_ext in '' $ac_executable_extensions; do
48698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48699    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48701    break 2
48702  fi
48703done
48704  done
48705IFS=$as_save_IFS
48706
48707  ;;
48708esac
48709fi
48710JTREGEXE=$ac_cv_path_JTREGEXE
48711if test -n "$JTREGEXE"; then
48712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48713$as_echo "$JTREGEXE" >&6; }
48714else
48715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48716$as_echo "no" >&6; }
48717fi
48718
48719
48720  test -n "$JTREGEXE" && break
48721done
48722
48723  else
48724    # The variable is set, but is it from the command line or the environment?
48725
48726    # Try to remove the string !JTREGEXE! from our list.
48727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48729      # If it failed, the variable was not from the command line. Ignore it,
48730      # but warn the user (except for BASH, which is always set by the calling BASH).
48731      if test "xJTREGEXE" != xBASH; then
48732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48733$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48734      fi
48735      # Try to locate tool using the code snippet
48736      for ac_prog in jtreg
48737do
48738  # Extract the first word of "$ac_prog", so it can be a program name with args.
48739set dummy $ac_prog; ac_word=$2
48740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48741$as_echo_n "checking for $ac_word... " >&6; }
48742if ${ac_cv_path_JTREGEXE+:} false; then :
48743  $as_echo_n "(cached) " >&6
48744else
48745  case $JTREGEXE in
48746  [\\/]* | ?:[\\/]*)
48747  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48748  ;;
48749  *)
48750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48751for as_dir in $PATH
48752do
48753  IFS=$as_save_IFS
48754  test -z "$as_dir" && as_dir=.
48755    for ac_exec_ext in '' $ac_executable_extensions; do
48756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48757    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48759    break 2
48760  fi
48761done
48762  done
48763IFS=$as_save_IFS
48764
48765  ;;
48766esac
48767fi
48768JTREGEXE=$ac_cv_path_JTREGEXE
48769if test -n "$JTREGEXE"; then
48770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48771$as_echo "$JTREGEXE" >&6; }
48772else
48773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48774$as_echo "no" >&6; }
48775fi
48776
48777
48778  test -n "$JTREGEXE" && break
48779done
48780
48781    else
48782      # If it succeeded, then it was overridden by the user. We will use it
48783      # for the tool.
48784
48785      # First remove it from the list of overridden variables, so we can test
48786      # for unknown variables in the end.
48787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48788
48789      # Check if we try to supply an empty value
48790      if test "x$JTREGEXE" = x; then
48791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48792$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48794$as_echo_n "checking for JTREGEXE... " >&6; }
48795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48796$as_echo "disabled" >&6; }
48797      else
48798        # Check if the provided tool contains a complete path.
48799        tool_specified="$JTREGEXE"
48800        tool_basename="${tool_specified##*/}"
48801        if test "x$tool_basename" = "x$tool_specified"; then
48802          # A command without a complete path is provided, search $PATH.
48803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48804$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48805          # Extract the first word of "$tool_basename", so it can be a program name with args.
48806set dummy $tool_basename; ac_word=$2
48807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48808$as_echo_n "checking for $ac_word... " >&6; }
48809if ${ac_cv_path_JTREGEXE+:} false; then :
48810  $as_echo_n "(cached) " >&6
48811else
48812  case $JTREGEXE in
48813  [\\/]* | ?:[\\/]*)
48814  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48815  ;;
48816  *)
48817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48818for as_dir in $PATH
48819do
48820  IFS=$as_save_IFS
48821  test -z "$as_dir" && as_dir=.
48822    for ac_exec_ext in '' $ac_executable_extensions; do
48823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48824    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48826    break 2
48827  fi
48828done
48829  done
48830IFS=$as_save_IFS
48831
48832  ;;
48833esac
48834fi
48835JTREGEXE=$ac_cv_path_JTREGEXE
48836if test -n "$JTREGEXE"; then
48837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48838$as_echo "$JTREGEXE" >&6; }
48839else
48840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48841$as_echo "no" >&6; }
48842fi
48843
48844
48845          if test "x$JTREGEXE" = x; then
48846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48847          fi
48848        else
48849          # Otherwise we believe it is a complete path. Use it as it is.
48850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48851$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48853$as_echo_n "checking for JTREGEXE... " >&6; }
48854          if test ! -x "$tool_specified"; then
48855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48856$as_echo "not found" >&6; }
48857            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48858          fi
48859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48860$as_echo "$tool_specified" >&6; }
48861        fi
48862      fi
48863    fi
48864
48865  fi
48866
48867
48868      if test "x$JTREGEXE" != x; then
48869        # That's good, now try to derive JT_HOME
48870        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
48871        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48872          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
48873$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
48874          JT_HOME=
48875          JTREGEXE=
48876        else
48877          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
48878$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
48879        fi
48880      fi
48881    fi
48882
48883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48884$as_echo_n "checking for jtreg test harness... " >&6; }
48885    if test "x$JT_HOME" != x; then
48886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48887$as_echo "$JT_HOME" >&6; }
48888    else
48889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
48890$as_echo "no, not found" >&6; }
48891
48892      if test "x$with_jtreg" = xyes; then
48893        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
48894      fi
48895    fi
48896  fi
48897
48898
48899  # Only process if variable expands to non-empty
48900
48901  if test "x$JTREGEXE" != x; then
48902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48903
48904  # First separate the path from the arguments. This will split at the first
48905  # space.
48906  complete="$JTREGEXE"
48907  path="${complete%% *}"
48908  tmp="$complete EOL"
48909  arguments="${tmp#* }"
48910
48911  # Input might be given as Windows format, start by converting to
48912  # unix format.
48913  new_path=`$CYGPATH -u "$path"`
48914
48915  # Now try to locate executable using which
48916  new_path=`$WHICH "$new_path" 2> /dev/null`
48917  # bat and cmd files are not always considered executable in cygwin causing which
48918  # to not find them
48919  if test "x$new_path" = x \
48920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48922    new_path=`$CYGPATH -u "$path"`
48923  fi
48924  if test "x$new_path" = x; then
48925    # Oops. Which didn't find the executable.
48926    # The splitting of arguments from the executable at a space might have been incorrect,
48927    # since paths with space are more likely in Windows. Give it another try with the whole
48928    # argument.
48929    path="$complete"
48930    arguments="EOL"
48931    new_path=`$CYGPATH -u "$path"`
48932    new_path=`$WHICH "$new_path" 2> /dev/null`
48933    # bat and cmd files are not always considered executable in cygwin causing which
48934    # to not find them
48935    if test "x$new_path" = x \
48936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48938      new_path=`$CYGPATH -u "$path"`
48939    fi
48940    if test "x$new_path" = x; then
48941      # It's still not found. Now this is an unrecoverable error.
48942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
48943$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
48944      has_space=`$ECHO "$complete" | $GREP " "`
48945      if test "x$has_space" != x; then
48946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48948      fi
48949      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
48950    fi
48951  fi
48952
48953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48956  # "foo.exe" is OK but "foo" is an error.
48957  #
48958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
48959  # It is also a way to make sure we got the proper file name for the real test later on.
48960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48961  if test "x$test_shortpath" = x; then
48962    # Short path failed, file does not exist as specified.
48963    # Try adding .exe or .cmd
48964    if test -f "${new_path}.exe"; then
48965      input_to_shortpath="${new_path}.exe"
48966    elif test -f "${new_path}.cmd"; then
48967      input_to_shortpath="${new_path}.cmd"
48968    else
48969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
48970$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
48971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48973      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
48974    fi
48975  else
48976    input_to_shortpath="$new_path"
48977  fi
48978
48979  # Call helper function which possibly converts this using DOS-style short mode.
48980  # If so, the updated path is stored in $new_path.
48981  new_path="$input_to_shortpath"
48982
48983  input_path="$input_to_shortpath"
48984  # Check if we need to convert this using DOS-style short mode. If the path
48985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48986  # take no chances and rewrite it.
48987  # Note: m4 eats our [], so we need to use [ and ] instead.
48988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48989  if test "x$has_forbidden_chars" != x; then
48990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48994      # Going to short mode and back again did indeed matter. Since short mode is
48995      # case insensitive, let's make it lowercase to improve readability.
48996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48997      # Now convert it back to Unix-style (cygpath)
48998      input_path=`$CYGPATH -u "$shortmode_path"`
48999      new_path="$input_path"
49000    fi
49001  fi
49002
49003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49004  if test "x$test_cygdrive_prefix" = x; then
49005    # As a simple fix, exclude /usr/bin since it's not a real path.
49006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49008      # a path prefixed by /cygdrive for fixpath to work.
49009      new_path="$CYGWIN_ROOT_PATH$input_path"
49010    fi
49011  fi
49012
49013  # remove trailing .exe if any
49014  new_path="${new_path/%.exe/}"
49015
49016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49017
49018  # First separate the path from the arguments. This will split at the first
49019  # space.
49020  complete="$JTREGEXE"
49021  path="${complete%% *}"
49022  tmp="$complete EOL"
49023  arguments="${tmp#* }"
49024
49025  # Input might be given as Windows format, start by converting to
49026  # unix format.
49027  new_path="$path"
49028
49029  windows_path="$new_path"
49030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49031    unix_path=`$CYGPATH -u "$windows_path"`
49032    new_path="$unix_path"
49033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49035    new_path="$unix_path"
49036  fi
49037
49038
49039  # Now try to locate executable using which
49040  new_path=`$WHICH "$new_path" 2> /dev/null`
49041
49042  if test "x$new_path" = x; then
49043    # Oops. Which didn't find the executable.
49044    # The splitting of arguments from the executable at a space might have been incorrect,
49045    # since paths with space are more likely in Windows. Give it another try with the whole
49046    # argument.
49047    path="$complete"
49048    arguments="EOL"
49049    new_path="$path"
49050
49051  windows_path="$new_path"
49052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49053    unix_path=`$CYGPATH -u "$windows_path"`
49054    new_path="$unix_path"
49055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49057    new_path="$unix_path"
49058  fi
49059
49060
49061    new_path=`$WHICH "$new_path" 2> /dev/null`
49062    # bat and cmd files are not always considered executable in MSYS causing which
49063    # to not find them
49064    if test "x$new_path" = x \
49065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49067      new_path="$path"
49068
49069  windows_path="$new_path"
49070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49071    unix_path=`$CYGPATH -u "$windows_path"`
49072    new_path="$unix_path"
49073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49075    new_path="$unix_path"
49076  fi
49077
49078    fi
49079
49080    if test "x$new_path" = x; then
49081      # It's still not found. Now this is an unrecoverable error.
49082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49083$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49084      has_space=`$ECHO "$complete" | $GREP " "`
49085      if test "x$has_space" != x; then
49086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49088      fi
49089      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49090    fi
49091  fi
49092
49093  # Now new_path has a complete unix path to the binary
49094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49095    # Keep paths in /bin as-is, but remove trailing .exe if any
49096    new_path="${new_path/%.exe/}"
49097    # Do not save /bin paths to all_fixpath_prefixes!
49098  else
49099    # Not in mixed or Windows style, start by that.
49100    new_path=`cmd //c echo $new_path`
49101
49102  input_path="$new_path"
49103  # Check if we need to convert this using DOS-style short mode. If the path
49104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49105  # take no chances and rewrite it.
49106  # Note: m4 eats our [], so we need to use [ and ] instead.
49107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49108  if test "x$has_forbidden_chars" != x; then
49109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49111  fi
49112
49113    # Output is in $new_path
49114
49115  windows_path="$new_path"
49116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49117    unix_path=`$CYGPATH -u "$windows_path"`
49118    new_path="$unix_path"
49119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49121    new_path="$unix_path"
49122  fi
49123
49124    # remove trailing .exe if any
49125    new_path="${new_path/%.exe/}"
49126
49127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49129  fi
49130
49131    else
49132      # We're on a unix platform. Hooray! :)
49133      # First separate the path from the arguments. This will split at the first
49134      # space.
49135      complete="$JTREGEXE"
49136      path="${complete%% *}"
49137      tmp="$complete EOL"
49138      arguments="${tmp#* }"
49139
49140      # Cannot rely on the command "which" here since it doesn't always work.
49141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49142      if test -z "$is_absolute_path"; then
49143        # Path to executable is not absolute. Find it.
49144        IFS_save="$IFS"
49145        IFS=:
49146        for p in $PATH; do
49147          if test -f "$p/$path" && test -x "$p/$path"; then
49148            new_path="$p/$path"
49149            break
49150          fi
49151        done
49152        IFS="$IFS_save"
49153      else
49154        # This is an absolute path, we can use it without further modifications.
49155        new_path="$path"
49156      fi
49157
49158      if test "x$new_path" = x; then
49159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49160$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49161        has_space=`$ECHO "$complete" | $GREP " "`
49162        if test "x$has_space" != x; then
49163          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49164$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49165        fi
49166        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49167      fi
49168    fi
49169
49170    # Now join together the path and the arguments once again
49171    if test "x$arguments" != xEOL; then
49172      new_complete="$new_path ${arguments% *}"
49173    else
49174      new_complete="$new_path"
49175    fi
49176
49177    if test "x$complete" != "x$new_complete"; then
49178      JTREGEXE="$new_complete"
49179      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49180$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49181    fi
49182  fi
49183
49184
49185  # Only process if variable expands to non-empty
49186
49187  if test "x$JT_HOME" != x; then
49188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49189
49190  # Input might be given as Windows format, start by converting to
49191  # unix format.
49192  path="$JT_HOME"
49193  new_path=`$CYGPATH -u "$path"`
49194
49195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49198  # "foo.exe" is OK but "foo" is an error.
49199  #
49200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49201  # It is also a way to make sure we got the proper file name for the real test later on.
49202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49203  if test "x$test_shortpath" = x; then
49204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49205$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49206    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49207  fi
49208
49209  # Call helper function which possibly converts this using DOS-style short mode.
49210  # If so, the updated path is stored in $new_path.
49211
49212  input_path="$new_path"
49213  # Check if we need to convert this using DOS-style short mode. If the path
49214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49215  # take no chances and rewrite it.
49216  # Note: m4 eats our [], so we need to use [ and ] instead.
49217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49218  if test "x$has_forbidden_chars" != x; then
49219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49223      # Going to short mode and back again did indeed matter. Since short mode is
49224      # case insensitive, let's make it lowercase to improve readability.
49225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49226      # Now convert it back to Unix-style (cygpath)
49227      input_path=`$CYGPATH -u "$shortmode_path"`
49228      new_path="$input_path"
49229    fi
49230  fi
49231
49232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49233  if test "x$test_cygdrive_prefix" = x; then
49234    # As a simple fix, exclude /usr/bin since it's not a real path.
49235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49237      # a path prefixed by /cygdrive for fixpath to work.
49238      new_path="$CYGWIN_ROOT_PATH$input_path"
49239    fi
49240  fi
49241
49242
49243  if test "x$path" != "x$new_path"; then
49244    JT_HOME="$new_path"
49245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49246$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49247  fi
49248
49249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49250
49251  path="$JT_HOME"
49252  has_colon=`$ECHO $path | $GREP ^.:`
49253  new_path="$path"
49254  if test "x$has_colon" = x; then
49255    # Not in mixed or Windows style, start by that.
49256    new_path=`cmd //c echo $path`
49257  fi
49258
49259
49260  input_path="$new_path"
49261  # Check if we need to convert this using DOS-style short mode. If the path
49262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49263  # take no chances and rewrite it.
49264  # Note: m4 eats our [], so we need to use [ and ] instead.
49265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49266  if test "x$has_forbidden_chars" != x; then
49267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49269  fi
49270
49271
49272  windows_path="$new_path"
49273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49274    unix_path=`$CYGPATH -u "$windows_path"`
49275    new_path="$unix_path"
49276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49278    new_path="$unix_path"
49279  fi
49280
49281  if test "x$path" != "x$new_path"; then
49282    JT_HOME="$new_path"
49283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49284$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49285  fi
49286
49287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49289
49290    else
49291      # We're on a unix platform. Hooray! :)
49292      path="$JT_HOME"
49293      has_space=`$ECHO "$path" | $GREP " "`
49294      if test "x$has_space" != x; then
49295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49296$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49298      fi
49299
49300      # Use eval to expand a potential ~
49301      eval path="$path"
49302      if test ! -f "$path" && test ! -d "$path"; then
49303        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49304      fi
49305
49306      if test -d "$path"; then
49307        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49308      else
49309        dir="`$DIRNAME "$path"`"
49310        base="`$BASENAME "$path"`"
49311        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49312      fi
49313    fi
49314  fi
49315
49316
49317
49318
49319
49320
49321  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49322  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49323  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49324  #                              commands produced by the link step (currently AIX only)
49325  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49326    COMPILER_TARGET_BITS_FLAG="-q"
49327    COMPILER_COMMAND_FILE_FLAG="-f"
49328    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49329  else
49330    COMPILER_TARGET_BITS_FLAG="-m"
49331    COMPILER_COMMAND_FILE_FLAG="@"
49332    COMPILER_BINDCMD_FILE_FLAG=""
49333
49334    # The solstudio linker does not support @-files.
49335    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49336      COMPILER_COMMAND_FILE_FLAG=
49337    fi
49338
49339    # Check if @file is supported by gcc
49340    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49342$as_echo_n "checking if @file is supported by gcc... " >&6; }
49343      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49344      $ECHO "" "--version" > command.file
49345      if $CXX @command.file 2>&5 >&5; then
49346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49347$as_echo "yes" >&6; }
49348        COMPILER_COMMAND_FILE_FLAG="@"
49349      else
49350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49351$as_echo "no" >&6; }
49352        COMPILER_COMMAND_FILE_FLAG=
49353      fi
49354      $RM command.file
49355    fi
49356  fi
49357
49358
49359
49360
49361  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49362  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49363    ARFLAGS="-r"
49364  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49365    ARFLAGS="-X64"
49366  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49367    # lib.exe is used as AR to create static libraries.
49368    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49369  else
49370    ARFLAGS=""
49371  fi
49372
49373
49374  ## Setup strip.
49375  # FIXME: should this really be per platform, or should it be per toolchain type?
49376  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49377  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49378  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49379    STRIPFLAGS="-g"
49380  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49381    STRIPFLAGS="-x"
49382  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49383    STRIPFLAGS="-S"
49384  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49385    STRIPFLAGS="-X32_64"
49386  fi
49387
49388
49389
49390  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49391    CC_OUT_OPTION=-Fo
49392    EXE_OUT_OPTION=-out:
49393    LD_OUT_OPTION=-out:
49394    AR_OUT_OPTION=-out:
49395  else
49396    # The option used to specify the target .o,.a or .so file.
49397    # When compiling, how to specify the to be created object file.
49398    CC_OUT_OPTION='-o$(SPACE)'
49399    # When linking, how to specify the to be created executable.
49400    EXE_OUT_OPTION='-o$(SPACE)'
49401    # When linking, how to specify the to be created dynamically linkable library.
49402    LD_OUT_OPTION='-o$(SPACE)'
49403    # When archiving, how to specify the to be create static archive for object files.
49404    AR_OUT_OPTION='rcs$(SPACE)'
49405  fi
49406
49407
49408
49409
49410
49411  # On Windows, we need to set RC flags.
49412  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49413    RC_FLAGS="-nologo -l0x409"
49414    JVM_RCFLAGS="-nologo"
49415    if test "x$DEBUG_LEVEL" = xrelease; then
49416      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49417      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49418    fi
49419
49420    # The version variables used to create RC_FLAGS may be overridden
49421    # in a custom configure script, or possibly the command line.
49422    # Let those variables be expanded at make time in spec.gmk.
49423    # The \$ are escaped to the shell, and the $(...) variables
49424    # are evaluated by make.
49425    RC_FLAGS="$RC_FLAGS \
49426        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49427        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49428        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49429        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49430        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49431        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49432        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49433
49434    JVM_RCFLAGS="$JVM_RCFLAGS \
49435        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49436        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49437        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49438        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49439        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49440        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49441        -D\"HS_FNAME=jvm.dll\" \
49442        -D\"HS_INTERNAL_NAME=jvm\""
49443  fi
49444
49445
49446
49447  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49448    # silence copyright notice and other headers.
49449    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49450  fi
49451
49452
49453# Now we can test some aspects on the target using configure macros.
49454
49455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49456$as_echo_n "checking for ANSI C header files... " >&6; }
49457if ${ac_cv_header_stdc+:} false; then :
49458  $as_echo_n "(cached) " >&6
49459else
49460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49461/* end confdefs.h.  */
49462#include <stdlib.h>
49463#include <stdarg.h>
49464#include <string.h>
49465#include <float.h>
49466
49467int
49468main ()
49469{
49470
49471  ;
49472  return 0;
49473}
49474_ACEOF
49475if ac_fn_cxx_try_compile "$LINENO"; then :
49476  ac_cv_header_stdc=yes
49477else
49478  ac_cv_header_stdc=no
49479fi
49480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49481
49482if test $ac_cv_header_stdc = yes; then
49483  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49485/* end confdefs.h.  */
49486#include <string.h>
49487
49488_ACEOF
49489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49490  $EGREP "memchr" >/dev/null 2>&1; then :
49491
49492else
49493  ac_cv_header_stdc=no
49494fi
49495rm -f conftest*
49496
49497fi
49498
49499if test $ac_cv_header_stdc = yes; then
49500  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49502/* end confdefs.h.  */
49503#include <stdlib.h>
49504
49505_ACEOF
49506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49507  $EGREP "free" >/dev/null 2>&1; then :
49508
49509else
49510  ac_cv_header_stdc=no
49511fi
49512rm -f conftest*
49513
49514fi
49515
49516if test $ac_cv_header_stdc = yes; then
49517  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49518  if test "$cross_compiling" = yes; then :
49519  :
49520else
49521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49522/* end confdefs.h.  */
49523#include <ctype.h>
49524#include <stdlib.h>
49525#if ((' ' & 0x0FF) == 0x020)
49526# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49527# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49528#else
49529# define ISLOWER(c) \
49530		   (('a' <= (c) && (c) <= 'i') \
49531		     || ('j' <= (c) && (c) <= 'r') \
49532		     || ('s' <= (c) && (c) <= 'z'))
49533# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49534#endif
49535
49536#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49537int
49538main ()
49539{
49540  int i;
49541  for (i = 0; i < 256; i++)
49542    if (XOR (islower (i), ISLOWER (i))
49543	|| toupper (i) != TOUPPER (i))
49544      return 2;
49545  return 0;
49546}
49547_ACEOF
49548if ac_fn_cxx_try_run "$LINENO"; then :
49549
49550else
49551  ac_cv_header_stdc=no
49552fi
49553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49554  conftest.$ac_objext conftest.beam conftest.$ac_ext
49555fi
49556
49557fi
49558fi
49559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49560$as_echo "$ac_cv_header_stdc" >&6; }
49561if test $ac_cv_header_stdc = yes; then
49562
49563$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49564
49565fi
49566
49567# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49568for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49569		  inttypes.h stdint.h unistd.h
49570do :
49571  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49572ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49573"
49574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49575  cat >>confdefs.h <<_ACEOF
49576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49577_ACEOF
49578
49579fi
49580
49581done
49582
49583
49584
49585  ###############################################################################
49586  #
49587  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49588  # (The JVM can use 32 or 64 bit Java pointers but that decision
49589  # is made at runtime.)
49590  #
49591
49592  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49593    # Always specify -m flag on Solaris
49594    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49595
49596  # When we add flags to the "official" CFLAGS etc, we need to
49597  # keep track of these additions in ADDED_CFLAGS etc. These
49598  # will later be checked to make sure only controlled additions
49599  # have been made to CFLAGS etc.
49600  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49601  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49602  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49603
49604  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49605  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49606  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49607
49608  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49609  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49610  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49611
49612  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49613  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49614  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49615
49616  elif test "x$COMPILE_TYPE" = xreduced; then
49617    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49618      # Specify -m if running reduced on unix platforms
49619
49620  # When we add flags to the "official" CFLAGS etc, we need to
49621  # keep track of these additions in ADDED_CFLAGS etc. These
49622  # will later be checked to make sure only controlled additions
49623  # have been made to CFLAGS etc.
49624  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49625  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49626  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49627
49628  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49629  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49630  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49631
49632  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49633  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49634  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49635
49636  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49637  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49638  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49639
49640    fi
49641  fi
49642  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49643    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49644    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49645    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49646  fi
49647
49648  # Make compilation sanity check
49649  for ac_header in stdio.h
49650do :
49651  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49652if test "x$ac_cv_header_stdio_h" = xyes; then :
49653  cat >>confdefs.h <<_ACEOF
49654#define HAVE_STDIO_H 1
49655_ACEOF
49656
49657else
49658
49659    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49660$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49661    if test "x$COMPILE_TYPE" = xreduced; then
49662
49663  # Print a helpful message on how to acquire the necessary build dependency.
49664  # reduced is the help tag: freetype, cups, alsa etc
49665  MISSING_DEPENDENCY=reduced
49666
49667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49668    cygwin_help $MISSING_DEPENDENCY
49669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49670    msys_help $MISSING_DEPENDENCY
49671  else
49672    PKGHANDLER_COMMAND=
49673
49674    case $PKGHANDLER in
49675      apt-get)
49676        apt_help     $MISSING_DEPENDENCY ;;
49677      yum)
49678        yum_help     $MISSING_DEPENDENCY ;;
49679      brew)
49680        brew_help    $MISSING_DEPENDENCY ;;
49681      port)
49682        port_help    $MISSING_DEPENDENCY ;;
49683      pkgutil)
49684        pkgutil_help $MISSING_DEPENDENCY ;;
49685      pkgadd)
49686        pkgadd_help  $MISSING_DEPENDENCY ;;
49687    esac
49688
49689    if test "x$PKGHANDLER_COMMAND" != x; then
49690      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49691    fi
49692  fi
49693
49694      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49695$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49696    elif test "x$COMPILE_TYPE" = xcross; then
49697      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49698$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49699    fi
49700    as_fn_error $? "Cannot continue." "$LINENO" 5
49701
49702fi
49703
49704done
49705
49706
49707  # The cast to long int works around a bug in the HP C Compiler
49708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49710# This bug is HP SR number 8606223364.
49711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49712$as_echo_n "checking size of int *... " >&6; }
49713if ${ac_cv_sizeof_int_p+:} false; then :
49714  $as_echo_n "(cached) " >&6
49715else
49716  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49717
49718else
49719  if test "$ac_cv_type_int_p" = yes; then
49720     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49722as_fn_error 77 "cannot compute sizeof (int *)
49723See \`config.log' for more details" "$LINENO" 5; }
49724   else
49725     ac_cv_sizeof_int_p=0
49726   fi
49727fi
49728
49729fi
49730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49731$as_echo "$ac_cv_sizeof_int_p" >&6; }
49732
49733
49734
49735cat >>confdefs.h <<_ACEOF
49736#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49737_ACEOF
49738
49739
49740
49741  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49742  if test "x$ac_cv_sizeof_int_p" = x; then
49743    # The test failed, lets stick to the assumed value.
49744    { $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
49745$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49746  else
49747    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49748
49749    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49750      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49751      # Let's try to implicitely set the compilers target architecture and retry the test
49752      { $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
49753$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;}
49754      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49755$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49756
49757  # When we add flags to the "official" CFLAGS etc, we need to
49758  # keep track of these additions in ADDED_CFLAGS etc. These
49759  # will later be checked to make sure only controlled additions
49760  # have been made to CFLAGS etc.
49761  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49762  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49763  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49764
49765  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49766  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49767  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49768
49769  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49770  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49771  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49772
49773  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49774  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49775  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49776
49777
49778      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49779      unset ac_cv_sizeof_int_p
49780      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49781      cat >>confdefs.h <<_ACEOF
49782#undef SIZEOF_INT_P
49783_ACEOF
49784
49785      # The cast to long int works around a bug in the HP C Compiler
49786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49788# This bug is HP SR number 8606223364.
49789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49790$as_echo_n "checking size of int *... " >&6; }
49791if ${ac_cv_sizeof_int_p+:} false; then :
49792  $as_echo_n "(cached) " >&6
49793else
49794  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49795
49796else
49797  if test "$ac_cv_type_int_p" = yes; then
49798     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49800as_fn_error 77 "cannot compute sizeof (int *)
49801See \`config.log' for more details" "$LINENO" 5; }
49802   else
49803     ac_cv_sizeof_int_p=0
49804   fi
49805fi
49806
49807fi
49808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49809$as_echo "$ac_cv_sizeof_int_p" >&6; }
49810
49811
49812
49813cat >>confdefs.h <<_ACEOF
49814#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49815_ACEOF
49816
49817
49818
49819      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49820
49821      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49822        { $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
49823$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;}
49824        if test "x$COMPILE_TYPE" = xreduced; then
49825
49826  # Print a helpful message on how to acquire the necessary build dependency.
49827  # reduced is the help tag: freetype, cups, alsa etc
49828  MISSING_DEPENDENCY=reduced
49829
49830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49831    cygwin_help $MISSING_DEPENDENCY
49832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49833    msys_help $MISSING_DEPENDENCY
49834  else
49835    PKGHANDLER_COMMAND=
49836
49837    case $PKGHANDLER in
49838      apt-get)
49839        apt_help     $MISSING_DEPENDENCY ;;
49840      yum)
49841        yum_help     $MISSING_DEPENDENCY ;;
49842      brew)
49843        brew_help    $MISSING_DEPENDENCY ;;
49844      port)
49845        port_help    $MISSING_DEPENDENCY ;;
49846      pkgutil)
49847        pkgutil_help $MISSING_DEPENDENCY ;;
49848      pkgadd)
49849        pkgadd_help  $MISSING_DEPENDENCY ;;
49850    esac
49851
49852    if test "x$PKGHANDLER_COMMAND" != x; then
49853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49854    fi
49855  fi
49856
49857          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49858$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49859        elif test "x$COMPILE_TYPE" = xcross; then
49860          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49861$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49862        fi
49863        as_fn_error $? "Cannot continue." "$LINENO" 5
49864      fi
49865    fi
49866  fi
49867
49868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49869$as_echo_n "checking for target address size... " >&6; }
49870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49871$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49872
49873
49874  ###############################################################################
49875  #
49876  # Is the target little of big endian?
49877  #
49878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49879$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49880if ${ac_cv_c_bigendian+:} false; then :
49881  $as_echo_n "(cached) " >&6
49882else
49883  ac_cv_c_bigendian=unknown
49884    # See if we're dealing with a universal compiler.
49885    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49886/* end confdefs.h.  */
49887#ifndef __APPLE_CC__
49888	       not a universal capable compiler
49889	     #endif
49890	     typedef int dummy;
49891
49892_ACEOF
49893if ac_fn_cxx_try_compile "$LINENO"; then :
49894
49895	# Check for potential -arch flags.  It is not universal unless
49896	# there are at least two -arch flags with different values.
49897	ac_arch=
49898	ac_prev=
49899	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49900	 if test -n "$ac_prev"; then
49901	   case $ac_word in
49902	     i?86 | x86_64 | ppc | ppc64)
49903	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49904		 ac_arch=$ac_word
49905	       else
49906		 ac_cv_c_bigendian=universal
49907		 break
49908	       fi
49909	       ;;
49910	   esac
49911	   ac_prev=
49912	 elif test "x$ac_word" = "x-arch"; then
49913	   ac_prev=arch
49914	 fi
49915       done
49916fi
49917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49918    if test $ac_cv_c_bigendian = unknown; then
49919      # See if sys/param.h defines the BYTE_ORDER macro.
49920      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49921/* end confdefs.h.  */
49922#include <sys/types.h>
49923	     #include <sys/param.h>
49924
49925int
49926main ()
49927{
49928#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49929		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49930		     && LITTLE_ENDIAN)
49931	      bogus endian macros
49932	     #endif
49933
49934  ;
49935  return 0;
49936}
49937_ACEOF
49938if ac_fn_cxx_try_compile "$LINENO"; then :
49939  # It does; now see whether it defined to BIG_ENDIAN or not.
49940	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49941/* end confdefs.h.  */
49942#include <sys/types.h>
49943		#include <sys/param.h>
49944
49945int
49946main ()
49947{
49948#if BYTE_ORDER != BIG_ENDIAN
49949		 not big endian
49950		#endif
49951
49952  ;
49953  return 0;
49954}
49955_ACEOF
49956if ac_fn_cxx_try_compile "$LINENO"; then :
49957  ac_cv_c_bigendian=yes
49958else
49959  ac_cv_c_bigendian=no
49960fi
49961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49962fi
49963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49964    fi
49965    if test $ac_cv_c_bigendian = unknown; then
49966      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49967      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49968/* end confdefs.h.  */
49969#include <limits.h>
49970
49971int
49972main ()
49973{
49974#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49975	      bogus endian macros
49976	     #endif
49977
49978  ;
49979  return 0;
49980}
49981_ACEOF
49982if ac_fn_cxx_try_compile "$LINENO"; then :
49983  # It does; now see whether it defined to _BIG_ENDIAN or not.
49984	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49985/* end confdefs.h.  */
49986#include <limits.h>
49987
49988int
49989main ()
49990{
49991#ifndef _BIG_ENDIAN
49992		 not big endian
49993		#endif
49994
49995  ;
49996  return 0;
49997}
49998_ACEOF
49999if ac_fn_cxx_try_compile "$LINENO"; then :
50000  ac_cv_c_bigendian=yes
50001else
50002  ac_cv_c_bigendian=no
50003fi
50004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50005fi
50006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50007    fi
50008    if test $ac_cv_c_bigendian = unknown; then
50009      # Compile a test program.
50010      if test "$cross_compiling" = yes; then :
50011  # Try to guess by grepping values from an object file.
50012	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50013/* end confdefs.h.  */
50014short int ascii_mm[] =
50015		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50016		short int ascii_ii[] =
50017		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50018		int use_ascii (int i) {
50019		  return ascii_mm[i] + ascii_ii[i];
50020		}
50021		short int ebcdic_ii[] =
50022		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50023		short int ebcdic_mm[] =
50024		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50025		int use_ebcdic (int i) {
50026		  return ebcdic_mm[i] + ebcdic_ii[i];
50027		}
50028		extern int foo;
50029
50030int
50031main ()
50032{
50033return use_ascii (foo) == use_ebcdic (foo);
50034  ;
50035  return 0;
50036}
50037_ACEOF
50038if ac_fn_cxx_try_compile "$LINENO"; then :
50039  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50040	      ac_cv_c_bigendian=yes
50041	    fi
50042	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50043	      if test "$ac_cv_c_bigendian" = unknown; then
50044		ac_cv_c_bigendian=no
50045	      else
50046		# finding both strings is unlikely to happen, but who knows?
50047		ac_cv_c_bigendian=unknown
50048	      fi
50049	    fi
50050fi
50051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50052else
50053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50054/* end confdefs.h.  */
50055$ac_includes_default
50056int
50057main ()
50058{
50059
50060	     /* Are we little or big endian?  From Harbison&Steele.  */
50061	     union
50062	     {
50063	       long int l;
50064	       char c[sizeof (long int)];
50065	     } u;
50066	     u.l = 1;
50067	     return u.c[sizeof (long int) - 1] == 1;
50068
50069  ;
50070  return 0;
50071}
50072_ACEOF
50073if ac_fn_cxx_try_run "$LINENO"; then :
50074  ac_cv_c_bigendian=no
50075else
50076  ac_cv_c_bigendian=yes
50077fi
50078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50079  conftest.$ac_objext conftest.beam conftest.$ac_ext
50080fi
50081
50082    fi
50083fi
50084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50085$as_echo "$ac_cv_c_bigendian" >&6; }
50086 case $ac_cv_c_bigendian in #(
50087   yes)
50088     ENDIAN="big";; #(
50089   no)
50090     ENDIAN="little" ;; #(
50091   universal)
50092     ENDIAN="universal_endianness"
50093     ;; #(
50094   *)
50095     ENDIAN="unknown" ;;
50096 esac
50097
50098
50099  if test "x$ENDIAN" = xuniversal_endianness; then
50100    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50101  fi
50102  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50103    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
50104  fi
50105
50106
50107# Configure flags for the tools
50108
50109  ###############################################################################
50110  #
50111  # How to compile shared libraries.
50112  #
50113
50114  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50115    PICFLAG="-fPIC"
50116    C_FLAG_REORDER=''
50117    CXX_FLAG_REORDER=''
50118
50119    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50120      # Linking is different on MacOSX
50121      if test "x$STATIC_BUILD" = xtrue; then
50122        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50123      else
50124        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50125        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50126      fi
50127      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50128      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50129      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50130      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50131    else
50132      # Default works for linux, might work on other platforms as well.
50133      SHARED_LIBRARY_FLAGS='-shared'
50134      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50135      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50136      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50137      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50138    fi
50139  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50140    C_FLAG_REORDER=''
50141    CXX_FLAG_REORDER=''
50142
50143    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50144      # Linking is different on MacOSX
50145      PICFLAG=''
50146      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50147      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50148      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50149      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50150      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50151
50152      if test "x$STATIC_BUILD" = xfalse; then
50153        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50154      fi
50155    else
50156      # Default works for linux, might work on other platforms as well.
50157      PICFLAG='-fPIC'
50158      SHARED_LIBRARY_FLAGS='-shared'
50159      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50160      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50161      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50162
50163      # arm specific settings
50164      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50165        # '-Wl,-z,origin' isn't used on arm.
50166        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50167      else
50168        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50169      fi
50170
50171    fi
50172  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50173    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50174      PICFLAG="-xcode=pic32"
50175    else
50176      PICFLAG="-KPIC"
50177    fi
50178    C_FLAG_REORDER='-xF'
50179    CXX_FLAG_REORDER='-xF'
50180    SHARED_LIBRARY_FLAGS="-G"
50181    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50182    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50183    SET_SHARED_LIBRARY_NAME='-h $1'
50184    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50185  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50186    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50187    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50188    # will have to patch this single instruction with a call to some out-of-order code which
50189    # does the load from the TOC. This is of course slow. But in that case we also would have
50190    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50191    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50192    # can be patched directly by the linker and does not require a jump to out-of-order code.
50193    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50194    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50195    # loads for accessing a global variable). But there are rumors that this may be seen as a
50196    # 'performance feature' because of improved code locality of the symbols used in a
50197    # compilation unit.
50198    PICFLAG="-qpic"
50199    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50200    C_FLAG_REORDER=''
50201    CXX_FLAG_REORDER=''
50202    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50203    SET_EXECUTABLE_ORIGIN=""
50204    SET_SHARED_LIBRARY_ORIGIN=''
50205    SET_SHARED_LIBRARY_NAME=''
50206    SET_SHARED_LIBRARY_MAPFILE=''
50207  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50208    PICFLAG=""
50209    C_FLAG_REORDER=''
50210    CXX_FLAG_REORDER=''
50211    SHARED_LIBRARY_FLAGS="-dll"
50212    SET_EXECUTABLE_ORIGIN=''
50213    SET_SHARED_LIBRARY_ORIGIN=''
50214    SET_SHARED_LIBRARY_NAME=''
50215    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50216  fi
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226  # The (cross) compiler is now configured, we can now test capabilities
50227  # of the target platform.
50228
50229
50230
50231  ###############################################################################
50232  #
50233  # Setup the opt flags for different compilers
50234  # and different operating systems.
50235  #
50236
50237  # FIXME: this was indirectly the old default, but just inherited.
50238  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50239  #   C_FLAG_DEPS="-MMD -MF"
50240  # fi
50241
50242  # Generate make dependency files
50243  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50244    C_FLAG_DEPS="-MMD -MF"
50245  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50246    C_FLAG_DEPS="-MMD -MF"
50247  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50248    C_FLAG_DEPS="-xMMD -xMF"
50249  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50250    C_FLAG_DEPS="-qmakedep=gcc -MF"
50251  fi
50252  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50253
50254
50255
50256  # Debug symbols
50257  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50258    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50259      # reduce from default "-g2" option to save space
50260      CFLAGS_DEBUG_SYMBOLS="-g1"
50261      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50262    else
50263      CFLAGS_DEBUG_SYMBOLS="-g"
50264      CXXFLAGS_DEBUG_SYMBOLS="-g"
50265    fi
50266  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50267    CFLAGS_DEBUG_SYMBOLS="-g"
50268    CXXFLAGS_DEBUG_SYMBOLS="-g"
50269  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50270    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50271    # -g0 enables debug symbols without disabling inlining.
50272    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50273  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50274    CFLAGS_DEBUG_SYMBOLS="-g"
50275    CXXFLAGS_DEBUG_SYMBOLS="-g"
50276  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50277    CFLAGS_DEBUG_SYMBOLS="-Zi"
50278    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50279  fi
50280
50281
50282
50283  # Debug symbols for JVM_CFLAGS
50284  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50285    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50286    if test "x$DEBUG_LEVEL" = xslowdebug; then
50287      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50288    else
50289      # -g0 does not disable inlining, which -g does.
50290      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50291    fi
50292  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50293    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50294  else
50295    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50296  fi
50297
50298
50299  # bounds, memory and behavior checking options
50300  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50301    case $DEBUG_LEVEL in
50302    release )
50303      # no adjustment
50304      ;;
50305    fastdebug )
50306      # no adjustment
50307      ;;
50308    slowdebug )
50309      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50310      # get's added conditionally on whether we produce debug symbols or not.
50311      # This is most likely not really correct.
50312
50313      # Add runtime stack smashing and undefined behavior checks.
50314      # Not all versions of gcc support -fstack-protector
50315      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358    # Execute function body
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407    # Execute function body
50408
50409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50410$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50411  supports=yes
50412
50413  saved_cflags="$CFLAGS"
50414  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50415  ac_ext=c
50416ac_cpp='$CPP $CPPFLAGS'
50417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50419ac_compiler_gnu=$ac_cv_c_compiler_gnu
50420
50421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50422/* end confdefs.h.  */
50423int i;
50424_ACEOF
50425if ac_fn_c_try_compile "$LINENO"; then :
50426
50427else
50428  supports=no
50429fi
50430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50431  ac_ext=cpp
50432ac_cpp='$CXXCPP $CPPFLAGS'
50433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50436
50437  CFLAGS="$saved_cflags"
50438
50439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50440$as_echo "$supports" >&6; }
50441  if test "x$supports" = "xyes" ; then
50442    :
50443    C_COMP_SUPPORTS="yes"
50444  else
50445    :
50446    C_COMP_SUPPORTS="no"
50447  fi
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507    # Execute function body
50508
50509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50510$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50511  supports=yes
50512
50513  saved_cxxflags="$CXXFLAGS"
50514  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50515  ac_ext=cpp
50516ac_cpp='$CXXCPP $CPPFLAGS'
50517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50520
50521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50522/* end confdefs.h.  */
50523int i;
50524_ACEOF
50525if ac_fn_cxx_try_compile "$LINENO"; then :
50526
50527else
50528  supports=no
50529fi
50530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50531  ac_ext=cpp
50532ac_cpp='$CXXCPP $CPPFLAGS'
50533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50536
50537  CXXFLAGS="$saved_cxxflags"
50538
50539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50540$as_echo "$supports" >&6; }
50541  if test "x$supports" = "xyes" ; then
50542    :
50543    CXX_COMP_SUPPORTS="yes"
50544  else
50545    :
50546    CXX_COMP_SUPPORTS="no"
50547  fi
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50562$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50563  supports=no
50564  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50565
50566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50567$as_echo "$supports" >&6; }
50568  if test "x$supports" = "xyes" ; then
50569    :
50570
50571  else
50572    :
50573    STACK_PROTECTOR_CFLAG=""
50574  fi
50575
50576
50577
50578
50579
50580
50581
50582      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50583      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50584      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50585        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50586      fi
50587      ;;
50588    esac
50589  fi
50590
50591  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50592    if test "x$DEBUG_LEVEL" != xrelease; then
50593      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50594        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50595      fi
50596    fi
50597  fi
50598
50599  # Optimization levels
50600  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50601    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50602
50603    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50604      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50605      C_O_FLAG_HIGHEST_JVM="-xO4"
50606      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50607      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50608      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50609      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50610      C_O_FLAG_DEBUG_JVM=""
50611      C_O_FLAG_NONE="-xregs=no%frameptr"
50612      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50613      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50614      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50615      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50616      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50617      CXX_O_FLAG_DEBUG_JVM=""
50618      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50619      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50620        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50621        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50622      fi
50623    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50624      C_O_FLAG_HIGHEST_JVM="-xO4"
50625      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50626      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50627      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50628      C_O_FLAG_DEBUG=""
50629      C_O_FLAG_DEBUG_JVM=""
50630      C_O_FLAG_NONE=""
50631      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50632      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50633      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50634      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50635      CXX_O_FLAG_DEBUG=""
50636      CXX_O_FLAG_DEBUG_JVM=""
50637      CXX_O_FLAG_NONE=""
50638    fi
50639  else
50640    # The remaining toolchains share opt flags between CC and CXX;
50641    # setup for C and duplicate afterwards.
50642    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50643      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50644        # On MacOSX we optimize for size, something
50645        # we should do for all platforms?
50646        C_O_FLAG_HIGHEST_JVM="-Os"
50647        C_O_FLAG_HIGHEST="-Os"
50648        C_O_FLAG_HI="-Os"
50649        C_O_FLAG_NORM="-Os"
50650        C_O_FLAG_SIZE="-Os"
50651      else
50652        C_O_FLAG_HIGHEST_JVM="-O3"
50653        C_O_FLAG_HIGHEST="-O3"
50654        C_O_FLAG_HI="-O3"
50655        C_O_FLAG_NORM="-O2"
50656        C_O_FLAG_SIZE="-Os"
50657      fi
50658      C_O_FLAG_DEBUG="-O0"
50659      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50660        C_O_FLAG_DEBUG_JVM=""
50661      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50662        C_O_FLAG_DEBUG_JVM="-O0"
50663      fi
50664      C_O_FLAG_NONE="-O0"
50665    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50666      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50667        # On MacOSX we optimize for size, something
50668        # we should do for all platforms?
50669        C_O_FLAG_HIGHEST_JVM="-Os"
50670        C_O_FLAG_HIGHEST="-Os"
50671        C_O_FLAG_HI="-Os"
50672        C_O_FLAG_NORM="-Os"
50673        C_O_FLAG_SIZE="-Os"
50674      else
50675        C_O_FLAG_HIGHEST_JVM="-O3"
50676        C_O_FLAG_HIGHEST="-O3"
50677        C_O_FLAG_HI="-O3"
50678        C_O_FLAG_NORM="-O2"
50679        C_O_FLAG_SIZE="-Os"
50680      fi
50681      C_O_FLAG_DEBUG="-O0"
50682      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50683        C_O_FLAG_DEBUG_JVM=""
50684      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50685        C_O_FLAG_DEBUG_JVM="-O0"
50686      fi
50687      C_O_FLAG_NONE="-O0"
50688    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50689      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50690      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50691      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50692      C_O_FLAG_NORM="-O2"
50693      C_O_FLAG_DEBUG="-qnoopt"
50694      # FIXME: Value below not verified.
50695      C_O_FLAG_DEBUG_JVM=""
50696      C_O_FLAG_NONE="-qnoopt"
50697    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50698      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50699      C_O_FLAG_HIGHEST="-O2"
50700      C_O_FLAG_HI="-O1"
50701      C_O_FLAG_NORM="-O1"
50702      C_O_FLAG_DEBUG="-Od"
50703      C_O_FLAG_DEBUG_JVM=""
50704      C_O_FLAG_NONE="-Od"
50705      C_O_FLAG_SIZE="-Os"
50706    fi
50707    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50708    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50709    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50710    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50711    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50712    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50713    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50714    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50715  fi
50716
50717  # Adjust optimization flags according to debug level.
50718  case $DEBUG_LEVEL in
50719    release )
50720      # no adjustment
50721      ;;
50722    fastdebug )
50723      # Not quite so much optimization
50724      C_O_FLAG_HI="$C_O_FLAG_NORM"
50725      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50726      ;;
50727    slowdebug )
50728      # Disable optimization
50729      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50730      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50731      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50732      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50733      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50734      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50735      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50736      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50737      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50738      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50739      ;;
50740  esac
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761# Check whether --with-abi-profile was given.
50762if test "${with_abi_profile+set}" = set; then :
50763  withval=$with_abi_profile;
50764fi
50765
50766
50767  if test "x$with_abi_profile" != x; then
50768    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50769        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50770      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50771    fi
50772
50773    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50775$as_echo_n "checking for ABI profle... " >&6; }
50776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50777$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50778
50779    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50780      ARM_FLOAT_TYPE=vfp-sflt
50781      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50782    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50783      ARM_FLOAT_TYPE=vfp-hflt
50784      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50785    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50786      ARM_FLOAT_TYPE=sflt
50787      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50788    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50789      ARM_FLOAT_TYPE=vfp-sflt
50790      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50791    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50792      ARM_FLOAT_TYPE=vfp-hflt
50793      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50794    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50795      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50796      ARM_FLOAT_TYPE=
50797      ARM_ARCH_TYPE_FLAGS=
50798    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50799      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50800      ARM_FLOAT_TYPE=
50801      ARM_ARCH_TYPE_FLAGS=
50802    else
50803      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50804    fi
50805
50806    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50807      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50808    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50809      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50810    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50811      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50812    fi
50813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50814$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50816$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50817
50818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50819$as_echo_n "checking for arch type flags... " >&6; }
50820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50821$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50822
50823    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50824    # autoconf target triplet.
50825     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50826    # Sanity check that it is a known ABI.
50827    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50828        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50829        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50830          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50831$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50832    fi
50833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50834$as_echo_n "checking for ABI property name... " >&6; }
50835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50836$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50837
50838
50839    # Pass these on to the open part of configure as if they were set using
50840    # --with-extra-c[xx]flags.
50841    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50842    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50843    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50844    # FIXME: This should not really be set using extra_cflags.
50845    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50846        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50847        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50848    fi
50849    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50850    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50851    # And pass the architecture flags to the linker as well
50852    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50853  fi
50854
50855  # When building with an abi profile, the name of that profile is appended on the
50856  # bundle platform, which is used in bundle names.
50857  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50858    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50859  fi
50860
50861
50862  # Special extras...
50863  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50864    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50865      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50866      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50867    fi
50868    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50869    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50870  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50871    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50872    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50873  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50874    CXXSTD_CXXFLAG="-std=gnu++98"
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917    # Execute function body
50918
50919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50920$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50921  supports=yes
50922
50923  saved_cxxflags="$CXXFLAGS"
50924  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50925  ac_ext=cpp
50926ac_cpp='$CXXCPP $CPPFLAGS'
50927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50930
50931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50932/* end confdefs.h.  */
50933int i;
50934_ACEOF
50935if ac_fn_cxx_try_compile "$LINENO"; then :
50936
50937else
50938  supports=no
50939fi
50940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50941  ac_ext=cpp
50942ac_cpp='$CXXCPP $CPPFLAGS'
50943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50946
50947  CXXFLAGS="$saved_cxxflags"
50948
50949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50950$as_echo "$supports" >&6; }
50951  if test "x$supports" = "xyes" ; then
50952    :
50953
50954  else
50955    :
50956    CXXSTD_CXXFLAG=""
50957  fi
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50971    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50972
50973  fi
50974  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50975    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50976    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50977  fi
50978
50979  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50980  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50981  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50982
50983  ###############################################################################
50984  #
50985  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50986  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50987  #
50988
50989  # Setup compiler/platform specific flags into
50990  #    CFLAGS_JDK    - C Compiler flags
50991  #    CXXFLAGS_JDK  - C++ Compiler flags
50992  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50993  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50994    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50995    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50996    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50997    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50998      # Force compatibility with i586 on 32 bit intel platforms.
50999      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51000      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51001    fi
51002    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51003        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51004    case $OPENJDK_TARGET_CPU_ARCH in
51005      arm )
51006        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51007        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51008        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51009        ;;
51010      ppc )
51011        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51012        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51013        ;;
51014      s390 )
51015        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51016        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51017        ;;
51018      * )
51019        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51020        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51021        ;;
51022    esac
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077    # Execute function body
51078
51079  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51080  REFERENCE_VERSION=6
51081
51082  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51083    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51084  fi
51085
51086  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51087    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51088  fi
51089
51090  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51091  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51092
51093  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51094    :
51095
51096  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51097  # runs afoul of the more aggressive versions of these optimisations.
51098  # Notably, value range propagation now assumes that the this pointer of C++
51099  # member functions is non-null.
51100  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51101        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51102        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51103$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51104  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51105  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51106
51107  else
51108    :
51109
51110  fi
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51126    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51127
51128    # Restrict the debug information created by Clang to avoid
51129    # too big object files and speed the build up a little bit
51130    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51131    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51132    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51133      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51134        # Force compatibility with i586 on 32 bit intel platforms.
51135        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51136        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51137      fi
51138      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51139      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51140          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51141      case $OPENJDK_TARGET_CPU_ARCH in
51142        ppc )
51143          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51144          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51145          ;;
51146        * )
51147          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51148          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51149          ;;
51150      esac
51151    fi
51152  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51153    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51154    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51155    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51156      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51157    fi
51158
51159    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51160    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51161  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51162    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51163    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51164    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51165  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51166    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51167        -MD -Zc:wchar_t- -W3 -wd4800 \
51168        -DWIN32_LEAN_AND_MEAN \
51169        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51170        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51171        -DWIN32 -DIAL"
51172    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51173      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51174    else
51175      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51176    fi
51177    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51178    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51179    # studio.
51180    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51181      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51182      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51183      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51184    fi
51185  fi
51186
51187  ###############################################################################
51188
51189  # Adjust flags according to debug level.
51190  case $DEBUG_LEVEL in
51191    fastdebug | slowdebug )
51192      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51193      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51194      ;;
51195    release )
51196      ;;
51197    * )
51198      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51199      ;;
51200  esac
51201
51202  # Set some common defines. These works for all compilers, but assume
51203  # -D is universally accepted.
51204
51205  # Setup endianness
51206  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51207    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51208    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51209    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51210    #   Note: -Dmacro         is the same as    #define macro 1
51211    #         -Dmacro=        is the same as    #define macro
51212    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51213      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51214    else
51215      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51216    fi
51217  else
51218    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51219    # are defined in the system?
51220    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51221      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51222    else
51223      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51224    fi
51225  fi
51226
51227  # Setup target OS define. Use OS target name but in upper case.
51228  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51229  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51230
51231  # Setup target CPU
51232  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51233      $OPENJDK_TARGET_ADD_LP64 \
51234      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51235
51236  # Setup debug/release defines
51237  if test "x$DEBUG_LEVEL" = xrelease; then
51238    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51239    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51240      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51241    fi
51242  else
51243    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51244  fi
51245
51246  # Set some additional per-OS defines.
51247  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51248    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51249    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51250        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51251  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51252    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51253    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51254        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51255  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51256    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51257    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51258    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51259    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51260        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51261        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51262        -fno-omit-frame-pointer"
51263  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51264    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51265    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51266    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51267        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51268        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51269  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51270    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51271  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51272    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51273    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51274  fi
51275
51276  # Set some additional per-CPU defines.
51277  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51278    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51279  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51280    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51281  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51282    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51283      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51284      # fixes `relocation truncated to fit' error for gcc 4.1.
51285      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51286      # Use ppc64 instructions, but schedule for power5
51287      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51288    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51289      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51290    fi
51291  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51292    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51293      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51294      # Little endian machine uses ELFv2 ABI.
51295      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51296      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51297      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51298    fi
51299  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51300    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51301      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51302    fi
51303  fi
51304
51305  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51306    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51307  fi
51308
51309  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51310    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51311      # Solaris does not have _LP64=1 in the old build.
51312      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51313      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51314    fi
51315  fi
51316
51317  # Set JVM_CFLAGS warning handling
51318  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51319    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51320        -Wunused-value -Woverloaded-virtual"
51321
51322    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377    # Execute function body
51378
51379  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51380  REFERENCE_VERSION=4.8
51381
51382  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51383    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51384  fi
51385
51386  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51387    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51388  fi
51389
51390  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51391  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51392
51393  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51394    :
51395
51396            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51397            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51398
51399
51400  else
51401    :
51402
51403  fi
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418    fi
51419    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51420      # Non-zero builds have stricter warnings
51421      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51422    else
51423      if test "x$TOOLCHAIN_TYPE" = xclang; then
51424        # Some versions of llvm do not like -Wundef
51425        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51426      fi
51427    fi
51428  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51429    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51430        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51431  fi
51432
51433  # Additional macosx handling
51434  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51435    # Setting these parameters makes it an error to link to macosx APIs that are
51436    # newer than the given OS version and makes the linked binaries compatible
51437    # even if built on a newer version of the OS.
51438    # The expected format is X.Y.Z
51439    MACOSX_VERSION_MIN=10.7.0
51440
51441
51442    # The macro takes the version with no dots, ex: 1070
51443    # Let the flags variables get resolved in make for easier override on make
51444    # command line.
51445    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51446    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51447  fi
51448
51449  # Setup some hard coded includes
51450  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51451      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51452      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51453      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51454      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51455      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51456      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51457
51458  # The shared libraries are compiled using the picflag.
51459  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51460      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51461  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51462      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51463
51464  # Executable flags
51465  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51466  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51467
51468
51469
51470
51471
51472
51473  # Setup LDFLAGS et al.
51474  #
51475
51476  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51477    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51478    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51479    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51480    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51481      LDFLAGS_SAFESH="-safeseh"
51482      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51483      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51484      # NOTE: Old build added -machine. Probably not needed.
51485      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51486    else
51487      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51488    fi
51489  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51490      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51491      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51492        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51493        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51494    fi
51495  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51496    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51497    # We have previously set HAS_GNU_HASH if this is the case
51498    if test -n "$HAS_GNU_HASH"; then
51499      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51500      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51501      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51502    fi
51503      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51504        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51505    fi
51506    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51507      # And since we now know that the linker is gnu, then add -z defs, to forbid
51508      # undefined symbols in object files.
51509      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51510      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51511      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51512      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51513      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51514      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51515        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51516      fi
51517      case $DEBUG_LEVEL in
51518        release )
51519          # tell linker to optimize libraries.
51520          # Should this be supplied to the OSS linker as well?
51521          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51522          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51523          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51524          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51525            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51526          fi
51527          ;;
51528        slowdebug )
51529          # Hotspot always let the linker optimize
51530          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51531          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51532            # do relocations at load
51533            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51534            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51535            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51536          fi
51537          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51538            # mark relocations read only
51539            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51540            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51541            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51542          fi
51543          ;;
51544        fastdebug )
51545          # Hotspot always let the linker optimize
51546          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51547          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51548            # mark relocations read only
51549            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51550            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51551            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51552          fi
51553          ;;
51554        * )
51555          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51556          ;;
51557        esac
51558    fi
51559  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51560    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51561    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51562    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51563    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51564    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51565    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51566      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51567    fi
51568  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51569    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51570    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51571    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51572  fi
51573
51574  # Customize LDFLAGS for executables
51575
51576  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51577
51578  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51579    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51580      LDFLAGS_STACK_SIZE=1048576
51581    else
51582      LDFLAGS_STACK_SIZE=327680
51583    fi
51584    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51585  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51586    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51587  fi
51588
51589  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51590
51591  # Customize LDFLAGS for libs
51592  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51593
51594  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51595  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51596    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51597        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51598    JDKLIB_LIBS=""
51599  else
51600    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51601        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51602
51603    if test "xTARGET" = "xTARGET"; then
51604      # On some platforms (mac) the linker warns about non existing -L dirs.
51605      # For any of the variants server, client or minimal, the dir matches the
51606      # variant name. The "main" variant should be used for linking. For the
51607      # rest, the dir is just server.
51608      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51609          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51610        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51611            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51612      else
51613        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51614            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51615      fi
51616    elif test "xTARGET" = "xBUILD"; then
51617      # When building a buildjdk, it's always only the server variant
51618      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51619          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51620    fi
51621
51622    JDKLIB_LIBS="-ljava -ljvm"
51623    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51624      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51625    fi
51626
51627  fi
51628
51629LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51630
51631  # Set JVM_LIBS (per os)
51632  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51633    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51634  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51635    # FIXME: This hard-coded path is not really proper.
51636    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51637      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51638    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51639      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51640    fi
51641    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51642        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51643  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51644    JVM_LIBS="$JVM_LIBS -lm"
51645  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51646    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51647  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51648    JVM_LIBS="$JVM_LIBS -lm"
51649  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51650    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51651        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51652        wsock32.lib winmm.lib version.lib psapi.lib"
51653    fi
51654
51655  # Set JVM_ASFLAGS
51656  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51657    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51658      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51659    fi
51660  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51661    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51662  fi
51663
51664  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680  # Special extras...
51681  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51682    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51683      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51684      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51685    fi
51686    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51687    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51688  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51689    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51690    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51691  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51692    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735    # Execute function body
51736
51737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51738$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51739  supports=yes
51740
51741  saved_cxxflags="$CXXFLAGS"
51742  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51743  ac_ext=cpp
51744ac_cpp='$CXXCPP $CPPFLAGS'
51745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51748
51749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51750/* end confdefs.h.  */
51751int i;
51752_ACEOF
51753if ac_fn_cxx_try_compile "$LINENO"; then :
51754
51755else
51756  supports=no
51757fi
51758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51759  ac_ext=cpp
51760ac_cpp='$CXXCPP $CPPFLAGS'
51761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51764
51765  CXXFLAGS="$saved_cxxflags"
51766
51767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51768$as_echo "$supports" >&6; }
51769  if test "x$supports" = "xyes" ; then
51770    :
51771
51772  else
51773    :
51774    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51775  fi
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51789    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51790
51791  fi
51792  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51793    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51794    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51795  fi
51796
51797  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51798  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51799  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51800
51801  ###############################################################################
51802  #
51803  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51804  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51805  #
51806
51807  # Setup compiler/platform specific flags into
51808  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51809  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51810  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51811  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51812    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51813    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51814    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51815    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51816      # Force compatibility with i586 on 32 bit intel platforms.
51817      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51818      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51819    fi
51820    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51821        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51822    case $OPENJDK_BUILD_CPU_ARCH in
51823      arm )
51824        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51825        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51826        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51827        ;;
51828      ppc )
51829        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51830        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51831        ;;
51832      s390 )
51833        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51834        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51835        ;;
51836      * )
51837        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51838        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51839        ;;
51840    esac
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895    # Execute function body
51896
51897  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51898  REFERENCE_VERSION=6
51899
51900  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51901    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51902  fi
51903
51904  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51905    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51906  fi
51907
51908  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51909  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51910
51911  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51912    :
51913
51914  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51915  # runs afoul of the more aggressive versions of these optimisations.
51916  # Notably, value range propagation now assumes that the this pointer of C++
51917  # member functions is non-null.
51918  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51919        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51920        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51921$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51922  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51923  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51924
51925  else
51926    :
51927
51928  fi
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51944    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51945
51946    # Restrict the debug information created by Clang to avoid
51947    # too big object files and speed the build up a little bit
51948    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51949    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51950    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51951      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51952        # Force compatibility with i586 on 32 bit intel platforms.
51953        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51954        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51955      fi
51956      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51957      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51958          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51959      case $OPENJDK_BUILD_CPU_ARCH in
51960        ppc )
51961          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51962          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51963          ;;
51964        * )
51965          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51966          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51967          ;;
51968      esac
51969    fi
51970  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51971    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51972    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51973    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51974      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51975    fi
51976
51977    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51978    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51979  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51980    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51981    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51982    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51983  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51984    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51985        -MD -Zc:wchar_t- -W3 -wd4800 \
51986        -DWIN32_LEAN_AND_MEAN \
51987        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51988        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51989        -DWIN32 -DIAL"
51990    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51991      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51992    else
51993      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51994    fi
51995    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51996    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51997    # studio.
51998    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51999      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52000      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52001      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52002    fi
52003  fi
52004
52005  ###############################################################################
52006
52007  # Adjust flags according to debug level.
52008  case $DEBUG_LEVEL in
52009    fastdebug | slowdebug )
52010      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52011      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52012      ;;
52013    release )
52014      ;;
52015    * )
52016      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52017      ;;
52018  esac
52019
52020  # Set some common defines. These works for all compilers, but assume
52021  # -D is universally accepted.
52022
52023  # Setup endianness
52024  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52025    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52026    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52027    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52028    #   Note: -Dmacro         is the same as    #define macro 1
52029    #         -Dmacro=        is the same as    #define macro
52030    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52031      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52032    else
52033      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52034    fi
52035  else
52036    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52037    # are defined in the system?
52038    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52039      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52040    else
52041      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52042    fi
52043  fi
52044
52045  # Setup target OS define. Use OS target name but in upper case.
52046  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52047  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52048
52049  # Setup target CPU
52050  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52051      $OPENJDK_BUILD_ADD_LP64 \
52052      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52053
52054  # Setup debug/release defines
52055  if test "x$DEBUG_LEVEL" = xrelease; then
52056    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52057    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52058      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52059    fi
52060  else
52061    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52062  fi
52063
52064  # Set some additional per-OS defines.
52065  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52066    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52067    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52068        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52069  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52070    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52071    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52072        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
52073  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52074    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52075    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52076    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52077    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52078        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52079        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52080        -fno-omit-frame-pointer"
52081  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52082    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52083    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52084    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52085        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52086        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52087  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52088    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52089  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52090    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52091    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52092  fi
52093
52094  # Set some additional per-CPU defines.
52095  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52096    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52097  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52098    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52099  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52100    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52101      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52102      # fixes `relocation truncated to fit' error for gcc 4.1.
52103      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52104      # Use ppc64 instructions, but schedule for power5
52105      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52106    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52107      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52108    fi
52109  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52110    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52111      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52112      # Little endian machine uses ELFv2 ABI.
52113      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52114      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52115      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52116    fi
52117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52118    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52119      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52120    fi
52121  fi
52122
52123  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52124    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52125  fi
52126
52127  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52128    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52129      # Solaris does not have _LP64=1 in the old build.
52130      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52131      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52132    fi
52133  fi
52134
52135  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52136  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52137    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52138        -Wunused-value -Woverloaded-virtual"
52139
52140    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195    # Execute function body
52196
52197  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52198  REFERENCE_VERSION=4.8
52199
52200  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52201    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52202  fi
52203
52204  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52205    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52206  fi
52207
52208  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52209  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52210
52211  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52212    :
52213
52214            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52215            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52216
52217
52218  else
52219    :
52220
52221  fi
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236    fi
52237    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52238      # Non-zero builds have stricter warnings
52239      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52240    else
52241      if test "x$TOOLCHAIN_TYPE" = xclang; then
52242        # Some versions of llvm do not like -Wundef
52243        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52244      fi
52245    fi
52246  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52247    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52248        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52249  fi
52250
52251  # Additional macosx handling
52252  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52253    # Setting these parameters makes it an error to link to macosx APIs that are
52254    # newer than the given OS version and makes the linked binaries compatible
52255    # even if built on a newer version of the OS.
52256    # The expected format is X.Y.Z
52257    MACOSX_VERSION_MIN=10.7.0
52258
52259
52260    # The macro takes the version with no dots, ex: 1070
52261    # Let the flags variables get resolved in make for easier override on make
52262    # command line.
52263    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)"
52264    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52265  fi
52266
52267  # Setup some hard coded includes
52268  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52269      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52270      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52271      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52272      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52273      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52274      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52275
52276  # The shared libraries are compiled using the picflag.
52277  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52278      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52279  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52280      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52281
52282  # Executable flags
52283  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52284  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52285
52286
52287
52288
52289
52290
52291  # Setup LDFLAGS et al.
52292  #
52293
52294  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52295    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52296    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52297    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52298    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52299      LDFLAGS_SAFESH="-safeseh"
52300      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52301      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52302      # NOTE: Old build added -machine. Probably not needed.
52303      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52304    else
52305      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52306    fi
52307  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52308      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52309      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52310        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52311        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52312    fi
52313  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52314    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52315    # We have previously set HAS_GNU_HASH if this is the case
52316    if test -n "$HAS_GNU_HASH"; then
52317      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52318      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52319      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52320    fi
52321      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52322        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52323    fi
52324    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52325      # And since we now know that the linker is gnu, then add -z defs, to forbid
52326      # undefined symbols in object files.
52327      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52328      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52329      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52330      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52331      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52332      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52333        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52334      fi
52335      case $DEBUG_LEVEL in
52336        release )
52337          # tell linker to optimize libraries.
52338          # Should this be supplied to the OSS linker as well?
52339          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52340          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52341          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52342          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52343            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52344          fi
52345          ;;
52346        slowdebug )
52347          # Hotspot always let the linker optimize
52348          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52349          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52350            # do relocations at load
52351            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52352            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52353            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52354          fi
52355          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52356            # mark relocations read only
52357            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52358            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52359            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52360          fi
52361          ;;
52362        fastdebug )
52363          # Hotspot always let the linker optimize
52364          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52365          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52366            # mark relocations read only
52367            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52368            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52369            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52370          fi
52371          ;;
52372        * )
52373          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52374          ;;
52375        esac
52376    fi
52377  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52378    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52379    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52380    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52381    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52382    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52383    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52384      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52385    fi
52386  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52387    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52388    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52389    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52390  fi
52391
52392  # Customize LDFLAGS for executables
52393
52394  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52395
52396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52397    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52398      LDFLAGS_STACK_SIZE=1048576
52399    else
52400      LDFLAGS_STACK_SIZE=327680
52401    fi
52402    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52403  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52404    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52405  fi
52406
52407  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52408
52409  # Customize LDFLAGS for libs
52410  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52411
52412  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52413  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52414    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52415        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52416    OPENJDK_BUILD_JDKLIB_LIBS=""
52417  else
52418    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52419        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52420
52421    if test "xBUILD" = "xTARGET"; then
52422      # On some platforms (mac) the linker warns about non existing -L dirs.
52423      # For any of the variants server, client or minimal, the dir matches the
52424      # variant name. The "main" variant should be used for linking. For the
52425      # rest, the dir is just server.
52426      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52427          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52428        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52429            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52430      else
52431        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52432            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52433      fi
52434    elif test "xBUILD" = "xBUILD"; then
52435      # When building a buildjdk, it's always only the server variant
52436      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52437          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52438    fi
52439
52440    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52441    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52442      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52443    fi
52444
52445  fi
52446
52447OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52448
52449  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52450  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52451    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52452  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52453    # FIXME: This hard-coded path is not really proper.
52454    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52455      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52456    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52457      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52458    fi
52459    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52460        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52461  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52462    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52463  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52464    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52465  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52466    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52467  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52468    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52469        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52470        wsock32.lib winmm.lib version.lib psapi.lib"
52471    fi
52472
52473  # Set OPENJDK_BUILD_JVM_ASFLAGS
52474  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52475    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52476      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52477    fi
52478  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52479    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52480  fi
52481
52482  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498  # Tests are only ever compiled for TARGET
52499  # Flags for compiling test libraries
52500  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52501  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52502
52503  # Flags for compiling test executables
52504  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52505  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52506
52507
52508
52509
52510
52511
52512  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52513  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52514
52515
52516
52517
52518
52519
52520  # Check that the compiler supports -mX (or -qX on AIX) flags
52521  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569    # Execute function body
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618    # Execute function body
52619
52620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52621$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52622  supports=yes
52623
52624  saved_cflags="$CFLAGS"
52625  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52626  ac_ext=c
52627ac_cpp='$CPP $CPPFLAGS'
52628ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52629ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52630ac_compiler_gnu=$ac_cv_c_compiler_gnu
52631
52632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52633/* end confdefs.h.  */
52634int i;
52635_ACEOF
52636if ac_fn_c_try_compile "$LINENO"; then :
52637
52638else
52639  supports=no
52640fi
52641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52642  ac_ext=cpp
52643ac_cpp='$CXXCPP $CPPFLAGS'
52644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52647
52648  CFLAGS="$saved_cflags"
52649
52650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52651$as_echo "$supports" >&6; }
52652  if test "x$supports" = "xyes" ; then
52653    :
52654    C_COMP_SUPPORTS="yes"
52655  else
52656    :
52657    C_COMP_SUPPORTS="no"
52658  fi
52659
52660
52661
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718    # Execute function body
52719
52720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52721$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52722  supports=yes
52723
52724  saved_cxxflags="$CXXFLAGS"
52725  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52726  ac_ext=cpp
52727ac_cpp='$CXXCPP $CPPFLAGS'
52728ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52729ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52730ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52731
52732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52733/* end confdefs.h.  */
52734int i;
52735_ACEOF
52736if ac_fn_cxx_try_compile "$LINENO"; then :
52737
52738else
52739  supports=no
52740fi
52741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52742  ac_ext=cpp
52743ac_cpp='$CXXCPP $CPPFLAGS'
52744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52747
52748  CXXFLAGS="$saved_cxxflags"
52749
52750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52751$as_echo "$supports" >&6; }
52752  if test "x$supports" = "xyes" ; then
52753    :
52754    CXX_COMP_SUPPORTS="yes"
52755  else
52756    :
52757    CXX_COMP_SUPPORTS="no"
52758  fi
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52773$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52774  supports=no
52775  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52776
52777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52778$as_echo "$supports" >&6; }
52779  if test "x$supports" = "xyes" ; then
52780    :
52781    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52782  else
52783    :
52784    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52785  fi
52786
52787
52788
52789
52790
52791
52792
52793
52794  # Check whether --enable-warnings-as-errors was given.
52795if test "${enable_warnings_as_errors+set}" = set; then :
52796  enableval=$enable_warnings_as_errors;
52797fi
52798
52799
52800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52801$as_echo_n "checking if native warnings are errors... " >&6; }
52802  if test "x$enable_warnings_as_errors" = "xyes"; then
52803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52804$as_echo "yes (explicitly set)" >&6; }
52805    WARNINGS_AS_ERRORS=true
52806  elif test "x$enable_warnings_as_errors" = "xno"; then
52807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52808$as_echo "no" >&6; }
52809    WARNINGS_AS_ERRORS=false
52810  elif test "x$enable_warnings_as_errors" = "x"; then
52811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52812$as_echo "yes (default)" >&6; }
52813    WARNINGS_AS_ERRORS=true
52814  else
52815    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52816  fi
52817
52818
52819
52820  case "${TOOLCHAIN_TYPE}" in
52821    microsoft)
52822      DISABLE_WARNING_PREFIX="-wd"
52823      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52824      ;;
52825    solstudio)
52826      DISABLE_WARNING_PREFIX="-erroff="
52827      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52828      ;;
52829    gcc)
52830      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878    # Execute function body
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927    # Execute function body
52928
52929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52930$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52931  supports=yes
52932
52933  saved_cflags="$CFLAGS"
52934  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52935  ac_ext=c
52936ac_cpp='$CPP $CPPFLAGS'
52937ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52938ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52939ac_compiler_gnu=$ac_cv_c_compiler_gnu
52940
52941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52942/* end confdefs.h.  */
52943int i;
52944_ACEOF
52945if ac_fn_c_try_compile "$LINENO"; then :
52946
52947else
52948  supports=no
52949fi
52950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52951  ac_ext=cpp
52952ac_cpp='$CXXCPP $CPPFLAGS'
52953ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52954ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52955ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52956
52957  CFLAGS="$saved_cflags"
52958
52959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52960$as_echo "$supports" >&6; }
52961  if test "x$supports" = "xyes" ; then
52962    :
52963    C_COMP_SUPPORTS="yes"
52964  else
52965    :
52966    C_COMP_SUPPORTS="no"
52967  fi
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027    # Execute function body
53028
53029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53030$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53031  supports=yes
53032
53033  saved_cxxflags="$CXXFLAGS"
53034  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53035  ac_ext=cpp
53036ac_cpp='$CXXCPP $CPPFLAGS'
53037ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53038ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53039ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53040
53041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53042/* end confdefs.h.  */
53043int i;
53044_ACEOF
53045if ac_fn_cxx_try_compile "$LINENO"; then :
53046
53047else
53048  supports=no
53049fi
53050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53051  ac_ext=cpp
53052ac_cpp='$CXXCPP $CPPFLAGS'
53053ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53054ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53055ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53056
53057  CXXFLAGS="$saved_cxxflags"
53058
53059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53060$as_echo "$supports" >&6; }
53061  if test "x$supports" = "xyes" ; then
53062    :
53063    CXX_COMP_SUPPORTS="yes"
53064  else
53065    :
53066    CXX_COMP_SUPPORTS="no"
53067  fi
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53082$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53083  supports=no
53084  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53085
53086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53087$as_echo "$supports" >&6; }
53088  if test "x$supports" = "xyes" ; then
53089    :
53090    GCC_CAN_DISABLE_WARNINGS=true
53091  else
53092    :
53093    GCC_CAN_DISABLE_WARNINGS=false
53094
53095  fi
53096
53097
53098
53099
53100
53101
53102      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53103        DISABLE_WARNING_PREFIX="-Wno-"
53104      else
53105        DISABLE_WARNING_PREFIX=
53106      fi
53107      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53108      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53109      # CFLAGS since any target specific flags will likely not work with the
53110      # build compiler
53111      CC_OLD="$CC"
53112      CXX_OLD="$CXX"
53113      CC="$BUILD_CC"
53114      CXX="$BUILD_CXX"
53115      CFLAGS_OLD="$CFLAGS"
53116      CFLAGS=""
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164    # Execute function body
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213    # Execute function body
53214
53215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53216$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53217  supports=yes
53218
53219  saved_cflags="$CFLAGS"
53220  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53221  ac_ext=c
53222ac_cpp='$CPP $CPPFLAGS'
53223ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53224ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53225ac_compiler_gnu=$ac_cv_c_compiler_gnu
53226
53227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53228/* end confdefs.h.  */
53229int i;
53230_ACEOF
53231if ac_fn_c_try_compile "$LINENO"; then :
53232
53233else
53234  supports=no
53235fi
53236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53237  ac_ext=cpp
53238ac_cpp='$CXXCPP $CPPFLAGS'
53239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53242
53243  CFLAGS="$saved_cflags"
53244
53245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53246$as_echo "$supports" >&6; }
53247  if test "x$supports" = "xyes" ; then
53248    :
53249    C_COMP_SUPPORTS="yes"
53250  else
53251    :
53252    C_COMP_SUPPORTS="no"
53253  fi
53254
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313    # Execute function body
53314
53315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53316$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53317  supports=yes
53318
53319  saved_cxxflags="$CXXFLAGS"
53320  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53321  ac_ext=cpp
53322ac_cpp='$CXXCPP $CPPFLAGS'
53323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53326
53327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53328/* end confdefs.h.  */
53329int i;
53330_ACEOF
53331if ac_fn_cxx_try_compile "$LINENO"; then :
53332
53333else
53334  supports=no
53335fi
53336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53337  ac_ext=cpp
53338ac_cpp='$CXXCPP $CPPFLAGS'
53339ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53340ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53341ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53342
53343  CXXFLAGS="$saved_cxxflags"
53344
53345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53346$as_echo "$supports" >&6; }
53347  if test "x$supports" = "xyes" ; then
53348    :
53349    CXX_COMP_SUPPORTS="yes"
53350  else
53351    :
53352    CXX_COMP_SUPPORTS="no"
53353  fi
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53368$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53369  supports=no
53370  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53371
53372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53373$as_echo "$supports" >&6; }
53374  if test "x$supports" = "xyes" ; then
53375    :
53376    BUILD_CC_CAN_DISABLE_WARNINGS=true
53377  else
53378    :
53379    BUILD_CC_CAN_DISABLE_WARNINGS=false
53380
53381  fi
53382
53383
53384
53385
53386
53387
53388      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53389        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53390      else
53391        BUILD_CC_DISABLE_WARNING_PREFIX=
53392      fi
53393      CC="$CC_OLD"
53394      CXX="$CXX_OLD"
53395      CFLAGS="$CFLAGS_OLD"
53396      ;;
53397    clang)
53398      DISABLE_WARNING_PREFIX="-Wno-"
53399      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53400      ;;
53401    xlc)
53402      DISABLE_WARNING_PREFIX="-qsuppress="
53403      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53404      ;;
53405  esac
53406
53407
53408
53409
53410
53411# Setup debug symbols (need objcopy from the toolchain for that)
53412
53413  #
53414  # NATIVE_DEBUG_SYMBOLS
53415  # This must be done after the toolchain is setup, since we're looking at objcopy.
53416  #
53417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53418$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53419
53420# Check whether --with-native-debug-symbols was given.
53421if test "${with_native_debug_symbols+set}" = set; then :
53422  withval=$with_native_debug_symbols;
53423        if test "x$OPENJDK_TARGET_OS" = xaix; then
53424          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53425            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53426          fi
53427        fi
53428
53429else
53430
53431        if test "x$OPENJDK_TARGET_OS" = xaix; then
53432          # AIX doesn't support 'zipped' so use 'internal' as default
53433          with_native_debug_symbols="internal"
53434        else
53435          if test "x$STATIC_BUILD" = xtrue; then
53436            with_native_debug_symbols="none"
53437          else
53438            with_native_debug_symbols="zipped"
53439          fi
53440        fi
53441
53442fi
53443
53444  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53446$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53447
53448  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53449
53450    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53451      if test "x$OBJCOPY" = x; then
53452        # enabling of enable-debug-symbols and can't find objcopy
53453        # this is an error
53454        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53455      fi
53456    fi
53457
53458    COMPILE_WITH_DEBUG_SYMBOLS=true
53459    COPY_DEBUG_SYMBOLS=true
53460    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53461  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53462    COMPILE_WITH_DEBUG_SYMBOLS=false
53463    COPY_DEBUG_SYMBOLS=false
53464    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53465  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53466    COMPILE_WITH_DEBUG_SYMBOLS=true
53467    COPY_DEBUG_SYMBOLS=false
53468    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53469  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53470
53471    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53472      if test "x$OBJCOPY" = x; then
53473        # enabling of enable-debug-symbols and can't find objcopy
53474        # this is an error
53475        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53476      fi
53477    fi
53478
53479    COMPILE_WITH_DEBUG_SYMBOLS=true
53480    COPY_DEBUG_SYMBOLS=true
53481    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53482  else
53483    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53484  fi
53485
53486  # --enable-debug-symbols is deprecated.
53487  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53488
53489  # Check whether --enable-debug-symbols was given.
53490if test "${enable_debug_symbols+set}" = set; then :
53491  enableval=$enable_debug_symbols;
53492fi
53493
53494  if test "x$enable_debug_symbols" != x; then
53495    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53496$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53497
53498    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53499      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53500$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53501    fi
53502
53503  fi
53504
53505
53506  # --enable-zip-debug-info is deprecated.
53507  # Please use --with-native-debug-symbols=zipped .
53508
53509  # Check whether --enable-zip-debug-info was given.
53510if test "${enable_zip_debug_info+set}" = set; then :
53511  enableval=$enable_zip_debug_info;
53512fi
53513
53514  if test "x$enable_zip_debug_info" != x; then
53515    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53516$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53517
53518    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53520$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53521    fi
53522
53523  fi
53524
53525
53526
53527
53528
53529
53530
53531  # Check whether --enable-native-coverage was given.
53532if test "${enable_native_coverage+set}" = set; then :
53533  enableval=$enable_native_coverage;
53534fi
53535
53536  GCOV_ENABLED="false"
53537  if test "x$enable_native_coverage" = "xyes"; then
53538    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53540$as_echo_n "checking if native coverage is enabled... " >&6; }
53541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53542$as_echo "yes" >&6; }
53543      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53544      GCOV_LDFLAGS="-fprofile-arcs"
53545      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53546      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53547      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53548      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53549      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53550      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53551      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53552      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53553      GCOV_ENABLED="true"
53554    else
53555      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53556    fi
53557  elif test "x$enable_native_coverage" = "xno"; then
53558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53559$as_echo_n "checking if native coverage is enabled... " >&6; }
53560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53561$as_echo "no" >&6; }
53562  elif test "x$enable_native_coverage" != "x"; then
53563    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53564  fi
53565
53566
53567
53568
53569# Need toolchain to setup dtrace
53570
53571  # Test for dtrace dependencies
53572  # Check whether --enable-dtrace was given.
53573if test "${enable_dtrace+set}" = set; then :
53574  enableval=$enable_dtrace;
53575fi
53576
53577
53578  DTRACE_DEP_MISSING=false
53579
53580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53581$as_echo_n "checking for dtrace tool... " >&6; }
53582  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53584$as_echo "$DTRACE" >&6; }
53585  else
53586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53587$as_echo "not found, cannot build dtrace" >&6; }
53588    DTRACE_DEP_MISSING=true
53589  fi
53590
53591  for ac_header in sys/sdt.h
53592do :
53593  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53594if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53595  cat >>confdefs.h <<_ACEOF
53596#define HAVE_SYS_SDT_H 1
53597_ACEOF
53598 DTRACE_HEADERS_OK=yes
53599else
53600  DTRACE_HEADERS_OK=no
53601fi
53602
53603done
53604
53605  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53606    DTRACE_DEP_MISSING=true
53607  fi
53608
53609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53610$as_echo_n "checking if dtrace should be built... " >&6; }
53611  if test "x$enable_dtrace" = "xyes"; then
53612    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53614$as_echo "no, missing dependencies" >&6; }
53615
53616  # Print a helpful message on how to acquire the necessary build dependency.
53617  # dtrace is the help tag: freetype, cups, alsa etc
53618  MISSING_DEPENDENCY=dtrace
53619
53620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53621    cygwin_help $MISSING_DEPENDENCY
53622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53623    msys_help $MISSING_DEPENDENCY
53624  else
53625    PKGHANDLER_COMMAND=
53626
53627    case $PKGHANDLER in
53628      apt-get)
53629        apt_help     $MISSING_DEPENDENCY ;;
53630      yum)
53631        yum_help     $MISSING_DEPENDENCY ;;
53632      brew)
53633        brew_help    $MISSING_DEPENDENCY ;;
53634      port)
53635        port_help    $MISSING_DEPENDENCY ;;
53636      pkgutil)
53637        pkgutil_help $MISSING_DEPENDENCY ;;
53638      pkgadd)
53639        pkgadd_help  $MISSING_DEPENDENCY ;;
53640    esac
53641
53642    if test "x$PKGHANDLER_COMMAND" != x; then
53643      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53644    fi
53645  fi
53646
53647      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53648    else
53649      INCLUDE_DTRACE=true
53650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53651$as_echo "yes, forced" >&6; }
53652    fi
53653  elif test "x$enable_dtrace" = "xno"; then
53654    INCLUDE_DTRACE=false
53655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53656$as_echo "no, forced" >&6; }
53657  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53658    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53659      INCLUDE_DTRACE=false
53660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53661$as_echo "no, missing dependencies" >&6; }
53662    else
53663      INCLUDE_DTRACE=true
53664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53665$as_echo "yes, dependencies present" >&6; }
53666    fi
53667  else
53668    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53669  fi
53670
53671
53672  # Check whether --enable-aot was given.
53673if test "${enable_aot+set}" = set; then :
53674  enableval=$enable_aot;
53675fi
53676
53677
53678  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53679    ENABLE_AOT="true"
53680  elif test "x$enable_aot" = "xyes"; then
53681    ENABLE_AOT="true"
53682  elif test "x$enable_aot" = "xno"; then
53683    ENABLE_AOT="false"
53684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53685$as_echo_n "checking if aot should be enabled... " >&6; }
53686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53687$as_echo "no, forced" >&6; }
53688  else
53689    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53690  fi
53691
53692  if test "x$ENABLE_AOT" = "xtrue"; then
53693    # Only enable AOT on linux-X64.
53694    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53695      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53696        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53697          ENABLE_AOT="true"
53698        else
53699          ENABLE_AOT="false"
53700          if test "x$enable_aot" = "xyes"; then
53701            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53702          fi
53703        fi
53704      else
53705        ENABLE_AOT="false"
53706        if test "x$enable_aot" = "xyes"; then
53707          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53708        fi
53709      fi
53710    else
53711      ENABLE_AOT="false"
53712      if test "x$enable_aot" = "xyes"; then
53713        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53714      fi
53715    fi
53716  fi
53717
53718
53719
53720
53721  # Check whether --enable-hotspot-gtest was given.
53722if test "${enable_hotspot_gtest+set}" = set; then :
53723  enableval=$enable_hotspot_gtest;
53724fi
53725
53726
53727  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53728    GTEST_DIR_EXISTS="true"
53729  else
53730    GTEST_DIR_EXISTS="false"
53731  fi
53732
53733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53734$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53735  if test "x$enable_hotspot_gtest" = "xyes"; then
53736    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53738$as_echo "yes, forced" >&6; }
53739      BUILD_GTEST="true"
53740    else
53741      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53742    fi
53743  elif test "x$enable_hotspot_gtest" = "xno"; then
53744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53745$as_echo "no, forced" >&6; }
53746    BUILD_GTEST="false"
53747  elif test "x$enable_hotspot_gtest" = "x"; then
53748    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53750$as_echo "yes" >&6; }
53751      BUILD_GTEST="true"
53752    else
53753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53754$as_echo "no" >&6; }
53755      BUILD_GTEST="false"
53756    fi
53757  else
53758    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53759  fi
53760
53761
53762
53763
53764###############################################################################
53765#
53766# Check dependencies for external and internal libraries.
53767#
53768###############################################################################
53769
53770# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53771
53772  # When using cygwin or msys, we need a wrapper binary that renames
53773  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53774  # @files and rewrites these too! This wrapper binary is
53775  # called fixpath.
53776  FIXPATH=
53777  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53779$as_echo_n "checking if fixpath can be created... " >&6; }
53780    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53781    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53782    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53783    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53784      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53785      FIXPATH="$FIXPATH_BIN -c"
53786    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53787      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53788      # @ was chosen as separator to minimize risk of other tools messing around with it
53789      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53790          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53791      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53792      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53793    fi
53794    FIXPATH_SRC_W="$FIXPATH_SRC"
53795    FIXPATH_BIN_W="$FIXPATH_BIN"
53796
53797  unix_path="$FIXPATH_SRC_W"
53798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53799    windows_path=`$CYGPATH -m "$unix_path"`
53800    FIXPATH_SRC_W="$windows_path"
53801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53802    windows_path=`cmd //c echo $unix_path`
53803    FIXPATH_SRC_W="$windows_path"
53804  fi
53805
53806
53807  unix_path="$FIXPATH_BIN_W"
53808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53809    windows_path=`$CYGPATH -m "$unix_path"`
53810    FIXPATH_BIN_W="$windows_path"
53811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53812    windows_path=`cmd //c echo $unix_path`
53813    FIXPATH_BIN_W="$windows_path"
53814  fi
53815
53816    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53817    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53818    cd $FIXPATH_DIR
53819    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53820    cd $CURDIR
53821
53822    if test ! -x $FIXPATH_BIN; then
53823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53824$as_echo "no" >&6; }
53825      cat $FIXPATH_DIR/fixpath1.log
53826      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53827    fi
53828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53829$as_echo "yes" >&6; }
53830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53831$as_echo_n "checking if fixpath.exe works... " >&6; }
53832    cd $FIXPATH_DIR
53833    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53834        > $FIXPATH_DIR/fixpath2.log 2>&1
53835    cd $CURDIR
53836    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53838$as_echo "no" >&6; }
53839      cat $FIXPATH_DIR/fixpath2.log
53840      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53841    fi
53842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53843$as_echo "yes" >&6; }
53844
53845    FIXPATH_DETACH_FLAG="--detach"
53846  fi
53847
53848
53849
53850
53851
53852
53853  # Check if X11 is needed
53854  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53855    # No X11 support on windows or macosx
53856    NEEDS_LIB_X11=false
53857  else
53858    # All other instances need X11, even if building headless only, libawt still
53859    # needs X11 headers.
53860    NEEDS_LIB_X11=true
53861  fi
53862
53863  # Check if cups is needed
53864  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53865    # Windows have a separate print system
53866    NEEDS_LIB_CUPS=false
53867  else
53868    NEEDS_LIB_CUPS=true
53869  fi
53870
53871  # A custom hook may have set this already
53872  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53873    NEEDS_LIB_FREETYPE=true
53874  fi
53875
53876  # Check if alsa is needed
53877  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53878    NEEDS_LIB_ALSA=true
53879  else
53880    NEEDS_LIB_ALSA=false
53881  fi
53882
53883  # Check if ffi is needed
53884  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53885    NEEDS_LIB_FFI=true
53886  else
53887    NEEDS_LIB_FFI=false
53888  fi
53889
53890
53891  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53892  # dynamic build is configured on command line.
53893
53894# Check whether --with-stdc++lib was given.
53895if test "${with_stdc__lib+set}" = set; then :
53896  withval=$with_stdc__lib;
53897        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53898                && test "x$with_stdc__lib" != xdefault; then
53899          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53900        fi
53901
53902else
53903  with_stdc__lib=default
53904
53905fi
53906
53907
53908  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53909    # Test if stdc++ can be linked statically.
53910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53911$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53912    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53913    ac_ext=cpp
53914ac_cpp='$CXXCPP $CPPFLAGS'
53915ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53916ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53917ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53918
53919    OLD_LIBS="$LIBS"
53920    LIBS="$STATIC_STDCXX_FLAGS"
53921    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53922/* end confdefs.h.  */
53923
53924int
53925main ()
53926{
53927return 0;
53928  ;
53929  return 0;
53930}
53931_ACEOF
53932if ac_fn_cxx_try_link "$LINENO"; then :
53933  has_static_libstdcxx=yes
53934else
53935  has_static_libstdcxx=no
53936fi
53937rm -f core conftest.err conftest.$ac_objext \
53938    conftest$ac_exeext conftest.$ac_ext
53939    LIBS="$OLD_LIBS"
53940    ac_ext=cpp
53941ac_cpp='$CXXCPP $CPPFLAGS'
53942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53945
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53947$as_echo "$has_static_libstdcxx" >&6; }
53948
53949    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53950      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53951    fi
53952
53953    # If dynamic was requested, it's available since it would fail above otherwise.
53954    # If dynamic wasn't requested, go with static unless it isn't available.
53955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53956$as_echo_n "checking how to link with libstdc++... " >&6; }
53957    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53958        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53959      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53960$as_echo "dynamic" >&6; }
53961    else
53962      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53963      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53964      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53965      # just use the same setting as for the TARGET toolchain.
53966      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53968$as_echo "static" >&6; }
53969    fi
53970  fi
53971
53972  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53973  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53974    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53975  fi
53976
53977
53978
53979  # Setup Windows runtime dlls
53980  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53981
53982
53983# Check whether --with-msvcr-dll was given.
53984if test "${with_msvcr_dll+set}" = set; then :
53985  withval=$with_msvcr_dll;
53986fi
53987
53988
53989  if test "x$with_msvcr_dll" != x; then
53990    # If given explicitly by user, do not probe. If not present, fail directly.
53991
53992  DLL_NAME="$MSVCR_NAME"
53993  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53994  METHOD="--with-msvcr-dll"
53995  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53996    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53997$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53998
53999    # Need to check if the found msvcr is correct architecture
54000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54001$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54002    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54004      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54005      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54006      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54007        CORRECT_MSVCR_ARCH="PE32 executable"
54008      else
54009        CORRECT_MSVCR_ARCH="PE32+ executable"
54010      fi
54011    else
54012      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54013        CORRECT_MSVCR_ARCH=386
54014      else
54015        CORRECT_MSVCR_ARCH=x86-64
54016      fi
54017    fi
54018    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54020$as_echo "ok" >&6; }
54021      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54022
54023  # Only process if variable expands to non-empty
54024
54025  if test "x$MSVC_DLL" != x; then
54026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54027
54028  # Input might be given as Windows format, start by converting to
54029  # unix format.
54030  path="$MSVC_DLL"
54031  new_path=`$CYGPATH -u "$path"`
54032
54033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54036  # "foo.exe" is OK but "foo" is an error.
54037  #
54038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54039  # It is also a way to make sure we got the proper file name for the real test later on.
54040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54041  if test "x$test_shortpath" = x; then
54042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54043$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54044    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54045  fi
54046
54047  # Call helper function which possibly converts this using DOS-style short mode.
54048  # If so, the updated path is stored in $new_path.
54049
54050  input_path="$new_path"
54051  # Check if we need to convert this using DOS-style short mode. If the path
54052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54053  # take no chances and rewrite it.
54054  # Note: m4 eats our [], so we need to use [ and ] instead.
54055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54056  if test "x$has_forbidden_chars" != x; then
54057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54061      # Going to short mode and back again did indeed matter. Since short mode is
54062      # case insensitive, let's make it lowercase to improve readability.
54063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54064      # Now convert it back to Unix-style (cygpath)
54065      input_path=`$CYGPATH -u "$shortmode_path"`
54066      new_path="$input_path"
54067    fi
54068  fi
54069
54070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54071  if test "x$test_cygdrive_prefix" = x; then
54072    # As a simple fix, exclude /usr/bin since it's not a real path.
54073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54075      # a path prefixed by /cygdrive for fixpath to work.
54076      new_path="$CYGWIN_ROOT_PATH$input_path"
54077    fi
54078  fi
54079
54080
54081  if test "x$path" != "x$new_path"; then
54082    MSVC_DLL="$new_path"
54083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54084$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54085  fi
54086
54087    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54088
54089  path="$MSVC_DLL"
54090  has_colon=`$ECHO $path | $GREP ^.:`
54091  new_path="$path"
54092  if test "x$has_colon" = x; then
54093    # Not in mixed or Windows style, start by that.
54094    new_path=`cmd //c echo $path`
54095  fi
54096
54097
54098  input_path="$new_path"
54099  # Check if we need to convert this using DOS-style short mode. If the path
54100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54101  # take no chances and rewrite it.
54102  # Note: m4 eats our [], so we need to use [ and ] instead.
54103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54104  if test "x$has_forbidden_chars" != x; then
54105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54107  fi
54108
54109
54110  windows_path="$new_path"
54111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54112    unix_path=`$CYGPATH -u "$windows_path"`
54113    new_path="$unix_path"
54114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54116    new_path="$unix_path"
54117  fi
54118
54119  if test "x$path" != "x$new_path"; then
54120    MSVC_DLL="$new_path"
54121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54122$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54123  fi
54124
54125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54127
54128    else
54129      # We're on a unix platform. Hooray! :)
54130      path="$MSVC_DLL"
54131      has_space=`$ECHO "$path" | $GREP " "`
54132      if test "x$has_space" != x; then
54133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54134$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54135        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54136      fi
54137
54138      # Use eval to expand a potential ~
54139      eval path="$path"
54140      if test ! -f "$path" && test ! -d "$path"; then
54141        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54142      fi
54143
54144      if test -d "$path"; then
54145        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54146      else
54147        dir="`$DIRNAME "$path"`"
54148        base="`$BASENAME "$path"`"
54149        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54150      fi
54151    fi
54152  fi
54153
54154      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54155$as_echo_n "checking for $DLL_NAME... " >&6; }
54156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54157$as_echo "$MSVC_DLL" >&6; }
54158    else
54159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54160$as_echo "incorrect, ignoring" >&6; }
54161      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54162$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54163    fi
54164  fi
54165
54166    if test "x$MSVC_DLL" = x; then
54167      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54168    fi
54169    MSVCR_DLL="$MSVC_DLL"
54170  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54171
54172  DLL_NAME="$MSVCR_NAME"
54173  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54174  METHOD="devkit"
54175  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54176    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54177$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54178
54179    # Need to check if the found msvcr is correct architecture
54180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54181$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54182    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54184      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54185      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54187        CORRECT_MSVCR_ARCH="PE32 executable"
54188      else
54189        CORRECT_MSVCR_ARCH="PE32+ executable"
54190      fi
54191    else
54192      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54193        CORRECT_MSVCR_ARCH=386
54194      else
54195        CORRECT_MSVCR_ARCH=x86-64
54196      fi
54197    fi
54198    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54200$as_echo "ok" >&6; }
54201      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54202
54203  # Only process if variable expands to non-empty
54204
54205  if test "x$MSVC_DLL" != x; then
54206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54207
54208  # Input might be given as Windows format, start by converting to
54209  # unix format.
54210  path="$MSVC_DLL"
54211  new_path=`$CYGPATH -u "$path"`
54212
54213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54216  # "foo.exe" is OK but "foo" is an error.
54217  #
54218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54219  # It is also a way to make sure we got the proper file name for the real test later on.
54220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54221  if test "x$test_shortpath" = x; then
54222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54223$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54224    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54225  fi
54226
54227  # Call helper function which possibly converts this using DOS-style short mode.
54228  # If so, the updated path is stored in $new_path.
54229
54230  input_path="$new_path"
54231  # Check if we need to convert this using DOS-style short mode. If the path
54232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54233  # take no chances and rewrite it.
54234  # Note: m4 eats our [], so we need to use [ and ] instead.
54235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54236  if test "x$has_forbidden_chars" != x; then
54237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54241      # Going to short mode and back again did indeed matter. Since short mode is
54242      # case insensitive, let's make it lowercase to improve readability.
54243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54244      # Now convert it back to Unix-style (cygpath)
54245      input_path=`$CYGPATH -u "$shortmode_path"`
54246      new_path="$input_path"
54247    fi
54248  fi
54249
54250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54251  if test "x$test_cygdrive_prefix" = x; then
54252    # As a simple fix, exclude /usr/bin since it's not a real path.
54253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54255      # a path prefixed by /cygdrive for fixpath to work.
54256      new_path="$CYGWIN_ROOT_PATH$input_path"
54257    fi
54258  fi
54259
54260
54261  if test "x$path" != "x$new_path"; then
54262    MSVC_DLL="$new_path"
54263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54264$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54265  fi
54266
54267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54268
54269  path="$MSVC_DLL"
54270  has_colon=`$ECHO $path | $GREP ^.:`
54271  new_path="$path"
54272  if test "x$has_colon" = x; then
54273    # Not in mixed or Windows style, start by that.
54274    new_path=`cmd //c echo $path`
54275  fi
54276
54277
54278  input_path="$new_path"
54279  # Check if we need to convert this using DOS-style short mode. If the path
54280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54281  # take no chances and rewrite it.
54282  # Note: m4 eats our [], so we need to use [ and ] instead.
54283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54284  if test "x$has_forbidden_chars" != x; then
54285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54287  fi
54288
54289
54290  windows_path="$new_path"
54291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54292    unix_path=`$CYGPATH -u "$windows_path"`
54293    new_path="$unix_path"
54294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54296    new_path="$unix_path"
54297  fi
54298
54299  if test "x$path" != "x$new_path"; then
54300    MSVC_DLL="$new_path"
54301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54303  fi
54304
54305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54307
54308    else
54309      # We're on a unix platform. Hooray! :)
54310      path="$MSVC_DLL"
54311      has_space=`$ECHO "$path" | $GREP " "`
54312      if test "x$has_space" != x; then
54313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54314$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54316      fi
54317
54318      # Use eval to expand a potential ~
54319      eval path="$path"
54320      if test ! -f "$path" && test ! -d "$path"; then
54321        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54322      fi
54323
54324      if test -d "$path"; then
54325        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54326      else
54327        dir="`$DIRNAME "$path"`"
54328        base="`$BASENAME "$path"`"
54329        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54330      fi
54331    fi
54332  fi
54333
54334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54335$as_echo_n "checking for $DLL_NAME... " >&6; }
54336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54337$as_echo "$MSVC_DLL" >&6; }
54338    else
54339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54340$as_echo "incorrect, ignoring" >&6; }
54341      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54342$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54343    fi
54344  fi
54345
54346    if test "x$MSVC_DLL" = x; then
54347      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54348    fi
54349    MSVCR_DLL="$MSVC_DLL"
54350  else
54351
54352  DLL_NAME="${MSVCR_NAME}"
54353  MSVC_DLL=
54354
54355  if test "x$MSVC_DLL" = x; then
54356    # Probe: Using well-known location from Visual Studio 10.0
54357    if test "x$VCINSTALLDIR" != x; then
54358      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54359
54360  windows_path="$CYGWIN_VC_INSTALL_DIR"
54361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54362    unix_path=`$CYGPATH -u "$windows_path"`
54363    CYGWIN_VC_INSTALL_DIR="$unix_path"
54364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54366    CYGWIN_VC_INSTALL_DIR="$unix_path"
54367  fi
54368
54369      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54370        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54371      else
54372        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54373      fi
54374      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54375
54376  DLL_NAME="$DLL_NAME"
54377  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54378  METHOD="well-known location in VCINSTALLDIR"
54379  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54381$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54382
54383    # Need to check if the found msvcr is correct architecture
54384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54385$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54386    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54388      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54389      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54391        CORRECT_MSVCR_ARCH="PE32 executable"
54392      else
54393        CORRECT_MSVCR_ARCH="PE32+ executable"
54394      fi
54395    else
54396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54397        CORRECT_MSVCR_ARCH=386
54398      else
54399        CORRECT_MSVCR_ARCH=x86-64
54400      fi
54401    fi
54402    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54404$as_echo "ok" >&6; }
54405      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54406
54407  # Only process if variable expands to non-empty
54408
54409  if test "x$MSVC_DLL" != x; then
54410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54411
54412  # Input might be given as Windows format, start by converting to
54413  # unix format.
54414  path="$MSVC_DLL"
54415  new_path=`$CYGPATH -u "$path"`
54416
54417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54420  # "foo.exe" is OK but "foo" is an error.
54421  #
54422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54423  # It is also a way to make sure we got the proper file name for the real test later on.
54424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54425  if test "x$test_shortpath" = x; then
54426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54428    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54429  fi
54430
54431  # Call helper function which possibly converts this using DOS-style short mode.
54432  # If so, the updated path is stored in $new_path.
54433
54434  input_path="$new_path"
54435  # Check if we need to convert this using DOS-style short mode. If the path
54436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54437  # take no chances and rewrite it.
54438  # Note: m4 eats our [], so we need to use [ and ] instead.
54439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54440  if test "x$has_forbidden_chars" != x; then
54441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54445      # Going to short mode and back again did indeed matter. Since short mode is
54446      # case insensitive, let's make it lowercase to improve readability.
54447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54448      # Now convert it back to Unix-style (cygpath)
54449      input_path=`$CYGPATH -u "$shortmode_path"`
54450      new_path="$input_path"
54451    fi
54452  fi
54453
54454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54455  if test "x$test_cygdrive_prefix" = x; then
54456    # As a simple fix, exclude /usr/bin since it's not a real path.
54457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54459      # a path prefixed by /cygdrive for fixpath to work.
54460      new_path="$CYGWIN_ROOT_PATH$input_path"
54461    fi
54462  fi
54463
54464
54465  if test "x$path" != "x$new_path"; then
54466    MSVC_DLL="$new_path"
54467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54469  fi
54470
54471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54472
54473  path="$MSVC_DLL"
54474  has_colon=`$ECHO $path | $GREP ^.:`
54475  new_path="$path"
54476  if test "x$has_colon" = x; then
54477    # Not in mixed or Windows style, start by that.
54478    new_path=`cmd //c echo $path`
54479  fi
54480
54481
54482  input_path="$new_path"
54483  # Check if we need to convert this using DOS-style short mode. If the path
54484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54485  # take no chances and rewrite it.
54486  # Note: m4 eats our [], so we need to use [ and ] instead.
54487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54488  if test "x$has_forbidden_chars" != x; then
54489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54491  fi
54492
54493
54494  windows_path="$new_path"
54495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54496    unix_path=`$CYGPATH -u "$windows_path"`
54497    new_path="$unix_path"
54498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54500    new_path="$unix_path"
54501  fi
54502
54503  if test "x$path" != "x$new_path"; then
54504    MSVC_DLL="$new_path"
54505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54507  fi
54508
54509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54511
54512    else
54513      # We're on a unix platform. Hooray! :)
54514      path="$MSVC_DLL"
54515      has_space=`$ECHO "$path" | $GREP " "`
54516      if test "x$has_space" != x; then
54517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54520      fi
54521
54522      # Use eval to expand a potential ~
54523      eval path="$path"
54524      if test ! -f "$path" && test ! -d "$path"; then
54525        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54526      fi
54527
54528      if test -d "$path"; then
54529        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54530      else
54531        dir="`$DIRNAME "$path"`"
54532        base="`$BASENAME "$path"`"
54533        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54534      fi
54535    fi
54536  fi
54537
54538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54539$as_echo_n "checking for $DLL_NAME... " >&6; }
54540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54541$as_echo "$MSVC_DLL" >&6; }
54542    else
54543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54544$as_echo "incorrect, ignoring" >&6; }
54545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54546$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54547    fi
54548  fi
54549
54550    fi
54551  fi
54552
54553  if test "x$MSVC_DLL" = x; then
54554    # Probe: Check in the Boot JDK directory.
54555    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54556
54557  DLL_NAME="$DLL_NAME"
54558  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54559  METHOD="well-known location in Boot JDK"
54560  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54562$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54563
54564    # Need to check if the found msvcr is correct architecture
54565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54566$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54567    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54569      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54570      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54571      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54572        CORRECT_MSVCR_ARCH="PE32 executable"
54573      else
54574        CORRECT_MSVCR_ARCH="PE32+ executable"
54575      fi
54576    else
54577      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54578        CORRECT_MSVCR_ARCH=386
54579      else
54580        CORRECT_MSVCR_ARCH=x86-64
54581      fi
54582    fi
54583    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54585$as_echo "ok" >&6; }
54586      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54587
54588  # Only process if variable expands to non-empty
54589
54590  if test "x$MSVC_DLL" != x; then
54591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54592
54593  # Input might be given as Windows format, start by converting to
54594  # unix format.
54595  path="$MSVC_DLL"
54596  new_path=`$CYGPATH -u "$path"`
54597
54598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54601  # "foo.exe" is OK but "foo" is an error.
54602  #
54603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54604  # It is also a way to make sure we got the proper file name for the real test later on.
54605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54606  if test "x$test_shortpath" = x; then
54607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54608$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54609    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54610  fi
54611
54612  # Call helper function which possibly converts this using DOS-style short mode.
54613  # If so, the updated path is stored in $new_path.
54614
54615  input_path="$new_path"
54616  # Check if we need to convert this using DOS-style short mode. If the path
54617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54618  # take no chances and rewrite it.
54619  # Note: m4 eats our [], so we need to use [ and ] instead.
54620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54621  if test "x$has_forbidden_chars" != x; then
54622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54626      # Going to short mode and back again did indeed matter. Since short mode is
54627      # case insensitive, let's make it lowercase to improve readability.
54628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54629      # Now convert it back to Unix-style (cygpath)
54630      input_path=`$CYGPATH -u "$shortmode_path"`
54631      new_path="$input_path"
54632    fi
54633  fi
54634
54635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54636  if test "x$test_cygdrive_prefix" = x; then
54637    # As a simple fix, exclude /usr/bin since it's not a real path.
54638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54640      # a path prefixed by /cygdrive for fixpath to work.
54641      new_path="$CYGWIN_ROOT_PATH$input_path"
54642    fi
54643  fi
54644
54645
54646  if test "x$path" != "x$new_path"; then
54647    MSVC_DLL="$new_path"
54648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54649$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54650  fi
54651
54652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54653
54654  path="$MSVC_DLL"
54655  has_colon=`$ECHO $path | $GREP ^.:`
54656  new_path="$path"
54657  if test "x$has_colon" = x; then
54658    # Not in mixed or Windows style, start by that.
54659    new_path=`cmd //c echo $path`
54660  fi
54661
54662
54663  input_path="$new_path"
54664  # Check if we need to convert this using DOS-style short mode. If the path
54665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54666  # take no chances and rewrite it.
54667  # Note: m4 eats our [], so we need to use [ and ] instead.
54668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54669  if test "x$has_forbidden_chars" != x; then
54670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54672  fi
54673
54674
54675  windows_path="$new_path"
54676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54677    unix_path=`$CYGPATH -u "$windows_path"`
54678    new_path="$unix_path"
54679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54681    new_path="$unix_path"
54682  fi
54683
54684  if test "x$path" != "x$new_path"; then
54685    MSVC_DLL="$new_path"
54686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54687$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54688  fi
54689
54690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54692
54693    else
54694      # We're on a unix platform. Hooray! :)
54695      path="$MSVC_DLL"
54696      has_space=`$ECHO "$path" | $GREP " "`
54697      if test "x$has_space" != x; then
54698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54699$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54701      fi
54702
54703      # Use eval to expand a potential ~
54704      eval path="$path"
54705      if test ! -f "$path" && test ! -d "$path"; then
54706        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54707      fi
54708
54709      if test -d "$path"; then
54710        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54711      else
54712        dir="`$DIRNAME "$path"`"
54713        base="`$BASENAME "$path"`"
54714        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54715      fi
54716    fi
54717  fi
54718
54719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54720$as_echo_n "checking for $DLL_NAME... " >&6; }
54721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54722$as_echo "$MSVC_DLL" >&6; }
54723    else
54724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54725$as_echo "incorrect, ignoring" >&6; }
54726      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54727$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54728    fi
54729  fi
54730
54731  fi
54732
54733  if test "x$MSVC_DLL" = x; then
54734    # Probe: Look in the Windows system32 directory
54735    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54736
54737  windows_path="$CYGWIN_SYSTEMROOT"
54738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54739    unix_path=`$CYGPATH -u "$windows_path"`
54740    CYGWIN_SYSTEMROOT="$unix_path"
54741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54743    CYGWIN_SYSTEMROOT="$unix_path"
54744  fi
54745
54746    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54747
54748  DLL_NAME="$DLL_NAME"
54749  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54750  METHOD="well-known location in SYSTEMROOT"
54751  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54752    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54753$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54754
54755    # Need to check if the found msvcr is correct architecture
54756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54757$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54758    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54760      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54761      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54762      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54763        CORRECT_MSVCR_ARCH="PE32 executable"
54764      else
54765        CORRECT_MSVCR_ARCH="PE32+ executable"
54766      fi
54767    else
54768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54769        CORRECT_MSVCR_ARCH=386
54770      else
54771        CORRECT_MSVCR_ARCH=x86-64
54772      fi
54773    fi
54774    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54776$as_echo "ok" >&6; }
54777      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54778
54779  # Only process if variable expands to non-empty
54780
54781  if test "x$MSVC_DLL" != x; then
54782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54783
54784  # Input might be given as Windows format, start by converting to
54785  # unix format.
54786  path="$MSVC_DLL"
54787  new_path=`$CYGPATH -u "$path"`
54788
54789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54792  # "foo.exe" is OK but "foo" is an error.
54793  #
54794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54795  # It is also a way to make sure we got the proper file name for the real test later on.
54796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54797  if test "x$test_shortpath" = x; then
54798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54799$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54800    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54801  fi
54802
54803  # Call helper function which possibly converts this using DOS-style short mode.
54804  # If so, the updated path is stored in $new_path.
54805
54806  input_path="$new_path"
54807  # Check if we need to convert this using DOS-style short mode. If the path
54808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54809  # take no chances and rewrite it.
54810  # Note: m4 eats our [], so we need to use [ and ] instead.
54811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54812  if test "x$has_forbidden_chars" != x; then
54813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54817      # Going to short mode and back again did indeed matter. Since short mode is
54818      # case insensitive, let's make it lowercase to improve readability.
54819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54820      # Now convert it back to Unix-style (cygpath)
54821      input_path=`$CYGPATH -u "$shortmode_path"`
54822      new_path="$input_path"
54823    fi
54824  fi
54825
54826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54827  if test "x$test_cygdrive_prefix" = x; then
54828    # As a simple fix, exclude /usr/bin since it's not a real path.
54829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54831      # a path prefixed by /cygdrive for fixpath to work.
54832      new_path="$CYGWIN_ROOT_PATH$input_path"
54833    fi
54834  fi
54835
54836
54837  if test "x$path" != "x$new_path"; then
54838    MSVC_DLL="$new_path"
54839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54840$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54841  fi
54842
54843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54844
54845  path="$MSVC_DLL"
54846  has_colon=`$ECHO $path | $GREP ^.:`
54847  new_path="$path"
54848  if test "x$has_colon" = x; then
54849    # Not in mixed or Windows style, start by that.
54850    new_path=`cmd //c echo $path`
54851  fi
54852
54853
54854  input_path="$new_path"
54855  # Check if we need to convert this using DOS-style short mode. If the path
54856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54857  # take no chances and rewrite it.
54858  # Note: m4 eats our [], so we need to use [ and ] instead.
54859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54860  if test "x$has_forbidden_chars" != x; then
54861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54863  fi
54864
54865
54866  windows_path="$new_path"
54867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54868    unix_path=`$CYGPATH -u "$windows_path"`
54869    new_path="$unix_path"
54870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54872    new_path="$unix_path"
54873  fi
54874
54875  if test "x$path" != "x$new_path"; then
54876    MSVC_DLL="$new_path"
54877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54878$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54879  fi
54880
54881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54883
54884    else
54885      # We're on a unix platform. Hooray! :)
54886      path="$MSVC_DLL"
54887      has_space=`$ECHO "$path" | $GREP " "`
54888      if test "x$has_space" != x; then
54889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54890$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54892      fi
54893
54894      # Use eval to expand a potential ~
54895      eval path="$path"
54896      if test ! -f "$path" && test ! -d "$path"; then
54897        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54898      fi
54899
54900      if test -d "$path"; then
54901        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54902      else
54903        dir="`$DIRNAME "$path"`"
54904        base="`$BASENAME "$path"`"
54905        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54906      fi
54907    fi
54908  fi
54909
54910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54911$as_echo_n "checking for $DLL_NAME... " >&6; }
54912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54913$as_echo "$MSVC_DLL" >&6; }
54914    else
54915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54916$as_echo "incorrect, ignoring" >&6; }
54917      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54918$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54919    fi
54920  fi
54921
54922  fi
54923
54924  if test "x$MSVC_DLL" = x; then
54925    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54926    if test "x$VS100COMNTOOLS" != x; then
54927      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54928
54929  windows_path="$CYGWIN_VS_TOOLS_DIR"
54930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54931    unix_path=`$CYGPATH -u "$windows_path"`
54932    CYGWIN_VS_TOOLS_DIR="$unix_path"
54933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54935    CYGWIN_VS_TOOLS_DIR="$unix_path"
54936  fi
54937
54938      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54939        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54940	    | $GREP -i /x64/ | $HEAD --lines 1`
54941      else
54942        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54943	    | $GREP -i /x86/ | $HEAD --lines 1`
54944      fi
54945
54946  DLL_NAME="$DLL_NAME"
54947  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54948  METHOD="search of VS100COMNTOOLS"
54949  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54951$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54952
54953    # Need to check if the found msvcr is correct architecture
54954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54955$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54956    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54958      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54959      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54961        CORRECT_MSVCR_ARCH="PE32 executable"
54962      else
54963        CORRECT_MSVCR_ARCH="PE32+ executable"
54964      fi
54965    else
54966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54967        CORRECT_MSVCR_ARCH=386
54968      else
54969        CORRECT_MSVCR_ARCH=x86-64
54970      fi
54971    fi
54972    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54974$as_echo "ok" >&6; }
54975      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54976
54977  # Only process if variable expands to non-empty
54978
54979  if test "x$MSVC_DLL" != x; then
54980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54981
54982  # Input might be given as Windows format, start by converting to
54983  # unix format.
54984  path="$MSVC_DLL"
54985  new_path=`$CYGPATH -u "$path"`
54986
54987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54990  # "foo.exe" is OK but "foo" is an error.
54991  #
54992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54993  # It is also a way to make sure we got the proper file name for the real test later on.
54994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54995  if test "x$test_shortpath" = x; then
54996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54998    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54999  fi
55000
55001  # Call helper function which possibly converts this using DOS-style short mode.
55002  # If so, the updated path is stored in $new_path.
55003
55004  input_path="$new_path"
55005  # Check if we need to convert this using DOS-style short mode. If the path
55006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55007  # take no chances and rewrite it.
55008  # Note: m4 eats our [], so we need to use [ and ] instead.
55009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55010  if test "x$has_forbidden_chars" != x; then
55011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55015      # Going to short mode and back again did indeed matter. Since short mode is
55016      # case insensitive, let's make it lowercase to improve readability.
55017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55018      # Now convert it back to Unix-style (cygpath)
55019      input_path=`$CYGPATH -u "$shortmode_path"`
55020      new_path="$input_path"
55021    fi
55022  fi
55023
55024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55025  if test "x$test_cygdrive_prefix" = x; then
55026    # As a simple fix, exclude /usr/bin since it's not a real path.
55027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55029      # a path prefixed by /cygdrive for fixpath to work.
55030      new_path="$CYGWIN_ROOT_PATH$input_path"
55031    fi
55032  fi
55033
55034
55035  if test "x$path" != "x$new_path"; then
55036    MSVC_DLL="$new_path"
55037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55038$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55039  fi
55040
55041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55042
55043  path="$MSVC_DLL"
55044  has_colon=`$ECHO $path | $GREP ^.:`
55045  new_path="$path"
55046  if test "x$has_colon" = x; then
55047    # Not in mixed or Windows style, start by that.
55048    new_path=`cmd //c echo $path`
55049  fi
55050
55051
55052  input_path="$new_path"
55053  # Check if we need to convert this using DOS-style short mode. If the path
55054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55055  # take no chances and rewrite it.
55056  # Note: m4 eats our [], so we need to use [ and ] instead.
55057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55058  if test "x$has_forbidden_chars" != x; then
55059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55061  fi
55062
55063
55064  windows_path="$new_path"
55065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55066    unix_path=`$CYGPATH -u "$windows_path"`
55067    new_path="$unix_path"
55068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55070    new_path="$unix_path"
55071  fi
55072
55073  if test "x$path" != "x$new_path"; then
55074    MSVC_DLL="$new_path"
55075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55076$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55077  fi
55078
55079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55081
55082    else
55083      # We're on a unix platform. Hooray! :)
55084      path="$MSVC_DLL"
55085      has_space=`$ECHO "$path" | $GREP " "`
55086      if test "x$has_space" != x; then
55087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55088$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55090      fi
55091
55092      # Use eval to expand a potential ~
55093      eval path="$path"
55094      if test ! -f "$path" && test ! -d "$path"; then
55095        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55096      fi
55097
55098      if test -d "$path"; then
55099        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55100      else
55101        dir="`$DIRNAME "$path"`"
55102        base="`$BASENAME "$path"`"
55103        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55104      fi
55105    fi
55106  fi
55107
55108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55109$as_echo_n "checking for $DLL_NAME... " >&6; }
55110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55111$as_echo "$MSVC_DLL" >&6; }
55112    else
55113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55114$as_echo "incorrect, ignoring" >&6; }
55115      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55116$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55117    fi
55118  fi
55119
55120    fi
55121  fi
55122
55123  if test "x$MSVC_DLL" = x; then
55124    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55125    # (This was the original behaviour; kept since it might turn something up)
55126    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55127      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55128        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55129	    | $GREP x64 | $HEAD --lines 1`
55130      else
55131        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55132	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55133        if test "x$POSSIBLE_MSVC_DLL" = x; then
55134          # We're grasping at straws now...
55135          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55136	      | $HEAD --lines 1`
55137        fi
55138      fi
55139
55140
55141  DLL_NAME="$DLL_NAME"
55142  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55143  METHOD="search of VCINSTALLDIR"
55144  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55146$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55147
55148    # Need to check if the found msvcr is correct architecture
55149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55150$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55151    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55153      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55154      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55155      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55156        CORRECT_MSVCR_ARCH="PE32 executable"
55157      else
55158        CORRECT_MSVCR_ARCH="PE32+ executable"
55159      fi
55160    else
55161      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55162        CORRECT_MSVCR_ARCH=386
55163      else
55164        CORRECT_MSVCR_ARCH=x86-64
55165      fi
55166    fi
55167    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55169$as_echo "ok" >&6; }
55170      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55171
55172  # Only process if variable expands to non-empty
55173
55174  if test "x$MSVC_DLL" != x; then
55175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55176
55177  # Input might be given as Windows format, start by converting to
55178  # unix format.
55179  path="$MSVC_DLL"
55180  new_path=`$CYGPATH -u "$path"`
55181
55182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55185  # "foo.exe" is OK but "foo" is an error.
55186  #
55187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55188  # It is also a way to make sure we got the proper file name for the real test later on.
55189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55190  if test "x$test_shortpath" = x; then
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55192$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55193    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55194  fi
55195
55196  # Call helper function which possibly converts this using DOS-style short mode.
55197  # If so, the updated path is stored in $new_path.
55198
55199  input_path="$new_path"
55200  # Check if we need to convert this using DOS-style short mode. If the path
55201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55202  # take no chances and rewrite it.
55203  # Note: m4 eats our [], so we need to use [ and ] instead.
55204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55205  if test "x$has_forbidden_chars" != x; then
55206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55210      # Going to short mode and back again did indeed matter. Since short mode is
55211      # case insensitive, let's make it lowercase to improve readability.
55212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55213      # Now convert it back to Unix-style (cygpath)
55214      input_path=`$CYGPATH -u "$shortmode_path"`
55215      new_path="$input_path"
55216    fi
55217  fi
55218
55219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55220  if test "x$test_cygdrive_prefix" = x; then
55221    # As a simple fix, exclude /usr/bin since it's not a real path.
55222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55224      # a path prefixed by /cygdrive for fixpath to work.
55225      new_path="$CYGWIN_ROOT_PATH$input_path"
55226    fi
55227  fi
55228
55229
55230  if test "x$path" != "x$new_path"; then
55231    MSVC_DLL="$new_path"
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55233$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55234  fi
55235
55236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55237
55238  path="$MSVC_DLL"
55239  has_colon=`$ECHO $path | $GREP ^.:`
55240  new_path="$path"
55241  if test "x$has_colon" = x; then
55242    # Not in mixed or Windows style, start by that.
55243    new_path=`cmd //c echo $path`
55244  fi
55245
55246
55247  input_path="$new_path"
55248  # Check if we need to convert this using DOS-style short mode. If the path
55249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55250  # take no chances and rewrite it.
55251  # Note: m4 eats our [], so we need to use [ and ] instead.
55252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55253  if test "x$has_forbidden_chars" != x; then
55254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55256  fi
55257
55258
55259  windows_path="$new_path"
55260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55261    unix_path=`$CYGPATH -u "$windows_path"`
55262    new_path="$unix_path"
55263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55265    new_path="$unix_path"
55266  fi
55267
55268  if test "x$path" != "x$new_path"; then
55269    MSVC_DLL="$new_path"
55270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55271$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55272  fi
55273
55274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55276
55277    else
55278      # We're on a unix platform. Hooray! :)
55279      path="$MSVC_DLL"
55280      has_space=`$ECHO "$path" | $GREP " "`
55281      if test "x$has_space" != x; then
55282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55283$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55285      fi
55286
55287      # Use eval to expand a potential ~
55288      eval path="$path"
55289      if test ! -f "$path" && test ! -d "$path"; then
55290        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55291      fi
55292
55293      if test -d "$path"; then
55294        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55295      else
55296        dir="`$DIRNAME "$path"`"
55297        base="`$BASENAME "$path"`"
55298        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55299      fi
55300    fi
55301  fi
55302
55303      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55304$as_echo_n "checking for $DLL_NAME... " >&6; }
55305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55306$as_echo "$MSVC_DLL" >&6; }
55307    else
55308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55309$as_echo "incorrect, ignoring" >&6; }
55310      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55311$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55312    fi
55313  fi
55314
55315    fi
55316  fi
55317
55318  if test "x$MSVC_DLL" = x; then
55319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55320$as_echo_n "checking for $DLL_NAME... " >&6; }
55321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55322$as_echo "no" >&6; }
55323    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55324  fi
55325
55326    MSVCR_DLL="$MSVC_DLL"
55327  fi
55328
55329
55330
55331# Check whether --with-msvcp-dll was given.
55332if test "${with_msvcp_dll+set}" = set; then :
55333  withval=$with_msvcp_dll;
55334fi
55335
55336
55337  if test "x$MSVCP_NAME" != "x"; then
55338    if test "x$with_msvcp_dll" != x; then
55339      # If given explicitly by user, do not probe. If not present, fail directly.
55340
55341  DLL_NAME="$MSVCP_NAME"
55342  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55343  METHOD="--with-msvcp-dll"
55344  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55346$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55347
55348    # Need to check if the found msvcr is correct architecture
55349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55350$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55351    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55353      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55354      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55356        CORRECT_MSVCR_ARCH="PE32 executable"
55357      else
55358        CORRECT_MSVCR_ARCH="PE32+ executable"
55359      fi
55360    else
55361      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55362        CORRECT_MSVCR_ARCH=386
55363      else
55364        CORRECT_MSVCR_ARCH=x86-64
55365      fi
55366    fi
55367    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55369$as_echo "ok" >&6; }
55370      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55371
55372  # Only process if variable expands to non-empty
55373
55374  if test "x$MSVC_DLL" != x; then
55375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55376
55377  # Input might be given as Windows format, start by converting to
55378  # unix format.
55379  path="$MSVC_DLL"
55380  new_path=`$CYGPATH -u "$path"`
55381
55382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55385  # "foo.exe" is OK but "foo" is an error.
55386  #
55387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55388  # It is also a way to make sure we got the proper file name for the real test later on.
55389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55390  if test "x$test_shortpath" = x; then
55391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55392$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55393    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55394  fi
55395
55396  # Call helper function which possibly converts this using DOS-style short mode.
55397  # If so, the updated path is stored in $new_path.
55398
55399  input_path="$new_path"
55400  # Check if we need to convert this using DOS-style short mode. If the path
55401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55402  # take no chances and rewrite it.
55403  # Note: m4 eats our [], so we need to use [ and ] instead.
55404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55405  if test "x$has_forbidden_chars" != x; then
55406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55410      # Going to short mode and back again did indeed matter. Since short mode is
55411      # case insensitive, let's make it lowercase to improve readability.
55412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55413      # Now convert it back to Unix-style (cygpath)
55414      input_path=`$CYGPATH -u "$shortmode_path"`
55415      new_path="$input_path"
55416    fi
55417  fi
55418
55419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55420  if test "x$test_cygdrive_prefix" = x; then
55421    # As a simple fix, exclude /usr/bin since it's not a real path.
55422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55424      # a path prefixed by /cygdrive for fixpath to work.
55425      new_path="$CYGWIN_ROOT_PATH$input_path"
55426    fi
55427  fi
55428
55429
55430  if test "x$path" != "x$new_path"; then
55431    MSVC_DLL="$new_path"
55432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55434  fi
55435
55436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55437
55438  path="$MSVC_DLL"
55439  has_colon=`$ECHO $path | $GREP ^.:`
55440  new_path="$path"
55441  if test "x$has_colon" = x; then
55442    # Not in mixed or Windows style, start by that.
55443    new_path=`cmd //c echo $path`
55444  fi
55445
55446
55447  input_path="$new_path"
55448  # Check if we need to convert this using DOS-style short mode. If the path
55449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55450  # take no chances and rewrite it.
55451  # Note: m4 eats our [], so we need to use [ and ] instead.
55452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55453  if test "x$has_forbidden_chars" != x; then
55454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55456  fi
55457
55458
55459  windows_path="$new_path"
55460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55461    unix_path=`$CYGPATH -u "$windows_path"`
55462    new_path="$unix_path"
55463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55465    new_path="$unix_path"
55466  fi
55467
55468  if test "x$path" != "x$new_path"; then
55469    MSVC_DLL="$new_path"
55470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55471$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55472  fi
55473
55474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55476
55477    else
55478      # We're on a unix platform. Hooray! :)
55479      path="$MSVC_DLL"
55480      has_space=`$ECHO "$path" | $GREP " "`
55481      if test "x$has_space" != x; then
55482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55485      fi
55486
55487      # Use eval to expand a potential ~
55488      eval path="$path"
55489      if test ! -f "$path" && test ! -d "$path"; then
55490        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55491      fi
55492
55493      if test -d "$path"; then
55494        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55495      else
55496        dir="`$DIRNAME "$path"`"
55497        base="`$BASENAME "$path"`"
55498        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55499      fi
55500    fi
55501  fi
55502
55503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55504$as_echo_n "checking for $DLL_NAME... " >&6; }
55505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55506$as_echo "$MSVC_DLL" >&6; }
55507    else
55508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55509$as_echo "incorrect, ignoring" >&6; }
55510      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55511$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55512    fi
55513  fi
55514
55515      if test "x$MSVC_DLL" = x; then
55516        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55517      fi
55518      MSVCP_DLL="$MSVC_DLL"
55519    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55520
55521  DLL_NAME="$MSVCP_NAME"
55522  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55523  METHOD="devkit"
55524  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55526$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55527
55528    # Need to check if the found msvcr is correct architecture
55529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55530$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55531    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55533      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55534      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55536        CORRECT_MSVCR_ARCH="PE32 executable"
55537      else
55538        CORRECT_MSVCR_ARCH="PE32+ executable"
55539      fi
55540    else
55541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55542        CORRECT_MSVCR_ARCH=386
55543      else
55544        CORRECT_MSVCR_ARCH=x86-64
55545      fi
55546    fi
55547    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55549$as_echo "ok" >&6; }
55550      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55551
55552  # Only process if variable expands to non-empty
55553
55554  if test "x$MSVC_DLL" != x; then
55555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55556
55557  # Input might be given as Windows format, start by converting to
55558  # unix format.
55559  path="$MSVC_DLL"
55560  new_path=`$CYGPATH -u "$path"`
55561
55562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55565  # "foo.exe" is OK but "foo" is an error.
55566  #
55567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55568  # It is also a way to make sure we got the proper file name for the real test later on.
55569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55570  if test "x$test_shortpath" = x; then
55571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55572$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55573    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55574  fi
55575
55576  # Call helper function which possibly converts this using DOS-style short mode.
55577  # If so, the updated path is stored in $new_path.
55578
55579  input_path="$new_path"
55580  # Check if we need to convert this using DOS-style short mode. If the path
55581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55582  # take no chances and rewrite it.
55583  # Note: m4 eats our [], so we need to use [ and ] instead.
55584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55585  if test "x$has_forbidden_chars" != x; then
55586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55590      # Going to short mode and back again did indeed matter. Since short mode is
55591      # case insensitive, let's make it lowercase to improve readability.
55592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55593      # Now convert it back to Unix-style (cygpath)
55594      input_path=`$CYGPATH -u "$shortmode_path"`
55595      new_path="$input_path"
55596    fi
55597  fi
55598
55599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55600  if test "x$test_cygdrive_prefix" = x; then
55601    # As a simple fix, exclude /usr/bin since it's not a real path.
55602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55604      # a path prefixed by /cygdrive for fixpath to work.
55605      new_path="$CYGWIN_ROOT_PATH$input_path"
55606    fi
55607  fi
55608
55609
55610  if test "x$path" != "x$new_path"; then
55611    MSVC_DLL="$new_path"
55612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55613$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55614  fi
55615
55616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55617
55618  path="$MSVC_DLL"
55619  has_colon=`$ECHO $path | $GREP ^.:`
55620  new_path="$path"
55621  if test "x$has_colon" = x; then
55622    # Not in mixed or Windows style, start by that.
55623    new_path=`cmd //c echo $path`
55624  fi
55625
55626
55627  input_path="$new_path"
55628  # Check if we need to convert this using DOS-style short mode. If the path
55629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55630  # take no chances and rewrite it.
55631  # Note: m4 eats our [], so we need to use [ and ] instead.
55632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55633  if test "x$has_forbidden_chars" != x; then
55634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55636  fi
55637
55638
55639  windows_path="$new_path"
55640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55641    unix_path=`$CYGPATH -u "$windows_path"`
55642    new_path="$unix_path"
55643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55645    new_path="$unix_path"
55646  fi
55647
55648  if test "x$path" != "x$new_path"; then
55649    MSVC_DLL="$new_path"
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55651$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55652  fi
55653
55654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55656
55657    else
55658      # We're on a unix platform. Hooray! :)
55659      path="$MSVC_DLL"
55660      has_space=`$ECHO "$path" | $GREP " "`
55661      if test "x$has_space" != x; then
55662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55663$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55665      fi
55666
55667      # Use eval to expand a potential ~
55668      eval path="$path"
55669      if test ! -f "$path" && test ! -d "$path"; then
55670        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55671      fi
55672
55673      if test -d "$path"; then
55674        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55675      else
55676        dir="`$DIRNAME "$path"`"
55677        base="`$BASENAME "$path"`"
55678        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55679      fi
55680    fi
55681  fi
55682
55683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55684$as_echo_n "checking for $DLL_NAME... " >&6; }
55685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55686$as_echo "$MSVC_DLL" >&6; }
55687    else
55688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55689$as_echo "incorrect, ignoring" >&6; }
55690      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55691$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55692    fi
55693  fi
55694
55695      if test "x$MSVC_DLL" = x; then
55696        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55697      fi
55698      MSVCP_DLL="$MSVC_DLL"
55699    else
55700
55701  DLL_NAME="${MSVCP_NAME}"
55702  MSVC_DLL=
55703
55704  if test "x$MSVC_DLL" = x; then
55705    # Probe: Using well-known location from Visual Studio 10.0
55706    if test "x$VCINSTALLDIR" != x; then
55707      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55708
55709  windows_path="$CYGWIN_VC_INSTALL_DIR"
55710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55711    unix_path=`$CYGPATH -u "$windows_path"`
55712    CYGWIN_VC_INSTALL_DIR="$unix_path"
55713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55715    CYGWIN_VC_INSTALL_DIR="$unix_path"
55716  fi
55717
55718      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55719        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55720      else
55721        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55722      fi
55723      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55724
55725  DLL_NAME="$DLL_NAME"
55726  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55727  METHOD="well-known location in VCINSTALLDIR"
55728  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55729    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55730$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55731
55732    # Need to check if the found msvcr is correct architecture
55733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55734$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55735    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55737      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55738      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55739      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55740        CORRECT_MSVCR_ARCH="PE32 executable"
55741      else
55742        CORRECT_MSVCR_ARCH="PE32+ executable"
55743      fi
55744    else
55745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55746        CORRECT_MSVCR_ARCH=386
55747      else
55748        CORRECT_MSVCR_ARCH=x86-64
55749      fi
55750    fi
55751    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55753$as_echo "ok" >&6; }
55754      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55755
55756  # Only process if variable expands to non-empty
55757
55758  if test "x$MSVC_DLL" != x; then
55759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55760
55761  # Input might be given as Windows format, start by converting to
55762  # unix format.
55763  path="$MSVC_DLL"
55764  new_path=`$CYGPATH -u "$path"`
55765
55766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55769  # "foo.exe" is OK but "foo" is an error.
55770  #
55771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55772  # It is also a way to make sure we got the proper file name for the real test later on.
55773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55774  if test "x$test_shortpath" = x; then
55775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55776$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55777    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55778  fi
55779
55780  # Call helper function which possibly converts this using DOS-style short mode.
55781  # If so, the updated path is stored in $new_path.
55782
55783  input_path="$new_path"
55784  # Check if we need to convert this using DOS-style short mode. If the path
55785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55786  # take no chances and rewrite it.
55787  # Note: m4 eats our [], so we need to use [ and ] instead.
55788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55789  if test "x$has_forbidden_chars" != x; then
55790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55794      # Going to short mode and back again did indeed matter. Since short mode is
55795      # case insensitive, let's make it lowercase to improve readability.
55796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55797      # Now convert it back to Unix-style (cygpath)
55798      input_path=`$CYGPATH -u "$shortmode_path"`
55799      new_path="$input_path"
55800    fi
55801  fi
55802
55803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55804  if test "x$test_cygdrive_prefix" = x; then
55805    # As a simple fix, exclude /usr/bin since it's not a real path.
55806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55808      # a path prefixed by /cygdrive for fixpath to work.
55809      new_path="$CYGWIN_ROOT_PATH$input_path"
55810    fi
55811  fi
55812
55813
55814  if test "x$path" != "x$new_path"; then
55815    MSVC_DLL="$new_path"
55816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55818  fi
55819
55820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55821
55822  path="$MSVC_DLL"
55823  has_colon=`$ECHO $path | $GREP ^.:`
55824  new_path="$path"
55825  if test "x$has_colon" = x; then
55826    # Not in mixed or Windows style, start by that.
55827    new_path=`cmd //c echo $path`
55828  fi
55829
55830
55831  input_path="$new_path"
55832  # Check if we need to convert this using DOS-style short mode. If the path
55833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55834  # take no chances and rewrite it.
55835  # Note: m4 eats our [], so we need to use [ and ] instead.
55836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55837  if test "x$has_forbidden_chars" != x; then
55838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55840  fi
55841
55842
55843  windows_path="$new_path"
55844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55845    unix_path=`$CYGPATH -u "$windows_path"`
55846    new_path="$unix_path"
55847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55849    new_path="$unix_path"
55850  fi
55851
55852  if test "x$path" != "x$new_path"; then
55853    MSVC_DLL="$new_path"
55854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55855$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55856  fi
55857
55858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55860
55861    else
55862      # We're on a unix platform. Hooray! :)
55863      path="$MSVC_DLL"
55864      has_space=`$ECHO "$path" | $GREP " "`
55865      if test "x$has_space" != x; then
55866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55867$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55868        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55869      fi
55870
55871      # Use eval to expand a potential ~
55872      eval path="$path"
55873      if test ! -f "$path" && test ! -d "$path"; then
55874        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55875      fi
55876
55877      if test -d "$path"; then
55878        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55879      else
55880        dir="`$DIRNAME "$path"`"
55881        base="`$BASENAME "$path"`"
55882        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55883      fi
55884    fi
55885  fi
55886
55887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55888$as_echo_n "checking for $DLL_NAME... " >&6; }
55889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55890$as_echo "$MSVC_DLL" >&6; }
55891    else
55892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55893$as_echo "incorrect, ignoring" >&6; }
55894      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55895$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55896    fi
55897  fi
55898
55899    fi
55900  fi
55901
55902  if test "x$MSVC_DLL" = x; then
55903    # Probe: Check in the Boot JDK directory.
55904    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55905
55906  DLL_NAME="$DLL_NAME"
55907  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55908  METHOD="well-known location in Boot JDK"
55909  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55910    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55911$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55912
55913    # Need to check if the found msvcr is correct architecture
55914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55915$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55916    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55918      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55919      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55920      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55921        CORRECT_MSVCR_ARCH="PE32 executable"
55922      else
55923        CORRECT_MSVCR_ARCH="PE32+ executable"
55924      fi
55925    else
55926      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55927        CORRECT_MSVCR_ARCH=386
55928      else
55929        CORRECT_MSVCR_ARCH=x86-64
55930      fi
55931    fi
55932    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55934$as_echo "ok" >&6; }
55935      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55936
55937  # Only process if variable expands to non-empty
55938
55939  if test "x$MSVC_DLL" != x; then
55940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55941
55942  # Input might be given as Windows format, start by converting to
55943  # unix format.
55944  path="$MSVC_DLL"
55945  new_path=`$CYGPATH -u "$path"`
55946
55947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55950  # "foo.exe" is OK but "foo" is an error.
55951  #
55952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55953  # It is also a way to make sure we got the proper file name for the real test later on.
55954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55955  if test "x$test_shortpath" = x; then
55956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55957$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55958    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55959  fi
55960
55961  # Call helper function which possibly converts this using DOS-style short mode.
55962  # If so, the updated path is stored in $new_path.
55963
55964  input_path="$new_path"
55965  # Check if we need to convert this using DOS-style short mode. If the path
55966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55967  # take no chances and rewrite it.
55968  # Note: m4 eats our [], so we need to use [ and ] instead.
55969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55970  if test "x$has_forbidden_chars" != x; then
55971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55975      # Going to short mode and back again did indeed matter. Since short mode is
55976      # case insensitive, let's make it lowercase to improve readability.
55977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55978      # Now convert it back to Unix-style (cygpath)
55979      input_path=`$CYGPATH -u "$shortmode_path"`
55980      new_path="$input_path"
55981    fi
55982  fi
55983
55984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55985  if test "x$test_cygdrive_prefix" = x; then
55986    # As a simple fix, exclude /usr/bin since it's not a real path.
55987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55989      # a path prefixed by /cygdrive for fixpath to work.
55990      new_path="$CYGWIN_ROOT_PATH$input_path"
55991    fi
55992  fi
55993
55994
55995  if test "x$path" != "x$new_path"; then
55996    MSVC_DLL="$new_path"
55997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55998$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55999  fi
56000
56001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56002
56003  path="$MSVC_DLL"
56004  has_colon=`$ECHO $path | $GREP ^.:`
56005  new_path="$path"
56006  if test "x$has_colon" = x; then
56007    # Not in mixed or Windows style, start by that.
56008    new_path=`cmd //c echo $path`
56009  fi
56010
56011
56012  input_path="$new_path"
56013  # Check if we need to convert this using DOS-style short mode. If the path
56014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56015  # take no chances and rewrite it.
56016  # Note: m4 eats our [], so we need to use [ and ] instead.
56017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56018  if test "x$has_forbidden_chars" != x; then
56019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56021  fi
56022
56023
56024  windows_path="$new_path"
56025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56026    unix_path=`$CYGPATH -u "$windows_path"`
56027    new_path="$unix_path"
56028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56030    new_path="$unix_path"
56031  fi
56032
56033  if test "x$path" != "x$new_path"; then
56034    MSVC_DLL="$new_path"
56035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56036$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56037  fi
56038
56039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56041
56042    else
56043      # We're on a unix platform. Hooray! :)
56044      path="$MSVC_DLL"
56045      has_space=`$ECHO "$path" | $GREP " "`
56046      if test "x$has_space" != x; then
56047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56048$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56050      fi
56051
56052      # Use eval to expand a potential ~
56053      eval path="$path"
56054      if test ! -f "$path" && test ! -d "$path"; then
56055        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56056      fi
56057
56058      if test -d "$path"; then
56059        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56060      else
56061        dir="`$DIRNAME "$path"`"
56062        base="`$BASENAME "$path"`"
56063        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56064      fi
56065    fi
56066  fi
56067
56068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56069$as_echo_n "checking for $DLL_NAME... " >&6; }
56070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56071$as_echo "$MSVC_DLL" >&6; }
56072    else
56073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56074$as_echo "incorrect, ignoring" >&6; }
56075      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56076$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56077    fi
56078  fi
56079
56080  fi
56081
56082  if test "x$MSVC_DLL" = x; then
56083    # Probe: Look in the Windows system32 directory
56084    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56085
56086  windows_path="$CYGWIN_SYSTEMROOT"
56087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56088    unix_path=`$CYGPATH -u "$windows_path"`
56089    CYGWIN_SYSTEMROOT="$unix_path"
56090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56092    CYGWIN_SYSTEMROOT="$unix_path"
56093  fi
56094
56095    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56096
56097  DLL_NAME="$DLL_NAME"
56098  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56099  METHOD="well-known location in SYSTEMROOT"
56100  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56102$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56103
56104    # Need to check if the found msvcr is correct architecture
56105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56106$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56107    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56109      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56110      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56112        CORRECT_MSVCR_ARCH="PE32 executable"
56113      else
56114        CORRECT_MSVCR_ARCH="PE32+ executable"
56115      fi
56116    else
56117      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56118        CORRECT_MSVCR_ARCH=386
56119      else
56120        CORRECT_MSVCR_ARCH=x86-64
56121      fi
56122    fi
56123    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56125$as_echo "ok" >&6; }
56126      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56127
56128  # Only process if variable expands to non-empty
56129
56130  if test "x$MSVC_DLL" != x; then
56131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56132
56133  # Input might be given as Windows format, start by converting to
56134  # unix format.
56135  path="$MSVC_DLL"
56136  new_path=`$CYGPATH -u "$path"`
56137
56138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56141  # "foo.exe" is OK but "foo" is an error.
56142  #
56143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56144  # It is also a way to make sure we got the proper file name for the real test later on.
56145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56146  if test "x$test_shortpath" = x; then
56147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56149    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56150  fi
56151
56152  # Call helper function which possibly converts this using DOS-style short mode.
56153  # If so, the updated path is stored in $new_path.
56154
56155  input_path="$new_path"
56156  # Check if we need to convert this using DOS-style short mode. If the path
56157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56158  # take no chances and rewrite it.
56159  # Note: m4 eats our [], so we need to use [ and ] instead.
56160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56161  if test "x$has_forbidden_chars" != x; then
56162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56166      # Going to short mode and back again did indeed matter. Since short mode is
56167      # case insensitive, let's make it lowercase to improve readability.
56168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56169      # Now convert it back to Unix-style (cygpath)
56170      input_path=`$CYGPATH -u "$shortmode_path"`
56171      new_path="$input_path"
56172    fi
56173  fi
56174
56175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56176  if test "x$test_cygdrive_prefix" = x; then
56177    # As a simple fix, exclude /usr/bin since it's not a real path.
56178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56180      # a path prefixed by /cygdrive for fixpath to work.
56181      new_path="$CYGWIN_ROOT_PATH$input_path"
56182    fi
56183  fi
56184
56185
56186  if test "x$path" != "x$new_path"; then
56187    MSVC_DLL="$new_path"
56188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56189$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56190  fi
56191
56192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56193
56194  path="$MSVC_DLL"
56195  has_colon=`$ECHO $path | $GREP ^.:`
56196  new_path="$path"
56197  if test "x$has_colon" = x; then
56198    # Not in mixed or Windows style, start by that.
56199    new_path=`cmd //c echo $path`
56200  fi
56201
56202
56203  input_path="$new_path"
56204  # Check if we need to convert this using DOS-style short mode. If the path
56205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56206  # take no chances and rewrite it.
56207  # Note: m4 eats our [], so we need to use [ and ] instead.
56208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56209  if test "x$has_forbidden_chars" != x; then
56210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56212  fi
56213
56214
56215  windows_path="$new_path"
56216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56217    unix_path=`$CYGPATH -u "$windows_path"`
56218    new_path="$unix_path"
56219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56221    new_path="$unix_path"
56222  fi
56223
56224  if test "x$path" != "x$new_path"; then
56225    MSVC_DLL="$new_path"
56226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56228  fi
56229
56230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56232
56233    else
56234      # We're on a unix platform. Hooray! :)
56235      path="$MSVC_DLL"
56236      has_space=`$ECHO "$path" | $GREP " "`
56237      if test "x$has_space" != x; then
56238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56239$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56241      fi
56242
56243      # Use eval to expand a potential ~
56244      eval path="$path"
56245      if test ! -f "$path" && test ! -d "$path"; then
56246        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56247      fi
56248
56249      if test -d "$path"; then
56250        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56251      else
56252        dir="`$DIRNAME "$path"`"
56253        base="`$BASENAME "$path"`"
56254        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56255      fi
56256    fi
56257  fi
56258
56259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56260$as_echo_n "checking for $DLL_NAME... " >&6; }
56261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56262$as_echo "$MSVC_DLL" >&6; }
56263    else
56264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56265$as_echo "incorrect, ignoring" >&6; }
56266      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56267$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56268    fi
56269  fi
56270
56271  fi
56272
56273  if test "x$MSVC_DLL" = x; then
56274    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56275    if test "x$VS100COMNTOOLS" != x; then
56276      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56277
56278  windows_path="$CYGWIN_VS_TOOLS_DIR"
56279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56280    unix_path=`$CYGPATH -u "$windows_path"`
56281    CYGWIN_VS_TOOLS_DIR="$unix_path"
56282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56284    CYGWIN_VS_TOOLS_DIR="$unix_path"
56285  fi
56286
56287      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56288        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56289	    | $GREP -i /x64/ | $HEAD --lines 1`
56290      else
56291        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56292	    | $GREP -i /x86/ | $HEAD --lines 1`
56293      fi
56294
56295  DLL_NAME="$DLL_NAME"
56296  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56297  METHOD="search of VS100COMNTOOLS"
56298  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56299    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56300$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56301
56302    # Need to check if the found msvcr is correct architecture
56303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56304$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56305    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56307      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56308      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56309      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56310        CORRECT_MSVCR_ARCH="PE32 executable"
56311      else
56312        CORRECT_MSVCR_ARCH="PE32+ executable"
56313      fi
56314    else
56315      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56316        CORRECT_MSVCR_ARCH=386
56317      else
56318        CORRECT_MSVCR_ARCH=x86-64
56319      fi
56320    fi
56321    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56323$as_echo "ok" >&6; }
56324      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56325
56326  # Only process if variable expands to non-empty
56327
56328  if test "x$MSVC_DLL" != x; then
56329    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56330
56331  # Input might be given as Windows format, start by converting to
56332  # unix format.
56333  path="$MSVC_DLL"
56334  new_path=`$CYGPATH -u "$path"`
56335
56336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56339  # "foo.exe" is OK but "foo" is an error.
56340  #
56341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56342  # It is also a way to make sure we got the proper file name for the real test later on.
56343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56344  if test "x$test_shortpath" = x; then
56345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56346$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56347    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56348  fi
56349
56350  # Call helper function which possibly converts this using DOS-style short mode.
56351  # If so, the updated path is stored in $new_path.
56352
56353  input_path="$new_path"
56354  # Check if we need to convert this using DOS-style short mode. If the path
56355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56356  # take no chances and rewrite it.
56357  # Note: m4 eats our [], so we need to use [ and ] instead.
56358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56359  if test "x$has_forbidden_chars" != x; then
56360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56364      # Going to short mode and back again did indeed matter. Since short mode is
56365      # case insensitive, let's make it lowercase to improve readability.
56366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56367      # Now convert it back to Unix-style (cygpath)
56368      input_path=`$CYGPATH -u "$shortmode_path"`
56369      new_path="$input_path"
56370    fi
56371  fi
56372
56373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56374  if test "x$test_cygdrive_prefix" = x; then
56375    # As a simple fix, exclude /usr/bin since it's not a real path.
56376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56378      # a path prefixed by /cygdrive for fixpath to work.
56379      new_path="$CYGWIN_ROOT_PATH$input_path"
56380    fi
56381  fi
56382
56383
56384  if test "x$path" != "x$new_path"; then
56385    MSVC_DLL="$new_path"
56386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56387$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56388  fi
56389
56390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56391
56392  path="$MSVC_DLL"
56393  has_colon=`$ECHO $path | $GREP ^.:`
56394  new_path="$path"
56395  if test "x$has_colon" = x; then
56396    # Not in mixed or Windows style, start by that.
56397    new_path=`cmd //c echo $path`
56398  fi
56399
56400
56401  input_path="$new_path"
56402  # Check if we need to convert this using DOS-style short mode. If the path
56403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56404  # take no chances and rewrite it.
56405  # Note: m4 eats our [], so we need to use [ and ] instead.
56406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56407  if test "x$has_forbidden_chars" != x; then
56408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56410  fi
56411
56412
56413  windows_path="$new_path"
56414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56415    unix_path=`$CYGPATH -u "$windows_path"`
56416    new_path="$unix_path"
56417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56419    new_path="$unix_path"
56420  fi
56421
56422  if test "x$path" != "x$new_path"; then
56423    MSVC_DLL="$new_path"
56424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56425$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56426  fi
56427
56428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56430
56431    else
56432      # We're on a unix platform. Hooray! :)
56433      path="$MSVC_DLL"
56434      has_space=`$ECHO "$path" | $GREP " "`
56435      if test "x$has_space" != x; then
56436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56437$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56438        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56439      fi
56440
56441      # Use eval to expand a potential ~
56442      eval path="$path"
56443      if test ! -f "$path" && test ! -d "$path"; then
56444        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56445      fi
56446
56447      if test -d "$path"; then
56448        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56449      else
56450        dir="`$DIRNAME "$path"`"
56451        base="`$BASENAME "$path"`"
56452        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56453      fi
56454    fi
56455  fi
56456
56457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56458$as_echo_n "checking for $DLL_NAME... " >&6; }
56459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56460$as_echo "$MSVC_DLL" >&6; }
56461    else
56462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56463$as_echo "incorrect, ignoring" >&6; }
56464      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56465$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56466    fi
56467  fi
56468
56469    fi
56470  fi
56471
56472  if test "x$MSVC_DLL" = x; then
56473    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56474    # (This was the original behaviour; kept since it might turn something up)
56475    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56476      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56477        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56478	    | $GREP x64 | $HEAD --lines 1`
56479      else
56480        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56481	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56482        if test "x$POSSIBLE_MSVC_DLL" = x; then
56483          # We're grasping at straws now...
56484          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56485	      | $HEAD --lines 1`
56486        fi
56487      fi
56488
56489
56490  DLL_NAME="$DLL_NAME"
56491  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56492  METHOD="search of VCINSTALLDIR"
56493  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56494    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56495$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56496
56497    # Need to check if the found msvcr is correct architecture
56498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56499$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56500    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56502      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56503      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56504      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56505        CORRECT_MSVCR_ARCH="PE32 executable"
56506      else
56507        CORRECT_MSVCR_ARCH="PE32+ executable"
56508      fi
56509    else
56510      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56511        CORRECT_MSVCR_ARCH=386
56512      else
56513        CORRECT_MSVCR_ARCH=x86-64
56514      fi
56515    fi
56516    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56518$as_echo "ok" >&6; }
56519      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56520
56521  # Only process if variable expands to non-empty
56522
56523  if test "x$MSVC_DLL" != x; then
56524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56525
56526  # Input might be given as Windows format, start by converting to
56527  # unix format.
56528  path="$MSVC_DLL"
56529  new_path=`$CYGPATH -u "$path"`
56530
56531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56534  # "foo.exe" is OK but "foo" is an error.
56535  #
56536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56537  # It is also a way to make sure we got the proper file name for the real test later on.
56538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56539  if test "x$test_shortpath" = x; then
56540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56541$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56542    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56543  fi
56544
56545  # Call helper function which possibly converts this using DOS-style short mode.
56546  # If so, the updated path is stored in $new_path.
56547
56548  input_path="$new_path"
56549  # Check if we need to convert this using DOS-style short mode. If the path
56550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56551  # take no chances and rewrite it.
56552  # Note: m4 eats our [], so we need to use [ and ] instead.
56553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56554  if test "x$has_forbidden_chars" != x; then
56555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56559      # Going to short mode and back again did indeed matter. Since short mode is
56560      # case insensitive, let's make it lowercase to improve readability.
56561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56562      # Now convert it back to Unix-style (cygpath)
56563      input_path=`$CYGPATH -u "$shortmode_path"`
56564      new_path="$input_path"
56565    fi
56566  fi
56567
56568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56569  if test "x$test_cygdrive_prefix" = x; then
56570    # As a simple fix, exclude /usr/bin since it's not a real path.
56571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56573      # a path prefixed by /cygdrive for fixpath to work.
56574      new_path="$CYGWIN_ROOT_PATH$input_path"
56575    fi
56576  fi
56577
56578
56579  if test "x$path" != "x$new_path"; then
56580    MSVC_DLL="$new_path"
56581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56582$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56583  fi
56584
56585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56586
56587  path="$MSVC_DLL"
56588  has_colon=`$ECHO $path | $GREP ^.:`
56589  new_path="$path"
56590  if test "x$has_colon" = x; then
56591    # Not in mixed or Windows style, start by that.
56592    new_path=`cmd //c echo $path`
56593  fi
56594
56595
56596  input_path="$new_path"
56597  # Check if we need to convert this using DOS-style short mode. If the path
56598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56599  # take no chances and rewrite it.
56600  # Note: m4 eats our [], so we need to use [ and ] instead.
56601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56602  if test "x$has_forbidden_chars" != x; then
56603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56605  fi
56606
56607
56608  windows_path="$new_path"
56609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56610    unix_path=`$CYGPATH -u "$windows_path"`
56611    new_path="$unix_path"
56612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56614    new_path="$unix_path"
56615  fi
56616
56617  if test "x$path" != "x$new_path"; then
56618    MSVC_DLL="$new_path"
56619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56620$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56621  fi
56622
56623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56625
56626    else
56627      # We're on a unix platform. Hooray! :)
56628      path="$MSVC_DLL"
56629      has_space=`$ECHO "$path" | $GREP " "`
56630      if test "x$has_space" != x; then
56631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56632$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56634      fi
56635
56636      # Use eval to expand a potential ~
56637      eval path="$path"
56638      if test ! -f "$path" && test ! -d "$path"; then
56639        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56640      fi
56641
56642      if test -d "$path"; then
56643        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56644      else
56645        dir="`$DIRNAME "$path"`"
56646        base="`$BASENAME "$path"`"
56647        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56648      fi
56649    fi
56650  fi
56651
56652      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56653$as_echo_n "checking for $DLL_NAME... " >&6; }
56654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56655$as_echo "$MSVC_DLL" >&6; }
56656    else
56657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56658$as_echo "incorrect, ignoring" >&6; }
56659      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56660$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56661    fi
56662  fi
56663
56664    fi
56665  fi
56666
56667  if test "x$MSVC_DLL" = x; then
56668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56669$as_echo_n "checking for $DLL_NAME... " >&6; }
56670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56671$as_echo "no" >&6; }
56672    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56673  fi
56674
56675      MSVCP_DLL="$MSVC_DLL"
56676    fi
56677
56678  fi
56679
56680  fi
56681
56682
56683  if test "x$NEEDS_LIB_X11" = xfalse; then
56684    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56685      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56686$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56687    fi
56688    X_CFLAGS=
56689    X_LIBS=
56690  else
56691
56692    if test "x${with_x}" = xno; then
56693      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56694    fi
56695
56696    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56697      # The user has specified a X11 base directory. Use it for includes and
56698      # libraries, unless explicitly overridden.
56699      if test "x$x_includes" = xNONE; then
56700        x_includes="${with_x}/include"
56701      fi
56702      if test "x$x_libraries" = xNONE; then
56703        x_libraries="${with_x}/lib"
56704      fi
56705    else
56706      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56707      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56708      # --x-libraries for the sysroot, if that seems to be correct.
56709      if test "x$SYSROOT" != "x"; then
56710        if test "x$x_includes" = xNONE; then
56711          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56712            x_includes="$SYSROOT/usr/X11R6/include"
56713          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56714            x_includes="$SYSROOT/usr/include"
56715          fi
56716        fi
56717        if test "x$x_libraries" = xNONE; then
56718          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56719            x_libraries="$SYSROOT/usr/X11R6/lib"
56720          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56721            x_libraries="$SYSROOT/usr/lib64"
56722          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56723            x_libraries="$SYSROOT/usr/lib"
56724          fi
56725        fi
56726      fi
56727    fi
56728
56729    # Now let autoconf do it's magic
56730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56731$as_echo_n "checking for X... " >&6; }
56732
56733
56734# Check whether --with-x was given.
56735if test "${with_x+set}" = set; then :
56736  withval=$with_x;
56737fi
56738
56739# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56740if test "x$with_x" = xno; then
56741  # The user explicitly disabled X.
56742  have_x=disabled
56743else
56744  case $x_includes,$x_libraries in #(
56745    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56746    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56747  $as_echo_n "(cached) " >&6
56748else
56749  # One or both of the vars are not set, and there is no cached value.
56750ac_x_includes=no ac_x_libraries=no
56751rm -f -r conftest.dir
56752if mkdir conftest.dir; then
56753  cd conftest.dir
56754  cat >Imakefile <<'_ACEOF'
56755incroot:
56756	@echo incroot='${INCROOT}'
56757usrlibdir:
56758	@echo usrlibdir='${USRLIBDIR}'
56759libdir:
56760	@echo libdir='${LIBDIR}'
56761_ACEOF
56762  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56763    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56764    for ac_var in incroot usrlibdir libdir; do
56765      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56766    done
56767    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56768    for ac_extension in a so sl dylib la dll; do
56769      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56770	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56771	ac_im_usrlibdir=$ac_im_libdir; break
56772      fi
56773    done
56774    # Screen out bogus values from the imake configuration.  They are
56775    # bogus both because they are the default anyway, and because
56776    # using them would break gcc on systems where it needs fixed includes.
56777    case $ac_im_incroot in
56778	/usr/include) ac_x_includes= ;;
56779	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56780    esac
56781    case $ac_im_usrlibdir in
56782	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56783	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56784    esac
56785  fi
56786  cd ..
56787  rm -f -r conftest.dir
56788fi
56789
56790# Standard set of common directories for X headers.
56791# Check X11 before X11Rn because it is often a symlink to the current release.
56792ac_x_header_dirs='
56793/usr/X11/include
56794/usr/X11R7/include
56795/usr/X11R6/include
56796/usr/X11R5/include
56797/usr/X11R4/include
56798
56799/usr/include/X11
56800/usr/include/X11R7
56801/usr/include/X11R6
56802/usr/include/X11R5
56803/usr/include/X11R4
56804
56805/usr/local/X11/include
56806/usr/local/X11R7/include
56807/usr/local/X11R6/include
56808/usr/local/X11R5/include
56809/usr/local/X11R4/include
56810
56811/usr/local/include/X11
56812/usr/local/include/X11R7
56813/usr/local/include/X11R6
56814/usr/local/include/X11R5
56815/usr/local/include/X11R4
56816
56817/usr/X386/include
56818/usr/x386/include
56819/usr/XFree86/include/X11
56820
56821/usr/include
56822/usr/local/include
56823/usr/unsupported/include
56824/usr/athena/include
56825/usr/local/x11r5/include
56826/usr/lpp/Xamples/include
56827
56828/usr/openwin/include
56829/usr/openwin/share/include'
56830
56831if test "$ac_x_includes" = no; then
56832  # Guess where to find include files, by looking for Xlib.h.
56833  # First, try using that file with no special directory specified.
56834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56835/* end confdefs.h.  */
56836#include <X11/Xlib.h>
56837_ACEOF
56838if ac_fn_cxx_try_cpp "$LINENO"; then :
56839  # We can compile using X headers with no special include directory.
56840ac_x_includes=
56841else
56842  for ac_dir in $ac_x_header_dirs; do
56843  if test -r "$ac_dir/X11/Xlib.h"; then
56844    ac_x_includes=$ac_dir
56845    break
56846  fi
56847done
56848fi
56849rm -f conftest.err conftest.i conftest.$ac_ext
56850fi # $ac_x_includes = no
56851
56852if test "$ac_x_libraries" = no; then
56853  # Check for the libraries.
56854  # See if we find them without any special options.
56855  # Don't add to $LIBS permanently.
56856  ac_save_LIBS=$LIBS
56857  LIBS="-lX11 $LIBS"
56858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56859/* end confdefs.h.  */
56860#include <X11/Xlib.h>
56861int
56862main ()
56863{
56864XrmInitialize ()
56865  ;
56866  return 0;
56867}
56868_ACEOF
56869if ac_fn_cxx_try_link "$LINENO"; then :
56870  LIBS=$ac_save_LIBS
56871# We can link X programs with no special library path.
56872ac_x_libraries=
56873else
56874  LIBS=$ac_save_LIBS
56875for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56876do
56877  # Don't even attempt the hair of trying to link an X program!
56878  for ac_extension in a so sl dylib la dll; do
56879    if test -r "$ac_dir/libX11.$ac_extension"; then
56880      ac_x_libraries=$ac_dir
56881      break 2
56882    fi
56883  done
56884done
56885fi
56886rm -f core conftest.err conftest.$ac_objext \
56887    conftest$ac_exeext conftest.$ac_ext
56888fi # $ac_x_libraries = no
56889
56890case $ac_x_includes,$ac_x_libraries in #(
56891  no,* | *,no | *\'*)
56892    # Didn't find X, or a directory has "'" in its name.
56893    ac_cv_have_x="have_x=no";; #(
56894  *)
56895    # Record where we found X for the cache.
56896    ac_cv_have_x="have_x=yes\
56897	ac_x_includes='$ac_x_includes'\
56898	ac_x_libraries='$ac_x_libraries'"
56899esac
56900fi
56901;; #(
56902    *) have_x=yes;;
56903  esac
56904  eval "$ac_cv_have_x"
56905fi # $with_x != no
56906
56907if test "$have_x" != yes; then
56908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56909$as_echo "$have_x" >&6; }
56910  no_x=yes
56911else
56912  # If each of the values was on the command line, it overrides each guess.
56913  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56914  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56915  # Update the cache value to reflect the command line values.
56916  ac_cv_have_x="have_x=yes\
56917	ac_x_includes='$x_includes'\
56918	ac_x_libraries='$x_libraries'"
56919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56920$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56921fi
56922
56923    if test "$no_x" = yes; then
56924  # Not all programs may use this symbol, but it does not hurt to define it.
56925
56926$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56927
56928  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56929else
56930  if test -n "$x_includes"; then
56931    X_CFLAGS="$X_CFLAGS -I$x_includes"
56932  fi
56933
56934  # It would also be nice to do this for all -L options, not just this one.
56935  if test -n "$x_libraries"; then
56936    X_LIBS="$X_LIBS -L$x_libraries"
56937    # For Solaris; some versions of Sun CC require a space after -R and
56938    # others require no space.  Words are not sufficient . . . .
56939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56940$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56941    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56942    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56943    ac_cxx_werror_flag=yes
56944    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56945/* end confdefs.h.  */
56946
56947int
56948main ()
56949{
56950
56951  ;
56952  return 0;
56953}
56954_ACEOF
56955if ac_fn_cxx_try_link "$LINENO"; then :
56956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56957$as_echo "no" >&6; }
56958       X_LIBS="$X_LIBS -R$x_libraries"
56959else
56960  LIBS="$ac_xsave_LIBS -R $x_libraries"
56961       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56962/* end confdefs.h.  */
56963
56964int
56965main ()
56966{
56967
56968  ;
56969  return 0;
56970}
56971_ACEOF
56972if ac_fn_cxx_try_link "$LINENO"; then :
56973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56974$as_echo "yes" >&6; }
56975	  X_LIBS="$X_LIBS -R $x_libraries"
56976else
56977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56978$as_echo "neither works" >&6; }
56979fi
56980rm -f core conftest.err conftest.$ac_objext \
56981    conftest$ac_exeext conftest.$ac_ext
56982fi
56983rm -f core conftest.err conftest.$ac_objext \
56984    conftest$ac_exeext conftest.$ac_ext
56985    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56986    LIBS=$ac_xsave_LIBS
56987  fi
56988
56989  # Check for system-dependent libraries X programs must link with.
56990  # Do this before checking for the system-independent R6 libraries
56991  # (-lICE), since we may need -lsocket or whatever for X linking.
56992
56993  if test "$ISC" = yes; then
56994    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56995  else
56996    # Martyn Johnson says this is needed for Ultrix, if the X
56997    # libraries were built with DECnet support.  And Karl Berry says
56998    # the Alpha needs dnet_stub (dnet does not exist).
56999    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57000    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57001/* end confdefs.h.  */
57002
57003/* Override any GCC internal prototype to avoid an error.
57004   Use char because int might match the return type of a GCC
57005   builtin and then its argument prototype would still apply.  */
57006#ifdef __cplusplus
57007extern "C"
57008#endif
57009char XOpenDisplay ();
57010int
57011main ()
57012{
57013return XOpenDisplay ();
57014  ;
57015  return 0;
57016}
57017_ACEOF
57018if ac_fn_cxx_try_link "$LINENO"; then :
57019
57020else
57021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57022$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57023if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57024  $as_echo_n "(cached) " >&6
57025else
57026  ac_check_lib_save_LIBS=$LIBS
57027LIBS="-ldnet  $LIBS"
57028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57029/* end confdefs.h.  */
57030
57031/* Override any GCC internal prototype to avoid an error.
57032   Use char because int might match the return type of a GCC
57033   builtin and then its argument prototype would still apply.  */
57034#ifdef __cplusplus
57035extern "C"
57036#endif
57037char dnet_ntoa ();
57038int
57039main ()
57040{
57041return dnet_ntoa ();
57042  ;
57043  return 0;
57044}
57045_ACEOF
57046if ac_fn_cxx_try_link "$LINENO"; then :
57047  ac_cv_lib_dnet_dnet_ntoa=yes
57048else
57049  ac_cv_lib_dnet_dnet_ntoa=no
57050fi
57051rm -f core conftest.err conftest.$ac_objext \
57052    conftest$ac_exeext conftest.$ac_ext
57053LIBS=$ac_check_lib_save_LIBS
57054fi
57055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57056$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57057if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57058  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57059fi
57060
57061    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57063$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57064if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57065  $as_echo_n "(cached) " >&6
57066else
57067  ac_check_lib_save_LIBS=$LIBS
57068LIBS="-ldnet_stub  $LIBS"
57069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57070/* end confdefs.h.  */
57071
57072/* Override any GCC internal prototype to avoid an error.
57073   Use char because int might match the return type of a GCC
57074   builtin and then its argument prototype would still apply.  */
57075#ifdef __cplusplus
57076extern "C"
57077#endif
57078char dnet_ntoa ();
57079int
57080main ()
57081{
57082return dnet_ntoa ();
57083  ;
57084  return 0;
57085}
57086_ACEOF
57087if ac_fn_cxx_try_link "$LINENO"; then :
57088  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57089else
57090  ac_cv_lib_dnet_stub_dnet_ntoa=no
57091fi
57092rm -f core conftest.err conftest.$ac_objext \
57093    conftest$ac_exeext conftest.$ac_ext
57094LIBS=$ac_check_lib_save_LIBS
57095fi
57096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57097$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57098if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57099  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57100fi
57101
57102    fi
57103fi
57104rm -f core conftest.err conftest.$ac_objext \
57105    conftest$ac_exeext conftest.$ac_ext
57106    LIBS="$ac_xsave_LIBS"
57107
57108    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57109    # to get the SysV transport functions.
57110    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57111    # needs -lnsl.
57112    # The nsl library prevents programs from opening the X display
57113    # on Irix 5.2, according to T.E. Dickey.
57114    # The functions gethostbyname, getservbyname, and inet_addr are
57115    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57116    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57117if test "x$ac_cv_func_gethostbyname" = xyes; then :
57118
57119fi
57120
57121    if test $ac_cv_func_gethostbyname = no; then
57122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57123$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57124if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57125  $as_echo_n "(cached) " >&6
57126else
57127  ac_check_lib_save_LIBS=$LIBS
57128LIBS="-lnsl  $LIBS"
57129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57130/* end confdefs.h.  */
57131
57132/* Override any GCC internal prototype to avoid an error.
57133   Use char because int might match the return type of a GCC
57134   builtin and then its argument prototype would still apply.  */
57135#ifdef __cplusplus
57136extern "C"
57137#endif
57138char gethostbyname ();
57139int
57140main ()
57141{
57142return gethostbyname ();
57143  ;
57144  return 0;
57145}
57146_ACEOF
57147if ac_fn_cxx_try_link "$LINENO"; then :
57148  ac_cv_lib_nsl_gethostbyname=yes
57149else
57150  ac_cv_lib_nsl_gethostbyname=no
57151fi
57152rm -f core conftest.err conftest.$ac_objext \
57153    conftest$ac_exeext conftest.$ac_ext
57154LIBS=$ac_check_lib_save_LIBS
57155fi
57156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57157$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57158if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57159  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57160fi
57161
57162      if test $ac_cv_lib_nsl_gethostbyname = no; then
57163	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57164$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57165if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57166  $as_echo_n "(cached) " >&6
57167else
57168  ac_check_lib_save_LIBS=$LIBS
57169LIBS="-lbsd  $LIBS"
57170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57171/* end confdefs.h.  */
57172
57173/* Override any GCC internal prototype to avoid an error.
57174   Use char because int might match the return type of a GCC
57175   builtin and then its argument prototype would still apply.  */
57176#ifdef __cplusplus
57177extern "C"
57178#endif
57179char gethostbyname ();
57180int
57181main ()
57182{
57183return gethostbyname ();
57184  ;
57185  return 0;
57186}
57187_ACEOF
57188if ac_fn_cxx_try_link "$LINENO"; then :
57189  ac_cv_lib_bsd_gethostbyname=yes
57190else
57191  ac_cv_lib_bsd_gethostbyname=no
57192fi
57193rm -f core conftest.err conftest.$ac_objext \
57194    conftest$ac_exeext conftest.$ac_ext
57195LIBS=$ac_check_lib_save_LIBS
57196fi
57197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57198$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57199if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57200  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57201fi
57202
57203      fi
57204    fi
57205
57206    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57207    # socket/setsockopt and other routines are undefined under SCO ODT
57208    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57209    # on later versions), says Simon Leinen: it contains gethostby*
57210    # variants that don't use the name server (or something).  -lsocket
57211    # must be given before -lnsl if both are needed.  We assume that
57212    # if connect needs -lnsl, so does gethostbyname.
57213    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57214if test "x$ac_cv_func_connect" = xyes; then :
57215
57216fi
57217
57218    if test $ac_cv_func_connect = no; then
57219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57220$as_echo_n "checking for connect in -lsocket... " >&6; }
57221if ${ac_cv_lib_socket_connect+:} false; then :
57222  $as_echo_n "(cached) " >&6
57223else
57224  ac_check_lib_save_LIBS=$LIBS
57225LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57227/* end confdefs.h.  */
57228
57229/* Override any GCC internal prototype to avoid an error.
57230   Use char because int might match the return type of a GCC
57231   builtin and then its argument prototype would still apply.  */
57232#ifdef __cplusplus
57233extern "C"
57234#endif
57235char connect ();
57236int
57237main ()
57238{
57239return connect ();
57240  ;
57241  return 0;
57242}
57243_ACEOF
57244if ac_fn_cxx_try_link "$LINENO"; then :
57245  ac_cv_lib_socket_connect=yes
57246else
57247  ac_cv_lib_socket_connect=no
57248fi
57249rm -f core conftest.err conftest.$ac_objext \
57250    conftest$ac_exeext conftest.$ac_ext
57251LIBS=$ac_check_lib_save_LIBS
57252fi
57253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57254$as_echo "$ac_cv_lib_socket_connect" >&6; }
57255if test "x$ac_cv_lib_socket_connect" = xyes; then :
57256  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57257fi
57258
57259    fi
57260
57261    # Guillermo Gomez says -lposix is necessary on A/UX.
57262    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57263if test "x$ac_cv_func_remove" = xyes; then :
57264
57265fi
57266
57267    if test $ac_cv_func_remove = no; then
57268      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57269$as_echo_n "checking for remove in -lposix... " >&6; }
57270if ${ac_cv_lib_posix_remove+:} false; then :
57271  $as_echo_n "(cached) " >&6
57272else
57273  ac_check_lib_save_LIBS=$LIBS
57274LIBS="-lposix  $LIBS"
57275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57276/* end confdefs.h.  */
57277
57278/* Override any GCC internal prototype to avoid an error.
57279   Use char because int might match the return type of a GCC
57280   builtin and then its argument prototype would still apply.  */
57281#ifdef __cplusplus
57282extern "C"
57283#endif
57284char remove ();
57285int
57286main ()
57287{
57288return remove ();
57289  ;
57290  return 0;
57291}
57292_ACEOF
57293if ac_fn_cxx_try_link "$LINENO"; then :
57294  ac_cv_lib_posix_remove=yes
57295else
57296  ac_cv_lib_posix_remove=no
57297fi
57298rm -f core conftest.err conftest.$ac_objext \
57299    conftest$ac_exeext conftest.$ac_ext
57300LIBS=$ac_check_lib_save_LIBS
57301fi
57302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57303$as_echo "$ac_cv_lib_posix_remove" >&6; }
57304if test "x$ac_cv_lib_posix_remove" = xyes; then :
57305  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57306fi
57307
57308    fi
57309
57310    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57311    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57312if test "x$ac_cv_func_shmat" = xyes; then :
57313
57314fi
57315
57316    if test $ac_cv_func_shmat = no; then
57317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57318$as_echo_n "checking for shmat in -lipc... " >&6; }
57319if ${ac_cv_lib_ipc_shmat+:} false; then :
57320  $as_echo_n "(cached) " >&6
57321else
57322  ac_check_lib_save_LIBS=$LIBS
57323LIBS="-lipc  $LIBS"
57324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57325/* end confdefs.h.  */
57326
57327/* Override any GCC internal prototype to avoid an error.
57328   Use char because int might match the return type of a GCC
57329   builtin and then its argument prototype would still apply.  */
57330#ifdef __cplusplus
57331extern "C"
57332#endif
57333char shmat ();
57334int
57335main ()
57336{
57337return shmat ();
57338  ;
57339  return 0;
57340}
57341_ACEOF
57342if ac_fn_cxx_try_link "$LINENO"; then :
57343  ac_cv_lib_ipc_shmat=yes
57344else
57345  ac_cv_lib_ipc_shmat=no
57346fi
57347rm -f core conftest.err conftest.$ac_objext \
57348    conftest$ac_exeext conftest.$ac_ext
57349LIBS=$ac_check_lib_save_LIBS
57350fi
57351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57352$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57353if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57354  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57355fi
57356
57357    fi
57358  fi
57359
57360  # Check for libraries that X11R6 Xt/Xaw programs need.
57361  ac_save_LDFLAGS=$LDFLAGS
57362  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57363  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57364  # check for ICE first), but we must link in the order -lSM -lICE or
57365  # we get undefined symbols.  So assume we have SM if we have ICE.
57366  # These have to be linked with before -lX11, unlike the other
57367  # libraries we check for below, so use a different variable.
57368  # John Interrante, Karl Berry
57369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57370$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57371if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57372  $as_echo_n "(cached) " >&6
57373else
57374  ac_check_lib_save_LIBS=$LIBS
57375LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57377/* end confdefs.h.  */
57378
57379/* Override any GCC internal prototype to avoid an error.
57380   Use char because int might match the return type of a GCC
57381   builtin and then its argument prototype would still apply.  */
57382#ifdef __cplusplus
57383extern "C"
57384#endif
57385char IceConnectionNumber ();
57386int
57387main ()
57388{
57389return IceConnectionNumber ();
57390  ;
57391  return 0;
57392}
57393_ACEOF
57394if ac_fn_cxx_try_link "$LINENO"; then :
57395  ac_cv_lib_ICE_IceConnectionNumber=yes
57396else
57397  ac_cv_lib_ICE_IceConnectionNumber=no
57398fi
57399rm -f core conftest.err conftest.$ac_objext \
57400    conftest$ac_exeext conftest.$ac_ext
57401LIBS=$ac_check_lib_save_LIBS
57402fi
57403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57404$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57405if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57406  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57407fi
57408
57409  LDFLAGS=$ac_save_LDFLAGS
57410
57411fi
57412
57413
57414    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57415    # this doesn't make sense so we remove it.
57416    if test "x$COMPILE_TYPE" = xcross; then
57417      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57418    fi
57419
57420    if test "x$no_x" = xyes; then
57421
57422  # Print a helpful message on how to acquire the necessary build dependency.
57423  # x11 is the help tag: freetype, cups, alsa etc
57424  MISSING_DEPENDENCY=x11
57425
57426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57427    cygwin_help $MISSING_DEPENDENCY
57428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57429    msys_help $MISSING_DEPENDENCY
57430  else
57431    PKGHANDLER_COMMAND=
57432
57433    case $PKGHANDLER in
57434      apt-get)
57435        apt_help     $MISSING_DEPENDENCY ;;
57436      yum)
57437        yum_help     $MISSING_DEPENDENCY ;;
57438      brew)
57439        brew_help    $MISSING_DEPENDENCY ;;
57440      port)
57441        port_help    $MISSING_DEPENDENCY ;;
57442      pkgutil)
57443        pkgutil_help $MISSING_DEPENDENCY ;;
57444      pkgadd)
57445        pkgadd_help  $MISSING_DEPENDENCY ;;
57446    esac
57447
57448    if test "x$PKGHANDLER_COMMAND" != x; then
57449      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57450    fi
57451  fi
57452
57453      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57454    fi
57455
57456    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57457      OPENWIN_HOME="/usr/openwin"
57458      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57459      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57460          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57461    fi
57462
57463    ac_ext=c
57464ac_cpp='$CPP $CPPFLAGS'
57465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57467ac_compiler_gnu=$ac_cv_c_compiler_gnu
57468
57469    OLD_CFLAGS="$CFLAGS"
57470    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57471
57472    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57473    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57474do :
57475  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57476ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57477          # include <X11/Xlib.h>
57478          # include <X11/Xutil.h>
57479
57480
57481"
57482if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57483  cat >>confdefs.h <<_ACEOF
57484#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57485_ACEOF
57486 X11_HEADERS_OK=yes
57487else
57488  X11_HEADERS_OK=no; break
57489fi
57490
57491done
57492
57493
57494    if test "x$X11_HEADERS_OK" = xno; then
57495
57496  # Print a helpful message on how to acquire the necessary build dependency.
57497  # x11 is the help tag: freetype, cups, alsa etc
57498  MISSING_DEPENDENCY=x11
57499
57500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57501    cygwin_help $MISSING_DEPENDENCY
57502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57503    msys_help $MISSING_DEPENDENCY
57504  else
57505    PKGHANDLER_COMMAND=
57506
57507    case $PKGHANDLER in
57508      apt-get)
57509        apt_help     $MISSING_DEPENDENCY ;;
57510      yum)
57511        yum_help     $MISSING_DEPENDENCY ;;
57512      brew)
57513        brew_help    $MISSING_DEPENDENCY ;;
57514      port)
57515        port_help    $MISSING_DEPENDENCY ;;
57516      pkgutil)
57517        pkgutil_help $MISSING_DEPENDENCY ;;
57518      pkgadd)
57519        pkgadd_help  $MISSING_DEPENDENCY ;;
57520    esac
57521
57522    if test "x$PKGHANDLER_COMMAND" != x; then
57523      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57524    fi
57525  fi
57526
57527      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57528    fi
57529
57530    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57531    # defined in libawt_xawt.
57532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57533$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57534    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57535/* end confdefs.h.  */
57536#include <X11/extensions/Xrender.h>
57537int
57538main ()
57539{
57540XLinearGradient x;
57541  ;
57542  return 0;
57543}
57544_ACEOF
57545if ac_fn_c_try_compile "$LINENO"; then :
57546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57547$as_echo "yes" >&6; }
57548else
57549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57550$as_echo "no" >&6; }
57551         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57552fi
57553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57554
57555    CFLAGS="$OLD_CFLAGS"
57556    ac_ext=cpp
57557ac_cpp='$CXXCPP $CPPFLAGS'
57558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57561
57562  fi # NEEDS_LIB_X11
57563
57564
57565
57566
57567
57568
57569# Check whether --with-cups was given.
57570if test "${with_cups+set}" = set; then :
57571  withval=$with_cups;
57572fi
57573
57574
57575# Check whether --with-cups-include was given.
57576if test "${with_cups_include+set}" = set; then :
57577  withval=$with_cups_include;
57578fi
57579
57580
57581  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57582    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57583        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57584      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57585$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57586    fi
57587    CUPS_CFLAGS=
57588  else
57589    CUPS_FOUND=no
57590
57591    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57592      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57593    fi
57594
57595    if test "x${with_cups}" != x; then
57596      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57597$as_echo_n "checking for cups headers... " >&6; }
57598      if test -s "${with_cups}/include/cups/cups.h"; then
57599        CUPS_CFLAGS="-I${with_cups}/include"
57600        CUPS_FOUND=yes
57601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57602$as_echo "$CUPS_FOUND" >&6; }
57603      else
57604        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57605      fi
57606    fi
57607    if test "x${with_cups_include}" != x; then
57608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57609$as_echo_n "checking for cups headers... " >&6; }
57610      if test -s "${with_cups_include}/cups/cups.h"; then
57611        CUPS_CFLAGS="-I${with_cups_include}"
57612        CUPS_FOUND=yes
57613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57614$as_echo "$CUPS_FOUND" >&6; }
57615      else
57616        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57617      fi
57618    fi
57619    if test "x$CUPS_FOUND" = xno; then
57620      # Are the cups headers installed in the default /usr/include location?
57621      for ac_header in cups/cups.h cups/ppd.h
57622do :
57623  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57624ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57625if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57626  cat >>confdefs.h <<_ACEOF
57627#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57628_ACEOF
57629
57630          CUPS_FOUND=yes
57631          CUPS_CFLAGS=
57632          DEFAULT_CUPS=yes
57633
57634fi
57635
57636done
57637
57638    fi
57639    if test "x$CUPS_FOUND" = xno; then
57640
57641  # Print a helpful message on how to acquire the necessary build dependency.
57642  # cups is the help tag: freetype, cups, alsa etc
57643  MISSING_DEPENDENCY=cups
57644
57645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57646    cygwin_help $MISSING_DEPENDENCY
57647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57648    msys_help $MISSING_DEPENDENCY
57649  else
57650    PKGHANDLER_COMMAND=
57651
57652    case $PKGHANDLER in
57653      apt-get)
57654        apt_help     $MISSING_DEPENDENCY ;;
57655      yum)
57656        yum_help     $MISSING_DEPENDENCY ;;
57657      brew)
57658        brew_help    $MISSING_DEPENDENCY ;;
57659      port)
57660        port_help    $MISSING_DEPENDENCY ;;
57661      pkgutil)
57662        pkgutil_help $MISSING_DEPENDENCY ;;
57663      pkgadd)
57664        pkgadd_help  $MISSING_DEPENDENCY ;;
57665    esac
57666
57667    if test "x$PKGHANDLER_COMMAND" != x; then
57668      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57669    fi
57670  fi
57671
57672      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57673    fi
57674  fi
57675
57676
57677
57678
57679
57680# Check whether --with-freetype was given.
57681if test "${with_freetype+set}" = set; then :
57682  withval=$with_freetype;
57683fi
57684
57685
57686# Check whether --with-freetype-include was given.
57687if test "${with_freetype_include+set}" = set; then :
57688  withval=$with_freetype_include;
57689fi
57690
57691
57692# Check whether --with-freetype-lib was given.
57693if test "${with_freetype_lib+set}" = set; then :
57694  withval=$with_freetype_lib;
57695fi
57696
57697
57698# Check whether --with-freetype-src was given.
57699if test "${with_freetype_src+set}" = set; then :
57700  withval=$with_freetype_src;
57701fi
57702
57703  # Check whether --enable-freetype-bundling was given.
57704if test "${enable_freetype_bundling+set}" = set; then :
57705  enableval=$enable_freetype_bundling;
57706fi
57707
57708
57709  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57710  FREETYPE_BASE_NAME=freetype
57711  FREETYPE_CFLAGS=
57712  FREETYPE_LIBS=
57713  FREETYPE_BUNDLE_LIB_PATH=
57714
57715  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57716    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57717        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57718        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57719        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57720      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57721$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57722    fi
57723    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57724      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57725$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57726    fi
57727  else
57728    # freetype is needed to build; go get it!
57729
57730    BUNDLE_FREETYPE="$enable_freetype_bundling"
57731
57732    if  test "x$with_freetype_src" != x; then
57733      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57734        # Try to build freetype if --with-freetype-src was given on Windows
57735
57736  FREETYPE_SRC_PATH="$with_freetype_src"
57737  BUILD_FREETYPE=yes
57738
57739  # Check if the freetype sources are acessible..
57740  if ! test -d $FREETYPE_SRC_PATH; then
57741    { $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
57742$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57743    BUILD_FREETYPE=no
57744  fi
57745  # ..and contain a vc2010 project file
57746  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57747  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57748    { $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
57749$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57750    BUILD_FREETYPE=no
57751  fi
57752  # Now check if configure found a version of 'msbuild.exe'
57753  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57754    { $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
57755$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;}
57756    BUILD_FREETYPE=no
57757  fi
57758
57759  # Ready to go..
57760  if test "x$BUILD_FREETYPE" = xyes; then
57761    # msbuild requires trailing slashes for output directories
57762    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57763    freetype_lib_path_unix="$freetype_lib_path"
57764    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57765
57766  unix_path="$vcxproj_path"
57767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57768    windows_path=`$CYGPATH -m "$unix_path"`
57769    vcxproj_path="$windows_path"
57770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57771    windows_path=`cmd //c echo $unix_path`
57772    vcxproj_path="$windows_path"
57773  fi
57774
57775
57776  unix_path="$freetype_lib_path"
57777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57778    windows_path=`$CYGPATH -m "$unix_path"`
57779    freetype_lib_path="$windows_path"
57780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57781    windows_path=`cmd //c echo $unix_path`
57782    freetype_lib_path="$windows_path"
57783  fi
57784
57785
57786  unix_path="$freetype_obj_path"
57787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57788    windows_path=`$CYGPATH -m "$unix_path"`
57789    freetype_obj_path="$windows_path"
57790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57791    windows_path=`cmd //c echo $unix_path`
57792    freetype_obj_path="$windows_path"
57793  fi
57794
57795    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57796      freetype_platform=x64
57797    else
57798      freetype_platform=win32
57799    fi
57800
57801    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57802    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57803    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57804    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57805    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57806$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57807
57808    # First we try to build the freetype.dll
57809    $ECHO -e "@echo off\n"\
57810        "$MSBUILD $vcxproj_path "\
57811        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57812        "/p:Configuration=\"Release Multithreaded\" "\
57813        "/p:Platform=$freetype_platform "\
57814        "/p:ConfigurationType=DynamicLibrary "\
57815        "/p:TargetName=freetype "\
57816        "/p:OutDir=\"$freetype_lib_path\" "\
57817        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57818    cmd /c freetype.bat
57819
57820    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57821      # If that succeeds we also build freetype.lib
57822      $ECHO -e "@echo off\n"\
57823          "$MSBUILD $vcxproj_path "\
57824          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57825          "/p:Configuration=\"Release Multithreaded\" "\
57826          "/p:Platform=$freetype_platform "\
57827          "/p:ConfigurationType=StaticLibrary "\
57828          "/p:TargetName=freetype "\
57829          "/p:OutDir=\"$freetype_lib_path\" "\
57830          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57831      cmd /c freetype.bat
57832
57833      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57834        # Once we build both, lib and dll, set freetype lib and include path appropriately
57835        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57836        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57837        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57838$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57839      else
57840        BUILD_FREETYPE=no
57841      fi
57842    else
57843      BUILD_FREETYPE=no
57844    fi
57845  fi
57846
57847        if test "x$BUILD_FREETYPE" = xyes; then
57848          # Okay, we built it. Check that it works.
57849
57850  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57851  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57852  METHOD="--with-freetype-src"
57853
57854  # Let's start with an optimistic view of the world :-)
57855  FOUND_FREETYPE=yes
57856
57857  # First look for the canonical freetype main include file ft2build.h.
57858  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57859    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57860    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57861    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57862      # Fail.
57863      FOUND_FREETYPE=no
57864    fi
57865  fi
57866
57867  if test "x$FOUND_FREETYPE" = xyes; then
57868    # Include file found, let's continue the sanity check.
57869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57870$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57871
57872    # Reset to default value
57873    FREETYPE_BASE_NAME=freetype
57874    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57875    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57876      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57877          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57878        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57879        # for the .6 version explicitly.
57880        FREETYPE_BASE_NAME=freetype.6
57881        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57882        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57883$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57884      else
57885        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57886$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57887        FOUND_FREETYPE=no
57888      fi
57889    else
57890      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57891        # On Windows, we will need both .lib and .dll file.
57892        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57893          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57894$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57895          FOUND_FREETYPE=no
57896        fi
57897      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57898          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57899        # Found lib in isa dir, use that instead.
57900        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57901        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57902$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57903      fi
57904    fi
57905  fi
57906
57907  if test "x$FOUND_FREETYPE" = xyes; then
57908
57909  # Only process if variable expands to non-empty
57910
57911  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57913
57914  # Input might be given as Windows format, start by converting to
57915  # unix format.
57916  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57917  new_path=`$CYGPATH -u "$path"`
57918
57919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57922  # "foo.exe" is OK but "foo" is an error.
57923  #
57924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57925  # It is also a way to make sure we got the proper file name for the real test later on.
57926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57927  if test "x$test_shortpath" = x; then
57928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57930    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57931  fi
57932
57933  # Call helper function which possibly converts this using DOS-style short mode.
57934  # If so, the updated path is stored in $new_path.
57935
57936  input_path="$new_path"
57937  # Check if we need to convert this using DOS-style short mode. If the path
57938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57939  # take no chances and rewrite it.
57940  # Note: m4 eats our [], so we need to use [ and ] instead.
57941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57942  if test "x$has_forbidden_chars" != x; then
57943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57947      # Going to short mode and back again did indeed matter. Since short mode is
57948      # case insensitive, let's make it lowercase to improve readability.
57949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57950      # Now convert it back to Unix-style (cygpath)
57951      input_path=`$CYGPATH -u "$shortmode_path"`
57952      new_path="$input_path"
57953    fi
57954  fi
57955
57956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57957  if test "x$test_cygdrive_prefix" = x; then
57958    # As a simple fix, exclude /usr/bin since it's not a real path.
57959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57961      # a path prefixed by /cygdrive for fixpath to work.
57962      new_path="$CYGWIN_ROOT_PATH$input_path"
57963    fi
57964  fi
57965
57966
57967  if test "x$path" != "x$new_path"; then
57968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57971  fi
57972
57973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57974
57975  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57976  has_colon=`$ECHO $path | $GREP ^.:`
57977  new_path="$path"
57978  if test "x$has_colon" = x; then
57979    # Not in mixed or Windows style, start by that.
57980    new_path=`cmd //c echo $path`
57981  fi
57982
57983
57984  input_path="$new_path"
57985  # Check if we need to convert this using DOS-style short mode. If the path
57986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57987  # take no chances and rewrite it.
57988  # Note: m4 eats our [], so we need to use [ and ] instead.
57989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57990  if test "x$has_forbidden_chars" != x; then
57991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57993  fi
57994
57995
57996  windows_path="$new_path"
57997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57998    unix_path=`$CYGPATH -u "$windows_path"`
57999    new_path="$unix_path"
58000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58002    new_path="$unix_path"
58003  fi
58004
58005  if test "x$path" != "x$new_path"; then
58006    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58009  fi
58010
58011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58013
58014    else
58015      # We're on a unix platform. Hooray! :)
58016      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58017      has_space=`$ECHO "$path" | $GREP " "`
58018      if test "x$has_space" != x; then
58019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58022      fi
58023
58024      # Use eval to expand a potential ~
58025      eval path="$path"
58026      if test ! -f "$path" && test ! -d "$path"; then
58027        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58028      fi
58029
58030      if test -d "$path"; then
58031        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58032      else
58033        dir="`$DIRNAME "$path"`"
58034        base="`$BASENAME "$path"`"
58035        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58036      fi
58037    fi
58038  fi
58039
58040
58041  # Only process if variable expands to non-empty
58042
58043  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58045
58046  # Input might be given as Windows format, start by converting to
58047  # unix format.
58048  path="$POTENTIAL_FREETYPE_LIB_PATH"
58049  new_path=`$CYGPATH -u "$path"`
58050
58051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58054  # "foo.exe" is OK but "foo" is an error.
58055  #
58056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58057  # It is also a way to make sure we got the proper file name for the real test later on.
58058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58059  if test "x$test_shortpath" = x; then
58060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58063  fi
58064
58065  # Call helper function which possibly converts this using DOS-style short mode.
58066  # If so, the updated path is stored in $new_path.
58067
58068  input_path="$new_path"
58069  # Check if we need to convert this using DOS-style short mode. If the path
58070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58071  # take no chances and rewrite it.
58072  # Note: m4 eats our [], so we need to use [ and ] instead.
58073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58074  if test "x$has_forbidden_chars" != x; then
58075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58079      # Going to short mode and back again did indeed matter. Since short mode is
58080      # case insensitive, let's make it lowercase to improve readability.
58081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58082      # Now convert it back to Unix-style (cygpath)
58083      input_path=`$CYGPATH -u "$shortmode_path"`
58084      new_path="$input_path"
58085    fi
58086  fi
58087
58088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58089  if test "x$test_cygdrive_prefix" = x; then
58090    # As a simple fix, exclude /usr/bin since it's not a real path.
58091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58093      # a path prefixed by /cygdrive for fixpath to work.
58094      new_path="$CYGWIN_ROOT_PATH$input_path"
58095    fi
58096  fi
58097
58098
58099  if test "x$path" != "x$new_path"; then
58100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58103  fi
58104
58105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58106
58107  path="$POTENTIAL_FREETYPE_LIB_PATH"
58108  has_colon=`$ECHO $path | $GREP ^.:`
58109  new_path="$path"
58110  if test "x$has_colon" = x; then
58111    # Not in mixed or Windows style, start by that.
58112    new_path=`cmd //c echo $path`
58113  fi
58114
58115
58116  input_path="$new_path"
58117  # Check if we need to convert this using DOS-style short mode. If the path
58118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58119  # take no chances and rewrite it.
58120  # Note: m4 eats our [], so we need to use [ and ] instead.
58121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58122  if test "x$has_forbidden_chars" != x; then
58123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58125  fi
58126
58127
58128  windows_path="$new_path"
58129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58130    unix_path=`$CYGPATH -u "$windows_path"`
58131    new_path="$unix_path"
58132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58134    new_path="$unix_path"
58135  fi
58136
58137  if test "x$path" != "x$new_path"; then
58138    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58141  fi
58142
58143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58145
58146    else
58147      # We're on a unix platform. Hooray! :)
58148      path="$POTENTIAL_FREETYPE_LIB_PATH"
58149      has_space=`$ECHO "$path" | $GREP " "`
58150      if test "x$has_space" != x; then
58151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58154      fi
58155
58156      # Use eval to expand a potential ~
58157      eval path="$path"
58158      if test ! -f "$path" && test ! -d "$path"; then
58159        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58160      fi
58161
58162      if test -d "$path"; then
58163        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58164      else
58165        dir="`$DIRNAME "$path"`"
58166        base="`$BASENAME "$path"`"
58167        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58168      fi
58169    fi
58170  fi
58171
58172
58173    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58175$as_echo_n "checking for freetype includes... " >&6; }
58176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58177$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58178    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58180$as_echo_n "checking for freetype libraries... " >&6; }
58181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58182$as_echo "$FREETYPE_LIB_PATH" >&6; }
58183  fi
58184
58185          if test "x$FOUND_FREETYPE" != xyes; then
58186            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58187          fi
58188        else
58189          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58190$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58191          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58192        fi
58193      else
58194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58195$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58196      fi
58197    fi
58198
58199    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58200      # User has specified settings
58201
58202      if test "x$BUNDLE_FREETYPE" = x; then
58203        # If not specified, default is to bundle freetype
58204        BUNDLE_FREETYPE=yes
58205      fi
58206
58207      if test "x$with_freetype" != x; then
58208        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58209        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58210      fi
58211
58212      # Allow --with-freetype-lib and --with-freetype-include to override
58213      if test "x$with_freetype_include" != x; then
58214        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58215      fi
58216      if test "x$with_freetype_lib" != x; then
58217        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58218      fi
58219
58220      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58221        # Okay, we got it. Check that it works.
58222
58223  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58224  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58225  METHOD="--with-freetype"
58226
58227  # Let's start with an optimistic view of the world :-)
58228  FOUND_FREETYPE=yes
58229
58230  # First look for the canonical freetype main include file ft2build.h.
58231  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58232    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58233    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58234    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58235      # Fail.
58236      FOUND_FREETYPE=no
58237    fi
58238  fi
58239
58240  if test "x$FOUND_FREETYPE" = xyes; then
58241    # Include file found, let's continue the sanity check.
58242    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58243$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58244
58245    # Reset to default value
58246    FREETYPE_BASE_NAME=freetype
58247    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58248    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58249      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58250          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58251        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58252        # for the .6 version explicitly.
58253        FREETYPE_BASE_NAME=freetype.6
58254        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58255        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58256$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58257      else
58258        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58259$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58260        FOUND_FREETYPE=no
58261      fi
58262    else
58263      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58264        # On Windows, we will need both .lib and .dll file.
58265        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58266          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58267$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58268          FOUND_FREETYPE=no
58269        fi
58270      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58271          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58272        # Found lib in isa dir, use that instead.
58273        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58274        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58275$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58276      fi
58277    fi
58278  fi
58279
58280  if test "x$FOUND_FREETYPE" = xyes; then
58281
58282  # Only process if variable expands to non-empty
58283
58284  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58286
58287  # Input might be given as Windows format, start by converting to
58288  # unix format.
58289  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58290  new_path=`$CYGPATH -u "$path"`
58291
58292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58295  # "foo.exe" is OK but "foo" is an error.
58296  #
58297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58298  # It is also a way to make sure we got the proper file name for the real test later on.
58299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58300  if test "x$test_shortpath" = x; then
58301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58304  fi
58305
58306  # Call helper function which possibly converts this using DOS-style short mode.
58307  # If so, the updated path is stored in $new_path.
58308
58309  input_path="$new_path"
58310  # Check if we need to convert this using DOS-style short mode. If the path
58311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58312  # take no chances and rewrite it.
58313  # Note: m4 eats our [], so we need to use [ and ] instead.
58314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58315  if test "x$has_forbidden_chars" != x; then
58316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58320      # Going to short mode and back again did indeed matter. Since short mode is
58321      # case insensitive, let's make it lowercase to improve readability.
58322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58323      # Now convert it back to Unix-style (cygpath)
58324      input_path=`$CYGPATH -u "$shortmode_path"`
58325      new_path="$input_path"
58326    fi
58327  fi
58328
58329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58330  if test "x$test_cygdrive_prefix" = x; then
58331    # As a simple fix, exclude /usr/bin since it's not a real path.
58332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58334      # a path prefixed by /cygdrive for fixpath to work.
58335      new_path="$CYGWIN_ROOT_PATH$input_path"
58336    fi
58337  fi
58338
58339
58340  if test "x$path" != "x$new_path"; then
58341    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58344  fi
58345
58346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58347
58348  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58349  has_colon=`$ECHO $path | $GREP ^.:`
58350  new_path="$path"
58351  if test "x$has_colon" = x; then
58352    # Not in mixed or Windows style, start by that.
58353    new_path=`cmd //c echo $path`
58354  fi
58355
58356
58357  input_path="$new_path"
58358  # Check if we need to convert this using DOS-style short mode. If the path
58359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58360  # take no chances and rewrite it.
58361  # Note: m4 eats our [], so we need to use [ and ] instead.
58362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58363  if test "x$has_forbidden_chars" != x; then
58364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58366  fi
58367
58368
58369  windows_path="$new_path"
58370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58371    unix_path=`$CYGPATH -u "$windows_path"`
58372    new_path="$unix_path"
58373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58375    new_path="$unix_path"
58376  fi
58377
58378  if test "x$path" != "x$new_path"; then
58379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58382  fi
58383
58384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58386
58387    else
58388      # We're on a unix platform. Hooray! :)
58389      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58390      has_space=`$ECHO "$path" | $GREP " "`
58391      if test "x$has_space" != x; then
58392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58395      fi
58396
58397      # Use eval to expand a potential ~
58398      eval path="$path"
58399      if test ! -f "$path" && test ! -d "$path"; then
58400        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58401      fi
58402
58403      if test -d "$path"; then
58404        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58405      else
58406        dir="`$DIRNAME "$path"`"
58407        base="`$BASENAME "$path"`"
58408        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58409      fi
58410    fi
58411  fi
58412
58413
58414  # Only process if variable expands to non-empty
58415
58416  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58418
58419  # Input might be given as Windows format, start by converting to
58420  # unix format.
58421  path="$POTENTIAL_FREETYPE_LIB_PATH"
58422  new_path=`$CYGPATH -u "$path"`
58423
58424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58427  # "foo.exe" is OK but "foo" is an error.
58428  #
58429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58430  # It is also a way to make sure we got the proper file name for the real test later on.
58431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58432  if test "x$test_shortpath" = x; then
58433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58436  fi
58437
58438  # Call helper function which possibly converts this using DOS-style short mode.
58439  # If so, the updated path is stored in $new_path.
58440
58441  input_path="$new_path"
58442  # Check if we need to convert this using DOS-style short mode. If the path
58443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58444  # take no chances and rewrite it.
58445  # Note: m4 eats our [], so we need to use [ and ] instead.
58446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58447  if test "x$has_forbidden_chars" != x; then
58448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58452      # Going to short mode and back again did indeed matter. Since short mode is
58453      # case insensitive, let's make it lowercase to improve readability.
58454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58455      # Now convert it back to Unix-style (cygpath)
58456      input_path=`$CYGPATH -u "$shortmode_path"`
58457      new_path="$input_path"
58458    fi
58459  fi
58460
58461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58462  if test "x$test_cygdrive_prefix" = x; then
58463    # As a simple fix, exclude /usr/bin since it's not a real path.
58464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58466      # a path prefixed by /cygdrive for fixpath to work.
58467      new_path="$CYGWIN_ROOT_PATH$input_path"
58468    fi
58469  fi
58470
58471
58472  if test "x$path" != "x$new_path"; then
58473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58476  fi
58477
58478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58479
58480  path="$POTENTIAL_FREETYPE_LIB_PATH"
58481  has_colon=`$ECHO $path | $GREP ^.:`
58482  new_path="$path"
58483  if test "x$has_colon" = x; then
58484    # Not in mixed or Windows style, start by that.
58485    new_path=`cmd //c echo $path`
58486  fi
58487
58488
58489  input_path="$new_path"
58490  # Check if we need to convert this using DOS-style short mode. If the path
58491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58492  # take no chances and rewrite it.
58493  # Note: m4 eats our [], so we need to use [ and ] instead.
58494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58495  if test "x$has_forbidden_chars" != x; then
58496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58498  fi
58499
58500
58501  windows_path="$new_path"
58502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58503    unix_path=`$CYGPATH -u "$windows_path"`
58504    new_path="$unix_path"
58505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58507    new_path="$unix_path"
58508  fi
58509
58510  if test "x$path" != "x$new_path"; then
58511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58514  fi
58515
58516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58518
58519    else
58520      # We're on a unix platform. Hooray! :)
58521      path="$POTENTIAL_FREETYPE_LIB_PATH"
58522      has_space=`$ECHO "$path" | $GREP " "`
58523      if test "x$has_space" != x; then
58524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58527      fi
58528
58529      # Use eval to expand a potential ~
58530      eval path="$path"
58531      if test ! -f "$path" && test ! -d "$path"; then
58532        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58533      fi
58534
58535      if test -d "$path"; then
58536        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58537      else
58538        dir="`$DIRNAME "$path"`"
58539        base="`$BASENAME "$path"`"
58540        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58541      fi
58542    fi
58543  fi
58544
58545
58546    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58548$as_echo_n "checking for freetype includes... " >&6; }
58549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58550$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58551    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58553$as_echo_n "checking for freetype libraries... " >&6; }
58554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58555$as_echo "$FREETYPE_LIB_PATH" >&6; }
58556  fi
58557
58558        if test "x$FOUND_FREETYPE" != xyes; then
58559          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58560        fi
58561      else
58562        # User specified only one of lib or include. This is an error.
58563        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58564          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58565$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58566          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58567        else
58568          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58569$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58570          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58571        fi
58572      fi
58573    else
58574      # User did not specify settings, but we need freetype. Try to locate it.
58575
58576      if test "x$BUNDLE_FREETYPE" = x; then
58577        # If not specified, default is to bundle freetype only on windows
58578        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58579          BUNDLE_FREETYPE=yes
58580        else
58581          BUNDLE_FREETYPE=no
58582        fi
58583      fi
58584
58585      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58586      if test "x$SYSROOT" = x; then
58587        if test "x$FOUND_FREETYPE" != xyes; then
58588          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58589          if test "x$PKG_CONFIG" != x; then
58590
58591pkg_failed=no
58592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58593$as_echo_n "checking for FREETYPE... " >&6; }
58594
58595if test -n "$FREETYPE_CFLAGS"; then
58596    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58597 elif test -n "$PKG_CONFIG"; then
58598    if test -n "$PKG_CONFIG" && \
58599    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58600  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58601  ac_status=$?
58602  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58603  test $ac_status = 0; }; then
58604  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58605else
58606  pkg_failed=yes
58607fi
58608 else
58609    pkg_failed=untried
58610fi
58611if test -n "$FREETYPE_LIBS"; then
58612    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58613 elif test -n "$PKG_CONFIG"; then
58614    if test -n "$PKG_CONFIG" && \
58615    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58616  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58617  ac_status=$?
58618  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58619  test $ac_status = 0; }; then
58620  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58621else
58622  pkg_failed=yes
58623fi
58624 else
58625    pkg_failed=untried
58626fi
58627
58628
58629
58630if test $pkg_failed = yes; then
58631
58632if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58633        _pkg_short_errors_supported=yes
58634else
58635        _pkg_short_errors_supported=no
58636fi
58637        if test $_pkg_short_errors_supported = yes; then
58638	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58639        else
58640	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58641        fi
58642	# Put the nasty error message in config.log where it belongs
58643	echo "$FREETYPE_PKG_ERRORS" >&5
58644
58645	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58646$as_echo "no" >&6; }
58647                FOUND_FREETYPE=no
58648elif test $pkg_failed = untried; then
58649	FOUND_FREETYPE=no
58650else
58651	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58652	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58654$as_echo "yes" >&6; }
58655	FOUND_FREETYPE=yes
58656fi
58657            if test "x$FOUND_FREETYPE" = xyes; then
58658              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58659              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58660              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58661              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58662                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58663              fi
58664              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58665              if test "x$BUNDLE_FREETYPE" = xyes; then
58666                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58667$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58668                FOUND_FREETYPE=no
58669              else
58670                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58671$as_echo_n "checking for freetype... " >&6; }
58672                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58673$as_echo "yes (using pkg-config)" >&6; }
58674              fi
58675            fi
58676          fi
58677        fi
58678      fi
58679
58680      if test "x$FOUND_FREETYPE" != xyes; then
58681        # Check in well-known locations
58682        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58683          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58684
58685  windows_path="$FREETYPE_BASE_DIR"
58686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58687    unix_path=`$CYGPATH -u "$windows_path"`
58688    FREETYPE_BASE_DIR="$unix_path"
58689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58691    FREETYPE_BASE_DIR="$unix_path"
58692  fi
58693
58694
58695  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58696  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58697  METHOD="well-known location"
58698
58699  # Let's start with an optimistic view of the world :-)
58700  FOUND_FREETYPE=yes
58701
58702  # First look for the canonical freetype main include file ft2build.h.
58703  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58704    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58705    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58706    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58707      # Fail.
58708      FOUND_FREETYPE=no
58709    fi
58710  fi
58711
58712  if test "x$FOUND_FREETYPE" = xyes; then
58713    # Include file found, let's continue the sanity check.
58714    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58715$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58716
58717    # Reset to default value
58718    FREETYPE_BASE_NAME=freetype
58719    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58720    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58721      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58722          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58723        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58724        # for the .6 version explicitly.
58725        FREETYPE_BASE_NAME=freetype.6
58726        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58727        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58728$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58729      else
58730        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58731$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58732        FOUND_FREETYPE=no
58733      fi
58734    else
58735      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58736        # On Windows, we will need both .lib and .dll file.
58737        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58738          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58739$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58740          FOUND_FREETYPE=no
58741        fi
58742      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58743          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58744        # Found lib in isa dir, use that instead.
58745        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58746        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58747$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58748      fi
58749    fi
58750  fi
58751
58752  if test "x$FOUND_FREETYPE" = xyes; then
58753
58754  # Only process if variable expands to non-empty
58755
58756  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58758
58759  # Input might be given as Windows format, start by converting to
58760  # unix format.
58761  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58762  new_path=`$CYGPATH -u "$path"`
58763
58764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58767  # "foo.exe" is OK but "foo" is an error.
58768  #
58769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58770  # It is also a way to make sure we got the proper file name for the real test later on.
58771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58772  if test "x$test_shortpath" = x; then
58773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58774$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58775    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58776  fi
58777
58778  # Call helper function which possibly converts this using DOS-style short mode.
58779  # If so, the updated path is stored in $new_path.
58780
58781  input_path="$new_path"
58782  # Check if we need to convert this using DOS-style short mode. If the path
58783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58784  # take no chances and rewrite it.
58785  # Note: m4 eats our [], so we need to use [ and ] instead.
58786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58787  if test "x$has_forbidden_chars" != x; then
58788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58792      # Going to short mode and back again did indeed matter. Since short mode is
58793      # case insensitive, let's make it lowercase to improve readability.
58794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58795      # Now convert it back to Unix-style (cygpath)
58796      input_path=`$CYGPATH -u "$shortmode_path"`
58797      new_path="$input_path"
58798    fi
58799  fi
58800
58801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58802  if test "x$test_cygdrive_prefix" = x; then
58803    # As a simple fix, exclude /usr/bin since it's not a real path.
58804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58806      # a path prefixed by /cygdrive for fixpath to work.
58807      new_path="$CYGWIN_ROOT_PATH$input_path"
58808    fi
58809  fi
58810
58811
58812  if test "x$path" != "x$new_path"; then
58813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58816  fi
58817
58818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58819
58820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58821  has_colon=`$ECHO $path | $GREP ^.:`
58822  new_path="$path"
58823  if test "x$has_colon" = x; then
58824    # Not in mixed or Windows style, start by that.
58825    new_path=`cmd //c echo $path`
58826  fi
58827
58828
58829  input_path="$new_path"
58830  # Check if we need to convert this using DOS-style short mode. If the path
58831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58832  # take no chances and rewrite it.
58833  # Note: m4 eats our [], so we need to use [ and ] instead.
58834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58835  if test "x$has_forbidden_chars" != x; then
58836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58838  fi
58839
58840
58841  windows_path="$new_path"
58842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58843    unix_path=`$CYGPATH -u "$windows_path"`
58844    new_path="$unix_path"
58845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58847    new_path="$unix_path"
58848  fi
58849
58850  if test "x$path" != "x$new_path"; then
58851    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58854  fi
58855
58856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58858
58859    else
58860      # We're on a unix platform. Hooray! :)
58861      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58862      has_space=`$ECHO "$path" | $GREP " "`
58863      if test "x$has_space" != x; then
58864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58867      fi
58868
58869      # Use eval to expand a potential ~
58870      eval path="$path"
58871      if test ! -f "$path" && test ! -d "$path"; then
58872        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58873      fi
58874
58875      if test -d "$path"; then
58876        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58877      else
58878        dir="`$DIRNAME "$path"`"
58879        base="`$BASENAME "$path"`"
58880        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58881      fi
58882    fi
58883  fi
58884
58885
58886  # Only process if variable expands to non-empty
58887
58888  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58890
58891  # Input might be given as Windows format, start by converting to
58892  # unix format.
58893  path="$POTENTIAL_FREETYPE_LIB_PATH"
58894  new_path=`$CYGPATH -u "$path"`
58895
58896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58899  # "foo.exe" is OK but "foo" is an error.
58900  #
58901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58902  # It is also a way to make sure we got the proper file name for the real test later on.
58903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58904  if test "x$test_shortpath" = x; then
58905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58906$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58907    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58908  fi
58909
58910  # Call helper function which possibly converts this using DOS-style short mode.
58911  # If so, the updated path is stored in $new_path.
58912
58913  input_path="$new_path"
58914  # Check if we need to convert this using DOS-style short mode. If the path
58915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58916  # take no chances and rewrite it.
58917  # Note: m4 eats our [], so we need to use [ and ] instead.
58918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58919  if test "x$has_forbidden_chars" != x; then
58920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58924      # Going to short mode and back again did indeed matter. Since short mode is
58925      # case insensitive, let's make it lowercase to improve readability.
58926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58927      # Now convert it back to Unix-style (cygpath)
58928      input_path=`$CYGPATH -u "$shortmode_path"`
58929      new_path="$input_path"
58930    fi
58931  fi
58932
58933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58934  if test "x$test_cygdrive_prefix" = x; then
58935    # As a simple fix, exclude /usr/bin since it's not a real path.
58936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58938      # a path prefixed by /cygdrive for fixpath to work.
58939      new_path="$CYGWIN_ROOT_PATH$input_path"
58940    fi
58941  fi
58942
58943
58944  if test "x$path" != "x$new_path"; then
58945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58948  fi
58949
58950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58951
58952  path="$POTENTIAL_FREETYPE_LIB_PATH"
58953  has_colon=`$ECHO $path | $GREP ^.:`
58954  new_path="$path"
58955  if test "x$has_colon" = x; then
58956    # Not in mixed or Windows style, start by that.
58957    new_path=`cmd //c echo $path`
58958  fi
58959
58960
58961  input_path="$new_path"
58962  # Check if we need to convert this using DOS-style short mode. If the path
58963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58964  # take no chances and rewrite it.
58965  # Note: m4 eats our [], so we need to use [ and ] instead.
58966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58967  if test "x$has_forbidden_chars" != x; then
58968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58970  fi
58971
58972
58973  windows_path="$new_path"
58974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58975    unix_path=`$CYGPATH -u "$windows_path"`
58976    new_path="$unix_path"
58977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58979    new_path="$unix_path"
58980  fi
58981
58982  if test "x$path" != "x$new_path"; then
58983    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58986  fi
58987
58988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58990
58991    else
58992      # We're on a unix platform. Hooray! :)
58993      path="$POTENTIAL_FREETYPE_LIB_PATH"
58994      has_space=`$ECHO "$path" | $GREP " "`
58995      if test "x$has_space" != x; then
58996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58998        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58999      fi
59000
59001      # Use eval to expand a potential ~
59002      eval path="$path"
59003      if test ! -f "$path" && test ! -d "$path"; then
59004        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59005      fi
59006
59007      if test -d "$path"; then
59008        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59009      else
59010        dir="`$DIRNAME "$path"`"
59011        base="`$BASENAME "$path"`"
59012        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59013      fi
59014    fi
59015  fi
59016
59017
59018    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59020$as_echo_n "checking for freetype includes... " >&6; }
59021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59022$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59023    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59025$as_echo_n "checking for freetype libraries... " >&6; }
59026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59027$as_echo "$FREETYPE_LIB_PATH" >&6; }
59028  fi
59029
59030          if test "x$FOUND_FREETYPE" != xyes; then
59031            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59032
59033  windows_path="$FREETYPE_BASE_DIR"
59034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59035    unix_path=`$CYGPATH -u "$windows_path"`
59036    FREETYPE_BASE_DIR="$unix_path"
59037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59039    FREETYPE_BASE_DIR="$unix_path"
59040  fi
59041
59042
59043  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59044  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59045  METHOD="well-known location"
59046
59047  # Let's start with an optimistic view of the world :-)
59048  FOUND_FREETYPE=yes
59049
59050  # First look for the canonical freetype main include file ft2build.h.
59051  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59052    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59053    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59054    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59055      # Fail.
59056      FOUND_FREETYPE=no
59057    fi
59058  fi
59059
59060  if test "x$FOUND_FREETYPE" = xyes; then
59061    # Include file found, let's continue the sanity check.
59062    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59063$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59064
59065    # Reset to default value
59066    FREETYPE_BASE_NAME=freetype
59067    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59068    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59069      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59070          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59071        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59072        # for the .6 version explicitly.
59073        FREETYPE_BASE_NAME=freetype.6
59074        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59075        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59076$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59077      else
59078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59080        FOUND_FREETYPE=no
59081      fi
59082    else
59083      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59084        # On Windows, we will need both .lib and .dll file.
59085        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59086          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59088          FOUND_FREETYPE=no
59089        fi
59090      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59091          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59092        # Found lib in isa dir, use that instead.
59093        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59094        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59095$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59096      fi
59097    fi
59098  fi
59099
59100  if test "x$FOUND_FREETYPE" = xyes; then
59101
59102  # Only process if variable expands to non-empty
59103
59104  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59106
59107  # Input might be given as Windows format, start by converting to
59108  # unix format.
59109  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59110  new_path=`$CYGPATH -u "$path"`
59111
59112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59115  # "foo.exe" is OK but "foo" is an error.
59116  #
59117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59118  # It is also a way to make sure we got the proper file name for the real test later on.
59119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59120  if test "x$test_shortpath" = x; then
59121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59124  fi
59125
59126  # Call helper function which possibly converts this using DOS-style short mode.
59127  # If so, the updated path is stored in $new_path.
59128
59129  input_path="$new_path"
59130  # Check if we need to convert this using DOS-style short mode. If the path
59131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59132  # take no chances and rewrite it.
59133  # Note: m4 eats our [], so we need to use [ and ] instead.
59134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59135  if test "x$has_forbidden_chars" != x; then
59136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59140      # Going to short mode and back again did indeed matter. Since short mode is
59141      # case insensitive, let's make it lowercase to improve readability.
59142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59143      # Now convert it back to Unix-style (cygpath)
59144      input_path=`$CYGPATH -u "$shortmode_path"`
59145      new_path="$input_path"
59146    fi
59147  fi
59148
59149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59150  if test "x$test_cygdrive_prefix" = x; then
59151    # As a simple fix, exclude /usr/bin since it's not a real path.
59152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59154      # a path prefixed by /cygdrive for fixpath to work.
59155      new_path="$CYGWIN_ROOT_PATH$input_path"
59156    fi
59157  fi
59158
59159
59160  if test "x$path" != "x$new_path"; then
59161    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59164  fi
59165
59166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59167
59168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59169  has_colon=`$ECHO $path | $GREP ^.:`
59170  new_path="$path"
59171  if test "x$has_colon" = x; then
59172    # Not in mixed or Windows style, start by that.
59173    new_path=`cmd //c echo $path`
59174  fi
59175
59176
59177  input_path="$new_path"
59178  # Check if we need to convert this using DOS-style short mode. If the path
59179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59180  # take no chances and rewrite it.
59181  # Note: m4 eats our [], so we need to use [ and ] instead.
59182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59183  if test "x$has_forbidden_chars" != x; then
59184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59186  fi
59187
59188
59189  windows_path="$new_path"
59190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59191    unix_path=`$CYGPATH -u "$windows_path"`
59192    new_path="$unix_path"
59193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59195    new_path="$unix_path"
59196  fi
59197
59198  if test "x$path" != "x$new_path"; then
59199    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59202  fi
59203
59204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59206
59207    else
59208      # We're on a unix platform. Hooray! :)
59209      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59210      has_space=`$ECHO "$path" | $GREP " "`
59211      if test "x$has_space" != x; then
59212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59215      fi
59216
59217      # Use eval to expand a potential ~
59218      eval path="$path"
59219      if test ! -f "$path" && test ! -d "$path"; then
59220        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59221      fi
59222
59223      if test -d "$path"; then
59224        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59225      else
59226        dir="`$DIRNAME "$path"`"
59227        base="`$BASENAME "$path"`"
59228        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59229      fi
59230    fi
59231  fi
59232
59233
59234  # Only process if variable expands to non-empty
59235
59236  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59238
59239  # Input might be given as Windows format, start by converting to
59240  # unix format.
59241  path="$POTENTIAL_FREETYPE_LIB_PATH"
59242  new_path=`$CYGPATH -u "$path"`
59243
59244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59247  # "foo.exe" is OK but "foo" is an error.
59248  #
59249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59250  # It is also a way to make sure we got the proper file name for the real test later on.
59251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59252  if test "x$test_shortpath" = x; then
59253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59256  fi
59257
59258  # Call helper function which possibly converts this using DOS-style short mode.
59259  # If so, the updated path is stored in $new_path.
59260
59261  input_path="$new_path"
59262  # Check if we need to convert this using DOS-style short mode. If the path
59263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59264  # take no chances and rewrite it.
59265  # Note: m4 eats our [], so we need to use [ and ] instead.
59266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59267  if test "x$has_forbidden_chars" != x; then
59268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59272      # Going to short mode and back again did indeed matter. Since short mode is
59273      # case insensitive, let's make it lowercase to improve readability.
59274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59275      # Now convert it back to Unix-style (cygpath)
59276      input_path=`$CYGPATH -u "$shortmode_path"`
59277      new_path="$input_path"
59278    fi
59279  fi
59280
59281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59282  if test "x$test_cygdrive_prefix" = x; then
59283    # As a simple fix, exclude /usr/bin since it's not a real path.
59284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59286      # a path prefixed by /cygdrive for fixpath to work.
59287      new_path="$CYGWIN_ROOT_PATH$input_path"
59288    fi
59289  fi
59290
59291
59292  if test "x$path" != "x$new_path"; then
59293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59296  fi
59297
59298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59299
59300  path="$POTENTIAL_FREETYPE_LIB_PATH"
59301  has_colon=`$ECHO $path | $GREP ^.:`
59302  new_path="$path"
59303  if test "x$has_colon" = x; then
59304    # Not in mixed or Windows style, start by that.
59305    new_path=`cmd //c echo $path`
59306  fi
59307
59308
59309  input_path="$new_path"
59310  # Check if we need to convert this using DOS-style short mode. If the path
59311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59312  # take no chances and rewrite it.
59313  # Note: m4 eats our [], so we need to use [ and ] instead.
59314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59315  if test "x$has_forbidden_chars" != x; then
59316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59318  fi
59319
59320
59321  windows_path="$new_path"
59322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59323    unix_path=`$CYGPATH -u "$windows_path"`
59324    new_path="$unix_path"
59325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59327    new_path="$unix_path"
59328  fi
59329
59330  if test "x$path" != "x$new_path"; then
59331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59334  fi
59335
59336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59338
59339    else
59340      # We're on a unix platform. Hooray! :)
59341      path="$POTENTIAL_FREETYPE_LIB_PATH"
59342      has_space=`$ECHO "$path" | $GREP " "`
59343      if test "x$has_space" != x; then
59344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59347      fi
59348
59349      # Use eval to expand a potential ~
59350      eval path="$path"
59351      if test ! -f "$path" && test ! -d "$path"; then
59352        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59353      fi
59354
59355      if test -d "$path"; then
59356        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59357      else
59358        dir="`$DIRNAME "$path"`"
59359        base="`$BASENAME "$path"`"
59360        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59361      fi
59362    fi
59363  fi
59364
59365
59366    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59368$as_echo_n "checking for freetype includes... " >&6; }
59369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59370$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59371    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59373$as_echo_n "checking for freetype libraries... " >&6; }
59374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59375$as_echo "$FREETYPE_LIB_PATH" >&6; }
59376  fi
59377
59378          fi
59379          if test "x$FOUND_FREETYPE" != xyes; then
59380            FREETYPE_BASE_DIR="$HOME/freetype"
59381
59382  windows_path="$FREETYPE_BASE_DIR"
59383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59384    unix_path=`$CYGPATH -u "$windows_path"`
59385    FREETYPE_BASE_DIR="$unix_path"
59386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59388    FREETYPE_BASE_DIR="$unix_path"
59389  fi
59390
59391            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59392
59393  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59394  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59395  METHOD="well-known location"
59396
59397  # Let's start with an optimistic view of the world :-)
59398  FOUND_FREETYPE=yes
59399
59400  # First look for the canonical freetype main include file ft2build.h.
59401  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59402    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59403    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59404    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59405      # Fail.
59406      FOUND_FREETYPE=no
59407    fi
59408  fi
59409
59410  if test "x$FOUND_FREETYPE" = xyes; then
59411    # Include file found, let's continue the sanity check.
59412    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59413$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59414
59415    # Reset to default value
59416    FREETYPE_BASE_NAME=freetype
59417    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59418    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59419      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59420          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59421        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59422        # for the .6 version explicitly.
59423        FREETYPE_BASE_NAME=freetype.6
59424        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59425        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59426$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59427      else
59428        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59430        FOUND_FREETYPE=no
59431      fi
59432    else
59433      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59434        # On Windows, we will need both .lib and .dll file.
59435        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59436          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59437$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59438          FOUND_FREETYPE=no
59439        fi
59440      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59441          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59442        # Found lib in isa dir, use that instead.
59443        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59444        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59445$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59446      fi
59447    fi
59448  fi
59449
59450  if test "x$FOUND_FREETYPE" = xyes; then
59451
59452  # Only process if variable expands to non-empty
59453
59454  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59456
59457  # Input might be given as Windows format, start by converting to
59458  # unix format.
59459  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59460  new_path=`$CYGPATH -u "$path"`
59461
59462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59465  # "foo.exe" is OK but "foo" is an error.
59466  #
59467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59468  # It is also a way to make sure we got the proper file name for the real test later on.
59469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59470  if test "x$test_shortpath" = x; then
59471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59472$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59473    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59474  fi
59475
59476  # Call helper function which possibly converts this using DOS-style short mode.
59477  # If so, the updated path is stored in $new_path.
59478
59479  input_path="$new_path"
59480  # Check if we need to convert this using DOS-style short mode. If the path
59481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59482  # take no chances and rewrite it.
59483  # Note: m4 eats our [], so we need to use [ and ] instead.
59484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59485  if test "x$has_forbidden_chars" != x; then
59486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59490      # Going to short mode and back again did indeed matter. Since short mode is
59491      # case insensitive, let's make it lowercase to improve readability.
59492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59493      # Now convert it back to Unix-style (cygpath)
59494      input_path=`$CYGPATH -u "$shortmode_path"`
59495      new_path="$input_path"
59496    fi
59497  fi
59498
59499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59500  if test "x$test_cygdrive_prefix" = x; then
59501    # As a simple fix, exclude /usr/bin since it's not a real path.
59502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59504      # a path prefixed by /cygdrive for fixpath to work.
59505      new_path="$CYGWIN_ROOT_PATH$input_path"
59506    fi
59507  fi
59508
59509
59510  if test "x$path" != "x$new_path"; then
59511    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59514  fi
59515
59516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59517
59518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59519  has_colon=`$ECHO $path | $GREP ^.:`
59520  new_path="$path"
59521  if test "x$has_colon" = x; then
59522    # Not in mixed or Windows style, start by that.
59523    new_path=`cmd //c echo $path`
59524  fi
59525
59526
59527  input_path="$new_path"
59528  # Check if we need to convert this using DOS-style short mode. If the path
59529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59530  # take no chances and rewrite it.
59531  # Note: m4 eats our [], so we need to use [ and ] instead.
59532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59533  if test "x$has_forbidden_chars" != x; then
59534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59536  fi
59537
59538
59539  windows_path="$new_path"
59540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59541    unix_path=`$CYGPATH -u "$windows_path"`
59542    new_path="$unix_path"
59543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59545    new_path="$unix_path"
59546  fi
59547
59548  if test "x$path" != "x$new_path"; then
59549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59552  fi
59553
59554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59556
59557    else
59558      # We're on a unix platform. Hooray! :)
59559      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59560      has_space=`$ECHO "$path" | $GREP " "`
59561      if test "x$has_space" != x; then
59562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59565      fi
59566
59567      # Use eval to expand a potential ~
59568      eval path="$path"
59569      if test ! -f "$path" && test ! -d "$path"; then
59570        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59571      fi
59572
59573      if test -d "$path"; then
59574        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59575      else
59576        dir="`$DIRNAME "$path"`"
59577        base="`$BASENAME "$path"`"
59578        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59579      fi
59580    fi
59581  fi
59582
59583
59584  # Only process if variable expands to non-empty
59585
59586  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59588
59589  # Input might be given as Windows format, start by converting to
59590  # unix format.
59591  path="$POTENTIAL_FREETYPE_LIB_PATH"
59592  new_path=`$CYGPATH -u "$path"`
59593
59594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59597  # "foo.exe" is OK but "foo" is an error.
59598  #
59599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59600  # It is also a way to make sure we got the proper file name for the real test later on.
59601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59602  if test "x$test_shortpath" = x; then
59603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59606  fi
59607
59608  # Call helper function which possibly converts this using DOS-style short mode.
59609  # If so, the updated path is stored in $new_path.
59610
59611  input_path="$new_path"
59612  # Check if we need to convert this using DOS-style short mode. If the path
59613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59614  # take no chances and rewrite it.
59615  # Note: m4 eats our [], so we need to use [ and ] instead.
59616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59617  if test "x$has_forbidden_chars" != x; then
59618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59622      # Going to short mode and back again did indeed matter. Since short mode is
59623      # case insensitive, let's make it lowercase to improve readability.
59624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59625      # Now convert it back to Unix-style (cygpath)
59626      input_path=`$CYGPATH -u "$shortmode_path"`
59627      new_path="$input_path"
59628    fi
59629  fi
59630
59631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59632  if test "x$test_cygdrive_prefix" = x; then
59633    # As a simple fix, exclude /usr/bin since it's not a real path.
59634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59636      # a path prefixed by /cygdrive for fixpath to work.
59637      new_path="$CYGWIN_ROOT_PATH$input_path"
59638    fi
59639  fi
59640
59641
59642  if test "x$path" != "x$new_path"; then
59643    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59646  fi
59647
59648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59649
59650  path="$POTENTIAL_FREETYPE_LIB_PATH"
59651  has_colon=`$ECHO $path | $GREP ^.:`
59652  new_path="$path"
59653  if test "x$has_colon" = x; then
59654    # Not in mixed or Windows style, start by that.
59655    new_path=`cmd //c echo $path`
59656  fi
59657
59658
59659  input_path="$new_path"
59660  # Check if we need to convert this using DOS-style short mode. If the path
59661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59662  # take no chances and rewrite it.
59663  # Note: m4 eats our [], so we need to use [ and ] instead.
59664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59665  if test "x$has_forbidden_chars" != x; then
59666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59668  fi
59669
59670
59671  windows_path="$new_path"
59672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59673    unix_path=`$CYGPATH -u "$windows_path"`
59674    new_path="$unix_path"
59675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59677    new_path="$unix_path"
59678  fi
59679
59680  if test "x$path" != "x$new_path"; then
59681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59684  fi
59685
59686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59688
59689    else
59690      # We're on a unix platform. Hooray! :)
59691      path="$POTENTIAL_FREETYPE_LIB_PATH"
59692      has_space=`$ECHO "$path" | $GREP " "`
59693      if test "x$has_space" != x; then
59694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59697      fi
59698
59699      # Use eval to expand a potential ~
59700      eval path="$path"
59701      if test ! -f "$path" && test ! -d "$path"; then
59702        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59703      fi
59704
59705      if test -d "$path"; then
59706        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59707      else
59708        dir="`$DIRNAME "$path"`"
59709        base="`$BASENAME "$path"`"
59710        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59711      fi
59712    fi
59713  fi
59714
59715
59716    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59718$as_echo_n "checking for freetype includes... " >&6; }
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59720$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59721    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59723$as_echo_n "checking for freetype libraries... " >&6; }
59724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59725$as_echo "$FREETYPE_LIB_PATH" >&6; }
59726  fi
59727
59728            else
59729
59730  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59731  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59732  METHOD="well-known location"
59733
59734  # Let's start with an optimistic view of the world :-)
59735  FOUND_FREETYPE=yes
59736
59737  # First look for the canonical freetype main include file ft2build.h.
59738  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59739    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59740    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59741    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59742      # Fail.
59743      FOUND_FREETYPE=no
59744    fi
59745  fi
59746
59747  if test "x$FOUND_FREETYPE" = xyes; then
59748    # Include file found, let's continue the sanity check.
59749    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59750$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59751
59752    # Reset to default value
59753    FREETYPE_BASE_NAME=freetype
59754    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59755    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59756      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59757          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59758        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59759        # for the .6 version explicitly.
59760        FREETYPE_BASE_NAME=freetype.6
59761        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59762        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59763$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59764      else
59765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59767        FOUND_FREETYPE=no
59768      fi
59769    else
59770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59771        # On Windows, we will need both .lib and .dll file.
59772        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59773          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59775          FOUND_FREETYPE=no
59776        fi
59777      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59778          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59779        # Found lib in isa dir, use that instead.
59780        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59781        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59782$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59783      fi
59784    fi
59785  fi
59786
59787  if test "x$FOUND_FREETYPE" = xyes; then
59788
59789  # Only process if variable expands to non-empty
59790
59791  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59793
59794  # Input might be given as Windows format, start by converting to
59795  # unix format.
59796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59797  new_path=`$CYGPATH -u "$path"`
59798
59799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59802  # "foo.exe" is OK but "foo" is an error.
59803  #
59804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59805  # It is also a way to make sure we got the proper file name for the real test later on.
59806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59807  if test "x$test_shortpath" = x; then
59808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59811  fi
59812
59813  # Call helper function which possibly converts this using DOS-style short mode.
59814  # If so, the updated path is stored in $new_path.
59815
59816  input_path="$new_path"
59817  # Check if we need to convert this using DOS-style short mode. If the path
59818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59819  # take no chances and rewrite it.
59820  # Note: m4 eats our [], so we need to use [ and ] instead.
59821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59822  if test "x$has_forbidden_chars" != x; then
59823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59827      # Going to short mode and back again did indeed matter. Since short mode is
59828      # case insensitive, let's make it lowercase to improve readability.
59829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59830      # Now convert it back to Unix-style (cygpath)
59831      input_path=`$CYGPATH -u "$shortmode_path"`
59832      new_path="$input_path"
59833    fi
59834  fi
59835
59836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59837  if test "x$test_cygdrive_prefix" = x; then
59838    # As a simple fix, exclude /usr/bin since it's not a real path.
59839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59841      # a path prefixed by /cygdrive for fixpath to work.
59842      new_path="$CYGWIN_ROOT_PATH$input_path"
59843    fi
59844  fi
59845
59846
59847  if test "x$path" != "x$new_path"; then
59848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59851  fi
59852
59853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59854
59855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59856  has_colon=`$ECHO $path | $GREP ^.:`
59857  new_path="$path"
59858  if test "x$has_colon" = x; then
59859    # Not in mixed or Windows style, start by that.
59860    new_path=`cmd //c echo $path`
59861  fi
59862
59863
59864  input_path="$new_path"
59865  # Check if we need to convert this using DOS-style short mode. If the path
59866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59867  # take no chances and rewrite it.
59868  # Note: m4 eats our [], so we need to use [ and ] instead.
59869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59870  if test "x$has_forbidden_chars" != x; then
59871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59873  fi
59874
59875
59876  windows_path="$new_path"
59877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59878    unix_path=`$CYGPATH -u "$windows_path"`
59879    new_path="$unix_path"
59880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59882    new_path="$unix_path"
59883  fi
59884
59885  if test "x$path" != "x$new_path"; then
59886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59889  fi
59890
59891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59893
59894    else
59895      # We're on a unix platform. Hooray! :)
59896      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59897      has_space=`$ECHO "$path" | $GREP " "`
59898      if test "x$has_space" != x; then
59899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59902      fi
59903
59904      # Use eval to expand a potential ~
59905      eval path="$path"
59906      if test ! -f "$path" && test ! -d "$path"; then
59907        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59908      fi
59909
59910      if test -d "$path"; then
59911        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59912      else
59913        dir="`$DIRNAME "$path"`"
59914        base="`$BASENAME "$path"`"
59915        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59916      fi
59917    fi
59918  fi
59919
59920
59921  # Only process if variable expands to non-empty
59922
59923  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59925
59926  # Input might be given as Windows format, start by converting to
59927  # unix format.
59928  path="$POTENTIAL_FREETYPE_LIB_PATH"
59929  new_path=`$CYGPATH -u "$path"`
59930
59931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59934  # "foo.exe" is OK but "foo" is an error.
59935  #
59936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59937  # It is also a way to make sure we got the proper file name for the real test later on.
59938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59939  if test "x$test_shortpath" = x; then
59940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59942    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59943  fi
59944
59945  # Call helper function which possibly converts this using DOS-style short mode.
59946  # If so, the updated path is stored in $new_path.
59947
59948  input_path="$new_path"
59949  # Check if we need to convert this using DOS-style short mode. If the path
59950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59951  # take no chances and rewrite it.
59952  # Note: m4 eats our [], so we need to use [ and ] instead.
59953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59954  if test "x$has_forbidden_chars" != x; then
59955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59959      # Going to short mode and back again did indeed matter. Since short mode is
59960      # case insensitive, let's make it lowercase to improve readability.
59961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59962      # Now convert it back to Unix-style (cygpath)
59963      input_path=`$CYGPATH -u "$shortmode_path"`
59964      new_path="$input_path"
59965    fi
59966  fi
59967
59968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59969  if test "x$test_cygdrive_prefix" = x; then
59970    # As a simple fix, exclude /usr/bin since it's not a real path.
59971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59973      # a path prefixed by /cygdrive for fixpath to work.
59974      new_path="$CYGWIN_ROOT_PATH$input_path"
59975    fi
59976  fi
59977
59978
59979  if test "x$path" != "x$new_path"; then
59980    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59983  fi
59984
59985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59986
59987  path="$POTENTIAL_FREETYPE_LIB_PATH"
59988  has_colon=`$ECHO $path | $GREP ^.:`
59989  new_path="$path"
59990  if test "x$has_colon" = x; then
59991    # Not in mixed or Windows style, start by that.
59992    new_path=`cmd //c echo $path`
59993  fi
59994
59995
59996  input_path="$new_path"
59997  # Check if we need to convert this using DOS-style short mode. If the path
59998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59999  # take no chances and rewrite it.
60000  # Note: m4 eats our [], so we need to use [ and ] instead.
60001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60002  if test "x$has_forbidden_chars" != x; then
60003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60005  fi
60006
60007
60008  windows_path="$new_path"
60009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60010    unix_path=`$CYGPATH -u "$windows_path"`
60011    new_path="$unix_path"
60012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60014    new_path="$unix_path"
60015  fi
60016
60017  if test "x$path" != "x$new_path"; then
60018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60021  fi
60022
60023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60025
60026    else
60027      # We're on a unix platform. Hooray! :)
60028      path="$POTENTIAL_FREETYPE_LIB_PATH"
60029      has_space=`$ECHO "$path" | $GREP " "`
60030      if test "x$has_space" != x; then
60031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60034      fi
60035
60036      # Use eval to expand a potential ~
60037      eval path="$path"
60038      if test ! -f "$path" && test ! -d "$path"; then
60039        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60040      fi
60041
60042      if test -d "$path"; then
60043        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60044      else
60045        dir="`$DIRNAME "$path"`"
60046        base="`$BASENAME "$path"`"
60047        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60048      fi
60049    fi
60050  fi
60051
60052
60053    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60055$as_echo_n "checking for freetype includes... " >&6; }
60056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60057$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60058    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60060$as_echo_n "checking for freetype libraries... " >&6; }
60061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60062$as_echo "$FREETYPE_LIB_PATH" >&6; }
60063  fi
60064
60065            fi
60066            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60067                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60068              # Source is available, as a last resort try to build freetype in default location
60069
60070  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60071  BUILD_FREETYPE=yes
60072
60073  # Check if the freetype sources are acessible..
60074  if ! test -d $FREETYPE_SRC_PATH; then
60075    { $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
60076$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60077    BUILD_FREETYPE=no
60078  fi
60079  # ..and contain a vc2010 project file
60080  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60081  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60082    { $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
60083$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60084    BUILD_FREETYPE=no
60085  fi
60086  # Now check if configure found a version of 'msbuild.exe'
60087  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60088    { $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
60089$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;}
60090    BUILD_FREETYPE=no
60091  fi
60092
60093  # Ready to go..
60094  if test "x$BUILD_FREETYPE" = xyes; then
60095    # msbuild requires trailing slashes for output directories
60096    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60097    freetype_lib_path_unix="$freetype_lib_path"
60098    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60099
60100  unix_path="$vcxproj_path"
60101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60102    windows_path=`$CYGPATH -m "$unix_path"`
60103    vcxproj_path="$windows_path"
60104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60105    windows_path=`cmd //c echo $unix_path`
60106    vcxproj_path="$windows_path"
60107  fi
60108
60109
60110  unix_path="$freetype_lib_path"
60111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60112    windows_path=`$CYGPATH -m "$unix_path"`
60113    freetype_lib_path="$windows_path"
60114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60115    windows_path=`cmd //c echo $unix_path`
60116    freetype_lib_path="$windows_path"
60117  fi
60118
60119
60120  unix_path="$freetype_obj_path"
60121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60122    windows_path=`$CYGPATH -m "$unix_path"`
60123    freetype_obj_path="$windows_path"
60124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60125    windows_path=`cmd //c echo $unix_path`
60126    freetype_obj_path="$windows_path"
60127  fi
60128
60129    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60130      freetype_platform=x64
60131    else
60132      freetype_platform=win32
60133    fi
60134
60135    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60136    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60137    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60138    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60139    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60140$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60141
60142    # First we try to build the freetype.dll
60143    $ECHO -e "@echo off\n"\
60144        "$MSBUILD $vcxproj_path "\
60145        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60146        "/p:Configuration=\"Release Multithreaded\" "\
60147        "/p:Platform=$freetype_platform "\
60148        "/p:ConfigurationType=DynamicLibrary "\
60149        "/p:TargetName=freetype "\
60150        "/p:OutDir=\"$freetype_lib_path\" "\
60151        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60152    cmd /c freetype.bat
60153
60154    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60155      # If that succeeds we also build freetype.lib
60156      $ECHO -e "@echo off\n"\
60157          "$MSBUILD $vcxproj_path "\
60158          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60159          "/p:Configuration=\"Release Multithreaded\" "\
60160          "/p:Platform=$freetype_platform "\
60161          "/p:ConfigurationType=StaticLibrary "\
60162          "/p:TargetName=freetype "\
60163          "/p:OutDir=\"$freetype_lib_path\" "\
60164          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60165      cmd /c freetype.bat
60166
60167      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60168        # Once we build both, lib and dll, set freetype lib and include path appropriately
60169        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60170        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60171        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60172$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60173      else
60174        BUILD_FREETYPE=no
60175      fi
60176    else
60177      BUILD_FREETYPE=no
60178    fi
60179  fi
60180
60181              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60182
60183  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60184  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60185  METHOD="well-known location"
60186
60187  # Let's start with an optimistic view of the world :-)
60188  FOUND_FREETYPE=yes
60189
60190  # First look for the canonical freetype main include file ft2build.h.
60191  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60192    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60193    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60194    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60195      # Fail.
60196      FOUND_FREETYPE=no
60197    fi
60198  fi
60199
60200  if test "x$FOUND_FREETYPE" = xyes; then
60201    # Include file found, let's continue the sanity check.
60202    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60203$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60204
60205    # Reset to default value
60206    FREETYPE_BASE_NAME=freetype
60207    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60208    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60209      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60210          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60211        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60212        # for the .6 version explicitly.
60213        FREETYPE_BASE_NAME=freetype.6
60214        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60215        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60216$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60217      else
60218        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60219$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60220        FOUND_FREETYPE=no
60221      fi
60222    else
60223      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60224        # On Windows, we will need both .lib and .dll file.
60225        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60226          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60227$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60228          FOUND_FREETYPE=no
60229        fi
60230      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60231          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60232        # Found lib in isa dir, use that instead.
60233        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60234        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60235$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60236      fi
60237    fi
60238  fi
60239
60240  if test "x$FOUND_FREETYPE" = xyes; then
60241
60242  # Only process if variable expands to non-empty
60243
60244  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60246
60247  # Input might be given as Windows format, start by converting to
60248  # unix format.
60249  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60250  new_path=`$CYGPATH -u "$path"`
60251
60252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60255  # "foo.exe" is OK but "foo" is an error.
60256  #
60257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60258  # It is also a way to make sure we got the proper file name for the real test later on.
60259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60260  if test "x$test_shortpath" = x; then
60261    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60263    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60264  fi
60265
60266  # Call helper function which possibly converts this using DOS-style short mode.
60267  # If so, the updated path is stored in $new_path.
60268
60269  input_path="$new_path"
60270  # Check if we need to convert this using DOS-style short mode. If the path
60271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60272  # take no chances and rewrite it.
60273  # Note: m4 eats our [], so we need to use [ and ] instead.
60274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60275  if test "x$has_forbidden_chars" != x; then
60276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60280      # Going to short mode and back again did indeed matter. Since short mode is
60281      # case insensitive, let's make it lowercase to improve readability.
60282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60283      # Now convert it back to Unix-style (cygpath)
60284      input_path=`$CYGPATH -u "$shortmode_path"`
60285      new_path="$input_path"
60286    fi
60287  fi
60288
60289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60290  if test "x$test_cygdrive_prefix" = x; then
60291    # As a simple fix, exclude /usr/bin since it's not a real path.
60292    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60294      # a path prefixed by /cygdrive for fixpath to work.
60295      new_path="$CYGWIN_ROOT_PATH$input_path"
60296    fi
60297  fi
60298
60299
60300  if test "x$path" != "x$new_path"; then
60301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60304  fi
60305
60306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60307
60308  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60309  has_colon=`$ECHO $path | $GREP ^.:`
60310  new_path="$path"
60311  if test "x$has_colon" = x; then
60312    # Not in mixed or Windows style, start by that.
60313    new_path=`cmd //c echo $path`
60314  fi
60315
60316
60317  input_path="$new_path"
60318  # Check if we need to convert this using DOS-style short mode. If the path
60319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60320  # take no chances and rewrite it.
60321  # Note: m4 eats our [], so we need to use [ and ] instead.
60322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60323  if test "x$has_forbidden_chars" != x; then
60324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60325    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60326  fi
60327
60328
60329  windows_path="$new_path"
60330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60331    unix_path=`$CYGPATH -u "$windows_path"`
60332    new_path="$unix_path"
60333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60335    new_path="$unix_path"
60336  fi
60337
60338  if test "x$path" != "x$new_path"; then
60339    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60342  fi
60343
60344  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60345  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60346
60347    else
60348      # We're on a unix platform. Hooray! :)
60349      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60350      has_space=`$ECHO "$path" | $GREP " "`
60351      if test "x$has_space" != x; then
60352        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60354        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60355      fi
60356
60357      # Use eval to expand a potential ~
60358      eval path="$path"
60359      if test ! -f "$path" && test ! -d "$path"; then
60360        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60361      fi
60362
60363      if test -d "$path"; then
60364        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60365      else
60366        dir="`$DIRNAME "$path"`"
60367        base="`$BASENAME "$path"`"
60368        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60369      fi
60370    fi
60371  fi
60372
60373
60374  # Only process if variable expands to non-empty
60375
60376  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60378
60379  # Input might be given as Windows format, start by converting to
60380  # unix format.
60381  path="$POTENTIAL_FREETYPE_LIB_PATH"
60382  new_path=`$CYGPATH -u "$path"`
60383
60384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60387  # "foo.exe" is OK but "foo" is an error.
60388  #
60389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60390  # It is also a way to make sure we got the proper file name for the real test later on.
60391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60392  if test "x$test_shortpath" = x; then
60393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60395    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60396  fi
60397
60398  # Call helper function which possibly converts this using DOS-style short mode.
60399  # If so, the updated path is stored in $new_path.
60400
60401  input_path="$new_path"
60402  # Check if we need to convert this using DOS-style short mode. If the path
60403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60404  # take no chances and rewrite it.
60405  # Note: m4 eats our [], so we need to use [ and ] instead.
60406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60407  if test "x$has_forbidden_chars" != x; then
60408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60412      # Going to short mode and back again did indeed matter. Since short mode is
60413      # case insensitive, let's make it lowercase to improve readability.
60414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60415      # Now convert it back to Unix-style (cygpath)
60416      input_path=`$CYGPATH -u "$shortmode_path"`
60417      new_path="$input_path"
60418    fi
60419  fi
60420
60421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60422  if test "x$test_cygdrive_prefix" = x; then
60423    # As a simple fix, exclude /usr/bin since it's not a real path.
60424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60426      # a path prefixed by /cygdrive for fixpath to work.
60427      new_path="$CYGWIN_ROOT_PATH$input_path"
60428    fi
60429  fi
60430
60431
60432  if test "x$path" != "x$new_path"; then
60433    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60436  fi
60437
60438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60439
60440  path="$POTENTIAL_FREETYPE_LIB_PATH"
60441  has_colon=`$ECHO $path | $GREP ^.:`
60442  new_path="$path"
60443  if test "x$has_colon" = x; then
60444    # Not in mixed or Windows style, start by that.
60445    new_path=`cmd //c echo $path`
60446  fi
60447
60448
60449  input_path="$new_path"
60450  # Check if we need to convert this using DOS-style short mode. If the path
60451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60452  # take no chances and rewrite it.
60453  # Note: m4 eats our [], so we need to use [ and ] instead.
60454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60455  if test "x$has_forbidden_chars" != x; then
60456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60458  fi
60459
60460
60461  windows_path="$new_path"
60462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60463    unix_path=`$CYGPATH -u "$windows_path"`
60464    new_path="$unix_path"
60465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60467    new_path="$unix_path"
60468  fi
60469
60470  if test "x$path" != "x$new_path"; then
60471    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60474  fi
60475
60476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60478
60479    else
60480      # We're on a unix platform. Hooray! :)
60481      path="$POTENTIAL_FREETYPE_LIB_PATH"
60482      has_space=`$ECHO "$path" | $GREP " "`
60483      if test "x$has_space" != x; then
60484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60485$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60487      fi
60488
60489      # Use eval to expand a potential ~
60490      eval path="$path"
60491      if test ! -f "$path" && test ! -d "$path"; then
60492        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60493      fi
60494
60495      if test -d "$path"; then
60496        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60497      else
60498        dir="`$DIRNAME "$path"`"
60499        base="`$BASENAME "$path"`"
60500        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60501      fi
60502    fi
60503  fi
60504
60505
60506    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60508$as_echo_n "checking for freetype includes... " >&6; }
60509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60510$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60511    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60513$as_echo_n "checking for freetype libraries... " >&6; }
60514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60515$as_echo "$FREETYPE_LIB_PATH" >&6; }
60516  fi
60517
60518              else
60519
60520  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60521  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60522  METHOD="well-known location"
60523
60524  # Let's start with an optimistic view of the world :-)
60525  FOUND_FREETYPE=yes
60526
60527  # First look for the canonical freetype main include file ft2build.h.
60528  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60529    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60530    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60531    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60532      # Fail.
60533      FOUND_FREETYPE=no
60534    fi
60535  fi
60536
60537  if test "x$FOUND_FREETYPE" = xyes; then
60538    # Include file found, let's continue the sanity check.
60539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60540$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60541
60542    # Reset to default value
60543    FREETYPE_BASE_NAME=freetype
60544    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60545    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60546      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60547          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60548        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60549        # for the .6 version explicitly.
60550        FREETYPE_BASE_NAME=freetype.6
60551        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60552        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60553$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60554      else
60555        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60556$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60557        FOUND_FREETYPE=no
60558      fi
60559    else
60560      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60561        # On Windows, we will need both .lib and .dll file.
60562        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60563          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60564$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60565          FOUND_FREETYPE=no
60566        fi
60567      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60568          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60569        # Found lib in isa dir, use that instead.
60570        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60571        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60572$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60573      fi
60574    fi
60575  fi
60576
60577  if test "x$FOUND_FREETYPE" = xyes; then
60578
60579  # Only process if variable expands to non-empty
60580
60581  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60583
60584  # Input might be given as Windows format, start by converting to
60585  # unix format.
60586  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60587  new_path=`$CYGPATH -u "$path"`
60588
60589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60592  # "foo.exe" is OK but "foo" is an error.
60593  #
60594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60595  # It is also a way to make sure we got the proper file name for the real test later on.
60596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60597  if test "x$test_shortpath" = x; then
60598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60600    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60601  fi
60602
60603  # Call helper function which possibly converts this using DOS-style short mode.
60604  # If so, the updated path is stored in $new_path.
60605
60606  input_path="$new_path"
60607  # Check if we need to convert this using DOS-style short mode. If the path
60608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60609  # take no chances and rewrite it.
60610  # Note: m4 eats our [], so we need to use [ and ] instead.
60611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60612  if test "x$has_forbidden_chars" != x; then
60613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60617      # Going to short mode and back again did indeed matter. Since short mode is
60618      # case insensitive, let's make it lowercase to improve readability.
60619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60620      # Now convert it back to Unix-style (cygpath)
60621      input_path=`$CYGPATH -u "$shortmode_path"`
60622      new_path="$input_path"
60623    fi
60624  fi
60625
60626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60627  if test "x$test_cygdrive_prefix" = x; then
60628    # As a simple fix, exclude /usr/bin since it's not a real path.
60629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60631      # a path prefixed by /cygdrive for fixpath to work.
60632      new_path="$CYGWIN_ROOT_PATH$input_path"
60633    fi
60634  fi
60635
60636
60637  if test "x$path" != "x$new_path"; then
60638    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60640$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60641  fi
60642
60643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60644
60645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60646  has_colon=`$ECHO $path | $GREP ^.:`
60647  new_path="$path"
60648  if test "x$has_colon" = x; then
60649    # Not in mixed or Windows style, start by that.
60650    new_path=`cmd //c echo $path`
60651  fi
60652
60653
60654  input_path="$new_path"
60655  # Check if we need to convert this using DOS-style short mode. If the path
60656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60657  # take no chances and rewrite it.
60658  # Note: m4 eats our [], so we need to use [ and ] instead.
60659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60660  if test "x$has_forbidden_chars" != x; then
60661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60663  fi
60664
60665
60666  windows_path="$new_path"
60667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60668    unix_path=`$CYGPATH -u "$windows_path"`
60669    new_path="$unix_path"
60670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60672    new_path="$unix_path"
60673  fi
60674
60675  if test "x$path" != "x$new_path"; then
60676    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60678$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60679  fi
60680
60681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60683
60684    else
60685      # We're on a unix platform. Hooray! :)
60686      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60687      has_space=`$ECHO "$path" | $GREP " "`
60688      if test "x$has_space" != x; then
60689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60690$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60692      fi
60693
60694      # Use eval to expand a potential ~
60695      eval path="$path"
60696      if test ! -f "$path" && test ! -d "$path"; then
60697        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60698      fi
60699
60700      if test -d "$path"; then
60701        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60702      else
60703        dir="`$DIRNAME "$path"`"
60704        base="`$BASENAME "$path"`"
60705        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60706      fi
60707    fi
60708  fi
60709
60710
60711  # Only process if variable expands to non-empty
60712
60713  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60715
60716  # Input might be given as Windows format, start by converting to
60717  # unix format.
60718  path="$POTENTIAL_FREETYPE_LIB_PATH"
60719  new_path=`$CYGPATH -u "$path"`
60720
60721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60724  # "foo.exe" is OK but "foo" is an error.
60725  #
60726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60727  # It is also a way to make sure we got the proper file name for the real test later on.
60728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60729  if test "x$test_shortpath" = x; then
60730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60732    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60733  fi
60734
60735  # Call helper function which possibly converts this using DOS-style short mode.
60736  # If so, the updated path is stored in $new_path.
60737
60738  input_path="$new_path"
60739  # Check if we need to convert this using DOS-style short mode. If the path
60740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60741  # take no chances and rewrite it.
60742  # Note: m4 eats our [], so we need to use [ and ] instead.
60743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60744  if test "x$has_forbidden_chars" != x; then
60745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60749      # Going to short mode and back again did indeed matter. Since short mode is
60750      # case insensitive, let's make it lowercase to improve readability.
60751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60752      # Now convert it back to Unix-style (cygpath)
60753      input_path=`$CYGPATH -u "$shortmode_path"`
60754      new_path="$input_path"
60755    fi
60756  fi
60757
60758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60759  if test "x$test_cygdrive_prefix" = x; then
60760    # As a simple fix, exclude /usr/bin since it's not a real path.
60761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60763      # a path prefixed by /cygdrive for fixpath to work.
60764      new_path="$CYGWIN_ROOT_PATH$input_path"
60765    fi
60766  fi
60767
60768
60769  if test "x$path" != "x$new_path"; then
60770    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60772$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60773  fi
60774
60775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60776
60777  path="$POTENTIAL_FREETYPE_LIB_PATH"
60778  has_colon=`$ECHO $path | $GREP ^.:`
60779  new_path="$path"
60780  if test "x$has_colon" = x; then
60781    # Not in mixed or Windows style, start by that.
60782    new_path=`cmd //c echo $path`
60783  fi
60784
60785
60786  input_path="$new_path"
60787  # Check if we need to convert this using DOS-style short mode. If the path
60788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60789  # take no chances and rewrite it.
60790  # Note: m4 eats our [], so we need to use [ and ] instead.
60791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60792  if test "x$has_forbidden_chars" != x; then
60793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60795  fi
60796
60797
60798  windows_path="$new_path"
60799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60800    unix_path=`$CYGPATH -u "$windows_path"`
60801    new_path="$unix_path"
60802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60804    new_path="$unix_path"
60805  fi
60806
60807  if test "x$path" != "x$new_path"; then
60808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60811  fi
60812
60813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60815
60816    else
60817      # We're on a unix platform. Hooray! :)
60818      path="$POTENTIAL_FREETYPE_LIB_PATH"
60819      has_space=`$ECHO "$path" | $GREP " "`
60820      if test "x$has_space" != x; then
60821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60822$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60824      fi
60825
60826      # Use eval to expand a potential ~
60827      eval path="$path"
60828      if test ! -f "$path" && test ! -d "$path"; then
60829        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60830      fi
60831
60832      if test -d "$path"; then
60833        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60834      else
60835        dir="`$DIRNAME "$path"`"
60836        base="`$BASENAME "$path"`"
60837        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60838      fi
60839    fi
60840  fi
60841
60842
60843    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60845$as_echo_n "checking for freetype includes... " >&6; }
60846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60847$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60848    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60850$as_echo_n "checking for freetype libraries... " >&6; }
60851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60852$as_echo "$FREETYPE_LIB_PATH" >&6; }
60853  fi
60854
60855              fi
60856            fi
60857          fi
60858        else
60859          FREETYPE_BASE_DIR="$SYSROOT/usr"
60860
60861  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60862  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60863  METHOD="well-known location"
60864
60865  # Let's start with an optimistic view of the world :-)
60866  FOUND_FREETYPE=yes
60867
60868  # First look for the canonical freetype main include file ft2build.h.
60869  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60870    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60871    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60872    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60873      # Fail.
60874      FOUND_FREETYPE=no
60875    fi
60876  fi
60877
60878  if test "x$FOUND_FREETYPE" = xyes; then
60879    # Include file found, let's continue the sanity check.
60880    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60881$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60882
60883    # Reset to default value
60884    FREETYPE_BASE_NAME=freetype
60885    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60886    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60887      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60888          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60889        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60890        # for the .6 version explicitly.
60891        FREETYPE_BASE_NAME=freetype.6
60892        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60893        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60894$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60895      else
60896        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60897$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60898        FOUND_FREETYPE=no
60899      fi
60900    else
60901      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60902        # On Windows, we will need both .lib and .dll file.
60903        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60904          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60905$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60906          FOUND_FREETYPE=no
60907        fi
60908      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60909          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60910        # Found lib in isa dir, use that instead.
60911        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60912        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60913$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60914      fi
60915    fi
60916  fi
60917
60918  if test "x$FOUND_FREETYPE" = xyes; then
60919
60920  # Only process if variable expands to non-empty
60921
60922  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60924
60925  # Input might be given as Windows format, start by converting to
60926  # unix format.
60927  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60928  new_path=`$CYGPATH -u "$path"`
60929
60930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60933  # "foo.exe" is OK but "foo" is an error.
60934  #
60935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60936  # It is also a way to make sure we got the proper file name for the real test later on.
60937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60938  if test "x$test_shortpath" = x; then
60939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60942  fi
60943
60944  # Call helper function which possibly converts this using DOS-style short mode.
60945  # If so, the updated path is stored in $new_path.
60946
60947  input_path="$new_path"
60948  # Check if we need to convert this using DOS-style short mode. If the path
60949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60950  # take no chances and rewrite it.
60951  # Note: m4 eats our [], so we need to use [ and ] instead.
60952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60953  if test "x$has_forbidden_chars" != x; then
60954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60958      # Going to short mode and back again did indeed matter. Since short mode is
60959      # case insensitive, let's make it lowercase to improve readability.
60960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60961      # Now convert it back to Unix-style (cygpath)
60962      input_path=`$CYGPATH -u "$shortmode_path"`
60963      new_path="$input_path"
60964    fi
60965  fi
60966
60967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60968  if test "x$test_cygdrive_prefix" = x; then
60969    # As a simple fix, exclude /usr/bin since it's not a real path.
60970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60972      # a path prefixed by /cygdrive for fixpath to work.
60973      new_path="$CYGWIN_ROOT_PATH$input_path"
60974    fi
60975  fi
60976
60977
60978  if test "x$path" != "x$new_path"; then
60979    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60982  fi
60983
60984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60985
60986  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60987  has_colon=`$ECHO $path | $GREP ^.:`
60988  new_path="$path"
60989  if test "x$has_colon" = x; then
60990    # Not in mixed or Windows style, start by that.
60991    new_path=`cmd //c echo $path`
60992  fi
60993
60994
60995  input_path="$new_path"
60996  # Check if we need to convert this using DOS-style short mode. If the path
60997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60998  # take no chances and rewrite it.
60999  # Note: m4 eats our [], so we need to use [ and ] instead.
61000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61001  if test "x$has_forbidden_chars" != x; then
61002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61004  fi
61005
61006
61007  windows_path="$new_path"
61008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61009    unix_path=`$CYGPATH -u "$windows_path"`
61010    new_path="$unix_path"
61011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61013    new_path="$unix_path"
61014  fi
61015
61016  if test "x$path" != "x$new_path"; then
61017    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61020  fi
61021
61022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61024
61025    else
61026      # We're on a unix platform. Hooray! :)
61027      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61028      has_space=`$ECHO "$path" | $GREP " "`
61029      if test "x$has_space" != x; then
61030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61033      fi
61034
61035      # Use eval to expand a potential ~
61036      eval path="$path"
61037      if test ! -f "$path" && test ! -d "$path"; then
61038        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61039      fi
61040
61041      if test -d "$path"; then
61042        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61043      else
61044        dir="`$DIRNAME "$path"`"
61045        base="`$BASENAME "$path"`"
61046        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61047      fi
61048    fi
61049  fi
61050
61051
61052  # Only process if variable expands to non-empty
61053
61054  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61056
61057  # Input might be given as Windows format, start by converting to
61058  # unix format.
61059  path="$POTENTIAL_FREETYPE_LIB_PATH"
61060  new_path=`$CYGPATH -u "$path"`
61061
61062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61065  # "foo.exe" is OK but "foo" is an error.
61066  #
61067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61068  # It is also a way to make sure we got the proper file name for the real test later on.
61069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61070  if test "x$test_shortpath" = x; then
61071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61073    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61074  fi
61075
61076  # Call helper function which possibly converts this using DOS-style short mode.
61077  # If so, the updated path is stored in $new_path.
61078
61079  input_path="$new_path"
61080  # Check if we need to convert this using DOS-style short mode. If the path
61081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61082  # take no chances and rewrite it.
61083  # Note: m4 eats our [], so we need to use [ and ] instead.
61084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61085  if test "x$has_forbidden_chars" != x; then
61086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61090      # Going to short mode and back again did indeed matter. Since short mode is
61091      # case insensitive, let's make it lowercase to improve readability.
61092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61093      # Now convert it back to Unix-style (cygpath)
61094      input_path=`$CYGPATH -u "$shortmode_path"`
61095      new_path="$input_path"
61096    fi
61097  fi
61098
61099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61100  if test "x$test_cygdrive_prefix" = x; then
61101    # As a simple fix, exclude /usr/bin since it's not a real path.
61102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61104      # a path prefixed by /cygdrive for fixpath to work.
61105      new_path="$CYGWIN_ROOT_PATH$input_path"
61106    fi
61107  fi
61108
61109
61110  if test "x$path" != "x$new_path"; then
61111    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61114  fi
61115
61116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61117
61118  path="$POTENTIAL_FREETYPE_LIB_PATH"
61119  has_colon=`$ECHO $path | $GREP ^.:`
61120  new_path="$path"
61121  if test "x$has_colon" = x; then
61122    # Not in mixed or Windows style, start by that.
61123    new_path=`cmd //c echo $path`
61124  fi
61125
61126
61127  input_path="$new_path"
61128  # Check if we need to convert this using DOS-style short mode. If the path
61129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61130  # take no chances and rewrite it.
61131  # Note: m4 eats our [], so we need to use [ and ] instead.
61132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61133  if test "x$has_forbidden_chars" != x; then
61134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61136  fi
61137
61138
61139  windows_path="$new_path"
61140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61141    unix_path=`$CYGPATH -u "$windows_path"`
61142    new_path="$unix_path"
61143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61145    new_path="$unix_path"
61146  fi
61147
61148  if test "x$path" != "x$new_path"; then
61149    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61152  fi
61153
61154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61156
61157    else
61158      # We're on a unix platform. Hooray! :)
61159      path="$POTENTIAL_FREETYPE_LIB_PATH"
61160      has_space=`$ECHO "$path" | $GREP " "`
61161      if test "x$has_space" != x; then
61162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61163$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61165      fi
61166
61167      # Use eval to expand a potential ~
61168      eval path="$path"
61169      if test ! -f "$path" && test ! -d "$path"; then
61170        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61171      fi
61172
61173      if test -d "$path"; then
61174        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61175      else
61176        dir="`$DIRNAME "$path"`"
61177        base="`$BASENAME "$path"`"
61178        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61179      fi
61180    fi
61181  fi
61182
61183
61184    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61186$as_echo_n "checking for freetype includes... " >&6; }
61187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61188$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61189    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61191$as_echo_n "checking for freetype libraries... " >&6; }
61192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61193$as_echo "$FREETYPE_LIB_PATH" >&6; }
61194  fi
61195
61196
61197          if test "x$FOUND_FREETYPE" != xyes; then
61198            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61199
61200  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61201  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61202  METHOD="well-known location"
61203
61204  # Let's start with an optimistic view of the world :-)
61205  FOUND_FREETYPE=yes
61206
61207  # First look for the canonical freetype main include file ft2build.h.
61208  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61209    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61210    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61211    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61212      # Fail.
61213      FOUND_FREETYPE=no
61214    fi
61215  fi
61216
61217  if test "x$FOUND_FREETYPE" = xyes; then
61218    # Include file found, let's continue the sanity check.
61219    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61220$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61221
61222    # Reset to default value
61223    FREETYPE_BASE_NAME=freetype
61224    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61225    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61226      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61227          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61228        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61229        # for the .6 version explicitly.
61230        FREETYPE_BASE_NAME=freetype.6
61231        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61232        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61233$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61234      else
61235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61237        FOUND_FREETYPE=no
61238      fi
61239    else
61240      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61241        # On Windows, we will need both .lib and .dll file.
61242        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61243          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61244$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61245          FOUND_FREETYPE=no
61246        fi
61247      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61248          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61249        # Found lib in isa dir, use that instead.
61250        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61251        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61252$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61253      fi
61254    fi
61255  fi
61256
61257  if test "x$FOUND_FREETYPE" = xyes; then
61258
61259  # Only process if variable expands to non-empty
61260
61261  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61263
61264  # Input might be given as Windows format, start by converting to
61265  # unix format.
61266  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61267  new_path=`$CYGPATH -u "$path"`
61268
61269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61272  # "foo.exe" is OK but "foo" is an error.
61273  #
61274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61275  # It is also a way to make sure we got the proper file name for the real test later on.
61276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61277  if test "x$test_shortpath" = x; then
61278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61280    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61281  fi
61282
61283  # Call helper function which possibly converts this using DOS-style short mode.
61284  # If so, the updated path is stored in $new_path.
61285
61286  input_path="$new_path"
61287  # Check if we need to convert this using DOS-style short mode. If the path
61288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61289  # take no chances and rewrite it.
61290  # Note: m4 eats our [], so we need to use [ and ] instead.
61291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61292  if test "x$has_forbidden_chars" != x; then
61293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61297      # Going to short mode and back again did indeed matter. Since short mode is
61298      # case insensitive, let's make it lowercase to improve readability.
61299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61300      # Now convert it back to Unix-style (cygpath)
61301      input_path=`$CYGPATH -u "$shortmode_path"`
61302      new_path="$input_path"
61303    fi
61304  fi
61305
61306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61307  if test "x$test_cygdrive_prefix" = x; then
61308    # As a simple fix, exclude /usr/bin since it's not a real path.
61309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61311      # a path prefixed by /cygdrive for fixpath to work.
61312      new_path="$CYGWIN_ROOT_PATH$input_path"
61313    fi
61314  fi
61315
61316
61317  if test "x$path" != "x$new_path"; then
61318    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61321  fi
61322
61323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61324
61325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61326  has_colon=`$ECHO $path | $GREP ^.:`
61327  new_path="$path"
61328  if test "x$has_colon" = x; then
61329    # Not in mixed or Windows style, start by that.
61330    new_path=`cmd //c echo $path`
61331  fi
61332
61333
61334  input_path="$new_path"
61335  # Check if we need to convert this using DOS-style short mode. If the path
61336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61337  # take no chances and rewrite it.
61338  # Note: m4 eats our [], so we need to use [ and ] instead.
61339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61340  if test "x$has_forbidden_chars" != x; then
61341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61343  fi
61344
61345
61346  windows_path="$new_path"
61347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61348    unix_path=`$CYGPATH -u "$windows_path"`
61349    new_path="$unix_path"
61350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61352    new_path="$unix_path"
61353  fi
61354
61355  if test "x$path" != "x$new_path"; then
61356    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61359  fi
61360
61361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61363
61364    else
61365      # We're on a unix platform. Hooray! :)
61366      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61367      has_space=`$ECHO "$path" | $GREP " "`
61368      if test "x$has_space" != x; then
61369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61371        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61372      fi
61373
61374      # Use eval to expand a potential ~
61375      eval path="$path"
61376      if test ! -f "$path" && test ! -d "$path"; then
61377        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61378      fi
61379
61380      if test -d "$path"; then
61381        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61382      else
61383        dir="`$DIRNAME "$path"`"
61384        base="`$BASENAME "$path"`"
61385        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61386      fi
61387    fi
61388  fi
61389
61390
61391  # Only process if variable expands to non-empty
61392
61393  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61395
61396  # Input might be given as Windows format, start by converting to
61397  # unix format.
61398  path="$POTENTIAL_FREETYPE_LIB_PATH"
61399  new_path=`$CYGPATH -u "$path"`
61400
61401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61404  # "foo.exe" is OK but "foo" is an error.
61405  #
61406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61407  # It is also a way to make sure we got the proper file name for the real test later on.
61408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61409  if test "x$test_shortpath" = x; then
61410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61412    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61413  fi
61414
61415  # Call helper function which possibly converts this using DOS-style short mode.
61416  # If so, the updated path is stored in $new_path.
61417
61418  input_path="$new_path"
61419  # Check if we need to convert this using DOS-style short mode. If the path
61420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61421  # take no chances and rewrite it.
61422  # Note: m4 eats our [], so we need to use [ and ] instead.
61423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61424  if test "x$has_forbidden_chars" != x; then
61425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61429      # Going to short mode and back again did indeed matter. Since short mode is
61430      # case insensitive, let's make it lowercase to improve readability.
61431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61432      # Now convert it back to Unix-style (cygpath)
61433      input_path=`$CYGPATH -u "$shortmode_path"`
61434      new_path="$input_path"
61435    fi
61436  fi
61437
61438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61439  if test "x$test_cygdrive_prefix" = x; then
61440    # As a simple fix, exclude /usr/bin since it's not a real path.
61441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61443      # a path prefixed by /cygdrive for fixpath to work.
61444      new_path="$CYGWIN_ROOT_PATH$input_path"
61445    fi
61446  fi
61447
61448
61449  if test "x$path" != "x$new_path"; then
61450    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61452$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61453  fi
61454
61455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61456
61457  path="$POTENTIAL_FREETYPE_LIB_PATH"
61458  has_colon=`$ECHO $path | $GREP ^.:`
61459  new_path="$path"
61460  if test "x$has_colon" = x; then
61461    # Not in mixed or Windows style, start by that.
61462    new_path=`cmd //c echo $path`
61463  fi
61464
61465
61466  input_path="$new_path"
61467  # Check if we need to convert this using DOS-style short mode. If the path
61468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61469  # take no chances and rewrite it.
61470  # Note: m4 eats our [], so we need to use [ and ] instead.
61471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61472  if test "x$has_forbidden_chars" != x; then
61473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61475  fi
61476
61477
61478  windows_path="$new_path"
61479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61480    unix_path=`$CYGPATH -u "$windows_path"`
61481    new_path="$unix_path"
61482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61484    new_path="$unix_path"
61485  fi
61486
61487  if test "x$path" != "x$new_path"; then
61488    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61490$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61491  fi
61492
61493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61495
61496    else
61497      # We're on a unix platform. Hooray! :)
61498      path="$POTENTIAL_FREETYPE_LIB_PATH"
61499      has_space=`$ECHO "$path" | $GREP " "`
61500      if test "x$has_space" != x; then
61501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61504      fi
61505
61506      # Use eval to expand a potential ~
61507      eval path="$path"
61508      if test ! -f "$path" && test ! -d "$path"; then
61509        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61510      fi
61511
61512      if test -d "$path"; then
61513        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61514      else
61515        dir="`$DIRNAME "$path"`"
61516        base="`$BASENAME "$path"`"
61517        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61518      fi
61519    fi
61520  fi
61521
61522
61523    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61525$as_echo_n "checking for freetype includes... " >&6; }
61526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61527$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61528    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61530$as_echo_n "checking for freetype libraries... " >&6; }
61531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61532$as_echo "$FREETYPE_LIB_PATH" >&6; }
61533  fi
61534
61535          fi
61536          if test "x$FOUND_FREETYPE" != xyes; then
61537            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61538
61539  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61540  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61541  METHOD="well-known location"
61542
61543  # Let's start with an optimistic view of the world :-)
61544  FOUND_FREETYPE=yes
61545
61546  # First look for the canonical freetype main include file ft2build.h.
61547  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61548    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61549    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61550    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61551      # Fail.
61552      FOUND_FREETYPE=no
61553    fi
61554  fi
61555
61556  if test "x$FOUND_FREETYPE" = xyes; then
61557    # Include file found, let's continue the sanity check.
61558    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61559$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61560
61561    # Reset to default value
61562    FREETYPE_BASE_NAME=freetype
61563    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61564    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61565      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61566          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61567        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61568        # for the .6 version explicitly.
61569        FREETYPE_BASE_NAME=freetype.6
61570        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61571        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61572$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61573      else
61574        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61575$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61576        FOUND_FREETYPE=no
61577      fi
61578    else
61579      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61580        # On Windows, we will need both .lib and .dll file.
61581        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61582          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61583$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61584          FOUND_FREETYPE=no
61585        fi
61586      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61587          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61588        # Found lib in isa dir, use that instead.
61589        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61590        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61591$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61592      fi
61593    fi
61594  fi
61595
61596  if test "x$FOUND_FREETYPE" = xyes; then
61597
61598  # Only process if variable expands to non-empty
61599
61600  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61602
61603  # Input might be given as Windows format, start by converting to
61604  # unix format.
61605  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61606  new_path=`$CYGPATH -u "$path"`
61607
61608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61611  # "foo.exe" is OK but "foo" is an error.
61612  #
61613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61614  # It is also a way to make sure we got the proper file name for the real test later on.
61615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61616  if test "x$test_shortpath" = x; then
61617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61619    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61620  fi
61621
61622  # Call helper function which possibly converts this using DOS-style short mode.
61623  # If so, the updated path is stored in $new_path.
61624
61625  input_path="$new_path"
61626  # Check if we need to convert this using DOS-style short mode. If the path
61627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61628  # take no chances and rewrite it.
61629  # Note: m4 eats our [], so we need to use [ and ] instead.
61630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61631  if test "x$has_forbidden_chars" != x; then
61632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61636      # Going to short mode and back again did indeed matter. Since short mode is
61637      # case insensitive, let's make it lowercase to improve readability.
61638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61639      # Now convert it back to Unix-style (cygpath)
61640      input_path=`$CYGPATH -u "$shortmode_path"`
61641      new_path="$input_path"
61642    fi
61643  fi
61644
61645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61646  if test "x$test_cygdrive_prefix" = x; then
61647    # As a simple fix, exclude /usr/bin since it's not a real path.
61648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61650      # a path prefixed by /cygdrive for fixpath to work.
61651      new_path="$CYGWIN_ROOT_PATH$input_path"
61652    fi
61653  fi
61654
61655
61656  if test "x$path" != "x$new_path"; then
61657    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61660  fi
61661
61662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61663
61664  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61665  has_colon=`$ECHO $path | $GREP ^.:`
61666  new_path="$path"
61667  if test "x$has_colon" = x; then
61668    # Not in mixed or Windows style, start by that.
61669    new_path=`cmd //c echo $path`
61670  fi
61671
61672
61673  input_path="$new_path"
61674  # Check if we need to convert this using DOS-style short mode. If the path
61675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61676  # take no chances and rewrite it.
61677  # Note: m4 eats our [], so we need to use [ and ] instead.
61678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61679  if test "x$has_forbidden_chars" != x; then
61680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61682  fi
61683
61684
61685  windows_path="$new_path"
61686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61687    unix_path=`$CYGPATH -u "$windows_path"`
61688    new_path="$unix_path"
61689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61691    new_path="$unix_path"
61692  fi
61693
61694  if test "x$path" != "x$new_path"; then
61695    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61697$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61698  fi
61699
61700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61702
61703    else
61704      # We're on a unix platform. Hooray! :)
61705      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61706      has_space=`$ECHO "$path" | $GREP " "`
61707      if test "x$has_space" != x; then
61708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61711      fi
61712
61713      # Use eval to expand a potential ~
61714      eval path="$path"
61715      if test ! -f "$path" && test ! -d "$path"; then
61716        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61717      fi
61718
61719      if test -d "$path"; then
61720        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61721      else
61722        dir="`$DIRNAME "$path"`"
61723        base="`$BASENAME "$path"`"
61724        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61725      fi
61726    fi
61727  fi
61728
61729
61730  # Only process if variable expands to non-empty
61731
61732  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61734
61735  # Input might be given as Windows format, start by converting to
61736  # unix format.
61737  path="$POTENTIAL_FREETYPE_LIB_PATH"
61738  new_path=`$CYGPATH -u "$path"`
61739
61740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61743  # "foo.exe" is OK but "foo" is an error.
61744  #
61745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61746  # It is also a way to make sure we got the proper file name for the real test later on.
61747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61748  if test "x$test_shortpath" = x; then
61749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61750$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61751    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61752  fi
61753
61754  # Call helper function which possibly converts this using DOS-style short mode.
61755  # If so, the updated path is stored in $new_path.
61756
61757  input_path="$new_path"
61758  # Check if we need to convert this using DOS-style short mode. If the path
61759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61760  # take no chances and rewrite it.
61761  # Note: m4 eats our [], so we need to use [ and ] instead.
61762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61763  if test "x$has_forbidden_chars" != x; then
61764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61768      # Going to short mode and back again did indeed matter. Since short mode is
61769      # case insensitive, let's make it lowercase to improve readability.
61770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61771      # Now convert it back to Unix-style (cygpath)
61772      input_path=`$CYGPATH -u "$shortmode_path"`
61773      new_path="$input_path"
61774    fi
61775  fi
61776
61777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61778  if test "x$test_cygdrive_prefix" = x; then
61779    # As a simple fix, exclude /usr/bin since it's not a real path.
61780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61782      # a path prefixed by /cygdrive for fixpath to work.
61783      new_path="$CYGWIN_ROOT_PATH$input_path"
61784    fi
61785  fi
61786
61787
61788  if test "x$path" != "x$new_path"; then
61789    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61792  fi
61793
61794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61795
61796  path="$POTENTIAL_FREETYPE_LIB_PATH"
61797  has_colon=`$ECHO $path | $GREP ^.:`
61798  new_path="$path"
61799  if test "x$has_colon" = x; then
61800    # Not in mixed or Windows style, start by that.
61801    new_path=`cmd //c echo $path`
61802  fi
61803
61804
61805  input_path="$new_path"
61806  # Check if we need to convert this using DOS-style short mode. If the path
61807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61808  # take no chances and rewrite it.
61809  # Note: m4 eats our [], so we need to use [ and ] instead.
61810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61811  if test "x$has_forbidden_chars" != x; then
61812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61814  fi
61815
61816
61817  windows_path="$new_path"
61818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61819    unix_path=`$CYGPATH -u "$windows_path"`
61820    new_path="$unix_path"
61821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61823    new_path="$unix_path"
61824  fi
61825
61826  if test "x$path" != "x$new_path"; then
61827    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61830  fi
61831
61832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61834
61835    else
61836      # We're on a unix platform. Hooray! :)
61837      path="$POTENTIAL_FREETYPE_LIB_PATH"
61838      has_space=`$ECHO "$path" | $GREP " "`
61839      if test "x$has_space" != x; then
61840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61841$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61843      fi
61844
61845      # Use eval to expand a potential ~
61846      eval path="$path"
61847      if test ! -f "$path" && test ! -d "$path"; then
61848        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61849      fi
61850
61851      if test -d "$path"; then
61852        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61853      else
61854        dir="`$DIRNAME "$path"`"
61855        base="`$BASENAME "$path"`"
61856        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61857      fi
61858    fi
61859  fi
61860
61861
61862    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61864$as_echo_n "checking for freetype includes... " >&6; }
61865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61866$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61867    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61869$as_echo_n "checking for freetype libraries... " >&6; }
61870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61871$as_echo "$FREETYPE_LIB_PATH" >&6; }
61872  fi
61873
61874          fi
61875
61876          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61877            if test "x$FOUND_FREETYPE" != xyes; then
61878              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61879              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61880
61881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61883  METHOD="well-known location"
61884
61885  # Let's start with an optimistic view of the world :-)
61886  FOUND_FREETYPE=yes
61887
61888  # First look for the canonical freetype main include file ft2build.h.
61889  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61890    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61891    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61892    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61893      # Fail.
61894      FOUND_FREETYPE=no
61895    fi
61896  fi
61897
61898  if test "x$FOUND_FREETYPE" = xyes; then
61899    # Include file found, let's continue the sanity check.
61900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61901$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61902
61903    # Reset to default value
61904    FREETYPE_BASE_NAME=freetype
61905    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61906    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61907      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61908          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61909        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61910        # for the .6 version explicitly.
61911        FREETYPE_BASE_NAME=freetype.6
61912        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61913        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61914$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61915      else
61916        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61917$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61918        FOUND_FREETYPE=no
61919      fi
61920    else
61921      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61922        # On Windows, we will need both .lib and .dll file.
61923        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61924          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61926          FOUND_FREETYPE=no
61927        fi
61928      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61929          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61930        # Found lib in isa dir, use that instead.
61931        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61932        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61933$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61934      fi
61935    fi
61936  fi
61937
61938  if test "x$FOUND_FREETYPE" = xyes; then
61939
61940  # Only process if variable expands to non-empty
61941
61942  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61944
61945  # Input might be given as Windows format, start by converting to
61946  # unix format.
61947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61948  new_path=`$CYGPATH -u "$path"`
61949
61950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61953  # "foo.exe" is OK but "foo" is an error.
61954  #
61955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61956  # It is also a way to make sure we got the proper file name for the real test later on.
61957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61958  if test "x$test_shortpath" = x; then
61959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61962  fi
61963
61964  # Call helper function which possibly converts this using DOS-style short mode.
61965  # If so, the updated path is stored in $new_path.
61966
61967  input_path="$new_path"
61968  # Check if we need to convert this using DOS-style short mode. If the path
61969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61970  # take no chances and rewrite it.
61971  # Note: m4 eats our [], so we need to use [ and ] instead.
61972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61973  if test "x$has_forbidden_chars" != x; then
61974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61978      # Going to short mode and back again did indeed matter. Since short mode is
61979      # case insensitive, let's make it lowercase to improve readability.
61980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61981      # Now convert it back to Unix-style (cygpath)
61982      input_path=`$CYGPATH -u "$shortmode_path"`
61983      new_path="$input_path"
61984    fi
61985  fi
61986
61987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61988  if test "x$test_cygdrive_prefix" = x; then
61989    # As a simple fix, exclude /usr/bin since it's not a real path.
61990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61992      # a path prefixed by /cygdrive for fixpath to work.
61993      new_path="$CYGWIN_ROOT_PATH$input_path"
61994    fi
61995  fi
61996
61997
61998  if test "x$path" != "x$new_path"; then
61999    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62002  fi
62003
62004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62005
62006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62007  has_colon=`$ECHO $path | $GREP ^.:`
62008  new_path="$path"
62009  if test "x$has_colon" = x; then
62010    # Not in mixed or Windows style, start by that.
62011    new_path=`cmd //c echo $path`
62012  fi
62013
62014
62015  input_path="$new_path"
62016  # Check if we need to convert this using DOS-style short mode. If the path
62017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62018  # take no chances and rewrite it.
62019  # Note: m4 eats our [], so we need to use [ and ] instead.
62020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62021  if test "x$has_forbidden_chars" != x; then
62022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62024  fi
62025
62026
62027  windows_path="$new_path"
62028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62029    unix_path=`$CYGPATH -u "$windows_path"`
62030    new_path="$unix_path"
62031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62033    new_path="$unix_path"
62034  fi
62035
62036  if test "x$path" != "x$new_path"; then
62037    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62040  fi
62041
62042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62044
62045    else
62046      # We're on a unix platform. Hooray! :)
62047      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62048      has_space=`$ECHO "$path" | $GREP " "`
62049      if test "x$has_space" != x; then
62050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62053      fi
62054
62055      # Use eval to expand a potential ~
62056      eval path="$path"
62057      if test ! -f "$path" && test ! -d "$path"; then
62058        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62059      fi
62060
62061      if test -d "$path"; then
62062        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62063      else
62064        dir="`$DIRNAME "$path"`"
62065        base="`$BASENAME "$path"`"
62066        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62067      fi
62068    fi
62069  fi
62070
62071
62072  # Only process if variable expands to non-empty
62073
62074  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62076
62077  # Input might be given as Windows format, start by converting to
62078  # unix format.
62079  path="$POTENTIAL_FREETYPE_LIB_PATH"
62080  new_path=`$CYGPATH -u "$path"`
62081
62082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62085  # "foo.exe" is OK but "foo" is an error.
62086  #
62087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62088  # It is also a way to make sure we got the proper file name for the real test later on.
62089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62090  if test "x$test_shortpath" = x; then
62091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62093    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62094  fi
62095
62096  # Call helper function which possibly converts this using DOS-style short mode.
62097  # If so, the updated path is stored in $new_path.
62098
62099  input_path="$new_path"
62100  # Check if we need to convert this using DOS-style short mode. If the path
62101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62102  # take no chances and rewrite it.
62103  # Note: m4 eats our [], so we need to use [ and ] instead.
62104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62105  if test "x$has_forbidden_chars" != x; then
62106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62110      # Going to short mode and back again did indeed matter. Since short mode is
62111      # case insensitive, let's make it lowercase to improve readability.
62112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62113      # Now convert it back to Unix-style (cygpath)
62114      input_path=`$CYGPATH -u "$shortmode_path"`
62115      new_path="$input_path"
62116    fi
62117  fi
62118
62119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62120  if test "x$test_cygdrive_prefix" = x; then
62121    # As a simple fix, exclude /usr/bin since it's not a real path.
62122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62124      # a path prefixed by /cygdrive for fixpath to work.
62125      new_path="$CYGWIN_ROOT_PATH$input_path"
62126    fi
62127  fi
62128
62129
62130  if test "x$path" != "x$new_path"; then
62131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62134  fi
62135
62136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62137
62138  path="$POTENTIAL_FREETYPE_LIB_PATH"
62139  has_colon=`$ECHO $path | $GREP ^.:`
62140  new_path="$path"
62141  if test "x$has_colon" = x; then
62142    # Not in mixed or Windows style, start by that.
62143    new_path=`cmd //c echo $path`
62144  fi
62145
62146
62147  input_path="$new_path"
62148  # Check if we need to convert this using DOS-style short mode. If the path
62149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62150  # take no chances and rewrite it.
62151  # Note: m4 eats our [], so we need to use [ and ] instead.
62152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62153  if test "x$has_forbidden_chars" != x; then
62154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62156  fi
62157
62158
62159  windows_path="$new_path"
62160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62161    unix_path=`$CYGPATH -u "$windows_path"`
62162    new_path="$unix_path"
62163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62165    new_path="$unix_path"
62166  fi
62167
62168  if test "x$path" != "x$new_path"; then
62169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62172  fi
62173
62174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62176
62177    else
62178      # We're on a unix platform. Hooray! :)
62179      path="$POTENTIAL_FREETYPE_LIB_PATH"
62180      has_space=`$ECHO "$path" | $GREP " "`
62181      if test "x$has_space" != x; then
62182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62184        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62185      fi
62186
62187      # Use eval to expand a potential ~
62188      eval path="$path"
62189      if test ! -f "$path" && test ! -d "$path"; then
62190        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62191      fi
62192
62193      if test -d "$path"; then
62194        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62195      else
62196        dir="`$DIRNAME "$path"`"
62197        base="`$BASENAME "$path"`"
62198        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62199      fi
62200    fi
62201  fi
62202
62203
62204    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62206$as_echo_n "checking for freetype includes... " >&6; }
62207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62208$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62209    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62211$as_echo_n "checking for freetype libraries... " >&6; }
62212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62213$as_echo "$FREETYPE_LIB_PATH" >&6; }
62214  fi
62215
62216            fi
62217          fi
62218
62219          if test "x$FOUND_FREETYPE" != xyes; then
62220            FREETYPE_BASE_DIR="$SYSROOT/usr"
62221            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62222
62223  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62224  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62225  METHOD="well-known location"
62226
62227  # Let's start with an optimistic view of the world :-)
62228  FOUND_FREETYPE=yes
62229
62230  # First look for the canonical freetype main include file ft2build.h.
62231  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62232    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62233    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62234    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62235      # Fail.
62236      FOUND_FREETYPE=no
62237    fi
62238  fi
62239
62240  if test "x$FOUND_FREETYPE" = xyes; then
62241    # Include file found, let's continue the sanity check.
62242    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62243$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62244
62245    # Reset to default value
62246    FREETYPE_BASE_NAME=freetype
62247    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62248    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62249      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62250          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62251        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62252        # for the .6 version explicitly.
62253        FREETYPE_BASE_NAME=freetype.6
62254        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62255        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62256$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62257      else
62258        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62259$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62260        FOUND_FREETYPE=no
62261      fi
62262    else
62263      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62264        # On Windows, we will need both .lib and .dll file.
62265        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62266          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62267$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62268          FOUND_FREETYPE=no
62269        fi
62270      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62271          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62272        # Found lib in isa dir, use that instead.
62273        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62274        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62275$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62276      fi
62277    fi
62278  fi
62279
62280  if test "x$FOUND_FREETYPE" = xyes; then
62281
62282  # Only process if variable expands to non-empty
62283
62284  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62286
62287  # Input might be given as Windows format, start by converting to
62288  # unix format.
62289  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62290  new_path=`$CYGPATH -u "$path"`
62291
62292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62295  # "foo.exe" is OK but "foo" is an error.
62296  #
62297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62298  # It is also a way to make sure we got the proper file name for the real test later on.
62299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62300  if test "x$test_shortpath" = x; then
62301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62304  fi
62305
62306  # Call helper function which possibly converts this using DOS-style short mode.
62307  # If so, the updated path is stored in $new_path.
62308
62309  input_path="$new_path"
62310  # Check if we need to convert this using DOS-style short mode. If the path
62311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62312  # take no chances and rewrite it.
62313  # Note: m4 eats our [], so we need to use [ and ] instead.
62314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62315  if test "x$has_forbidden_chars" != x; then
62316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62320      # Going to short mode and back again did indeed matter. Since short mode is
62321      # case insensitive, let's make it lowercase to improve readability.
62322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62323      # Now convert it back to Unix-style (cygpath)
62324      input_path=`$CYGPATH -u "$shortmode_path"`
62325      new_path="$input_path"
62326    fi
62327  fi
62328
62329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62330  if test "x$test_cygdrive_prefix" = x; then
62331    # As a simple fix, exclude /usr/bin since it's not a real path.
62332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62334      # a path prefixed by /cygdrive for fixpath to work.
62335      new_path="$CYGWIN_ROOT_PATH$input_path"
62336    fi
62337  fi
62338
62339
62340  if test "x$path" != "x$new_path"; then
62341    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62344  fi
62345
62346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62347
62348  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62349  has_colon=`$ECHO $path | $GREP ^.:`
62350  new_path="$path"
62351  if test "x$has_colon" = x; then
62352    # Not in mixed or Windows style, start by that.
62353    new_path=`cmd //c echo $path`
62354  fi
62355
62356
62357  input_path="$new_path"
62358  # Check if we need to convert this using DOS-style short mode. If the path
62359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62360  # take no chances and rewrite it.
62361  # Note: m4 eats our [], so we need to use [ and ] instead.
62362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62363  if test "x$has_forbidden_chars" != x; then
62364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62366  fi
62367
62368
62369  windows_path="$new_path"
62370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62371    unix_path=`$CYGPATH -u "$windows_path"`
62372    new_path="$unix_path"
62373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62375    new_path="$unix_path"
62376  fi
62377
62378  if test "x$path" != "x$new_path"; then
62379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62382  fi
62383
62384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62386
62387    else
62388      # We're on a unix platform. Hooray! :)
62389      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62390      has_space=`$ECHO "$path" | $GREP " "`
62391      if test "x$has_space" != x; then
62392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62395      fi
62396
62397      # Use eval to expand a potential ~
62398      eval path="$path"
62399      if test ! -f "$path" && test ! -d "$path"; then
62400        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62401      fi
62402
62403      if test -d "$path"; then
62404        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62405      else
62406        dir="`$DIRNAME "$path"`"
62407        base="`$BASENAME "$path"`"
62408        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62409      fi
62410    fi
62411  fi
62412
62413
62414  # Only process if variable expands to non-empty
62415
62416  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62418
62419  # Input might be given as Windows format, start by converting to
62420  # unix format.
62421  path="$POTENTIAL_FREETYPE_LIB_PATH"
62422  new_path=`$CYGPATH -u "$path"`
62423
62424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62427  # "foo.exe" is OK but "foo" is an error.
62428  #
62429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62430  # It is also a way to make sure we got the proper file name for the real test later on.
62431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62432  if test "x$test_shortpath" = x; then
62433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62436  fi
62437
62438  # Call helper function which possibly converts this using DOS-style short mode.
62439  # If so, the updated path is stored in $new_path.
62440
62441  input_path="$new_path"
62442  # Check if we need to convert this using DOS-style short mode. If the path
62443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62444  # take no chances and rewrite it.
62445  # Note: m4 eats our [], so we need to use [ and ] instead.
62446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62447  if test "x$has_forbidden_chars" != x; then
62448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62452      # Going to short mode and back again did indeed matter. Since short mode is
62453      # case insensitive, let's make it lowercase to improve readability.
62454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62455      # Now convert it back to Unix-style (cygpath)
62456      input_path=`$CYGPATH -u "$shortmode_path"`
62457      new_path="$input_path"
62458    fi
62459  fi
62460
62461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62462  if test "x$test_cygdrive_prefix" = x; then
62463    # As a simple fix, exclude /usr/bin since it's not a real path.
62464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62466      # a path prefixed by /cygdrive for fixpath to work.
62467      new_path="$CYGWIN_ROOT_PATH$input_path"
62468    fi
62469  fi
62470
62471
62472  if test "x$path" != "x$new_path"; then
62473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62476  fi
62477
62478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62479
62480  path="$POTENTIAL_FREETYPE_LIB_PATH"
62481  has_colon=`$ECHO $path | $GREP ^.:`
62482  new_path="$path"
62483  if test "x$has_colon" = x; then
62484    # Not in mixed or Windows style, start by that.
62485    new_path=`cmd //c echo $path`
62486  fi
62487
62488
62489  input_path="$new_path"
62490  # Check if we need to convert this using DOS-style short mode. If the path
62491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62492  # take no chances and rewrite it.
62493  # Note: m4 eats our [], so we need to use [ and ] instead.
62494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62495  if test "x$has_forbidden_chars" != x; then
62496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62498  fi
62499
62500
62501  windows_path="$new_path"
62502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62503    unix_path=`$CYGPATH -u "$windows_path"`
62504    new_path="$unix_path"
62505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62507    new_path="$unix_path"
62508  fi
62509
62510  if test "x$path" != "x$new_path"; then
62511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62514  fi
62515
62516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62518
62519    else
62520      # We're on a unix platform. Hooray! :)
62521      path="$POTENTIAL_FREETYPE_LIB_PATH"
62522      has_space=`$ECHO "$path" | $GREP " "`
62523      if test "x$has_space" != x; then
62524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62527      fi
62528
62529      # Use eval to expand a potential ~
62530      eval path="$path"
62531      if test ! -f "$path" && test ! -d "$path"; then
62532        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62533      fi
62534
62535      if test -d "$path"; then
62536        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62537      else
62538        dir="`$DIRNAME "$path"`"
62539        base="`$BASENAME "$path"`"
62540        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62541      fi
62542    fi
62543  fi
62544
62545
62546    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62548$as_echo_n "checking for freetype includes... " >&6; }
62549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62550$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62551    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62553$as_echo_n "checking for freetype libraries... " >&6; }
62554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62555$as_echo "$FREETYPE_LIB_PATH" >&6; }
62556  fi
62557
62558            else
62559
62560  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62561  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62562  METHOD="well-known location"
62563
62564  # Let's start with an optimistic view of the world :-)
62565  FOUND_FREETYPE=yes
62566
62567  # First look for the canonical freetype main include file ft2build.h.
62568  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62569    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62570    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62571    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62572      # Fail.
62573      FOUND_FREETYPE=no
62574    fi
62575  fi
62576
62577  if test "x$FOUND_FREETYPE" = xyes; then
62578    # Include file found, let's continue the sanity check.
62579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62580$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62581
62582    # Reset to default value
62583    FREETYPE_BASE_NAME=freetype
62584    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62585    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62586      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62587          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62588        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62589        # for the .6 version explicitly.
62590        FREETYPE_BASE_NAME=freetype.6
62591        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62592        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62593$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62594      else
62595        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62596$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62597        FOUND_FREETYPE=no
62598      fi
62599    else
62600      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62601        # On Windows, we will need both .lib and .dll file.
62602        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62603          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62604$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62605          FOUND_FREETYPE=no
62606        fi
62607      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62608          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62609        # Found lib in isa dir, use that instead.
62610        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62611        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62612$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62613      fi
62614    fi
62615  fi
62616
62617  if test "x$FOUND_FREETYPE" = xyes; then
62618
62619  # Only process if variable expands to non-empty
62620
62621  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62623
62624  # Input might be given as Windows format, start by converting to
62625  # unix format.
62626  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62627  new_path=`$CYGPATH -u "$path"`
62628
62629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62632  # "foo.exe" is OK but "foo" is an error.
62633  #
62634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62635  # It is also a way to make sure we got the proper file name for the real test later on.
62636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62637  if test "x$test_shortpath" = x; then
62638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62639$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62640    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62641  fi
62642
62643  # Call helper function which possibly converts this using DOS-style short mode.
62644  # If so, the updated path is stored in $new_path.
62645
62646  input_path="$new_path"
62647  # Check if we need to convert this using DOS-style short mode. If the path
62648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62649  # take no chances and rewrite it.
62650  # Note: m4 eats our [], so we need to use [ and ] instead.
62651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62652  if test "x$has_forbidden_chars" != x; then
62653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62657      # Going to short mode and back again did indeed matter. Since short mode is
62658      # case insensitive, let's make it lowercase to improve readability.
62659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62660      # Now convert it back to Unix-style (cygpath)
62661      input_path=`$CYGPATH -u "$shortmode_path"`
62662      new_path="$input_path"
62663    fi
62664  fi
62665
62666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62667  if test "x$test_cygdrive_prefix" = x; then
62668    # As a simple fix, exclude /usr/bin since it's not a real path.
62669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62671      # a path prefixed by /cygdrive for fixpath to work.
62672      new_path="$CYGWIN_ROOT_PATH$input_path"
62673    fi
62674  fi
62675
62676
62677  if test "x$path" != "x$new_path"; then
62678    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62680$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62681  fi
62682
62683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62684
62685  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62686  has_colon=`$ECHO $path | $GREP ^.:`
62687  new_path="$path"
62688  if test "x$has_colon" = x; then
62689    # Not in mixed or Windows style, start by that.
62690    new_path=`cmd //c echo $path`
62691  fi
62692
62693
62694  input_path="$new_path"
62695  # Check if we need to convert this using DOS-style short mode. If the path
62696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62697  # take no chances and rewrite it.
62698  # Note: m4 eats our [], so we need to use [ and ] instead.
62699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62700  if test "x$has_forbidden_chars" != x; then
62701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62703  fi
62704
62705
62706  windows_path="$new_path"
62707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62708    unix_path=`$CYGPATH -u "$windows_path"`
62709    new_path="$unix_path"
62710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62712    new_path="$unix_path"
62713  fi
62714
62715  if test "x$path" != "x$new_path"; then
62716    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62719  fi
62720
62721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62723
62724    else
62725      # We're on a unix platform. Hooray! :)
62726      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62727      has_space=`$ECHO "$path" | $GREP " "`
62728      if test "x$has_space" != x; then
62729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62732      fi
62733
62734      # Use eval to expand a potential ~
62735      eval path="$path"
62736      if test ! -f "$path" && test ! -d "$path"; then
62737        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62738      fi
62739
62740      if test -d "$path"; then
62741        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62742      else
62743        dir="`$DIRNAME "$path"`"
62744        base="`$BASENAME "$path"`"
62745        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62746      fi
62747    fi
62748  fi
62749
62750
62751  # Only process if variable expands to non-empty
62752
62753  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62755
62756  # Input might be given as Windows format, start by converting to
62757  # unix format.
62758  path="$POTENTIAL_FREETYPE_LIB_PATH"
62759  new_path=`$CYGPATH -u "$path"`
62760
62761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62764  # "foo.exe" is OK but "foo" is an error.
62765  #
62766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62767  # It is also a way to make sure we got the proper file name for the real test later on.
62768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62769  if test "x$test_shortpath" = x; then
62770    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62772    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62773  fi
62774
62775  # Call helper function which possibly converts this using DOS-style short mode.
62776  # If so, the updated path is stored in $new_path.
62777
62778  input_path="$new_path"
62779  # Check if we need to convert this using DOS-style short mode. If the path
62780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62781  # take no chances and rewrite it.
62782  # Note: m4 eats our [], so we need to use [ and ] instead.
62783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62784  if test "x$has_forbidden_chars" != x; then
62785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62786    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62787    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62788    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62789      # Going to short mode and back again did indeed matter. Since short mode is
62790      # case insensitive, let's make it lowercase to improve readability.
62791      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62792      # Now convert it back to Unix-style (cygpath)
62793      input_path=`$CYGPATH -u "$shortmode_path"`
62794      new_path="$input_path"
62795    fi
62796  fi
62797
62798  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62799  if test "x$test_cygdrive_prefix" = x; then
62800    # As a simple fix, exclude /usr/bin since it's not a real path.
62801    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62802      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62803      # a path prefixed by /cygdrive for fixpath to work.
62804      new_path="$CYGWIN_ROOT_PATH$input_path"
62805    fi
62806  fi
62807
62808
62809  if test "x$path" != "x$new_path"; then
62810    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62813  fi
62814
62815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62816
62817  path="$POTENTIAL_FREETYPE_LIB_PATH"
62818  has_colon=`$ECHO $path | $GREP ^.:`
62819  new_path="$path"
62820  if test "x$has_colon" = x; then
62821    # Not in mixed or Windows style, start by that.
62822    new_path=`cmd //c echo $path`
62823  fi
62824
62825
62826  input_path="$new_path"
62827  # Check if we need to convert this using DOS-style short mode. If the path
62828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62829  # take no chances and rewrite it.
62830  # Note: m4 eats our [], so we need to use [ and ] instead.
62831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62832  if test "x$has_forbidden_chars" != x; then
62833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62835  fi
62836
62837
62838  windows_path="$new_path"
62839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62840    unix_path=`$CYGPATH -u "$windows_path"`
62841    new_path="$unix_path"
62842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62844    new_path="$unix_path"
62845  fi
62846
62847  if test "x$path" != "x$new_path"; then
62848    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62851  fi
62852
62853  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62854  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62855
62856    else
62857      # We're on a unix platform. Hooray! :)
62858      path="$POTENTIAL_FREETYPE_LIB_PATH"
62859      has_space=`$ECHO "$path" | $GREP " "`
62860      if test "x$has_space" != x; then
62861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62863        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62864      fi
62865
62866      # Use eval to expand a potential ~
62867      eval path="$path"
62868      if test ! -f "$path" && test ! -d "$path"; then
62869        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62870      fi
62871
62872      if test -d "$path"; then
62873        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62874      else
62875        dir="`$DIRNAME "$path"`"
62876        base="`$BASENAME "$path"`"
62877        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62878      fi
62879    fi
62880  fi
62881
62882
62883    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62885$as_echo_n "checking for freetype includes... " >&6; }
62886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62887$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62888    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62890$as_echo_n "checking for freetype libraries... " >&6; }
62891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62892$as_echo "$FREETYPE_LIB_PATH" >&6; }
62893  fi
62894
62895              if test "x$FOUND_FREETYPE" != xyes; then
62896
62897  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62898  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62899  METHOD="well-known location"
62900
62901  # Let's start with an optimistic view of the world :-)
62902  FOUND_FREETYPE=yes
62903
62904  # First look for the canonical freetype main include file ft2build.h.
62905  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62906    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62907    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62908    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62909      # Fail.
62910      FOUND_FREETYPE=no
62911    fi
62912  fi
62913
62914  if test "x$FOUND_FREETYPE" = xyes; then
62915    # Include file found, let's continue the sanity check.
62916    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62917$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62918
62919    # Reset to default value
62920    FREETYPE_BASE_NAME=freetype
62921    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62922    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62923      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62924          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62925        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62926        # for the .6 version explicitly.
62927        FREETYPE_BASE_NAME=freetype.6
62928        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62929        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62930$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62931      else
62932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62933$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62934        FOUND_FREETYPE=no
62935      fi
62936    else
62937      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62938        # On Windows, we will need both .lib and .dll file.
62939        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62940          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62942          FOUND_FREETYPE=no
62943        fi
62944      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62945          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62946        # Found lib in isa dir, use that instead.
62947        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62948        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62949$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62950      fi
62951    fi
62952  fi
62953
62954  if test "x$FOUND_FREETYPE" = xyes; then
62955
62956  # Only process if variable expands to non-empty
62957
62958  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62960
62961  # Input might be given as Windows format, start by converting to
62962  # unix format.
62963  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62964  new_path=`$CYGPATH -u "$path"`
62965
62966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62969  # "foo.exe" is OK but "foo" is an error.
62970  #
62971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62972  # It is also a way to make sure we got the proper file name for the real test later on.
62973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62974  if test "x$test_shortpath" = x; then
62975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62976$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62977    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62978  fi
62979
62980  # Call helper function which possibly converts this using DOS-style short mode.
62981  # If so, the updated path is stored in $new_path.
62982
62983  input_path="$new_path"
62984  # Check if we need to convert this using DOS-style short mode. If the path
62985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62986  # take no chances and rewrite it.
62987  # Note: m4 eats our [], so we need to use [ and ] instead.
62988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62989  if test "x$has_forbidden_chars" != x; then
62990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62994      # Going to short mode and back again did indeed matter. Since short mode is
62995      # case insensitive, let's make it lowercase to improve readability.
62996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62997      # Now convert it back to Unix-style (cygpath)
62998      input_path=`$CYGPATH -u "$shortmode_path"`
62999      new_path="$input_path"
63000    fi
63001  fi
63002
63003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63004  if test "x$test_cygdrive_prefix" = x; then
63005    # As a simple fix, exclude /usr/bin since it's not a real path.
63006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63008      # a path prefixed by /cygdrive for fixpath to work.
63009      new_path="$CYGWIN_ROOT_PATH$input_path"
63010    fi
63011  fi
63012
63013
63014  if test "x$path" != "x$new_path"; then
63015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63018  fi
63019
63020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63021
63022  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63023  has_colon=`$ECHO $path | $GREP ^.:`
63024  new_path="$path"
63025  if test "x$has_colon" = x; then
63026    # Not in mixed or Windows style, start by that.
63027    new_path=`cmd //c echo $path`
63028  fi
63029
63030
63031  input_path="$new_path"
63032  # Check if we need to convert this using DOS-style short mode. If the path
63033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63034  # take no chances and rewrite it.
63035  # Note: m4 eats our [], so we need to use [ and ] instead.
63036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63037  if test "x$has_forbidden_chars" != x; then
63038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63040  fi
63041
63042
63043  windows_path="$new_path"
63044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63045    unix_path=`$CYGPATH -u "$windows_path"`
63046    new_path="$unix_path"
63047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63049    new_path="$unix_path"
63050  fi
63051
63052  if test "x$path" != "x$new_path"; then
63053    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63056  fi
63057
63058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63060
63061    else
63062      # We're on a unix platform. Hooray! :)
63063      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63064      has_space=`$ECHO "$path" | $GREP " "`
63065      if test "x$has_space" != x; then
63066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63069      fi
63070
63071      # Use eval to expand a potential ~
63072      eval path="$path"
63073      if test ! -f "$path" && test ! -d "$path"; then
63074        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63075      fi
63076
63077      if test -d "$path"; then
63078        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63079      else
63080        dir="`$DIRNAME "$path"`"
63081        base="`$BASENAME "$path"`"
63082        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63083      fi
63084    fi
63085  fi
63086
63087
63088  # Only process if variable expands to non-empty
63089
63090  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63092
63093  # Input might be given as Windows format, start by converting to
63094  # unix format.
63095  path="$POTENTIAL_FREETYPE_LIB_PATH"
63096  new_path=`$CYGPATH -u "$path"`
63097
63098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63101  # "foo.exe" is OK but "foo" is an error.
63102  #
63103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63104  # It is also a way to make sure we got the proper file name for the real test later on.
63105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63106  if test "x$test_shortpath" = x; then
63107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63109    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63110  fi
63111
63112  # Call helper function which possibly converts this using DOS-style short mode.
63113  # If so, the updated path is stored in $new_path.
63114
63115  input_path="$new_path"
63116  # Check if we need to convert this using DOS-style short mode. If the path
63117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63118  # take no chances and rewrite it.
63119  # Note: m4 eats our [], so we need to use [ and ] instead.
63120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63121  if test "x$has_forbidden_chars" != x; then
63122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63126      # Going to short mode and back again did indeed matter. Since short mode is
63127      # case insensitive, let's make it lowercase to improve readability.
63128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63129      # Now convert it back to Unix-style (cygpath)
63130      input_path=`$CYGPATH -u "$shortmode_path"`
63131      new_path="$input_path"
63132    fi
63133  fi
63134
63135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63136  if test "x$test_cygdrive_prefix" = x; then
63137    # As a simple fix, exclude /usr/bin since it's not a real path.
63138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63140      # a path prefixed by /cygdrive for fixpath to work.
63141      new_path="$CYGWIN_ROOT_PATH$input_path"
63142    fi
63143  fi
63144
63145
63146  if test "x$path" != "x$new_path"; then
63147    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63150  fi
63151
63152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63153
63154  path="$POTENTIAL_FREETYPE_LIB_PATH"
63155  has_colon=`$ECHO $path | $GREP ^.:`
63156  new_path="$path"
63157  if test "x$has_colon" = x; then
63158    # Not in mixed or Windows style, start by that.
63159    new_path=`cmd //c echo $path`
63160  fi
63161
63162
63163  input_path="$new_path"
63164  # Check if we need to convert this using DOS-style short mode. If the path
63165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63166  # take no chances and rewrite it.
63167  # Note: m4 eats our [], so we need to use [ and ] instead.
63168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63169  if test "x$has_forbidden_chars" != x; then
63170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63172  fi
63173
63174
63175  windows_path="$new_path"
63176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63177    unix_path=`$CYGPATH -u "$windows_path"`
63178    new_path="$unix_path"
63179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63181    new_path="$unix_path"
63182  fi
63183
63184  if test "x$path" != "x$new_path"; then
63185    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63188  fi
63189
63190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63192
63193    else
63194      # We're on a unix platform. Hooray! :)
63195      path="$POTENTIAL_FREETYPE_LIB_PATH"
63196      has_space=`$ECHO "$path" | $GREP " "`
63197      if test "x$has_space" != x; then
63198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63201      fi
63202
63203      # Use eval to expand a potential ~
63204      eval path="$path"
63205      if test ! -f "$path" && test ! -d "$path"; then
63206        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63207      fi
63208
63209      if test -d "$path"; then
63210        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63211      else
63212        dir="`$DIRNAME "$path"`"
63213        base="`$BASENAME "$path"`"
63214        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63215      fi
63216    fi
63217  fi
63218
63219
63220    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63222$as_echo_n "checking for freetype includes... " >&6; }
63223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63224$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63225    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63227$as_echo_n "checking for freetype libraries... " >&6; }
63228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63229$as_echo "$FREETYPE_LIB_PATH" >&6; }
63230  fi
63231
63232              fi
63233            fi
63234          fi
63235        fi
63236      fi # end check in well-known locations
63237
63238      if test "x$FOUND_FREETYPE" != xyes; then
63239
63240  # Print a helpful message on how to acquire the necessary build dependency.
63241  # freetype is the help tag: freetype, cups, alsa etc
63242  MISSING_DEPENDENCY=freetype
63243
63244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63245    cygwin_help $MISSING_DEPENDENCY
63246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63247    msys_help $MISSING_DEPENDENCY
63248  else
63249    PKGHANDLER_COMMAND=
63250
63251    case $PKGHANDLER in
63252      apt-get)
63253        apt_help     $MISSING_DEPENDENCY ;;
63254      yum)
63255        yum_help     $MISSING_DEPENDENCY ;;
63256      brew)
63257        brew_help    $MISSING_DEPENDENCY ;;
63258      port)
63259        port_help    $MISSING_DEPENDENCY ;;
63260      pkgutil)
63261        pkgutil_help $MISSING_DEPENDENCY ;;
63262      pkgadd)
63263        pkgadd_help  $MISSING_DEPENDENCY ;;
63264    esac
63265
63266    if test "x$PKGHANDLER_COMMAND" != x; then
63267      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63268    fi
63269  fi
63270
63271        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63272      fi
63273    fi # end user specified settings
63274
63275    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63276    if test "x$FREETYPE_CFLAGS" = x; then
63277
63278  # Only process if variable expands to non-empty
63279
63280  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63282
63283  # Input might be given as Windows format, start by converting to
63284  # unix format.
63285  path="$FREETYPE_INCLUDE_PATH"
63286  new_path=`$CYGPATH -u "$path"`
63287
63288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63291  # "foo.exe" is OK but "foo" is an error.
63292  #
63293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63294  # It is also a way to make sure we got the proper file name for the real test later on.
63295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63296  if test "x$test_shortpath" = x; then
63297    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63298$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63299    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63300  fi
63301
63302  # Call helper function which possibly converts this using DOS-style short mode.
63303  # If so, the updated path is stored in $new_path.
63304
63305  input_path="$new_path"
63306  # Check if we need to convert this using DOS-style short mode. If the path
63307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63308  # take no chances and rewrite it.
63309  # Note: m4 eats our [], so we need to use [ and ] instead.
63310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63311  if test "x$has_forbidden_chars" != x; then
63312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63316      # Going to short mode and back again did indeed matter. Since short mode is
63317      # case insensitive, let's make it lowercase to improve readability.
63318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63319      # Now convert it back to Unix-style (cygpath)
63320      input_path=`$CYGPATH -u "$shortmode_path"`
63321      new_path="$input_path"
63322    fi
63323  fi
63324
63325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63326  if test "x$test_cygdrive_prefix" = x; then
63327    # As a simple fix, exclude /usr/bin since it's not a real path.
63328    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63330      # a path prefixed by /cygdrive for fixpath to work.
63331      new_path="$CYGWIN_ROOT_PATH$input_path"
63332    fi
63333  fi
63334
63335
63336  if test "x$path" != "x$new_path"; then
63337    FREETYPE_INCLUDE_PATH="$new_path"
63338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63339$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63340  fi
63341
63342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63343
63344  path="$FREETYPE_INCLUDE_PATH"
63345  has_colon=`$ECHO $path | $GREP ^.:`
63346  new_path="$path"
63347  if test "x$has_colon" = x; then
63348    # Not in mixed or Windows style, start by that.
63349    new_path=`cmd //c echo $path`
63350  fi
63351
63352
63353  input_path="$new_path"
63354  # Check if we need to convert this using DOS-style short mode. If the path
63355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63356  # take no chances and rewrite it.
63357  # Note: m4 eats our [], so we need to use [ and ] instead.
63358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63359  if test "x$has_forbidden_chars" != x; then
63360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63362  fi
63363
63364
63365  windows_path="$new_path"
63366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63367    unix_path=`$CYGPATH -u "$windows_path"`
63368    new_path="$unix_path"
63369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63371    new_path="$unix_path"
63372  fi
63373
63374  if test "x$path" != "x$new_path"; then
63375    FREETYPE_INCLUDE_PATH="$new_path"
63376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63377$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63378  fi
63379
63380  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63381  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63382
63383    else
63384      # We're on a unix platform. Hooray! :)
63385      path="$FREETYPE_INCLUDE_PATH"
63386      has_space=`$ECHO "$path" | $GREP " "`
63387      if test "x$has_space" != x; then
63388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63389$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63390        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63391      fi
63392
63393      # Use eval to expand a potential ~
63394      eval path="$path"
63395      if test ! -f "$path" && test ! -d "$path"; then
63396        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63397      fi
63398
63399      if test -d "$path"; then
63400        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63401      else
63402        dir="`$DIRNAME "$path"`"
63403        base="`$BASENAME "$path"`"
63404        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63405      fi
63406    fi
63407  fi
63408
63409      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63410        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63411      else
63412        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63413      fi
63414    fi
63415
63416    if test "x$FREETYPE_LIBS" = x; then
63417
63418  # Only process if variable expands to non-empty
63419
63420  if test "x$FREETYPE_LIB_PATH" != x; then
63421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63422
63423  # Input might be given as Windows format, start by converting to
63424  # unix format.
63425  path="$FREETYPE_LIB_PATH"
63426  new_path=`$CYGPATH -u "$path"`
63427
63428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63431  # "foo.exe" is OK but "foo" is an error.
63432  #
63433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63434  # It is also a way to make sure we got the proper file name for the real test later on.
63435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63436  if test "x$test_shortpath" = x; then
63437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63438$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63439    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63440  fi
63441
63442  # Call helper function which possibly converts this using DOS-style short mode.
63443  # If so, the updated path is stored in $new_path.
63444
63445  input_path="$new_path"
63446  # Check if we need to convert this using DOS-style short mode. If the path
63447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63448  # take no chances and rewrite it.
63449  # Note: m4 eats our [], so we need to use [ and ] instead.
63450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63451  if test "x$has_forbidden_chars" != x; then
63452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63456      # Going to short mode and back again did indeed matter. Since short mode is
63457      # case insensitive, let's make it lowercase to improve readability.
63458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63459      # Now convert it back to Unix-style (cygpath)
63460      input_path=`$CYGPATH -u "$shortmode_path"`
63461      new_path="$input_path"
63462    fi
63463  fi
63464
63465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63466  if test "x$test_cygdrive_prefix" = x; then
63467    # As a simple fix, exclude /usr/bin since it's not a real path.
63468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63470      # a path prefixed by /cygdrive for fixpath to work.
63471      new_path="$CYGWIN_ROOT_PATH$input_path"
63472    fi
63473  fi
63474
63475
63476  if test "x$path" != "x$new_path"; then
63477    FREETYPE_LIB_PATH="$new_path"
63478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63479$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63480  fi
63481
63482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63483
63484  path="$FREETYPE_LIB_PATH"
63485  has_colon=`$ECHO $path | $GREP ^.:`
63486  new_path="$path"
63487  if test "x$has_colon" = x; then
63488    # Not in mixed or Windows style, start by that.
63489    new_path=`cmd //c echo $path`
63490  fi
63491
63492
63493  input_path="$new_path"
63494  # Check if we need to convert this using DOS-style short mode. If the path
63495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63496  # take no chances and rewrite it.
63497  # Note: m4 eats our [], so we need to use [ and ] instead.
63498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63499  if test "x$has_forbidden_chars" != x; then
63500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63502  fi
63503
63504
63505  windows_path="$new_path"
63506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63507    unix_path=`$CYGPATH -u "$windows_path"`
63508    new_path="$unix_path"
63509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63511    new_path="$unix_path"
63512  fi
63513
63514  if test "x$path" != "x$new_path"; then
63515    FREETYPE_LIB_PATH="$new_path"
63516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63517$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63518  fi
63519
63520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63522
63523    else
63524      # We're on a unix platform. Hooray! :)
63525      path="$FREETYPE_LIB_PATH"
63526      has_space=`$ECHO "$path" | $GREP " "`
63527      if test "x$has_space" != x; then
63528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63529$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63530        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63531      fi
63532
63533      # Use eval to expand a potential ~
63534      eval path="$path"
63535      if test ! -f "$path" && test ! -d "$path"; then
63536        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63537      fi
63538
63539      if test -d "$path"; then
63540        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63541      else
63542        dir="`$DIRNAME "$path"`"
63543        base="`$BASENAME "$path"`"
63544        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63545      fi
63546    fi
63547  fi
63548
63549      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63550        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63551      else
63552        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63553      fi
63554    fi
63555
63556    # Try to compile it
63557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63558$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63559    ac_ext=cpp
63560ac_cpp='$CXXCPP $CPPFLAGS'
63561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63564
63565    PREV_CXXCFLAGS="$CXXFLAGS"
63566    PREV_LIBS="$LIBS"
63567    PREV_CXX="$CXX"
63568    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63569    LIBS="$LIBS $FREETYPE_LIBS"
63570    CXX="$FIXPATH $CXX"
63571    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63572/* end confdefs.h.  */
63573
63574          #include<ft2build.h>
63575          #include FT_FREETYPE_H
63576          int main () {
63577            FT_Init_FreeType(NULL);
63578            return 0;
63579          }
63580
63581_ACEOF
63582if ac_fn_cxx_try_link "$LINENO"; then :
63583
63584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63585$as_echo "yes" >&6; }
63586
63587else
63588
63589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63590$as_echo "no" >&6; }
63591          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63592$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63593          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63594$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63595
63596
63597  # Print a helpful message on how to acquire the necessary build dependency.
63598  # freetype is the help tag: freetype, cups, alsa etc
63599  MISSING_DEPENDENCY=freetype
63600
63601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63602    cygwin_help $MISSING_DEPENDENCY
63603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63604    msys_help $MISSING_DEPENDENCY
63605  else
63606    PKGHANDLER_COMMAND=
63607
63608    case $PKGHANDLER in
63609      apt-get)
63610        apt_help     $MISSING_DEPENDENCY ;;
63611      yum)
63612        yum_help     $MISSING_DEPENDENCY ;;
63613      brew)
63614        brew_help    $MISSING_DEPENDENCY ;;
63615      port)
63616        port_help    $MISSING_DEPENDENCY ;;
63617      pkgutil)
63618        pkgutil_help $MISSING_DEPENDENCY ;;
63619      pkgadd)
63620        pkgadd_help  $MISSING_DEPENDENCY ;;
63621    esac
63622
63623    if test "x$PKGHANDLER_COMMAND" != x; then
63624      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63625    fi
63626  fi
63627
63628
63629          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63630
63631
63632fi
63633rm -f core conftest.err conftest.$ac_objext \
63634    conftest$ac_exeext conftest.$ac_ext
63635    CXXCFLAGS="$PREV_CXXFLAGS"
63636    LIBS="$PREV_LIBS"
63637    CXX="$PREV_CXX"
63638    ac_ext=cpp
63639ac_cpp='$CXXCPP $CPPFLAGS'
63640ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63641ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63642ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63643
63644
63645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63646$as_echo_n "checking if we should bundle freetype... " >&6; }
63647    if test "x$BUNDLE_FREETYPE" = xyes; then
63648      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63649    fi
63650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63651$as_echo "$BUNDLE_FREETYPE" >&6; }
63652
63653  fi # end freetype needed
63654
63655
63656
63657
63658
63659
63660
63661# Check whether --with-alsa was given.
63662if test "${with_alsa+set}" = set; then :
63663  withval=$with_alsa;
63664fi
63665
63666
63667# Check whether --with-alsa-include was given.
63668if test "${with_alsa_include+set}" = set; then :
63669  withval=$with_alsa_include;
63670fi
63671
63672
63673# Check whether --with-alsa-lib was given.
63674if test "${with_alsa_lib+set}" = set; then :
63675  withval=$with_alsa_lib;
63676fi
63677
63678
63679  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63680    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63681        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63682        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63683      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63684$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63685    fi
63686    ALSA_CFLAGS=
63687    ALSA_LIBS=
63688  else
63689    ALSA_FOUND=no
63690
63691    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63692      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63693    fi
63694
63695    if test "x${with_alsa}" != x; then
63696      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63697      ALSA_CFLAGS="-I${with_alsa}/include"
63698      ALSA_FOUND=yes
63699    fi
63700    if test "x${with_alsa_include}" != x; then
63701      ALSA_CFLAGS="-I${with_alsa_include}"
63702      ALSA_FOUND=yes
63703    fi
63704    if test "x${with_alsa_lib}" != x; then
63705      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63706      ALSA_FOUND=yes
63707    fi
63708    # Do not try pkg-config if we have a sysroot set.
63709    if test "x$SYSROOT" = x; then
63710      if test "x$ALSA_FOUND" = xno; then
63711
63712pkg_failed=no
63713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63714$as_echo_n "checking for ALSA... " >&6; }
63715
63716if test -n "$ALSA_CFLAGS"; then
63717    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63718 elif test -n "$PKG_CONFIG"; then
63719    if test -n "$PKG_CONFIG" && \
63720    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63721  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63722  ac_status=$?
63723  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63724  test $ac_status = 0; }; then
63725  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63726else
63727  pkg_failed=yes
63728fi
63729 else
63730    pkg_failed=untried
63731fi
63732if test -n "$ALSA_LIBS"; then
63733    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63734 elif test -n "$PKG_CONFIG"; then
63735    if test -n "$PKG_CONFIG" && \
63736    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63737  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63738  ac_status=$?
63739  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63740  test $ac_status = 0; }; then
63741  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63742else
63743  pkg_failed=yes
63744fi
63745 else
63746    pkg_failed=untried
63747fi
63748
63749
63750
63751if test $pkg_failed = yes; then
63752
63753if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63754        _pkg_short_errors_supported=yes
63755else
63756        _pkg_short_errors_supported=no
63757fi
63758        if test $_pkg_short_errors_supported = yes; then
63759	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63760        else
63761	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63762        fi
63763	# Put the nasty error message in config.log where it belongs
63764	echo "$ALSA_PKG_ERRORS" >&5
63765
63766	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63767$as_echo "no" >&6; }
63768                ALSA_FOUND=no
63769elif test $pkg_failed = untried; then
63770	ALSA_FOUND=no
63771else
63772	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63773	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63775$as_echo "yes" >&6; }
63776	ALSA_FOUND=yes
63777fi
63778      fi
63779    fi
63780    if test "x$ALSA_FOUND" = xno; then
63781      for ac_header in alsa/asoundlib.h
63782do :
63783  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63784if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63785  cat >>confdefs.h <<_ACEOF
63786#define HAVE_ALSA_ASOUNDLIB_H 1
63787_ACEOF
63788
63789            ALSA_FOUND=yes
63790            ALSA_CFLAGS=-Iignoreme
63791            ALSA_LIBS=-lasound
63792            DEFAULT_ALSA=yes
63793
63794else
63795  ALSA_FOUND=no
63796
63797fi
63798
63799done
63800
63801    fi
63802    if test "x$ALSA_FOUND" = xno; then
63803
63804  # Print a helpful message on how to acquire the necessary build dependency.
63805  # alsa is the help tag: freetype, cups, alsa etc
63806  MISSING_DEPENDENCY=alsa
63807
63808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63809    cygwin_help $MISSING_DEPENDENCY
63810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63811    msys_help $MISSING_DEPENDENCY
63812  else
63813    PKGHANDLER_COMMAND=
63814
63815    case $PKGHANDLER in
63816      apt-get)
63817        apt_help     $MISSING_DEPENDENCY ;;
63818      yum)
63819        yum_help     $MISSING_DEPENDENCY ;;
63820      brew)
63821        brew_help    $MISSING_DEPENDENCY ;;
63822      port)
63823        port_help    $MISSING_DEPENDENCY ;;
63824      pkgutil)
63825        pkgutil_help $MISSING_DEPENDENCY ;;
63826      pkgadd)
63827        pkgadd_help  $MISSING_DEPENDENCY ;;
63828    esac
63829
63830    if test "x$PKGHANDLER_COMMAND" != x; then
63831      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63832    fi
63833  fi
63834
63835      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63836    fi
63837  fi
63838
63839
63840
63841
63842
63843
63844# Check whether --with-libffi was given.
63845if test "${with_libffi+set}" = set; then :
63846  withval=$with_libffi;
63847fi
63848
63849
63850# Check whether --with-libffi-include was given.
63851if test "${with_libffi_include+set}" = set; then :
63852  withval=$with_libffi_include;
63853fi
63854
63855
63856# Check whether --with-libffi-lib was given.
63857if test "${with_libffi_lib+set}" = set; then :
63858  withval=$with_libffi_lib;
63859fi
63860
63861  # Check whether --enable-libffi-bundling was given.
63862if test "${enable_libffi_bundling+set}" = set; then :
63863  enableval=$enable_libffi_bundling;
63864fi
63865
63866
63867  if test "x$NEEDS_LIB_FFI" = xfalse; then
63868    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63869        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63870        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63871      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63872$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63873    fi
63874    LIBFFI_CFLAGS=
63875    LIBFFI_LIBS=
63876  else
63877    LIBFFI_FOUND=no
63878
63879    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63880      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63881    fi
63882
63883    if test "x${with_libffi}" != x; then
63884      LIBFFI_LIB_PATH="${with_libffi}/lib"
63885      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63886      LIBFFI_CFLAGS="-I${with_libffi}/include"
63887      LIBFFI_FOUND=yes
63888    fi
63889    if test "x${with_libffi_include}" != x; then
63890      LIBFFI_CFLAGS="-I${with_libffi_include}"
63891      LIBFFI_FOUND=yes
63892    fi
63893    if test "x${with_libffi_lib}" != x; then
63894      LIBFFI_LIB_PATH="${with_libffi_lib}"
63895      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63896      LIBFFI_FOUND=yes
63897    fi
63898    # Do not try pkg-config if we have a sysroot set.
63899    if test "x$SYSROOT" = x; then
63900      if test "x$LIBFFI_FOUND" = xno; then
63901        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63902
63903pkg_failed=no
63904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63905$as_echo_n "checking for LIBFFI... " >&6; }
63906
63907if test -n "$LIBFFI_CFLAGS"; then
63908    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63909 elif test -n "$PKG_CONFIG"; then
63910    if test -n "$PKG_CONFIG" && \
63911    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63912  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63913  ac_status=$?
63914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63915  test $ac_status = 0; }; then
63916  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63917else
63918  pkg_failed=yes
63919fi
63920 else
63921    pkg_failed=untried
63922fi
63923if test -n "$LIBFFI_LIBS"; then
63924    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63925 elif test -n "$PKG_CONFIG"; then
63926    if test -n "$PKG_CONFIG" && \
63927    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63928  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63929  ac_status=$?
63930  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63931  test $ac_status = 0; }; then
63932  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63933else
63934  pkg_failed=yes
63935fi
63936 else
63937    pkg_failed=untried
63938fi
63939
63940
63941
63942if test $pkg_failed = yes; then
63943
63944if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63945        _pkg_short_errors_supported=yes
63946else
63947        _pkg_short_errors_supported=no
63948fi
63949        if test $_pkg_short_errors_supported = yes; then
63950	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63951        else
63952	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63953        fi
63954	# Put the nasty error message in config.log where it belongs
63955	echo "$LIBFFI_PKG_ERRORS" >&5
63956
63957	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63958$as_echo "no" >&6; }
63959                LIBFFI_FOUND=no
63960elif test $pkg_failed = untried; then
63961	LIBFFI_FOUND=no
63962else
63963	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63964	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63966$as_echo "yes" >&6; }
63967	LIBFFI_FOUND=yes
63968fi
63969      fi
63970    fi
63971    if test "x$LIBFFI_FOUND" = xno; then
63972      for ac_header in ffi.h
63973do :
63974  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63975if test "x$ac_cv_header_ffi_h" = xyes; then :
63976  cat >>confdefs.h <<_ACEOF
63977#define HAVE_FFI_H 1
63978_ACEOF
63979
63980            LIBFFI_FOUND=yes
63981            LIBFFI_CFLAGS=
63982            LIBFFI_LIBS=-lffi
63983
63984else
63985  LIBFFI_FOUND=no
63986
63987fi
63988
63989done
63990
63991    fi
63992    if test "x$LIBFFI_FOUND" = xno; then
63993
63994  # Print a helpful message on how to acquire the necessary build dependency.
63995  # ffi is the help tag: freetype, cups, alsa etc
63996  MISSING_DEPENDENCY=ffi
63997
63998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63999    cygwin_help $MISSING_DEPENDENCY
64000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64001    msys_help $MISSING_DEPENDENCY
64002  else
64003    PKGHANDLER_COMMAND=
64004
64005    case $PKGHANDLER in
64006      apt-get)
64007        apt_help     $MISSING_DEPENDENCY ;;
64008      yum)
64009        yum_help     $MISSING_DEPENDENCY ;;
64010      brew)
64011        brew_help    $MISSING_DEPENDENCY ;;
64012      port)
64013        port_help    $MISSING_DEPENDENCY ;;
64014      pkgutil)
64015        pkgutil_help $MISSING_DEPENDENCY ;;
64016      pkgadd)
64017        pkgadd_help  $MISSING_DEPENDENCY ;;
64018    esac
64019
64020    if test "x$PKGHANDLER_COMMAND" != x; then
64021      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64022    fi
64023  fi
64024
64025      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64026    fi
64027
64028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64029$as_echo_n "checking if libffi works... " >&6; }
64030    ac_ext=c
64031ac_cpp='$CPP $CPPFLAGS'
64032ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64033ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64034ac_compiler_gnu=$ac_cv_c_compiler_gnu
64035
64036    OLD_CFLAGS="$CFLAGS"
64037    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64038    OLD_LIBS="$LIBS"
64039    LIBS="$LIBS $LIBFFI_LIBS"
64040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64041/* end confdefs.h.  */
64042#include <ffi.h>
64043int
64044main ()
64045{
64046
64047          ffi_call(NULL, NULL, NULL, NULL);
64048          return 0;
64049
64050  ;
64051  return 0;
64052}
64053_ACEOF
64054if ac_fn_c_try_link "$LINENO"; then :
64055  LIBFFI_WORKS=yes
64056else
64057  LIBFFI_WORKS=no
64058
64059fi
64060rm -f core conftest.err conftest.$ac_objext \
64061    conftest$ac_exeext conftest.$ac_ext
64062    CFLAGS="$OLD_CFLAGS"
64063    LIBS="$OLD_LIBS"
64064    ac_ext=cpp
64065ac_cpp='$CXXCPP $CPPFLAGS'
64066ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64067ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64068ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64069
64070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64071$as_echo "$LIBFFI_WORKS" >&6; }
64072
64073    if test "x$LIBFFI_WORKS" = xno; then
64074
64075  # Print a helpful message on how to acquire the necessary build dependency.
64076  # ffi is the help tag: freetype, cups, alsa etc
64077  MISSING_DEPENDENCY=ffi
64078
64079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64080    cygwin_help $MISSING_DEPENDENCY
64081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64082    msys_help $MISSING_DEPENDENCY
64083  else
64084    PKGHANDLER_COMMAND=
64085
64086    case $PKGHANDLER in
64087      apt-get)
64088        apt_help     $MISSING_DEPENDENCY ;;
64089      yum)
64090        yum_help     $MISSING_DEPENDENCY ;;
64091      brew)
64092        brew_help    $MISSING_DEPENDENCY ;;
64093      port)
64094        port_help    $MISSING_DEPENDENCY ;;
64095      pkgutil)
64096        pkgutil_help $MISSING_DEPENDENCY ;;
64097      pkgadd)
64098        pkgadd_help  $MISSING_DEPENDENCY ;;
64099    esac
64100
64101    if test "x$PKGHANDLER_COMMAND" != x; then
64102      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64103    fi
64104  fi
64105
64106      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64107    fi
64108
64109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64110$as_echo_n "checking if libffi should be bundled... " >&6; }
64111    if test "x$enable_libffi_bundling" = "x"; then
64112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64113$as_echo "no" >&6; }
64114      ENABLE_LIBFFI_BUNDLING=false
64115    elif  test "x$enable_libffi_bundling" = "xno"; then
64116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64117$as_echo "no, forced" >&6; }
64118      ENABLE_LIBFFI_BUNDLING=false
64119    elif  test "x$enable_libffi_bundling" = "xyes"; then
64120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64121$as_echo "yes, forced" >&6; }
64122      ENABLE_LIBFFI_BUNDLING=true
64123    else
64124      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64125    fi
64126
64127    # Find the libffi.so.X to bundle
64128    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64130$as_echo_n "checking for libffi lib file location... " >&6; }
64131      if test "x${LIBFFI_LIB_PATH}" != x; then
64132        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64133          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64134        else
64135          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64136        fi
64137      else
64138        # If we don't have an explicit path, look in a few obvious places
64139        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64140          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64141            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64142          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64143            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64144          else
64145            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64146          fi
64147        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64148          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64149            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64150          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64151            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64152          else
64153            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64154          fi
64155        else
64156          # Fallback on the default /usr/lib dir
64157          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64158            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64159          else
64160            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64161          fi
64162        fi
64163      fi
64164      # Make sure the wildcard is evaluated
64165      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64167$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64168    fi
64169  fi
64170
64171
64172
64173
64174
64175
64176
64177  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64178    # Extract the first word of "llvm-config", so it can be a program name with args.
64179set dummy llvm-config; ac_word=$2
64180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64181$as_echo_n "checking for $ac_word... " >&6; }
64182if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64183  $as_echo_n "(cached) " >&6
64184else
64185  if test -n "$LLVM_CONFIG"; then
64186  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64187else
64188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64189for as_dir in $PATH
64190do
64191  IFS=$as_save_IFS
64192  test -z "$as_dir" && as_dir=.
64193    for ac_exec_ext in '' $ac_executable_extensions; do
64194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64195    ac_cv_prog_LLVM_CONFIG="llvm-config"
64196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64197    break 2
64198  fi
64199done
64200  done
64201IFS=$as_save_IFS
64202
64203fi
64204fi
64205LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64206if test -n "$LLVM_CONFIG"; then
64207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64208$as_echo "$LLVM_CONFIG" >&6; }
64209else
64210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64211$as_echo "no" >&6; }
64212fi
64213
64214
64215
64216    if test "x$LLVM_CONFIG" != xllvm-config; then
64217      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64218    fi
64219
64220    llvm_components="jit mcjit engine nativecodegen native"
64221    unset LLVM_CFLAGS
64222    for flag in $("$LLVM_CONFIG" --cxxflags); do
64223      if echo "${flag}" | grep -q '^-[ID]'; then
64224        if test "${flag}" != "-D_DEBUG" ; then
64225          if test "${LLVM_CFLAGS}" != "" ; then
64226            LLVM_CFLAGS="${LLVM_CFLAGS} "
64227          fi
64228          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64229        fi
64230      fi
64231    done
64232    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64233    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64234
64235    unset LLVM_LDFLAGS
64236    for flag in $("${LLVM_CONFIG}" --ldflags); do
64237      if echo "${flag}" | grep -q '^-L'; then
64238        if test "${LLVM_LDFLAGS}" != ""; then
64239          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64240        fi
64241        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64242      fi
64243    done
64244
64245    unset LLVM_LIBS
64246    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64247      if echo "${flag}" | grep -q '^-l'; then
64248        if test "${LLVM_LIBS}" != ""; then
64249          LLVM_LIBS="${LLVM_LIBS} "
64250        fi
64251        LLVM_LIBS="${LLVM_LIBS}${flag}"
64252      fi
64253    done
64254
64255    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64256    # always properly detect -ltinfo
64257    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64258
64259
64260
64261
64262  fi
64263
64264
64265
64266# Check whether --with-libjpeg was given.
64267if test "${with_libjpeg+set}" = set; then :
64268  withval=$with_libjpeg;
64269fi
64270
64271
64272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64273$as_echo_n "checking for which libjpeg to use... " >&6; }
64274  # default is bundled
64275  DEFAULT_LIBJPEG=bundled
64276  # if user didn't specify, use DEFAULT_LIBJPEG
64277  if test "x${with_libjpeg}" = "x"; then
64278    with_libjpeg=${DEFAULT_LIBJPEG}
64279  fi
64280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64281$as_echo "${with_libjpeg}" >&6; }
64282
64283  if test "x${with_libjpeg}" = "xbundled"; then
64284    USE_EXTERNAL_LIBJPEG=false
64285  elif test "x${with_libjpeg}" = "xsystem"; then
64286    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64287if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64288
64289else
64290   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64291fi
64292
64293
64294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64295$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64296if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64297  $as_echo_n "(cached) " >&6
64298else
64299  ac_check_lib_save_LIBS=$LIBS
64300LIBS="-ljpeg  $LIBS"
64301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64302/* end confdefs.h.  */
64303
64304/* Override any GCC internal prototype to avoid an error.
64305   Use char because int might match the return type of a GCC
64306   builtin and then its argument prototype would still apply.  */
64307#ifdef __cplusplus
64308extern "C"
64309#endif
64310char jpeg_CreateDecompress ();
64311int
64312main ()
64313{
64314return jpeg_CreateDecompress ();
64315  ;
64316  return 0;
64317}
64318_ACEOF
64319if ac_fn_cxx_try_link "$LINENO"; then :
64320  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64321else
64322  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64323fi
64324rm -f core conftest.err conftest.$ac_objext \
64325    conftest$ac_exeext conftest.$ac_ext
64326LIBS=$ac_check_lib_save_LIBS
64327fi
64328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64329$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64330if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64331  cat >>confdefs.h <<_ACEOF
64332#define HAVE_LIBJPEG 1
64333_ACEOF
64334
64335  LIBS="-ljpeg $LIBS"
64336
64337else
64338   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64339fi
64340
64341
64342    USE_EXTERNAL_LIBJPEG=true
64343  else
64344    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64345  fi
64346
64347
64348
64349
64350
64351# Check whether --with-giflib was given.
64352if test "${with_giflib+set}" = set; then :
64353  withval=$with_giflib;
64354fi
64355
64356
64357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64358$as_echo_n "checking for which giflib to use... " >&6; }
64359  # default is bundled
64360  DEFAULT_GIFLIB=bundled
64361  # if user didn't specify, use DEFAULT_GIFLIB
64362  if test "x${with_giflib}" = "x"; then
64363    with_giflib=${DEFAULT_GIFLIB}
64364  fi
64365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64366$as_echo "${with_giflib}" >&6; }
64367
64368  if test "x${with_giflib}" = "xbundled"; then
64369    USE_EXTERNAL_LIBGIF=false
64370  elif test "x${with_giflib}" = "xsystem"; then
64371    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64372if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64373
64374else
64375   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64376fi
64377
64378
64379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64380$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64381if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64382  $as_echo_n "(cached) " >&6
64383else
64384  ac_check_lib_save_LIBS=$LIBS
64385LIBS="-lgif  $LIBS"
64386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64387/* end confdefs.h.  */
64388
64389/* Override any GCC internal prototype to avoid an error.
64390   Use char because int might match the return type of a GCC
64391   builtin and then its argument prototype would still apply.  */
64392#ifdef __cplusplus
64393extern "C"
64394#endif
64395char DGifGetCode ();
64396int
64397main ()
64398{
64399return DGifGetCode ();
64400  ;
64401  return 0;
64402}
64403_ACEOF
64404if ac_fn_cxx_try_link "$LINENO"; then :
64405  ac_cv_lib_gif_DGifGetCode=yes
64406else
64407  ac_cv_lib_gif_DGifGetCode=no
64408fi
64409rm -f core conftest.err conftest.$ac_objext \
64410    conftest$ac_exeext conftest.$ac_ext
64411LIBS=$ac_check_lib_save_LIBS
64412fi
64413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64414$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64415if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64416  cat >>confdefs.h <<_ACEOF
64417#define HAVE_LIBGIF 1
64418_ACEOF
64419
64420  LIBS="-lgif $LIBS"
64421
64422else
64423   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64424fi
64425
64426
64427    USE_EXTERNAL_LIBGIF=true
64428  else
64429    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64430  fi
64431
64432
64433
64434
64435
64436# Check whether --with-libpng was given.
64437if test "${with_libpng+set}" = set; then :
64438  withval=$with_libpng;
64439fi
64440
64441
64442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64443$as_echo_n "checking for which libpng to use... " >&6; }
64444
64445  # default is bundled
64446  DEFAULT_LIBPNG=bundled
64447  # if user didn't specify, use DEFAULT_LIBPNG
64448  if test "x${with_libpng}" = "x"; then
64449    with_libpng=${DEFAULT_LIBPNG}
64450  fi
64451
64452  if test "x${with_libpng}" = "xbundled"; then
64453    USE_EXTERNAL_LIBPNG=false
64454    PNG_CFLAGS=""
64455    PNG_LIBS=""
64456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64457$as_echo "bundled" >&6; }
64458  elif test "x${with_libpng}" = "xsystem"; then
64459
64460pkg_failed=no
64461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64462$as_echo_n "checking for PNG... " >&6; }
64463
64464if test -n "$PNG_CFLAGS"; then
64465    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64466 elif test -n "$PKG_CONFIG"; then
64467    if test -n "$PKG_CONFIG" && \
64468    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64469  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64470  ac_status=$?
64471  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64472  test $ac_status = 0; }; then
64473  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64474else
64475  pkg_failed=yes
64476fi
64477 else
64478    pkg_failed=untried
64479fi
64480if test -n "$PNG_LIBS"; then
64481    pkg_cv_PNG_LIBS="$PNG_LIBS"
64482 elif test -n "$PKG_CONFIG"; then
64483    if test -n "$PKG_CONFIG" && \
64484    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64485  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64486  ac_status=$?
64487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64488  test $ac_status = 0; }; then
64489  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64490else
64491  pkg_failed=yes
64492fi
64493 else
64494    pkg_failed=untried
64495fi
64496
64497
64498
64499if test $pkg_failed = yes; then
64500
64501if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64502        _pkg_short_errors_supported=yes
64503else
64504        _pkg_short_errors_supported=no
64505fi
64506        if test $_pkg_short_errors_supported = yes; then
64507	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64508        else
64509	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64510        fi
64511	# Put the nasty error message in config.log where it belongs
64512	echo "$PNG_PKG_ERRORS" >&5
64513
64514	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64515$as_echo "no" >&6; }
64516                LIBPNG_FOUND=no
64517elif test $pkg_failed = untried; then
64518	LIBPNG_FOUND=no
64519else
64520	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64521	PNG_LIBS=$pkg_cv_PNG_LIBS
64522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64523$as_echo "yes" >&6; }
64524	LIBPNG_FOUND=yes
64525fi
64526    if test "x${LIBPNG_FOUND}" = "xyes"; then
64527      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64528      USE_EXTERNAL_LIBPNG=true
64529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64530$as_echo "system" >&6; }
64531    else
64532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64533$as_echo "system not found" >&6; }
64534      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64535    fi
64536  else
64537    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64538  fi
64539
64540
64541
64542
64543
64544
64545
64546# Check whether --with-zlib was given.
64547if test "${with_zlib+set}" = set; then :
64548  withval=$with_zlib;
64549fi
64550
64551
64552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64553$as_echo_n "checking for compress in -lz... " >&6; }
64554if ${ac_cv_lib_z_compress+:} false; then :
64555  $as_echo_n "(cached) " >&6
64556else
64557  ac_check_lib_save_LIBS=$LIBS
64558LIBS="-lz  $LIBS"
64559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64560/* end confdefs.h.  */
64561
64562/* Override any GCC internal prototype to avoid an error.
64563   Use char because int might match the return type of a GCC
64564   builtin and then its argument prototype would still apply.  */
64565#ifdef __cplusplus
64566extern "C"
64567#endif
64568char compress ();
64569int
64570main ()
64571{
64572return compress ();
64573  ;
64574  return 0;
64575}
64576_ACEOF
64577if ac_fn_cxx_try_link "$LINENO"; then :
64578  ac_cv_lib_z_compress=yes
64579else
64580  ac_cv_lib_z_compress=no
64581fi
64582rm -f core conftest.err conftest.$ac_objext \
64583    conftest$ac_exeext conftest.$ac_ext
64584LIBS=$ac_check_lib_save_LIBS
64585fi
64586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64587$as_echo "$ac_cv_lib_z_compress" >&6; }
64588if test "x$ac_cv_lib_z_compress" = xyes; then :
64589   ZLIB_FOUND=yes
64590else
64591   ZLIB_FOUND=no
64592fi
64593
64594
64595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64596$as_echo_n "checking for which zlib to use... " >&6; }
64597
64598  DEFAULT_ZLIB=system
64599  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64600    # On windows default is bundled...on others default is system
64601    DEFAULT_ZLIB=bundled
64602  fi
64603
64604  if test "x${ZLIB_FOUND}" != "xyes"; then
64605    # If we don't find any system...set default to bundled
64606    DEFAULT_ZLIB=bundled
64607  fi
64608
64609  # If user didn't specify, use DEFAULT_ZLIB
64610  if test "x${with_zlib}" = "x"; then
64611    with_zlib=${DEFAULT_ZLIB}
64612  fi
64613
64614  if test "x${with_zlib}" = "xbundled"; then
64615    USE_EXTERNAL_LIBZ=false
64616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64617$as_echo "bundled" >&6; }
64618  elif test "x${with_zlib}" = "xsystem"; then
64619    if test "x${ZLIB_FOUND}" = "xyes"; then
64620      USE_EXTERNAL_LIBZ=true
64621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64622$as_echo "system" >&6; }
64623    else
64624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64625$as_echo "system not found" >&6; }
64626      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64627    fi
64628  else
64629    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64630  fi
64631
64632
64633
64634
64635
64636# Check whether --with-lcms was given.
64637if test "${with_lcms+set}" = set; then :
64638  withval=$with_lcms;
64639fi
64640
64641
64642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64643$as_echo_n "checking for which lcms to use... " >&6; }
64644
64645  DEFAULT_LCMS=bundled
64646  # If user didn't specify, use DEFAULT_LCMS
64647  if test "x${with_lcms}" = "x"; then
64648    with_lcms=${DEFAULT_LCMS}
64649  fi
64650
64651  if test "x${with_lcms}" = "xbundled"; then
64652    USE_EXTERNAL_LCMS=false
64653    LCMS_CFLAGS=""
64654    LCMS_LIBS=""
64655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64656$as_echo "bundled" >&6; }
64657  elif test "x${with_lcms}" = "xsystem"; then
64658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64659$as_echo "system" >&6; }
64660
64661pkg_failed=no
64662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64663$as_echo_n "checking for LCMS... " >&6; }
64664
64665if test -n "$LCMS_CFLAGS"; then
64666    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64667 elif test -n "$PKG_CONFIG"; then
64668    if test -n "$PKG_CONFIG" && \
64669    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64670  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64671  ac_status=$?
64672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64673  test $ac_status = 0; }; then
64674  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64675else
64676  pkg_failed=yes
64677fi
64678 else
64679    pkg_failed=untried
64680fi
64681if test -n "$LCMS_LIBS"; then
64682    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64683 elif test -n "$PKG_CONFIG"; then
64684    if test -n "$PKG_CONFIG" && \
64685    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64686  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64687  ac_status=$?
64688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64689  test $ac_status = 0; }; then
64690  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64691else
64692  pkg_failed=yes
64693fi
64694 else
64695    pkg_failed=untried
64696fi
64697
64698
64699
64700if test $pkg_failed = yes; then
64701
64702if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64703        _pkg_short_errors_supported=yes
64704else
64705        _pkg_short_errors_supported=no
64706fi
64707        if test $_pkg_short_errors_supported = yes; then
64708	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64709        else
64710	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64711        fi
64712	# Put the nasty error message in config.log where it belongs
64713	echo "$LCMS_PKG_ERRORS" >&5
64714
64715	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64716$as_echo "no" >&6; }
64717                LCMS_FOUND=no
64718elif test $pkg_failed = untried; then
64719	LCMS_FOUND=no
64720else
64721	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64722	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64724$as_echo "yes" >&6; }
64725	LCMS_FOUND=yes
64726fi
64727    if test "x${LCMS_FOUND}" = "xyes"; then
64728      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64729      USE_EXTERNAL_LCMS=true
64730    else
64731      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64732    fi
64733  else
64734    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64735  fi
64736
64737
64738
64739
64740
64741
64742
64743
64744
64745
64746
64747
64748
64749  # Setup libm (the maths library)
64750  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64752$as_echo_n "checking for cos in -lm... " >&6; }
64753if ${ac_cv_lib_m_cos+:} false; then :
64754  $as_echo_n "(cached) " >&6
64755else
64756  ac_check_lib_save_LIBS=$LIBS
64757LIBS="-lm  $LIBS"
64758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64759/* end confdefs.h.  */
64760
64761/* Override any GCC internal prototype to avoid an error.
64762   Use char because int might match the return type of a GCC
64763   builtin and then its argument prototype would still apply.  */
64764#ifdef __cplusplus
64765extern "C"
64766#endif
64767char cos ();
64768int
64769main ()
64770{
64771return cos ();
64772  ;
64773  return 0;
64774}
64775_ACEOF
64776if ac_fn_cxx_try_link "$LINENO"; then :
64777  ac_cv_lib_m_cos=yes
64778else
64779  ac_cv_lib_m_cos=no
64780fi
64781rm -f core conftest.err conftest.$ac_objext \
64782    conftest$ac_exeext conftest.$ac_ext
64783LIBS=$ac_check_lib_save_LIBS
64784fi
64785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64786$as_echo "$ac_cv_lib_m_cos" >&6; }
64787if test "x$ac_cv_lib_m_cos" = xyes; then :
64788  cat >>confdefs.h <<_ACEOF
64789#define HAVE_LIBM 1
64790_ACEOF
64791
64792  LIBS="-lm $LIBS"
64793
64794else
64795
64796        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64797$as_echo "$as_me: Maths library was not found" >&6;}
64798
64799fi
64800
64801    LIBM="-lm"
64802  else
64803    LIBM=""
64804  fi
64805
64806
64807  # Setup libdl (for dynamic library loading)
64808  save_LIBS="$LIBS"
64809  LIBS=""
64810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64811$as_echo_n "checking for dlopen in -ldl... " >&6; }
64812if ${ac_cv_lib_dl_dlopen+:} false; then :
64813  $as_echo_n "(cached) " >&6
64814else
64815  ac_check_lib_save_LIBS=$LIBS
64816LIBS="-ldl  $LIBS"
64817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64818/* end confdefs.h.  */
64819
64820/* Override any GCC internal prototype to avoid an error.
64821   Use char because int might match the return type of a GCC
64822   builtin and then its argument prototype would still apply.  */
64823#ifdef __cplusplus
64824extern "C"
64825#endif
64826char dlopen ();
64827int
64828main ()
64829{
64830return dlopen ();
64831  ;
64832  return 0;
64833}
64834_ACEOF
64835if ac_fn_cxx_try_link "$LINENO"; then :
64836  ac_cv_lib_dl_dlopen=yes
64837else
64838  ac_cv_lib_dl_dlopen=no
64839fi
64840rm -f core conftest.err conftest.$ac_objext \
64841    conftest$ac_exeext conftest.$ac_ext
64842LIBS=$ac_check_lib_save_LIBS
64843fi
64844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64845$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64846if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64847  cat >>confdefs.h <<_ACEOF
64848#define HAVE_LIBDL 1
64849_ACEOF
64850
64851  LIBS="-ldl $LIBS"
64852
64853fi
64854
64855  LIBDL="$LIBS"
64856
64857  LIBS="$save_LIBS"
64858
64859  # Deprecated libraries, keep the flags for backwards compatibility
64860  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64861
64862
64863# Check whether --with-dxsdk was given.
64864if test "${with_dxsdk+set}" = set; then :
64865  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64866$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64867fi
64868
64869
64870
64871
64872# Check whether --with-dxsdk-lib was given.
64873if test "${with_dxsdk_lib+set}" = set; then :
64874  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64875$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64876fi
64877
64878
64879
64880
64881# Check whether --with-dxsdk-include was given.
64882if test "${with_dxsdk_include+set}" = set; then :
64883  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64884$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64885fi
64886
64887
64888  fi
64889
64890  # Control if libzip can use mmap. Available for purposes of overriding.
64891  LIBZIP_CAN_USE_MMAP=true
64892
64893
64894
64895  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64896    # Find the root of the Solaris Studio installation from the compiler path
64897    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64898    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64900$as_echo_n "checking for libstlport.so.1... " >&6; }
64901    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64902      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64903      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64904    fi
64905    if test -f "$STLPORT_LIB"; then
64906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64907$as_echo "yes, $STLPORT_LIB" >&6; }
64908
64909  # Only process if variable expands to non-empty
64910
64911  if test "x$STLPORT_LIB" != x; then
64912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64913
64914  # Input might be given as Windows format, start by converting to
64915  # unix format.
64916  path="$STLPORT_LIB"
64917  new_path=`$CYGPATH -u "$path"`
64918
64919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64922  # "foo.exe" is OK but "foo" is an error.
64923  #
64924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64925  # It is also a way to make sure we got the proper file name for the real test later on.
64926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64927  if test "x$test_shortpath" = x; then
64928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64929$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64930    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64931  fi
64932
64933  # Call helper function which possibly converts this using DOS-style short mode.
64934  # If so, the updated path is stored in $new_path.
64935
64936  input_path="$new_path"
64937  # Check if we need to convert this using DOS-style short mode. If the path
64938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64939  # take no chances and rewrite it.
64940  # Note: m4 eats our [], so we need to use [ and ] instead.
64941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64942  if test "x$has_forbidden_chars" != x; then
64943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64947      # Going to short mode and back again did indeed matter. Since short mode is
64948      # case insensitive, let's make it lowercase to improve readability.
64949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64950      # Now convert it back to Unix-style (cygpath)
64951      input_path=`$CYGPATH -u "$shortmode_path"`
64952      new_path="$input_path"
64953    fi
64954  fi
64955
64956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64957  if test "x$test_cygdrive_prefix" = x; then
64958    # As a simple fix, exclude /usr/bin since it's not a real path.
64959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64961      # a path prefixed by /cygdrive for fixpath to work.
64962      new_path="$CYGWIN_ROOT_PATH$input_path"
64963    fi
64964  fi
64965
64966
64967  if test "x$path" != "x$new_path"; then
64968    STLPORT_LIB="$new_path"
64969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64970$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64971  fi
64972
64973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64974
64975  path="$STLPORT_LIB"
64976  has_colon=`$ECHO $path | $GREP ^.:`
64977  new_path="$path"
64978  if test "x$has_colon" = x; then
64979    # Not in mixed or Windows style, start by that.
64980    new_path=`cmd //c echo $path`
64981  fi
64982
64983
64984  input_path="$new_path"
64985  # Check if we need to convert this using DOS-style short mode. If the path
64986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64987  # take no chances and rewrite it.
64988  # Note: m4 eats our [], so we need to use [ and ] instead.
64989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64990  if test "x$has_forbidden_chars" != x; then
64991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64993  fi
64994
64995
64996  windows_path="$new_path"
64997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64998    unix_path=`$CYGPATH -u "$windows_path"`
64999    new_path="$unix_path"
65000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65002    new_path="$unix_path"
65003  fi
65004
65005  if test "x$path" != "x$new_path"; then
65006    STLPORT_LIB="$new_path"
65007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65008$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65009  fi
65010
65011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65013
65014    else
65015      # We're on a unix platform. Hooray! :)
65016      path="$STLPORT_LIB"
65017      has_space=`$ECHO "$path" | $GREP " "`
65018      if test "x$has_space" != x; then
65019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65020$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65022      fi
65023
65024      # Use eval to expand a potential ~
65025      eval path="$path"
65026      if test ! -f "$path" && test ! -d "$path"; then
65027        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65028      fi
65029
65030      if test -d "$path"; then
65031        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65032      else
65033        dir="`$DIRNAME "$path"`"
65034        base="`$BASENAME "$path"`"
65035        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65036      fi
65037    fi
65038  fi
65039
65040    else
65041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65042$as_echo "no, not found at $STLPORT_LIB" >&6; }
65043      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65044    fi
65045
65046  fi
65047
65048
65049
65050# Check whether --with-libelf was given.
65051if test "${with_libelf+set}" = set; then :
65052  withval=$with_libelf;
65053fi
65054
65055
65056# Check whether --with-libelf-include was given.
65057if test "${with_libelf_include+set}" = set; then :
65058  withval=$with_libelf_include;
65059fi
65060
65061
65062# Check whether --with-libelf-lib was given.
65063if test "${with_libelf_lib+set}" = set; then :
65064  withval=$with_libelf_lib;
65065fi
65066
65067
65068  if test "x$ENABLE_AOT" = xfalse; then
65069    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
65070        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
65071        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
65072      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
65073$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
65074    fi
65075    LIBELF_CFLAGS=
65076    LIBELF_LIBS=
65077  else
65078    LIBELF_FOUND=no
65079
65080    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
65081      ENABLE_AOT="false"
65082      if test "x${enable_aot}" = xyes; then
65083        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
65084      fi
65085    else
65086      if test "x${with_libelf}" != x; then
65087        ELF_LIBS="-L${with_libelf}/lib -lelf"
65088        ELF_CFLAGS="-I${with_libelf}/include"
65089        LIBELF_FOUND=yes
65090      fi
65091      if test "x${with_libelf_include}" != x; then
65092        ELF_CFLAGS="-I${with_libelf_include}"
65093        LIBELF_FOUND=yes
65094      fi
65095      if test "x${with_libelf_lib}" != x; then
65096        ELF_LIBS="-L${with_libelf_lib} -lelf"
65097        LIBELF_FOUND=yes
65098      fi
65099      # Do not try pkg-config if we have a sysroot set.
65100      if test "x$SYSROOT" = x; then
65101        if test "x$LIBELF_FOUND" = xno; then
65102          # Figure out ELF_CFLAGS and ELF_LIBS
65103
65104pkg_failed=no
65105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
65106$as_echo_n "checking for ELF... " >&6; }
65107
65108if test -n "$ELF_CFLAGS"; then
65109    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
65110 elif test -n "$PKG_CONFIG"; then
65111    if test -n "$PKG_CONFIG" && \
65112    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65113  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65114  ac_status=$?
65115  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65116  test $ac_status = 0; }; then
65117  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
65118else
65119  pkg_failed=yes
65120fi
65121 else
65122    pkg_failed=untried
65123fi
65124if test -n "$ELF_LIBS"; then
65125    pkg_cv_ELF_LIBS="$ELF_LIBS"
65126 elif test -n "$PKG_CONFIG"; then
65127    if test -n "$PKG_CONFIG" && \
65128    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65129  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65130  ac_status=$?
65131  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65132  test $ac_status = 0; }; then
65133  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
65134else
65135  pkg_failed=yes
65136fi
65137 else
65138    pkg_failed=untried
65139fi
65140
65141
65142
65143if test $pkg_failed = yes; then
65144
65145if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65146        _pkg_short_errors_supported=yes
65147else
65148        _pkg_short_errors_supported=no
65149fi
65150        if test $_pkg_short_errors_supported = yes; then
65151	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
65152        else
65153	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
65154        fi
65155	# Put the nasty error message in config.log where it belongs
65156	echo "$ELF_PKG_ERRORS" >&5
65157
65158	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65159$as_echo "no" >&6; }
65160                LIBELF_FOUND=no
65161elif test $pkg_failed = untried; then
65162	LIBELF_FOUND=no
65163else
65164	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
65165	ELF_LIBS=$pkg_cv_ELF_LIBS
65166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65167$as_echo "yes" >&6; }
65168	LIBELF_FOUND=yes
65169fi
65170        fi
65171      fi
65172      if test "x$LIBELF_FOUND" = xno; then
65173        for ac_header in libelf.h
65174do :
65175  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
65176if test "x$ac_cv_header_libelf_h" = xyes; then :
65177  cat >>confdefs.h <<_ACEOF
65178#define HAVE_LIBELF_H 1
65179_ACEOF
65180
65181              LIBELF_FOUND=yes
65182              ELF_CFLAGS=
65183              ELF_LIBS=-lelf
65184
65185else
65186  LIBELF_FOUND=no
65187
65188fi
65189
65190done
65191
65192      fi
65193      if test "x$LIBELF_FOUND" = xno; then
65194        ENABLE_AOT="false"
65195
65196  # Print a helpful message on how to acquire the necessary build dependency.
65197  # elf is the help tag: freetype, cups, alsa etc
65198  MISSING_DEPENDENCY=elf
65199
65200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65201    cygwin_help $MISSING_DEPENDENCY
65202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65203    msys_help $MISSING_DEPENDENCY
65204  else
65205    PKGHANDLER_COMMAND=
65206
65207    case $PKGHANDLER in
65208      apt-get)
65209        apt_help     $MISSING_DEPENDENCY ;;
65210      yum)
65211        yum_help     $MISSING_DEPENDENCY ;;
65212      brew)
65213        brew_help    $MISSING_DEPENDENCY ;;
65214      port)
65215        port_help    $MISSING_DEPENDENCY ;;
65216      pkgutil)
65217        pkgutil_help $MISSING_DEPENDENCY ;;
65218      pkgadd)
65219        pkgadd_help  $MISSING_DEPENDENCY ;;
65220    esac
65221
65222    if test "x$PKGHANDLER_COMMAND" != x; then
65223      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65224    fi
65225  fi
65226
65227        if test "x${enable_aot}" = xyes; then
65228          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65229        else
65230          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
65231$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
65232        fi
65233      else
65234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
65235$as_echo_n "checking if libelf works... " >&6; }
65236        ac_ext=c
65237ac_cpp='$CPP $CPPFLAGS'
65238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65240ac_compiler_gnu=$ac_cv_c_compiler_gnu
65241
65242        OLD_CFLAGS="$CFLAGS"
65243        CFLAGS="$CFLAGS $ELF_CFLAGS"
65244        OLD_LIBS="$LIBS"
65245        LIBS="$LIBS $ELF_LIBS"
65246        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65247/* end confdefs.h.  */
65248#include <libelf.h>
65249int
65250main ()
65251{
65252
65253              elf_version(0);
65254              return 0;
65255
65256  ;
65257  return 0;
65258}
65259_ACEOF
65260if ac_fn_c_try_link "$LINENO"; then :
65261  LIBELF_WORKS=yes
65262else
65263  LIBELF_WORKS=no
65264
65265fi
65266rm -f core conftest.err conftest.$ac_objext \
65267    conftest$ac_exeext conftest.$ac_ext
65268        CFLAGS="$OLD_CFLAGS"
65269        LIBS="$OLD_LIBS"
65270        ac_ext=cpp
65271ac_cpp='$CXXCPP $CPPFLAGS'
65272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65275
65276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
65277$as_echo "$LIBELF_WORKS" >&6; }
65278
65279        if test "x$LIBELF_WORKS" = xno; then
65280          ENABLE_AOT="false"
65281
65282  # Print a helpful message on how to acquire the necessary build dependency.
65283  # elf is the help tag: freetype, cups, alsa etc
65284  MISSING_DEPENDENCY=elf
65285
65286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65287    cygwin_help $MISSING_DEPENDENCY
65288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65289    msys_help $MISSING_DEPENDENCY
65290  else
65291    PKGHANDLER_COMMAND=
65292
65293    case $PKGHANDLER in
65294      apt-get)
65295        apt_help     $MISSING_DEPENDENCY ;;
65296      yum)
65297        yum_help     $MISSING_DEPENDENCY ;;
65298      brew)
65299        brew_help    $MISSING_DEPENDENCY ;;
65300      port)
65301        port_help    $MISSING_DEPENDENCY ;;
65302      pkgutil)
65303        pkgutil_help $MISSING_DEPENDENCY ;;
65304      pkgadd)
65305        pkgadd_help  $MISSING_DEPENDENCY ;;
65306    esac
65307
65308    if test "x$PKGHANDLER_COMMAND" != x; then
65309      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65310    fi
65311  fi
65312
65313          if test "x$enable_aot" = "xyes"; then
65314            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65315          else
65316            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
65317$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
65318          fi
65319        fi
65320      fi
65321    fi
65322  fi
65323
65324
65325
65326
65327
65328
65329
65330
65331
65332
65333
65334
65335
65336
65337
65338
65339
65340
65341# Hotspot setup depends on lib checks (AOT needs libelf).
65342
65343
65344  # The user can in some cases supply additional jvm features. For the custom
65345  # variant, this defines the entire variant.
65346
65347# Check whether --with-jvm-features was given.
65348if test "${with_jvm_features+set}" = set; then :
65349  withval=$with_jvm_features;
65350fi
65351
65352  if test "x$with_jvm_features" != x; then
65353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65354$as_echo_n "checking additional JVM features... " >&6; }
65355    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65357$as_echo "$JVM_FEATURES" >&6; }
65358  fi
65359
65360  # Override hotspot cpu definitions for ARM platforms
65361  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65362    HOTSPOT_TARGET_CPU=arm_32
65363    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65364    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65365    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65366  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65367    HOTSPOT_TARGET_CPU=arm_64
65368    HOTSPOT_TARGET_CPU_ARCH=arm
65369    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65370    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65371  fi
65372
65373  # Verify that dependencies are met for explicitly set features.
65374  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65375    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65376  fi
65377
65378  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65379    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65380  fi
65381
65382  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65383    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65384  fi
65385
65386  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65387    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65388  fi
65389
65390  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65391    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65392  fi
65393
65394  # Turn on additional features based on other parts of configure
65395  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65396    JVM_FEATURES="$JVM_FEATURES dtrace"
65397  else
65398    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65399      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65400    fi
65401  fi
65402
65403  if test "x$STATIC_BUILD" = "xtrue"; then
65404    JVM_FEATURES="$JVM_FEATURES static-build"
65405  else
65406    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65407      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65408    fi
65409  fi
65410
65411  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65412    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65413      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65414    fi
65415  fi
65416
65417  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65418    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65419      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65420    fi
65421  fi
65422
65423  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65424  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65425     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65426     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65427    JVM_FEATURES_jvmci="jvmci"
65428  else
65429    JVM_FEATURES_jvmci=""
65430  fi
65431
65432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65433$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65434  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65436$as_echo "yes, forced" >&6; }
65437    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65438      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65439    fi
65440    INCLUDE_GRAAL="true"
65441  else
65442    # By default enable graal build where AOT is available
65443    if test "x$ENABLE_AOT" = "xtrue"; then
65444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65445$as_echo "yes" >&6; }
65446      JVM_FEATURES_graal="graal"
65447      INCLUDE_GRAAL="true"
65448    else
65449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65450$as_echo "no" >&6; }
65451      JVM_FEATURES_graal=""
65452      INCLUDE_GRAAL="false"
65453    fi
65454  fi
65455
65456
65457
65458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65459$as_echo_n "checking if aot should be enabled... " >&6; }
65460  if test "x$ENABLE_AOT" = "xtrue"; then
65461    if test "x$enable_aot" = "xyes"; then
65462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65463$as_echo "yes, forced" >&6; }
65464    else
65465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65466$as_echo "yes" >&6; }
65467    fi
65468    JVM_FEATURES_aot="aot"
65469  else
65470    if test "x$enable_aot" = "xno"; then
65471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65472$as_echo "no, forced" >&6; }
65473    else
65474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65475$as_echo "no" >&6; }
65476    fi
65477    JVM_FEATURES_aot=""
65478  fi
65479
65480  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65481    # Default to use link time optimizations on minimal on arm
65482    JVM_FEATURES_link_time_opt="link-time-opt"
65483  else
65484    JVM_FEATURES_link_time_opt=""
65485  fi
65486
65487  # All variants but minimal (and custom) get these features
65488  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65489
65490  # Enable features depending on variant.
65491  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65492  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65493  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65494  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65495  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65496  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65497  JVM_FEATURES_custom="$JVM_FEATURES"
65498
65499
65500
65501
65502
65503
65504
65505
65506
65507  # Used for verification of Makefiles by check-jvm-feature
65508
65509
65510  # We don't support --with-jvm-interpreter anymore, use zero instead.
65511
65512
65513# Check whether --with-jvm-interpreter was given.
65514if test "${with_jvm_interpreter+set}" = set; then :
65515  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65516$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65517fi
65518
65519
65520
65521
65522###############################################################################
65523#
65524# We need to do some final tweaking, when everything else is done.
65525#
65526###############################################################################
65527
65528
65529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65530$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65531
65532  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65533    ENABLE_INTREE_EC=true
65534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65535$as_echo "yes" >&6; }
65536  else
65537    ENABLE_INTREE_EC=false
65538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65539$as_echo "no" >&6; }
65540  fi
65541
65542
65543
65544
65545  # Check whether --enable-jtreg-failure-handler was given.
65546if test "${enable_jtreg_failure_handler+set}" = set; then :
65547  enableval=$enable_jtreg_failure_handler;
65548fi
65549
65550
65551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65552$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65553
65554  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65555    if test "x$JT_HOME" = "x"; then
65556      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65557    else
65558      BUILD_FAILURE_HANDLER=true
65559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65560$as_echo "yes, forced" >&6; }
65561    fi
65562  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65563    BUILD_FAILURE_HANDLER=false
65564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65565$as_echo "no, forced" >&6; }
65566  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65567      || test "x$enable_jtreg_failure_handler" = "x"; then
65568    if test "x$JT_HOME" = "x"; then
65569      BUILD_FAILURE_HANDLER=false
65570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65571$as_echo "no, missing jtreg" >&6; }
65572    else
65573      BUILD_FAILURE_HANDLER=true
65574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65575$as_echo "yes, jtreg present" >&6; }
65576    fi
65577  else
65578    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65579  fi
65580
65581
65582
65583
65584  # Check whether --enable-generate-classlist was given.
65585if test "${enable_generate_classlist+set}" = set; then :
65586  enableval=$enable_generate_classlist;
65587fi
65588
65589
65590  # Check if it's likely that it's possible to generate the classlist. Depending
65591  # on exact jvm configuration it could be possible anyway.
65592  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65593    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65594  else
65595    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65596  fi
65597
65598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65599$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65600  if test "x$enable_generate_classlist" = "xyes"; then
65601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65602$as_echo "yes, forced" >&6; }
65603    ENABLE_GENERATE_CLASSLIST="true"
65604    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65605      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65606$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65607    fi
65608  elif test "x$enable_generate_classlist" = "xno"; then
65609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65610$as_echo "no, forced" >&6; }
65611    ENABLE_GENERATE_CLASSLIST="false"
65612  elif test "x$enable_generate_classlist" = "x"; then
65613    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65615$as_echo "yes" >&6; }
65616      ENABLE_GENERATE_CLASSLIST="true"
65617    else
65618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65619$as_echo "no" >&6; }
65620      ENABLE_GENERATE_CLASSLIST="false"
65621    fi
65622  else
65623    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65624  fi
65625
65626
65627
65628
65629###############################################################################
65630#
65631# Configure parts of the build that only affect the build performance,
65632# not the result.
65633#
65634###############################################################################
65635
65636
65637  # How many cores do we have on this build system?
65638
65639# Check whether --with-num-cores was given.
65640if test "${with_num_cores+set}" = set; then :
65641  withval=$with_num_cores;
65642fi
65643
65644  if test "x$with_num_cores" = x; then
65645    # The number of cores were not specified, try to probe them.
65646
65647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65648$as_echo_n "checking for number of cores... " >&6; }
65649  NUM_CORES=1
65650  FOUND_CORES=no
65651
65652  if test -f /proc/cpuinfo; then
65653    # Looks like a Linux (or cygwin) system
65654    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65655    FOUND_CORES=yes
65656  elif test -x /usr/sbin/psrinfo; then
65657    # Looks like a Solaris system
65658    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65659    FOUND_CORES=yes
65660  elif test -x /usr/sbin/sysctl; then
65661    # Looks like a MacOSX system
65662    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65663    FOUND_CORES=yes
65664  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65665    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65666    FOUND_CORES=yes
65667  elif test -n "$NUMBER_OF_PROCESSORS"; then
65668    # On windows, look in the env
65669    NUM_CORES=$NUMBER_OF_PROCESSORS
65670    FOUND_CORES=yes
65671  fi
65672
65673  if test "x$FOUND_CORES" = xyes; then
65674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65675$as_echo "$NUM_CORES" >&6; }
65676  else
65677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65678$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65679    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65680$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65681  fi
65682
65683  else
65684    NUM_CORES=$with_num_cores
65685  fi
65686
65687
65688
65689  # How much memory do we have on this build system?
65690
65691# Check whether --with-memory-size was given.
65692if test "${with_memory_size+set}" = set; then :
65693  withval=$with_memory_size;
65694fi
65695
65696  if test "x$with_memory_size" = x; then
65697    # The memory size was not specified, try to probe it.
65698
65699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65700$as_echo_n "checking for memory size... " >&6; }
65701  # Default to 1024 MB
65702  MEMORY_SIZE=1024
65703  FOUND_MEM=no
65704
65705  if test -f /proc/meminfo; then
65706    # Looks like a Linux (or cygwin) system
65707    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65708    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65709    FOUND_MEM=yes
65710  elif test -x /usr/sbin/prtconf; then
65711    # Looks like a Solaris or AIX system
65712    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65713    FOUND_MEM=yes
65714  elif test -x /usr/sbin/sysctl; then
65715    # Looks like a MacOSX system
65716    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65717    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65718    FOUND_MEM=yes
65719  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65720    # Windows, but without cygwin
65721    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65722    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65723    FOUND_MEM=yes
65724  fi
65725
65726  if test "x$FOUND_MEM" = xyes; then
65727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65728$as_echo "$MEMORY_SIZE MB" >&6; }
65729  else
65730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65731$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65732    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65733$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65734  fi
65735
65736  else
65737    MEMORY_SIZE=$with_memory_size
65738  fi
65739
65740
65741
65742  # Provide a decent default number of parallel jobs for make depending on
65743  # number of cores, amount of memory and machine architecture.
65744
65745# Check whether --with-jobs was given.
65746if test "${with_jobs+set}" = set; then :
65747  withval=$with_jobs;
65748fi
65749
65750  if test "x$with_jobs" = x; then
65751    # Number of jobs was not specified, calculate.
65752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65753$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65754    # Approximate memory in GB.
65755    memory_gb=`expr $MEMORY_SIZE / 1024`
65756    # Pick the lowest of memory in gb and number of cores.
65757    if test "$memory_gb" -lt "$NUM_CORES"; then
65758      JOBS="$memory_gb"
65759    else
65760      JOBS="$NUM_CORES"
65761    fi
65762    if test "$JOBS" -eq "0"; then
65763      JOBS=1
65764    fi
65765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65766$as_echo "$JOBS" >&6; }
65767  else
65768    JOBS=$with_jobs
65769  fi
65770
65771
65772
65773  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65774
65775# Check whether --with-test-jobs was given.
65776if test "${with_test_jobs+set}" = set; then :
65777  withval=$with_test_jobs;
65778fi
65779
65780  if test "x$with_test_jobs" = x; then
65781      TEST_JOBS=0
65782  else
65783      TEST_JOBS=$with_test_jobs
65784  fi
65785
65786
65787
65788# Setup arguments for the boot jdk (after cores and memory have been setup)
65789
65790  ##############################################################################
65791  #
65792  # Specify jvm options for anything that is run with the Boot JDK.
65793  # Not all JVM:s accept the same arguments on the command line.
65794  #
65795
65796# Check whether --with-boot-jdk-jvmargs was given.
65797if test "${with_boot_jdk_jvmargs+set}" = set; then :
65798  withval=$with_boot_jdk_jvmargs;
65799fi
65800
65801
65802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65803$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65804
65805  # Disable special log output when a debug build is used as Boot JDK...
65806
65807  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65808  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65809  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65810  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65811  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65812  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65813    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65814    JVM_ARG_OK=true
65815  else
65816    $ECHO "Arg failed:" >&5
65817    $ECHO "$OUTPUT" >&5
65818    JVM_ARG_OK=false
65819  fi
65820
65821
65822  # Force en-US environment
65823
65824  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65825  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65826  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65827  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65828  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65829  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65830    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65831    JVM_ARG_OK=true
65832  else
65833    $ECHO "Arg failed:" >&5
65834    $ECHO "$OUTPUT" >&5
65835    JVM_ARG_OK=false
65836  fi
65837
65838
65839  # Apply user provided options.
65840
65841  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65842  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65843  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65844  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65845  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65846  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65847    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65848    JVM_ARG_OK=true
65849  else
65850    $ECHO "Arg failed:" >&5
65851    $ECHO "$OUTPUT" >&5
65852    JVM_ARG_OK=false
65853  fi
65854
65855
65856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65857$as_echo "$boot_jdk_jvmargs" >&6; }
65858
65859  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65860  JAVA_FLAGS=$boot_jdk_jvmargs
65861
65862
65863
65864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65865$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65866
65867  # Starting amount of heap memory.
65868
65869  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65870  $ECHO "Command: $JAVA -Xms64M -version" >&5
65871  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65872  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65873  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65874  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65875    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65876    JVM_ARG_OK=true
65877  else
65878    $ECHO "Arg failed:" >&5
65879    $ECHO "$OUTPUT" >&5
65880    JVM_ARG_OK=false
65881  fi
65882
65883  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65884
65885  # Maximum amount of heap memory and stack size.
65886  JVM_HEAP_LIMIT_32="1024"
65887  # Running a 64 bit JVM allows for and requires a bigger heap
65888  JVM_HEAP_LIMIT_64="1600"
65889  STACK_SIZE_32=768
65890  STACK_SIZE_64=1536
65891  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65892  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65893    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65894  fi
65895  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65896    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65897  fi
65898  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65899    JVM_HEAP_LIMIT_32=512
65900    JVM_HEAP_LIMIT_64=512
65901  fi
65902
65903  if test "x$BOOT_JDK_BITS" = "x32"; then
65904    STACK_SIZE=$STACK_SIZE_32
65905    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65906  else
65907    STACK_SIZE=$STACK_SIZE_64
65908    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65909  fi
65910
65911  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65912  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65913  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65914  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65915  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65916  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65917    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65918    JVM_ARG_OK=true
65919  else
65920    $ECHO "Arg failed:" >&5
65921    $ECHO "$OUTPUT" >&5
65922    JVM_ARG_OK=false
65923  fi
65924
65925
65926  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65927  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65928  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65929  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65930  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65931  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65932    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65933    JVM_ARG_OK=true
65934  else
65935    $ECHO "Arg failed:" >&5
65936    $ECHO "$OUTPUT" >&5
65937    JVM_ARG_OK=false
65938  fi
65939
65940
65941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65942$as_echo "$boot_jdk_jvmargs_big" >&6; }
65943
65944  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65945
65946
65947  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65948    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65949    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65950  else
65951    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65952    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65953  fi
65954  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65955  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65957$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65959$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65960
65961
65962  # By default, the main javac compilations use big
65963  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65964
65965
65966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65967$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65968
65969  # Use serial gc for small short lived tools if possible
65970
65971  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65972  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65973  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65974  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65975  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65976  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65977    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65978    JVM_ARG_OK=true
65979  else
65980    $ECHO "Arg failed:" >&5
65981    $ECHO "$OUTPUT" >&5
65982    JVM_ARG_OK=false
65983  fi
65984
65985
65986  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65987  $ECHO "Command: $JAVA -Xms32M -version" >&5
65988  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65989  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65990  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65991  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65992    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65993    JVM_ARG_OK=true
65994  else
65995    $ECHO "Arg failed:" >&5
65996    $ECHO "$OUTPUT" >&5
65997    JVM_ARG_OK=false
65998  fi
65999
66000
66001  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66002  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66003  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66004  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66005  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66006  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66007    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66008    JVM_ARG_OK=true
66009  else
66010    $ECHO "Arg failed:" >&5
66011    $ECHO "$OUTPUT" >&5
66012    JVM_ARG_OK=false
66013  fi
66014
66015
66016  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66017  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66018  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66019  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66020  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66021  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66022    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66023    JVM_ARG_OK=true
66024  else
66025    $ECHO "Arg failed:" >&5
66026    $ECHO "$OUTPUT" >&5
66027    JVM_ARG_OK=false
66028  fi
66029
66030
66031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66032$as_echo "$boot_jdk_jvmargs_small" >&6; }
66033
66034  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66035
66036
66037  JAVA_TOOL_FLAGS_SMALL=""
66038  for f in $JAVA_FLAGS_SMALL; do
66039    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66040  done
66041
66042
66043
66044# Setup smart javac (after cores and memory have been setup)
66045
66046
66047# Check whether --with-sjavac-server-java was given.
66048if test "${with_sjavac_server_java+set}" = set; then :
66049  withval=$with_sjavac_server_java;
66050fi
66051
66052
66053  if test "x$with_sjavac_server_java" != x; then
66054    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66055    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66056    if test "x$FOUND_VERSION" = x; then
66057      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66058    fi
66059  else
66060    SJAVAC_SERVER_JAVA="$JAVA"
66061  fi
66062
66063
66064  if test "$MEMORY_SIZE" -gt "3000"; then
66065
66066  $ECHO "Check if jvm arg is ok: -d64" >&5
66067  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
66068  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
66069  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66070  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66071  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66072    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
66073    JVM_ARG_OK=true
66074  else
66075    $ECHO "Arg failed:" >&5
66076    $ECHO "$OUTPUT" >&5
66077    JVM_ARG_OK=false
66078  fi
66079
66080    if test "$JVM_ARG_OK" = true; then
66081      JVM_64BIT=true
66082      JVM_ARG_OK=false
66083    fi
66084  fi
66085
66086  MX_VALUE=`expr $MEMORY_SIZE / 2`
66087  if test "$JVM_64BIT" = true; then
66088    # Set ms lower than mx since more than one instance of the server might
66089    # get launched at the same time before they figure out which instance won.
66090    MS_VALUE=512
66091    if test "$MX_VALUE" -gt "2048"; then
66092      MX_VALUE=2048
66093    fi
66094  else
66095    MS_VALUE=256
66096    if test "$MX_VALUE" -gt "1500"; then
66097      MX_VALUE=1500
66098    fi
66099  fi
66100  if test "$MX_VALUE" -lt "512"; then
66101    MX_VALUE=512
66102  fi
66103
66104  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66105  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66106  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66107  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66108  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66109  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66110    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66111    JVM_ARG_OK=true
66112  else
66113    $ECHO "Arg failed:" >&5
66114    $ECHO "$OUTPUT" >&5
66115    JVM_ARG_OK=false
66116  fi
66117
66118
66119
66120  # Check whether --enable-sjavac was given.
66121if test "${enable_sjavac+set}" = set; then :
66122  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66123else
66124  ENABLE_SJAVAC="no"
66125fi
66126
66127  if test "x$JVM_ARG_OK" = "xfalse"; then
66128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66129$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66130    ENABLE_SJAVAC="no"
66131  fi
66132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66133$as_echo_n "checking whether to use sjavac... " >&6; }
66134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66135$as_echo "$ENABLE_SJAVAC" >&6; }
66136
66137
66138  # Check whether --enable-javac-server was given.
66139if test "${enable_javac_server+set}" = set; then :
66140  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66141else
66142  ENABLE_JAVAC_SERVER="yes"
66143fi
66144
66145  if test "x$JVM_ARG_OK" = "xfalse"; then
66146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66147$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66148    ENABLE_JAVAC_SERVER="no"
66149  fi
66150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66151$as_echo_n "checking whether to use javac server... " >&6; }
66152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66153$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66154
66155
66156  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66157    # When using a server javac, the small client instances do not need much
66158    # resources.
66159    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66160  fi
66161
66162
66163# Setup use of icecc if requested
66164
66165  # Check whether --enable-icecc was given.
66166if test "${enable_icecc+set}" = set; then :
66167  enableval=$enable_icecc;
66168fi
66169
66170
66171  if test "x${enable_icecc}" = "xyes"; then
66172
66173
66174
66175  # Publish this variable in the help.
66176
66177
66178  if [ -z "${ICECC_CMD+x}" ]; then
66179    # The variable is not set by user, try to locate tool using the code snippet
66180    for ac_prog in icecc
66181do
66182  # Extract the first word of "$ac_prog", so it can be a program name with args.
66183set dummy $ac_prog; ac_word=$2
66184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66185$as_echo_n "checking for $ac_word... " >&6; }
66186if ${ac_cv_path_ICECC_CMD+:} false; then :
66187  $as_echo_n "(cached) " >&6
66188else
66189  case $ICECC_CMD in
66190  [\\/]* | ?:[\\/]*)
66191  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66192  ;;
66193  *)
66194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66195for as_dir in $PATH
66196do
66197  IFS=$as_save_IFS
66198  test -z "$as_dir" && as_dir=.
66199    for ac_exec_ext in '' $ac_executable_extensions; do
66200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66201    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66203    break 2
66204  fi
66205done
66206  done
66207IFS=$as_save_IFS
66208
66209  ;;
66210esac
66211fi
66212ICECC_CMD=$ac_cv_path_ICECC_CMD
66213if test -n "$ICECC_CMD"; then
66214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66215$as_echo "$ICECC_CMD" >&6; }
66216else
66217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66218$as_echo "no" >&6; }
66219fi
66220
66221
66222  test -n "$ICECC_CMD" && break
66223done
66224
66225  else
66226    # The variable is set, but is it from the command line or the environment?
66227
66228    # Try to remove the string !ICECC_CMD! from our list.
66229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66231      # If it failed, the variable was not from the command line. Ignore it,
66232      # but warn the user (except for BASH, which is always set by the calling BASH).
66233      if test "xICECC_CMD" != xBASH; then
66234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66235$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66236      fi
66237      # Try to locate tool using the code snippet
66238      for ac_prog in icecc
66239do
66240  # Extract the first word of "$ac_prog", so it can be a program name with args.
66241set dummy $ac_prog; ac_word=$2
66242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66243$as_echo_n "checking for $ac_word... " >&6; }
66244if ${ac_cv_path_ICECC_CMD+:} false; then :
66245  $as_echo_n "(cached) " >&6
66246else
66247  case $ICECC_CMD in
66248  [\\/]* | ?:[\\/]*)
66249  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66250  ;;
66251  *)
66252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66253for as_dir in $PATH
66254do
66255  IFS=$as_save_IFS
66256  test -z "$as_dir" && as_dir=.
66257    for ac_exec_ext in '' $ac_executable_extensions; do
66258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66259    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66261    break 2
66262  fi
66263done
66264  done
66265IFS=$as_save_IFS
66266
66267  ;;
66268esac
66269fi
66270ICECC_CMD=$ac_cv_path_ICECC_CMD
66271if test -n "$ICECC_CMD"; then
66272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66273$as_echo "$ICECC_CMD" >&6; }
66274else
66275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66276$as_echo "no" >&6; }
66277fi
66278
66279
66280  test -n "$ICECC_CMD" && break
66281done
66282
66283    else
66284      # If it succeeded, then it was overridden by the user. We will use it
66285      # for the tool.
66286
66287      # First remove it from the list of overridden variables, so we can test
66288      # for unknown variables in the end.
66289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66290
66291      # Check if we try to supply an empty value
66292      if test "x$ICECC_CMD" = x; then
66293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66294$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66296$as_echo_n "checking for ICECC_CMD... " >&6; }
66297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66298$as_echo "disabled" >&6; }
66299      else
66300        # Check if the provided tool contains a complete path.
66301        tool_specified="$ICECC_CMD"
66302        tool_basename="${tool_specified##*/}"
66303        if test "x$tool_basename" = "x$tool_specified"; then
66304          # A command without a complete path is provided, search $PATH.
66305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66306$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66307          # Extract the first word of "$tool_basename", so it can be a program name with args.
66308set dummy $tool_basename; ac_word=$2
66309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66310$as_echo_n "checking for $ac_word... " >&6; }
66311if ${ac_cv_path_ICECC_CMD+:} false; then :
66312  $as_echo_n "(cached) " >&6
66313else
66314  case $ICECC_CMD in
66315  [\\/]* | ?:[\\/]*)
66316  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66317  ;;
66318  *)
66319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66320for as_dir in $PATH
66321do
66322  IFS=$as_save_IFS
66323  test -z "$as_dir" && as_dir=.
66324    for ac_exec_ext in '' $ac_executable_extensions; do
66325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66326    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66328    break 2
66329  fi
66330done
66331  done
66332IFS=$as_save_IFS
66333
66334  ;;
66335esac
66336fi
66337ICECC_CMD=$ac_cv_path_ICECC_CMD
66338if test -n "$ICECC_CMD"; then
66339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66340$as_echo "$ICECC_CMD" >&6; }
66341else
66342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66343$as_echo "no" >&6; }
66344fi
66345
66346
66347          if test "x$ICECC_CMD" = x; then
66348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66349          fi
66350        else
66351          # Otherwise we believe it is a complete path. Use it as it is.
66352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66353$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66355$as_echo_n "checking for ICECC_CMD... " >&6; }
66356          if test ! -x "$tool_specified"; then
66357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66358$as_echo "not found" >&6; }
66359            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66360          fi
66361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66362$as_echo "$tool_specified" >&6; }
66363        fi
66364      fi
66365    fi
66366
66367  fi
66368
66369
66370
66371  if test "x$ICECC_CMD" = x; then
66372    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66373  fi
66374
66375
66376    old_path="$PATH"
66377
66378    # Look for icecc-create-env in some known places
66379    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66380
66381
66382
66383  # Publish this variable in the help.
66384
66385
66386  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66387    # The variable is not set by user, try to locate tool using the code snippet
66388    for ac_prog in icecc-create-env
66389do
66390  # Extract the first word of "$ac_prog", so it can be a program name with args.
66391set dummy $ac_prog; ac_word=$2
66392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66393$as_echo_n "checking for $ac_word... " >&6; }
66394if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66395  $as_echo_n "(cached) " >&6
66396else
66397  case $ICECC_CREATE_ENV in
66398  [\\/]* | ?:[\\/]*)
66399  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66400  ;;
66401  *)
66402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66403for as_dir in $PATH
66404do
66405  IFS=$as_save_IFS
66406  test -z "$as_dir" && as_dir=.
66407    for ac_exec_ext in '' $ac_executable_extensions; do
66408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66409    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66411    break 2
66412  fi
66413done
66414  done
66415IFS=$as_save_IFS
66416
66417  ;;
66418esac
66419fi
66420ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66421if test -n "$ICECC_CREATE_ENV"; then
66422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66423$as_echo "$ICECC_CREATE_ENV" >&6; }
66424else
66425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66426$as_echo "no" >&6; }
66427fi
66428
66429
66430  test -n "$ICECC_CREATE_ENV" && break
66431done
66432
66433  else
66434    # The variable is set, but is it from the command line or the environment?
66435
66436    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66439      # If it failed, the variable was not from the command line. Ignore it,
66440      # but warn the user (except for BASH, which is always set by the calling BASH).
66441      if test "xICECC_CREATE_ENV" != xBASH; then
66442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66443$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66444      fi
66445      # Try to locate tool using the code snippet
66446      for ac_prog in icecc-create-env
66447do
66448  # Extract the first word of "$ac_prog", so it can be a program name with args.
66449set dummy $ac_prog; ac_word=$2
66450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66451$as_echo_n "checking for $ac_word... " >&6; }
66452if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66453  $as_echo_n "(cached) " >&6
66454else
66455  case $ICECC_CREATE_ENV in
66456  [\\/]* | ?:[\\/]*)
66457  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66458  ;;
66459  *)
66460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66461for as_dir in $PATH
66462do
66463  IFS=$as_save_IFS
66464  test -z "$as_dir" && as_dir=.
66465    for ac_exec_ext in '' $ac_executable_extensions; do
66466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66467    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66469    break 2
66470  fi
66471done
66472  done
66473IFS=$as_save_IFS
66474
66475  ;;
66476esac
66477fi
66478ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66479if test -n "$ICECC_CREATE_ENV"; then
66480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66481$as_echo "$ICECC_CREATE_ENV" >&6; }
66482else
66483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66484$as_echo "no" >&6; }
66485fi
66486
66487
66488  test -n "$ICECC_CREATE_ENV" && break
66489done
66490
66491    else
66492      # If it succeeded, then it was overridden by the user. We will use it
66493      # for the tool.
66494
66495      # First remove it from the list of overridden variables, so we can test
66496      # for unknown variables in the end.
66497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66498
66499      # Check if we try to supply an empty value
66500      if test "x$ICECC_CREATE_ENV" = x; then
66501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66502$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66504$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66506$as_echo "disabled" >&6; }
66507      else
66508        # Check if the provided tool contains a complete path.
66509        tool_specified="$ICECC_CREATE_ENV"
66510        tool_basename="${tool_specified##*/}"
66511        if test "x$tool_basename" = "x$tool_specified"; then
66512          # A command without a complete path is provided, search $PATH.
66513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66514$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66515          # Extract the first word of "$tool_basename", so it can be a program name with args.
66516set dummy $tool_basename; ac_word=$2
66517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66518$as_echo_n "checking for $ac_word... " >&6; }
66519if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66520  $as_echo_n "(cached) " >&6
66521else
66522  case $ICECC_CREATE_ENV in
66523  [\\/]* | ?:[\\/]*)
66524  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66525  ;;
66526  *)
66527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66528for as_dir in $PATH
66529do
66530  IFS=$as_save_IFS
66531  test -z "$as_dir" && as_dir=.
66532    for ac_exec_ext in '' $ac_executable_extensions; do
66533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66534    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66536    break 2
66537  fi
66538done
66539  done
66540IFS=$as_save_IFS
66541
66542  ;;
66543esac
66544fi
66545ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66546if test -n "$ICECC_CREATE_ENV"; then
66547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66548$as_echo "$ICECC_CREATE_ENV" >&6; }
66549else
66550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66551$as_echo "no" >&6; }
66552fi
66553
66554
66555          if test "x$ICECC_CREATE_ENV" = x; then
66556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66557          fi
66558        else
66559          # Otherwise we believe it is a complete path. Use it as it is.
66560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66561$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66563$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66564          if test ! -x "$tool_specified"; then
66565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66566$as_echo "not found" >&6; }
66567            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66568          fi
66569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66570$as_echo "$tool_specified" >&6; }
66571        fi
66572      fi
66573    fi
66574
66575  fi
66576
66577
66578
66579  if test "x$ICECC_CREATE_ENV" = x; then
66580    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66581  fi
66582
66583
66584    # Use icecc-create-env to create a minimal compilation environment that can
66585    # be sent to the other hosts in the icecream cluster.
66586    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66587    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66588    # Older versions of icecc does not have the --gcc parameter
66589    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66590      icecc_gcc_arg="--gcc"
66591    fi
66592    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66593
66594  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66595      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66596          ${icecc_create_env_log} 2>&1 )
66597  if test "$?" != "0"; then
66598    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66599$as_echo "$as_me: icecc-create-env output:" >&6;}
66600    cat \
66601          ${icecc_create_env_log}
66602    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66603  fi
66604
66605    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66606      # For clang, the icecc compilerwrapper is needed. It usually resides next
66607      # to icecc-create-env.
66608
66609
66610
66611  # Publish this variable in the help.
66612
66613
66614  if [ -z "${ICECC_WRAPPER+x}" ]; then
66615    # The variable is not set by user, try to locate tool using the code snippet
66616    for ac_prog in compilerwrapper
66617do
66618  # Extract the first word of "$ac_prog", so it can be a program name with args.
66619set dummy $ac_prog; ac_word=$2
66620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66621$as_echo_n "checking for $ac_word... " >&6; }
66622if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66623  $as_echo_n "(cached) " >&6
66624else
66625  case $ICECC_WRAPPER in
66626  [\\/]* | ?:[\\/]*)
66627  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66628  ;;
66629  *)
66630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66631for as_dir in $PATH
66632do
66633  IFS=$as_save_IFS
66634  test -z "$as_dir" && as_dir=.
66635    for ac_exec_ext in '' $ac_executable_extensions; do
66636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66637    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66639    break 2
66640  fi
66641done
66642  done
66643IFS=$as_save_IFS
66644
66645  ;;
66646esac
66647fi
66648ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66649if test -n "$ICECC_WRAPPER"; then
66650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66651$as_echo "$ICECC_WRAPPER" >&6; }
66652else
66653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66654$as_echo "no" >&6; }
66655fi
66656
66657
66658  test -n "$ICECC_WRAPPER" && break
66659done
66660
66661  else
66662    # The variable is set, but is it from the command line or the environment?
66663
66664    # Try to remove the string !ICECC_WRAPPER! from our list.
66665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66667      # If it failed, the variable was not from the command line. Ignore it,
66668      # but warn the user (except for BASH, which is always set by the calling BASH).
66669      if test "xICECC_WRAPPER" != xBASH; then
66670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66671$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66672      fi
66673      # Try to locate tool using the code snippet
66674      for ac_prog in compilerwrapper
66675do
66676  # Extract the first word of "$ac_prog", so it can be a program name with args.
66677set dummy $ac_prog; ac_word=$2
66678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66679$as_echo_n "checking for $ac_word... " >&6; }
66680if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66681  $as_echo_n "(cached) " >&6
66682else
66683  case $ICECC_WRAPPER in
66684  [\\/]* | ?:[\\/]*)
66685  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66686  ;;
66687  *)
66688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66689for as_dir in $PATH
66690do
66691  IFS=$as_save_IFS
66692  test -z "$as_dir" && as_dir=.
66693    for ac_exec_ext in '' $ac_executable_extensions; do
66694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66695    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66697    break 2
66698  fi
66699done
66700  done
66701IFS=$as_save_IFS
66702
66703  ;;
66704esac
66705fi
66706ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66707if test -n "$ICECC_WRAPPER"; then
66708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66709$as_echo "$ICECC_WRAPPER" >&6; }
66710else
66711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66712$as_echo "no" >&6; }
66713fi
66714
66715
66716  test -n "$ICECC_WRAPPER" && break
66717done
66718
66719    else
66720      # If it succeeded, then it was overridden by the user. We will use it
66721      # for the tool.
66722
66723      # First remove it from the list of overridden variables, so we can test
66724      # for unknown variables in the end.
66725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66726
66727      # Check if we try to supply an empty value
66728      if test "x$ICECC_WRAPPER" = x; then
66729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66730$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66732$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66734$as_echo "disabled" >&6; }
66735      else
66736        # Check if the provided tool contains a complete path.
66737        tool_specified="$ICECC_WRAPPER"
66738        tool_basename="${tool_specified##*/}"
66739        if test "x$tool_basename" = "x$tool_specified"; then
66740          # A command without a complete path is provided, search $PATH.
66741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66742$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66743          # Extract the first word of "$tool_basename", so it can be a program name with args.
66744set dummy $tool_basename; ac_word=$2
66745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66746$as_echo_n "checking for $ac_word... " >&6; }
66747if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66748  $as_echo_n "(cached) " >&6
66749else
66750  case $ICECC_WRAPPER in
66751  [\\/]* | ?:[\\/]*)
66752  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66753  ;;
66754  *)
66755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66756for as_dir in $PATH
66757do
66758  IFS=$as_save_IFS
66759  test -z "$as_dir" && as_dir=.
66760    for ac_exec_ext in '' $ac_executable_extensions; do
66761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66762    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66764    break 2
66765  fi
66766done
66767  done
66768IFS=$as_save_IFS
66769
66770  ;;
66771esac
66772fi
66773ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66774if test -n "$ICECC_WRAPPER"; then
66775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66776$as_echo "$ICECC_WRAPPER" >&6; }
66777else
66778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66779$as_echo "no" >&6; }
66780fi
66781
66782
66783          if test "x$ICECC_WRAPPER" = x; then
66784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66785          fi
66786        else
66787          # Otherwise we believe it is a complete path. Use it as it is.
66788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66789$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66791$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66792          if test ! -x "$tool_specified"; then
66793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66794$as_echo "not found" >&6; }
66795            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66796          fi
66797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66798$as_echo "$tool_specified" >&6; }
66799        fi
66800      fi
66801    fi
66802
66803  fi
66804
66805
66806
66807  if test "x$ICECC_WRAPPER" = x; then
66808    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66809  fi
66810
66811
66812
66813  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66814      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66815  if test "$?" != "0"; then
66816    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66817$as_echo "$as_me: icecc-create-env output:" >&6;}
66818    cat ${icecc_create_env_log}
66819    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66820  fi
66821
66822    else
66823      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66824    fi
66825    PATH="$old_path"
66826    # The bundle with the compiler gets a name based on checksums. Parse log file
66827    # to find it.
66828    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66829    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66830    if test ! -f ${ICECC_ENV_BUNDLE}; then
66831      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66832    fi
66833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66834$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66836$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66837    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66838
66839    if test "x${COMPILE_TYPE}" = "xcross"; then
66840      # If cross compiling, create a separate env package for the build compiler
66841      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66842      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66843      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66844
66845  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66846      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66847            ${icecc_create_env_log_build} 2>&1 )
66848  if test "$?" != "0"; then
66849    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66850$as_echo "$as_me: icecc-create-env output:" >&6;}
66851    cat \
66852            ${icecc_create_env_log_build}
66853    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66854  fi
66855
66856      elif test "x${BUILD_CC##*/}" = "xclang"; then
66857
66858  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66859      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66860  if test "$?" != "0"; then
66861    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66862$as_echo "$as_me: icecc-create-env output:" >&6;}
66863    cat ${icecc_create_env_log_build}
66864    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66865  fi
66866
66867      else
66868        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66869      fi
66870      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66871      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66872      if test ! -f ${ICECC_ENV_BUNDLE}; then
66873        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66874      fi
66875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66876$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66878$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66879      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66880          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66881    else
66882      BUILD_ICECC="${ICECC}"
66883    fi
66884
66885
66886  fi
66887
66888
66889# Can the C/C++ compiler use precompiled headers?
66890
66891
66892  ###############################################################################
66893  #
66894  # Can the C/C++ compiler use precompiled headers?
66895  #
66896  # Check whether --enable-precompiled-headers was given.
66897if test "${enable_precompiled_headers+set}" = set; then :
66898  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66899else
66900  ENABLE_PRECOMPH=yes
66901fi
66902
66903
66904  USE_PRECOMPILED_HEADER=true
66905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66906$as_echo_n "checking If precompiled header is enabled... " >&6; }
66907  if test "x$ENABLE_PRECOMPH" = xno; then
66908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66909$as_echo "no, forced" >&6; }
66910    USE_PRECOMPILED_HEADER=false
66911  elif test "x$ICECC" != "x"; then
66912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66913$as_echo "no, does not work effectively with icecc" >&6; }
66914    USE_PRECOMPILED_HEADER=false
66915  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66917$as_echo "no, does not work with Solaris Studio" >&6; }
66918    USE_PRECOMPILED_HEADER=false
66919  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66921$as_echo "no, does not work with xlc" >&6; }
66922    USE_PRECOMPILED_HEADER=false
66923  else
66924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66925$as_echo "yes" >&6; }
66926  fi
66927
66928  if test "x$ENABLE_PRECOMPH" = xyes; then
66929    # Check that the compiler actually supports precomp headers.
66930    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66932$as_echo_n "checking that precompiled headers work... " >&6; }
66933      echo "int alfa();" > conftest.h
66934      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66935      if test ! -f conftest.hpp.gch; then
66936        USE_PRECOMPILED_HEADER=false
66937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66938$as_echo "no" >&6; }
66939      else
66940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66941$as_echo "yes" >&6; }
66942      fi
66943      $RM conftest.h conftest.hpp.gch
66944    fi
66945  fi
66946
66947
66948
66949
66950# Setup use of ccache, if available
66951
66952  # Check whether --enable-ccache was given.
66953if test "${enable_ccache+set}" = set; then :
66954  enableval=$enable_ccache;
66955fi
66956
66957
66958  CCACHE_STATUS=
66959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66960$as_echo_n "checking is ccache enabled... " >&6; }
66961  if test "x$enable_ccache" = xyes; then
66962    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66964$as_echo "yes" >&6; }
66965      OLD_PATH="$PATH"
66966      if test "x$TOOLCHAIN_PATH" != x; then
66967        PATH=$TOOLCHAIN_PATH:$PATH
66968      fi
66969
66970
66971
66972  # Publish this variable in the help.
66973
66974
66975  if [ -z "${CCACHE+x}" ]; then
66976    # The variable is not set by user, try to locate tool using the code snippet
66977    for ac_prog in ccache
66978do
66979  # Extract the first word of "$ac_prog", so it can be a program name with args.
66980set dummy $ac_prog; ac_word=$2
66981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66982$as_echo_n "checking for $ac_word... " >&6; }
66983if ${ac_cv_path_CCACHE+:} false; then :
66984  $as_echo_n "(cached) " >&6
66985else
66986  case $CCACHE in
66987  [\\/]* | ?:[\\/]*)
66988  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66989  ;;
66990  *)
66991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66992for as_dir in $PATH
66993do
66994  IFS=$as_save_IFS
66995  test -z "$as_dir" && as_dir=.
66996    for ac_exec_ext in '' $ac_executable_extensions; do
66997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66998    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67000    break 2
67001  fi
67002done
67003  done
67004IFS=$as_save_IFS
67005
67006  ;;
67007esac
67008fi
67009CCACHE=$ac_cv_path_CCACHE
67010if test -n "$CCACHE"; then
67011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67012$as_echo "$CCACHE" >&6; }
67013else
67014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67015$as_echo "no" >&6; }
67016fi
67017
67018
67019  test -n "$CCACHE" && break
67020done
67021
67022  else
67023    # The variable is set, but is it from the command line or the environment?
67024
67025    # Try to remove the string !CCACHE! from our list.
67026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67028      # If it failed, the variable was not from the command line. Ignore it,
67029      # but warn the user (except for BASH, which is always set by the calling BASH).
67030      if test "xCCACHE" != xBASH; then
67031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67032$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67033      fi
67034      # Try to locate tool using the code snippet
67035      for ac_prog in ccache
67036do
67037  # Extract the first word of "$ac_prog", so it can be a program name with args.
67038set dummy $ac_prog; ac_word=$2
67039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67040$as_echo_n "checking for $ac_word... " >&6; }
67041if ${ac_cv_path_CCACHE+:} false; then :
67042  $as_echo_n "(cached) " >&6
67043else
67044  case $CCACHE in
67045  [\\/]* | ?:[\\/]*)
67046  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67047  ;;
67048  *)
67049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67050for as_dir in $PATH
67051do
67052  IFS=$as_save_IFS
67053  test -z "$as_dir" && as_dir=.
67054    for ac_exec_ext in '' $ac_executable_extensions; do
67055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67056    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67058    break 2
67059  fi
67060done
67061  done
67062IFS=$as_save_IFS
67063
67064  ;;
67065esac
67066fi
67067CCACHE=$ac_cv_path_CCACHE
67068if test -n "$CCACHE"; then
67069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67070$as_echo "$CCACHE" >&6; }
67071else
67072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67073$as_echo "no" >&6; }
67074fi
67075
67076
67077  test -n "$CCACHE" && break
67078done
67079
67080    else
67081      # If it succeeded, then it was overridden by the user. We will use it
67082      # for the tool.
67083
67084      # First remove it from the list of overridden variables, so we can test
67085      # for unknown variables in the end.
67086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67087
67088      # Check if we try to supply an empty value
67089      if test "x$CCACHE" = x; then
67090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67091$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67093$as_echo_n "checking for CCACHE... " >&6; }
67094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67095$as_echo "disabled" >&6; }
67096      else
67097        # Check if the provided tool contains a complete path.
67098        tool_specified="$CCACHE"
67099        tool_basename="${tool_specified##*/}"
67100        if test "x$tool_basename" = "x$tool_specified"; then
67101          # A command without a complete path is provided, search $PATH.
67102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67103$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67104          # Extract the first word of "$tool_basename", so it can be a program name with args.
67105set dummy $tool_basename; ac_word=$2
67106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67107$as_echo_n "checking for $ac_word... " >&6; }
67108if ${ac_cv_path_CCACHE+:} false; then :
67109  $as_echo_n "(cached) " >&6
67110else
67111  case $CCACHE in
67112  [\\/]* | ?:[\\/]*)
67113  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67114  ;;
67115  *)
67116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67117for as_dir in $PATH
67118do
67119  IFS=$as_save_IFS
67120  test -z "$as_dir" && as_dir=.
67121    for ac_exec_ext in '' $ac_executable_extensions; do
67122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67123    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67125    break 2
67126  fi
67127done
67128  done
67129IFS=$as_save_IFS
67130
67131  ;;
67132esac
67133fi
67134CCACHE=$ac_cv_path_CCACHE
67135if test -n "$CCACHE"; then
67136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67137$as_echo "$CCACHE" >&6; }
67138else
67139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67140$as_echo "no" >&6; }
67141fi
67142
67143
67144          if test "x$CCACHE" = x; then
67145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67146          fi
67147        else
67148          # Otherwise we believe it is a complete path. Use it as it is.
67149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67150$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67152$as_echo_n "checking for CCACHE... " >&6; }
67153          if test ! -x "$tool_specified"; then
67154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67155$as_echo "not found" >&6; }
67156            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67157          fi
67158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67159$as_echo "$tool_specified" >&6; }
67160        fi
67161      fi
67162    fi
67163
67164  fi
67165
67166
67167
67168  if test "x$CCACHE" = x; then
67169    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67170  fi
67171
67172
67173      PATH="$OLD_PATH"
67174      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67175      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67176    else
67177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67178$as_echo "no" >&6; }
67179      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67180$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67181    fi
67182  elif test "x$enable_ccache" = xno; then
67183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67184$as_echo "no, explicitly disabled" >&6; }
67185    CCACHE_STATUS="Disabled"
67186  elif test "x$enable_ccache" = x; then
67187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67188$as_echo "no" >&6; }
67189  else
67190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67191$as_echo "unknown" >&6; }
67192    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67193  fi
67194
67195
67196
67197# Check whether --with-ccache-dir was given.
67198if test "${with_ccache_dir+set}" = set; then :
67199  withval=$with_ccache_dir;
67200fi
67201
67202
67203  if test "x$with_ccache_dir" != x; then
67204    # When using a non home ccache directory, assume the use is to share ccache files
67205    # with other users. Thus change the umask.
67206    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67207    if test "x$CCACHE" = x; then
67208      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67209$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67210    fi
67211  fi
67212
67213  if test "x$CCACHE" != x; then
67214
67215  if test "x$CCACHE" != x; then
67216    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67217      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67218          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67219      if test "x$HAS_BAD_CCACHE" != "x"; then
67220        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67221      fi
67222    fi
67223    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67224      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67225          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67226      if test "x$HAS_BAD_CCACHE" != "x"; then
67227        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67228      fi
67229      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67230$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67231      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67232      PUSHED_FLAGS="$CXXFLAGS"
67233      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67234      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67235/* end confdefs.h.  */
67236
67237int
67238main ()
67239{
67240
67241  ;
67242  return 0;
67243}
67244_ACEOF
67245if ac_fn_cxx_try_compile "$LINENO"; then :
67246  CC_KNOWS_CCACHE_TRICK=yes
67247else
67248  CC_KNOWS_CCACHE_TRICK=no
67249fi
67250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67251      CXXFLAGS="$PUSHED_FLAGS"
67252      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67254$as_echo "yes" >&6; }
67255        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67256
67257        CCACHE_SLOPPINESS=pch_defines,time_macros
67258      else
67259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67260$as_echo "no" >&6; }
67261        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67262      fi
67263    fi
67264
67265    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67266        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67267
67268    if test "x$SET_CCACHE_DIR" != x; then
67269      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67270      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67271    fi
67272  fi
67273
67274  fi
67275
67276
67277###############################################################################
67278#
67279# And now the finish...
67280#
67281###############################################################################
67282
67283# Check for some common pitfalls
67284
67285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67286    file_to_test="$SRC_ROOT/LICENSE"
67287    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67288      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
67289    fi
67290  fi
67291
67292
67293  # Did user specify any unknown variables?
67294
67295  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67296    # Replace the separating ! with spaces before presenting for end user.
67297    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67298    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67299$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67300  fi
67301
67302
67303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67304$as_echo_n "checking if build directory is on local disk... " >&6; }
67305
67306  # df -l lists only local disks; if the given directory is not found then
67307  # a non-zero exit code is given
67308  if test "x$DF" = x; then
67309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67310      # msys does not have df; use Windows "net use" instead.
67311      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67312      if test "x$IS_NETWORK_DISK" = x; then
67313        OUTPUT_DIR_IS_LOCAL="yes"
67314      else
67315        OUTPUT_DIR_IS_LOCAL="no"
67316      fi
67317    else
67318      # No df here, say it's local
67319      OUTPUT_DIR_IS_LOCAL="yes"
67320    fi
67321  else
67322    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67323      OUTPUT_DIR_IS_LOCAL="yes"
67324    else
67325      OUTPUT_DIR_IS_LOCAL="no"
67326    fi
67327  fi
67328
67329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67330$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67331
67332
67333
67334  # Check if the user has any old-style ALT_ variables set.
67335  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67336
67337  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67338  # Since we can't properly handle the dependencies for this, warn the user about the situation
67339  if test -e $OUTPUT_ROOT/spec.gmk; then
67340    IS_RECONFIGURE=yes
67341  else
67342    IS_RECONFIGURE=no
67343  fi
67344
67345
67346# At the end, call the custom hook. (Dummy macro if no custom sources available)
67347
67348
67349# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67350
67351  # Keep feature lists sorted and free of duplicates
67352  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67353  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67354  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67355  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67356  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67357  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67358  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67359
67360  # Validate features
67361  for variant in $JVM_VARIANTS; do
67362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67363$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67364    features_var_name=JVM_FEATURES_$variant
67365    JVM_FEATURES_TO_TEST=${!features_var_name}
67366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67367$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67368    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67369    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67370    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67371    if test "x$INVALID_FEATURES" != x; then
67372      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67373    fi
67374  done
67375
67376
67377# We're messing a bit with internal autoconf variables to put the config.status
67378# in the output directory instead of the current directory.
67379CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67380
67381# Create the actual output files. Now the main work of configure is done.
67382cat >confcache <<\_ACEOF
67383# This file is a shell script that caches the results of configure
67384# tests run on this system so they can be shared between configure
67385# scripts and configure runs, see configure's option --config-cache.
67386# It is not useful on other systems.  If it contains results you don't
67387# want to keep, you may remove or edit it.
67388#
67389# config.status only pays attention to the cache file if you give it
67390# the --recheck option to rerun configure.
67391#
67392# `ac_cv_env_foo' variables (set or unset) will be overridden when
67393# loading this file, other *unset* `ac_cv_foo' will be assigned the
67394# following values.
67395
67396_ACEOF
67397
67398# The following way of writing the cache mishandles newlines in values,
67399# but we know of no workaround that is simple, portable, and efficient.
67400# So, we kill variables containing newlines.
67401# Ultrix sh set writes to stderr and can't be redirected directly,
67402# and sets the high bit in the cache file unless we assign to the vars.
67403(
67404  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67405    eval ac_val=\$$ac_var
67406    case $ac_val in #(
67407    *${as_nl}*)
67408      case $ac_var in #(
67409      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67410$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67411      esac
67412      case $ac_var in #(
67413      _ | IFS | as_nl) ;; #(
67414      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67415      *) { eval $ac_var=; unset $ac_var;} ;;
67416      esac ;;
67417    esac
67418  done
67419
67420  (set) 2>&1 |
67421    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67422    *${as_nl}ac_space=\ *)
67423      # `set' does not quote correctly, so add quotes: double-quote
67424      # substitution turns \\\\ into \\, and sed turns \\ into \.
67425      sed -n \
67426	"s/'/'\\\\''/g;
67427	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67428      ;; #(
67429    *)
67430      # `set' quotes correctly as required by POSIX, so do not add quotes.
67431      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67432      ;;
67433    esac |
67434    sort
67435) |
67436  sed '
67437     /^ac_cv_env_/b end
67438     t clear
67439     :clear
67440     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67441     t end
67442     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67443     :end' >>confcache
67444if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67445  if test -w "$cache_file"; then
67446    if test "x$cache_file" != "x/dev/null"; then
67447      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67448$as_echo "$as_me: updating cache $cache_file" >&6;}
67449      if test ! -f "$cache_file" || test -h "$cache_file"; then
67450	cat confcache >"$cache_file"
67451      else
67452        case $cache_file in #(
67453        */* | ?:*)
67454	  mv -f confcache "$cache_file"$$ &&
67455	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67456        *)
67457	  mv -f confcache "$cache_file" ;;
67458	esac
67459      fi
67460    fi
67461  else
67462    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67463$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67464  fi
67465fi
67466rm -f confcache
67467
67468test "x$prefix" = xNONE && prefix=$ac_default_prefix
67469# Let make expand exec_prefix.
67470test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67471
67472# Transform confdefs.h into DEFS.
67473# Protect against shell expansion while executing Makefile rules.
67474# Protect against Makefile macro expansion.
67475#
67476# If the first sed substitution is executed (which looks for macros that
67477# take arguments), then branch to the quote section.  Otherwise,
67478# look for a macro that doesn't take arguments.
67479ac_script='
67480:mline
67481/\\$/{
67482 N
67483 s,\\\n,,
67484 b mline
67485}
67486t clear
67487:clear
67488s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67489t quote
67490s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67491t quote
67492b any
67493:quote
67494s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67495s/\[/\\&/g
67496s/\]/\\&/g
67497s/\$/$$/g
67498H
67499:any
67500${
67501	g
67502	s/^\n//
67503	s/\n/ /g
67504	p
67505}
67506'
67507DEFS=`sed -n "$ac_script" confdefs.h`
67508
67509
67510ac_libobjs=
67511ac_ltlibobjs=
67512U=
67513for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67514  # 1. Remove the extension, and $U if already installed.
67515  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67516  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67517  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67518  #    will be set to the directory where LIBOBJS objects are built.
67519  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67520  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67521done
67522LIBOBJS=$ac_libobjs
67523
67524LTLIBOBJS=$ac_ltlibobjs
67525
67526
67527
67528: "${CONFIG_STATUS=./config.status}"
67529ac_write_fail=0
67530ac_clean_files_save=$ac_clean_files
67531ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67532{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67533$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67534as_write_fail=0
67535cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67536#! $SHELL
67537# Generated by $as_me.
67538# Run this file to recreate the current configuration.
67539# Compiler output produced by configure, useful for debugging
67540# configure, is in config.log if it exists.
67541
67542debug=false
67543ac_cs_recheck=false
67544ac_cs_silent=false
67545
67546SHELL=\${CONFIG_SHELL-$SHELL}
67547export SHELL
67548_ASEOF
67549cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67550## -------------------- ##
67551## M4sh Initialization. ##
67552## -------------------- ##
67553
67554# Be more Bourne compatible
67555DUALCASE=1; export DUALCASE # for MKS sh
67556if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67557  emulate sh
67558  NULLCMD=:
67559  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67560  # is contrary to our usage.  Disable this feature.
67561  alias -g '${1+"$@"}'='"$@"'
67562  setopt NO_GLOB_SUBST
67563else
67564  case `(set -o) 2>/dev/null` in #(
67565  *posix*) :
67566    set -o posix ;; #(
67567  *) :
67568     ;;
67569esac
67570fi
67571
67572
67573as_nl='
67574'
67575export as_nl
67576# Printing a long string crashes Solaris 7 /usr/bin/printf.
67577as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67578as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67579as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67580# Prefer a ksh shell builtin over an external printf program on Solaris,
67581# but without wasting forks for bash or zsh.
67582if test -z "$BASH_VERSION$ZSH_VERSION" \
67583    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67584  as_echo='print -r --'
67585  as_echo_n='print -rn --'
67586elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67587  as_echo='printf %s\n'
67588  as_echo_n='printf %s'
67589else
67590  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67591    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67592    as_echo_n='/usr/ucb/echo -n'
67593  else
67594    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67595    as_echo_n_body='eval
67596      arg=$1;
67597      case $arg in #(
67598      *"$as_nl"*)
67599	expr "X$arg" : "X\\(.*\\)$as_nl";
67600	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67601      esac;
67602      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67603    '
67604    export as_echo_n_body
67605    as_echo_n='sh -c $as_echo_n_body as_echo'
67606  fi
67607  export as_echo_body
67608  as_echo='sh -c $as_echo_body as_echo'
67609fi
67610
67611# The user is always right.
67612if test "${PATH_SEPARATOR+set}" != set; then
67613  PATH_SEPARATOR=:
67614  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67615    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67616      PATH_SEPARATOR=';'
67617  }
67618fi
67619
67620
67621# IFS
67622# We need space, tab and new line, in precisely that order.  Quoting is
67623# there to prevent editors from complaining about space-tab.
67624# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67625# splitting by setting IFS to empty value.)
67626IFS=" ""	$as_nl"
67627
67628# Find who we are.  Look in the path if we contain no directory separator.
67629as_myself=
67630case $0 in #((
67631  *[\\/]* ) as_myself=$0 ;;
67632  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67633for as_dir in $PATH
67634do
67635  IFS=$as_save_IFS
67636  test -z "$as_dir" && as_dir=.
67637    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67638  done
67639IFS=$as_save_IFS
67640
67641     ;;
67642esac
67643# We did not find ourselves, most probably we were run as `sh COMMAND'
67644# in which case we are not to be found in the path.
67645if test "x$as_myself" = x; then
67646  as_myself=$0
67647fi
67648if test ! -f "$as_myself"; then
67649  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67650  exit 1
67651fi
67652
67653# Unset variables that we do not need and which cause bugs (e.g. in
67654# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67655# suppresses any "Segmentation fault" message there.  '((' could
67656# trigger a bug in pdksh 5.2.14.
67657for as_var in BASH_ENV ENV MAIL MAILPATH
67658do eval test x\${$as_var+set} = xset \
67659  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67660done
67661PS1='$ '
67662PS2='> '
67663PS4='+ '
67664
67665# NLS nuisances.
67666LC_ALL=C
67667export LC_ALL
67668LANGUAGE=C
67669export LANGUAGE
67670
67671# CDPATH.
67672(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67673
67674
67675# as_fn_error STATUS ERROR [LINENO LOG_FD]
67676# ----------------------------------------
67677# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67678# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67679# script with STATUS, using 1 if that was 0.
67680as_fn_error ()
67681{
67682  as_status=$1; test $as_status -eq 0 && as_status=1
67683  if test "$4"; then
67684    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67685    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67686  fi
67687  $as_echo "$as_me: error: $2" >&2
67688  as_fn_exit $as_status
67689} # as_fn_error
67690
67691
67692# as_fn_set_status STATUS
67693# -----------------------
67694# Set $? to STATUS, without forking.
67695as_fn_set_status ()
67696{
67697  return $1
67698} # as_fn_set_status
67699
67700# as_fn_exit STATUS
67701# -----------------
67702# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67703as_fn_exit ()
67704{
67705  set +e
67706  as_fn_set_status $1
67707  exit $1
67708} # as_fn_exit
67709
67710# as_fn_unset VAR
67711# ---------------
67712# Portably unset VAR.
67713as_fn_unset ()
67714{
67715  { eval $1=; unset $1;}
67716}
67717as_unset=as_fn_unset
67718# as_fn_append VAR VALUE
67719# ----------------------
67720# Append the text in VALUE to the end of the definition contained in VAR. Take
67721# advantage of any shell optimizations that allow amortized linear growth over
67722# repeated appends, instead of the typical quadratic growth present in naive
67723# implementations.
67724if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67725  eval 'as_fn_append ()
67726  {
67727    eval $1+=\$2
67728  }'
67729else
67730  as_fn_append ()
67731  {
67732    eval $1=\$$1\$2
67733  }
67734fi # as_fn_append
67735
67736# as_fn_arith ARG...
67737# ------------------
67738# Perform arithmetic evaluation on the ARGs, and store the result in the
67739# global $as_val. Take advantage of shells that can avoid forks. The arguments
67740# must be portable across $(()) and expr.
67741if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67742  eval 'as_fn_arith ()
67743  {
67744    as_val=$(( $* ))
67745  }'
67746else
67747  as_fn_arith ()
67748  {
67749    as_val=`expr "$@" || test $? -eq 1`
67750  }
67751fi # as_fn_arith
67752
67753
67754if expr a : '\(a\)' >/dev/null 2>&1 &&
67755   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67756  as_expr=expr
67757else
67758  as_expr=false
67759fi
67760
67761if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67762  as_basename=basename
67763else
67764  as_basename=false
67765fi
67766
67767if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67768  as_dirname=dirname
67769else
67770  as_dirname=false
67771fi
67772
67773as_me=`$as_basename -- "$0" ||
67774$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67775	 X"$0" : 'X\(//\)$' \| \
67776	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67777$as_echo X/"$0" |
67778    sed '/^.*\/\([^/][^/]*\)\/*$/{
67779	    s//\1/
67780	    q
67781	  }
67782	  /^X\/\(\/\/\)$/{
67783	    s//\1/
67784	    q
67785	  }
67786	  /^X\/\(\/\).*/{
67787	    s//\1/
67788	    q
67789	  }
67790	  s/.*/./; q'`
67791
67792# Avoid depending upon Character Ranges.
67793as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67794as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67795as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67796as_cr_digits='0123456789'
67797as_cr_alnum=$as_cr_Letters$as_cr_digits
67798
67799ECHO_C= ECHO_N= ECHO_T=
67800case `echo -n x` in #(((((
67801-n*)
67802  case `echo 'xy\c'` in
67803  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67804  xy)  ECHO_C='\c';;
67805  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67806       ECHO_T='	';;
67807  esac;;
67808*)
67809  ECHO_N='-n';;
67810esac
67811
67812rm -f conf$$ conf$$.exe conf$$.file
67813if test -d conf$$.dir; then
67814  rm -f conf$$.dir/conf$$.file
67815else
67816  rm -f conf$$.dir
67817  mkdir conf$$.dir 2>/dev/null
67818fi
67819if (echo >conf$$.file) 2>/dev/null; then
67820  if ln -s conf$$.file conf$$ 2>/dev/null; then
67821    as_ln_s='ln -s'
67822    # ... but there are two gotchas:
67823    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67824    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67825    # In both cases, we have to default to `cp -pR'.
67826    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67827      as_ln_s='cp -pR'
67828  elif ln conf$$.file conf$$ 2>/dev/null; then
67829    as_ln_s=ln
67830  else
67831    as_ln_s='cp -pR'
67832  fi
67833else
67834  as_ln_s='cp -pR'
67835fi
67836rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67837rmdir conf$$.dir 2>/dev/null
67838
67839
67840# as_fn_mkdir_p
67841# -------------
67842# Create "$as_dir" as a directory, including parents if necessary.
67843as_fn_mkdir_p ()
67844{
67845
67846  case $as_dir in #(
67847  -*) as_dir=./$as_dir;;
67848  esac
67849  test -d "$as_dir" || eval $as_mkdir_p || {
67850    as_dirs=
67851    while :; do
67852      case $as_dir in #(
67853      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67854      *) as_qdir=$as_dir;;
67855      esac
67856      as_dirs="'$as_qdir' $as_dirs"
67857      as_dir=`$as_dirname -- "$as_dir" ||
67858$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67859	 X"$as_dir" : 'X\(//\)[^/]' \| \
67860	 X"$as_dir" : 'X\(//\)$' \| \
67861	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67862$as_echo X"$as_dir" |
67863    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67864	    s//\1/
67865	    q
67866	  }
67867	  /^X\(\/\/\)[^/].*/{
67868	    s//\1/
67869	    q
67870	  }
67871	  /^X\(\/\/\)$/{
67872	    s//\1/
67873	    q
67874	  }
67875	  /^X\(\/\).*/{
67876	    s//\1/
67877	    q
67878	  }
67879	  s/.*/./; q'`
67880      test -d "$as_dir" && break
67881    done
67882    test -z "$as_dirs" || eval "mkdir $as_dirs"
67883  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67884
67885
67886} # as_fn_mkdir_p
67887if mkdir -p . 2>/dev/null; then
67888  as_mkdir_p='mkdir -p "$as_dir"'
67889else
67890  test -d ./-p && rmdir ./-p
67891  as_mkdir_p=false
67892fi
67893
67894
67895# as_fn_executable_p FILE
67896# -----------------------
67897# Test if FILE is an executable regular file.
67898as_fn_executable_p ()
67899{
67900  test -f "$1" && test -x "$1"
67901} # as_fn_executable_p
67902as_test_x='test -x'
67903as_executable_p=as_fn_executable_p
67904
67905# Sed expression to map a string onto a valid CPP name.
67906as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67907
67908# Sed expression to map a string onto a valid variable name.
67909as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67910
67911
67912exec 6>&1
67913## ----------------------------------- ##
67914## Main body of $CONFIG_STATUS script. ##
67915## ----------------------------------- ##
67916_ASEOF
67917test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67918
67919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67920# Save the log message, to keep $0 and so on meaningful, and to
67921# report actual input values of CONFIG_FILES etc. instead of their
67922# values after options handling.
67923ac_log="
67924This file was extended by OpenJDK $as_me jdk9, which was
67925generated by GNU Autoconf 2.69.  Invocation command line was
67926
67927  CONFIG_FILES    = $CONFIG_FILES
67928  CONFIG_HEADERS  = $CONFIG_HEADERS
67929  CONFIG_LINKS    = $CONFIG_LINKS
67930  CONFIG_COMMANDS = $CONFIG_COMMANDS
67931  $ $0 $@
67932
67933on `(hostname || uname -n) 2>/dev/null | sed 1q`
67934"
67935
67936_ACEOF
67937
67938case $ac_config_files in *"
67939"*) set x $ac_config_files; shift; ac_config_files=$*;;
67940esac
67941
67942
67943
67944cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67945# Files that config.status was made for.
67946config_files="$ac_config_files"
67947
67948_ACEOF
67949
67950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67951ac_cs_usage="\
67952\`$as_me' instantiates files and other configuration actions
67953from templates according to the current configuration.  Unless the files
67954and actions are specified as TAGs, all are instantiated by default.
67955
67956Usage: $0 [OPTION]... [TAG]...
67957
67958  -h, --help       print this help, then exit
67959  -V, --version    print version number and configuration settings, then exit
67960      --config     print configuration, then exit
67961  -q, --quiet, --silent
67962                   do not print progress messages
67963  -d, --debug      don't remove temporary files
67964      --recheck    update $as_me by reconfiguring in the same conditions
67965      --file=FILE[:TEMPLATE]
67966                   instantiate the configuration file FILE
67967
67968Configuration files:
67969$config_files
67970
67971Report bugs to <build-dev@openjdk.java.net>.
67972OpenJDK home page: <http://openjdk.java.net>."
67973
67974_ACEOF
67975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67976ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67977ac_cs_version="\\
67978OpenJDK config.status jdk9
67979configured by $0, generated by GNU Autoconf 2.69,
67980  with options \\"\$ac_cs_config\\"
67981
67982Copyright (C) 2012 Free Software Foundation, Inc.
67983This config.status script is free software; the Free Software Foundation
67984gives unlimited permission to copy, distribute and modify it."
67985
67986ac_pwd='$ac_pwd'
67987srcdir='$srcdir'
67988AWK='$AWK'
67989test -n "\$AWK" || AWK=awk
67990_ACEOF
67991
67992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67993# The default lists apply if the user does not specify any file.
67994ac_need_defaults=:
67995while test $# != 0
67996do
67997  case $1 in
67998  --*=?*)
67999    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68000    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68001    ac_shift=:
68002    ;;
68003  --*=)
68004    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68005    ac_optarg=
68006    ac_shift=:
68007    ;;
68008  *)
68009    ac_option=$1
68010    ac_optarg=$2
68011    ac_shift=shift
68012    ;;
68013  esac
68014
68015  case $ac_option in
68016  # Handling of the options.
68017  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68018    ac_cs_recheck=: ;;
68019  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68020    $as_echo "$ac_cs_version"; exit ;;
68021  --config | --confi | --conf | --con | --co | --c )
68022    $as_echo "$ac_cs_config"; exit ;;
68023  --debug | --debu | --deb | --de | --d | -d )
68024    debug=: ;;
68025  --file | --fil | --fi | --f )
68026    $ac_shift
68027    case $ac_optarg in
68028    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68029    '') as_fn_error $? "missing file argument" ;;
68030    esac
68031    as_fn_append CONFIG_FILES " '$ac_optarg'"
68032    ac_need_defaults=false;;
68033  --he | --h |  --help | --hel | -h )
68034    $as_echo "$ac_cs_usage"; exit ;;
68035  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68036  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68037    ac_cs_silent=: ;;
68038
68039  # This is an error.
68040  -*) as_fn_error $? "unrecognized option: \`$1'
68041Try \`$0 --help' for more information." ;;
68042
68043  *) as_fn_append ac_config_targets " $1"
68044     ac_need_defaults=false ;;
68045
68046  esac
68047  shift
68048done
68049
68050ac_configure_extra_args=
68051
68052if $ac_cs_silent; then
68053  exec 6>/dev/null
68054  ac_configure_extra_args="$ac_configure_extra_args --silent"
68055fi
68056
68057_ACEOF
68058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68059if \$ac_cs_recheck; then
68060  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68061  shift
68062  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68063  CONFIG_SHELL='$SHELL'
68064  export CONFIG_SHELL
68065  exec "\$@"
68066fi
68067
68068_ACEOF
68069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68070exec 5>>config.log
68071{
68072  echo
68073  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68074## Running $as_me. ##
68075_ASBOX
68076  $as_echo "$ac_log"
68077} >&5
68078
68079_ACEOF
68080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68081_ACEOF
68082
68083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68084
68085# Handling of arguments.
68086for ac_config_target in $ac_config_targets
68087do
68088  case $ac_config_target in
68089    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68090    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68091    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68092    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68093    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68094
68095  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68096  esac
68097done
68098
68099
68100# If the user did not use the arguments to specify the items to instantiate,
68101# then the envvar interface is used.  Set only those that are not.
68102# We use the long form for the default assignment because of an extremely
68103# bizarre bug on SunOS 4.1.3.
68104if $ac_need_defaults; then
68105  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68106fi
68107
68108# Have a temporary directory for convenience.  Make it in the build tree
68109# simply because there is no reason against having it here, and in addition,
68110# creating and moving files from /tmp can sometimes cause problems.
68111# Hook for its removal unless debugging.
68112# Note that there is a small window in which the directory will not be cleaned:
68113# after its creation but before its name has been assigned to `$tmp'.
68114$debug ||
68115{
68116  tmp= ac_tmp=
68117  trap 'exit_status=$?
68118  : "${ac_tmp:=$tmp}"
68119  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68120' 0
68121  trap 'as_fn_exit 1' 1 2 13 15
68122}
68123# Create a (secure) tmp directory for tmp files.
68124
68125{
68126  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68127  test -d "$tmp"
68128}  ||
68129{
68130  tmp=./conf$$-$RANDOM
68131  (umask 077 && mkdir "$tmp")
68132} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68133ac_tmp=$tmp
68134
68135# Set up the scripts for CONFIG_FILES section.
68136# No need to generate them if there are no CONFIG_FILES.
68137# This happens for instance with `./config.status config.h'.
68138if test -n "$CONFIG_FILES"; then
68139
68140
68141ac_cr=`echo X | tr X '\015'`
68142# On cygwin, bash can eat \r inside `` if the user requested igncr.
68143# But we know of no other shell where ac_cr would be empty at this
68144# point, so we can use a bashism as a fallback.
68145if test "x$ac_cr" = x; then
68146  eval ac_cr=\$\'\\r\'
68147fi
68148ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68149if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68150  ac_cs_awk_cr='\\r'
68151else
68152  ac_cs_awk_cr=$ac_cr
68153fi
68154
68155echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68156_ACEOF
68157
68158
68159{
68160  echo "cat >conf$$subs.awk <<_ACEOF" &&
68161  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68162  echo "_ACEOF"
68163} >conf$$subs.sh ||
68164  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68165ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68166ac_delim='%!_!# '
68167for ac_last_try in false false false false false :; do
68168  . ./conf$$subs.sh ||
68169    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68170
68171  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68172  if test $ac_delim_n = $ac_delim_num; then
68173    break
68174  elif $ac_last_try; then
68175    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68176  else
68177    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68178  fi
68179done
68180rm -f conf$$subs.sh
68181
68182cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68183cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68184_ACEOF
68185sed -n '
68186h
68187s/^/S["/; s/!.*/"]=/
68188p
68189g
68190s/^[^!]*!//
68191:repl
68192t repl
68193s/'"$ac_delim"'$//
68194t delim
68195:nl
68196h
68197s/\(.\{148\}\)..*/\1/
68198t more1
68199s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68200p
68201n
68202b repl
68203:more1
68204s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68205p
68206g
68207s/.\{148\}//
68208t nl
68209:delim
68210h
68211s/\(.\{148\}\)..*/\1/
68212t more2
68213s/["\\]/\\&/g; s/^/"/; s/$/"/
68214p
68215b
68216:more2
68217s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68218p
68219g
68220s/.\{148\}//
68221t delim
68222' <conf$$subs.awk | sed '
68223/^[^""]/{
68224  N
68225  s/\n//
68226}
68227' >>$CONFIG_STATUS || ac_write_fail=1
68228rm -f conf$$subs.awk
68229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68230_ACAWK
68231cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68232  for (key in S) S_is_set[key] = 1
68233  FS = ""
68234
68235}
68236{
68237  line = $ 0
68238  nfields = split(line, field, "@")
68239  substed = 0
68240  len = length(field[1])
68241  for (i = 2; i < nfields; i++) {
68242    key = field[i]
68243    keylen = length(key)
68244    if (S_is_set[key]) {
68245      value = S[key]
68246      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68247      len += length(value) + length(field[++i])
68248      substed = 1
68249    } else
68250      len += 1 + keylen
68251  }
68252
68253  print line
68254}
68255
68256_ACAWK
68257_ACEOF
68258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68259if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68260  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68261else
68262  cat
68263fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68264  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68265_ACEOF
68266
68267# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68268# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68269# trailing colons and then remove the whole line if VPATH becomes empty
68270# (actually we leave an empty line to preserve line numbers).
68271if test "x$srcdir" = x.; then
68272  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68273h
68274s///
68275s/^/:/
68276s/[	 ]*$/:/
68277s/:\$(srcdir):/:/g
68278s/:\${srcdir}:/:/g
68279s/:@srcdir@:/:/g
68280s/^:*//
68281s/:*$//
68282x
68283s/\(=[	 ]*\).*/\1/
68284G
68285s/\n//
68286s/^[^=]*=[	 ]*$//
68287}'
68288fi
68289
68290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68291fi # test -n "$CONFIG_FILES"
68292
68293
68294eval set X "  :F $CONFIG_FILES      "
68295shift
68296for ac_tag
68297do
68298  case $ac_tag in
68299  :[FHLC]) ac_mode=$ac_tag; continue;;
68300  esac
68301  case $ac_mode$ac_tag in
68302  :[FHL]*:*);;
68303  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68304  :[FH]-) ac_tag=-:-;;
68305  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68306  esac
68307  ac_save_IFS=$IFS
68308  IFS=:
68309  set x $ac_tag
68310  IFS=$ac_save_IFS
68311  shift
68312  ac_file=$1
68313  shift
68314
68315  case $ac_mode in
68316  :L) ac_source=$1;;
68317  :[FH])
68318    ac_file_inputs=
68319    for ac_f
68320    do
68321      case $ac_f in
68322      -) ac_f="$ac_tmp/stdin";;
68323      *) # Look for the file first in the build tree, then in the source tree
68324	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68325	 # because $ac_f cannot contain `:'.
68326	 test -f "$ac_f" ||
68327	   case $ac_f in
68328	   [\\/$]*) false;;
68329	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68330	   esac ||
68331	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68332      esac
68333      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68334      as_fn_append ac_file_inputs " '$ac_f'"
68335    done
68336
68337    # Let's still pretend it is `configure' which instantiates (i.e., don't
68338    # use $as_me), people would be surprised to read:
68339    #    /* config.h.  Generated by config.status.  */
68340    configure_input='Generated from '`
68341	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68342	`' by configure.'
68343    if test x"$ac_file" != x-; then
68344      configure_input="$ac_file.  $configure_input"
68345      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68346$as_echo "$as_me: creating $ac_file" >&6;}
68347    fi
68348    # Neutralize special characters interpreted by sed in replacement strings.
68349    case $configure_input in #(
68350    *\&* | *\|* | *\\* )
68351       ac_sed_conf_input=`$as_echo "$configure_input" |
68352       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68353    *) ac_sed_conf_input=$configure_input;;
68354    esac
68355
68356    case $ac_tag in
68357    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68358      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68359    esac
68360    ;;
68361  esac
68362
68363  ac_dir=`$as_dirname -- "$ac_file" ||
68364$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68365	 X"$ac_file" : 'X\(//\)[^/]' \| \
68366	 X"$ac_file" : 'X\(//\)$' \| \
68367	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68368$as_echo X"$ac_file" |
68369    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68370	    s//\1/
68371	    q
68372	  }
68373	  /^X\(\/\/\)[^/].*/{
68374	    s//\1/
68375	    q
68376	  }
68377	  /^X\(\/\/\)$/{
68378	    s//\1/
68379	    q
68380	  }
68381	  /^X\(\/\).*/{
68382	    s//\1/
68383	    q
68384	  }
68385	  s/.*/./; q'`
68386  as_dir="$ac_dir"; as_fn_mkdir_p
68387  ac_builddir=.
68388
68389case "$ac_dir" in
68390.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68391*)
68392  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68393  # A ".." for each directory in $ac_dir_suffix.
68394  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68395  case $ac_top_builddir_sub in
68396  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68397  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68398  esac ;;
68399esac
68400ac_abs_top_builddir=$ac_pwd
68401ac_abs_builddir=$ac_pwd$ac_dir_suffix
68402# for backward compatibility:
68403ac_top_builddir=$ac_top_build_prefix
68404
68405case $srcdir in
68406  .)  # We are building in place.
68407    ac_srcdir=.
68408    ac_top_srcdir=$ac_top_builddir_sub
68409    ac_abs_top_srcdir=$ac_pwd ;;
68410  [\\/]* | ?:[\\/]* )  # Absolute name.
68411    ac_srcdir=$srcdir$ac_dir_suffix;
68412    ac_top_srcdir=$srcdir
68413    ac_abs_top_srcdir=$srcdir ;;
68414  *) # Relative name.
68415    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68416    ac_top_srcdir=$ac_top_build_prefix$srcdir
68417    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68418esac
68419ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68420
68421
68422  case $ac_mode in
68423  :F)
68424  #
68425  # CONFIG_FILE
68426  #
68427
68428_ACEOF
68429
68430cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68431# If the template does not know about datarootdir, expand it.
68432# FIXME: This hack should be removed a few years after 2.60.
68433ac_datarootdir_hack=; ac_datarootdir_seen=
68434ac_sed_dataroot='
68435/datarootdir/ {
68436  p
68437  q
68438}
68439/@datadir@/p
68440/@docdir@/p
68441/@infodir@/p
68442/@localedir@/p
68443/@mandir@/p'
68444case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68445*datarootdir*) ac_datarootdir_seen=yes;;
68446*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68447  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68448$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68449_ACEOF
68450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68451  ac_datarootdir_hack='
68452  s&@datadir@&$datadir&g
68453  s&@docdir@&$docdir&g
68454  s&@infodir@&$infodir&g
68455  s&@localedir@&$localedir&g
68456  s&@mandir@&$mandir&g
68457  s&\\\${datarootdir}&$datarootdir&g' ;;
68458esac
68459_ACEOF
68460
68461# Neutralize VPATH when `$srcdir' = `.'.
68462# Shell code in configure.ac might set extrasub.
68463# FIXME: do we really want to maintain this feature?
68464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68465ac_sed_extra="$ac_vpsub
68466$extrasub
68467_ACEOF
68468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68469:t
68470/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68471s|@configure_input@|$ac_sed_conf_input|;t t
68472s&@top_builddir@&$ac_top_builddir_sub&;t t
68473s&@top_build_prefix@&$ac_top_build_prefix&;t t
68474s&@srcdir@&$ac_srcdir&;t t
68475s&@abs_srcdir@&$ac_abs_srcdir&;t t
68476s&@top_srcdir@&$ac_top_srcdir&;t t
68477s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68478s&@builddir@&$ac_builddir&;t t
68479s&@abs_builddir@&$ac_abs_builddir&;t t
68480s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68481$ac_datarootdir_hack
68482"
68483eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68484  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68485
68486test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68487  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68488  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68489      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68490  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68491which seems to be undefined.  Please make sure it is defined" >&5
68492$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68493which seems to be undefined.  Please make sure it is defined" >&2;}
68494
68495  rm -f "$ac_tmp/stdin"
68496  case $ac_file in
68497  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68498  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68499  esac \
68500  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68501 ;;
68502
68503
68504
68505  esac
68506
68507done # for ac_tag
68508
68509
68510as_fn_exit 0
68511_ACEOF
68512ac_clean_files=$ac_clean_files_save
68513
68514test $ac_write_fail = 0 ||
68515  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68516
68517
68518# configure is writing to config.log, and then calls config.status.
68519# config.status does its own redirection, appending to config.log.
68520# Unfortunately, on DOS this fails, as config.log is still kept open
68521# by configure, so config.status won't be able to write to it; its
68522# output is simply discarded.  So we exec the FD to /dev/null,
68523# effectively closing config.log, so it can be properly (re)opened and
68524# appended to by config.status.  When coming back to configure, we
68525# need to make the FD available again.
68526if test "$no_create" != yes; then
68527  ac_cs_success=:
68528  ac_config_status_args=
68529  test "$silent" = yes &&
68530    ac_config_status_args="$ac_config_status_args --quiet"
68531  exec 5>/dev/null
68532  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68533  exec 5>>config.log
68534  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68535  # would make configure fail if this is the last instruction.
68536  $ac_cs_success || as_fn_exit 1
68537fi
68538if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68539  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68540$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68541fi
68542
68543
68544# After AC_OUTPUT, we need to do final work
68545
68546
68547  # Try to move config.log (generated by autoconf) to the configure-support directory.
68548  if test -e ./config.log; then
68549    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68550  fi
68551
68552  # Rotate our log file (configure.log)
68553  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68554    $RM -f "$OUTPUT_ROOT/configure.log.old"
68555  fi
68556  if test -e "$OUTPUT_ROOT/configure.log"; then
68557    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68558  fi
68559
68560  # Move configure.log from current directory to the build output root
68561  if test -e ./configure.log; then
68562    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68563  fi
68564
68565  # Make the compare script executable
68566  $CHMOD +x $OUTPUT_ROOT/compare.sh
68567
68568
68569# Finally output some useful information to the user
68570
68571  # Finally output some useful information to the user
68572
68573  printf "\n"
68574  printf "====================================================\n"
68575  if test "x$no_create" != "xyes"; then
68576    if test "x$IS_RECONFIGURE" != "xyes"; then
68577      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68578    else
68579      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68580    fi
68581  else
68582    if test "x$IS_RECONFIGURE" != "xyes"; then
68583      printf "A configuration has been successfully checked but not created\n"
68584    else
68585      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68586    fi
68587  fi
68588  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68589    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68590  else
68591    printf "using default settings.\n"
68592  fi
68593
68594  printf "\n"
68595  printf "Configuration summary:\n"
68596  printf "* Debug level:    $DEBUG_LEVEL\n"
68597  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68598  printf "* JDK variant:    $JDK_VARIANT\n"
68599  printf "* JVM variants:   $JVM_VARIANTS\n"
68600  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68601  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68602
68603  printf "\n"
68604  printf "Tools summary:\n"
68605  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68606    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68607  fi
68608  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68609  if test "x$TOOLCHAIN_VERSION" != "x"; then
68610    print_version=" $TOOLCHAIN_VERSION"
68611  fi
68612  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68613  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68614  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68615
68616  printf "\n"
68617  printf "Build performance summary:\n"
68618  printf "* Cores to use:   $JOBS\n"
68619  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68620  if test "x$CCACHE_STATUS" != "x"; then
68621    printf "* ccache status:  $CCACHE_STATUS\n"
68622  fi
68623  printf "\n"
68624
68625  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68626    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68627    printf "will result in longer build times.\n"
68628    printf "\n"
68629  fi
68630
68631  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68632    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68633    printf "These are not respected, and will be ignored. It is recommended\n"
68634    printf "that you clean your environment. The following variables are set:\n"
68635    printf "$FOUND_ALT_VARIABLES\n"
68636    printf "\n"
68637  fi
68638
68639  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68640    printf "WARNING: Your build output directory is not on a local disk.\n"
68641    printf "This will severely degrade build performance!\n"
68642    printf "It is recommended that you create an output directory on a local disk,\n"
68643    printf "and run the configure script again from that directory.\n"
68644    printf "\n"
68645  fi
68646
68647  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68648    printf "WARNING: The result of this configuration has overridden an older\n"
68649    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68650    printf "proper build. Failure to do so might result in strange build problems.\n"
68651    printf "\n"
68652  fi
68653
68654  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68655    printf "WARNING: The result of this configuration was not saved.\n"
68656    printf "You should run without '--no-create | -n' to create the configuration.\n"
68657    printf "\n"
68658  fi
68659
68660
68661
68662  # Locate config.log.
68663  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68664    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68665  elif test -e "./config.log"; then
68666    CONFIG_LOG_PATH="."
68667  fi
68668
68669  if test -e "$CONFIG_LOG_PATH/config.log"; then
68670    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68671    if test $? -eq 0; then
68672      printf "The following warnings were produced. Repeated here for convenience:\n"
68673      # We must quote sed expression (using []) to stop m4 from eating the [].
68674      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68675      printf "\n"
68676    fi
68677  fi
68678
68679